mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-09 16:17:44 +00:00
get rid of warnings in SuggestionStripView
and add a comment
This commit is contained in:
parent
0a961a68db
commit
d0787201ae
2 changed files with 4 additions and 3 deletions
|
@ -6,8 +6,6 @@
|
||||||
|
|
||||||
package helium314.keyboard.latin;
|
package helium314.keyboard.latin;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Locale;
|
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
|
* Not a true dictionary. A placeholder used to indicate suggestions that don't come from any
|
||||||
* real dictionary.
|
* real dictionary.
|
||||||
*/
|
*/
|
||||||
static class PhonyDictionary extends Dictionary {
|
public static class PhonyDictionary extends Dictionary {
|
||||||
PhonyDictionary(final String type) {
|
PhonyDictionary(final String type) {
|
||||||
super(type, null);
|
super(type, null);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,7 @@ import helium314.keyboard.latin.utils.setToolbarButtonsActivatedStateOnPrefChang
|
||||||
import java.util.concurrent.atomic.AtomicBoolean
|
import java.util.concurrent.atomic.AtomicBoolean
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
|
|
||||||
|
@SuppressLint("InflateParams")
|
||||||
class SuggestionStripView(context: Context, attrs: AttributeSet?, defStyle: Int) :
|
class SuggestionStripView(context: Context, attrs: AttributeSet?, defStyle: Int) :
|
||||||
RelativeLayout(context, attrs, defStyle), View.OnClickListener, OnLongClickListener, OnSharedPreferenceChangeListener {
|
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
|
val colors = Settings.getValues().mColors
|
||||||
|
|
||||||
// expand key
|
// 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())
|
val toolbarHeight = min(toolbarExpandKey.layoutParams.height, resources.getDimension(R.dimen.config_suggestions_strip_height).toInt())
|
||||||
toolbarExpandKey.layoutParams.height = toolbarHeight
|
toolbarExpandKey.layoutParams.height = toolbarHeight
|
||||||
toolbarExpandKey.layoutParams.width = toolbarHeight // we want it square
|
toolbarExpandKey.layoutParams.width = toolbarHeight // we want it square
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue