get rid of warnings in SuggestionStripView

and add a comment
This commit is contained in:
Helium314 2025-06-01 19:53:56 +02:00
parent 0a961a68db
commit d0787201ae
2 changed files with 4 additions and 3 deletions

View file

@ -6,8 +6,6 @@
package helium314.keyboard.latin;
import androidx.annotation.NonNull;
import java.util.ArrayList;
import java.util.Locale;
@ -183,7 +181,7 @@ public abstract class Dictionary {
* Not a true dictionary. A placeholder used to indicate suggestions that don't come from any
* real dictionary.
*/
static class PhonyDictionary extends Dictionary {
public static class PhonyDictionary extends Dictionary {
PhonyDictionary(final String type) {
super(type, null);
}

View file

@ -60,6 +60,7 @@ import helium314.keyboard.latin.utils.setToolbarButtonsActivatedStateOnPrefChang
import java.util.concurrent.atomic.AtomicBoolean
import kotlin.math.min
@SuppressLint("InflateParams")
class SuggestionStripView(context: Context, attrs: AttributeSet?, defStyle: Int) :
RelativeLayout(context, attrs, defStyle), View.OnClickListener, OnLongClickListener, OnSharedPreferenceChangeListener {
@ -119,6 +120,8 @@ class SuggestionStripView(context: Context, attrs: AttributeSet?, defStyle: Int)
val colors = Settings.getValues().mColors
// expand key
// weird way of setting size (default is config_suggestions_strip_edge_key_width)
// but better not change it or people will complain
val toolbarHeight = min(toolbarExpandKey.layoutParams.height, resources.getDimension(R.dimen.config_suggestions_strip_height).toInt())
toolbarExpandKey.layoutParams.height = toolbarHeight
toolbarExpandKey.layoutParams.width = toolbarHeight // we want it square