1
0
Fork 0

added v-shaped numpad layout

This commit is contained in:
sspanak 2025-02-02 15:20:56 +02:00 committed by Dimo Karaivanov
parent 4303e03448
commit e6950c370c
29 changed files with 228 additions and 82 deletions

View file

@ -28,22 +28,25 @@ public class AppearanceScreen extends BaseScreenFragment {
ItemAlignment alignment = new ItemAlignment(findPreference(ItemAlignment.NAME), activity.getSettings());
ItemNumpadKeyHeight numpadKeyHeight = new ItemNumpadKeyHeight(findPreference(ItemNumpadKeyHeight.NAME), activity.getSettings());
ItemWidth keyboardWidth = new ItemWidth(findPreference(ItemWidth.NAME), activity.getSettings());
ItemNumpadShape numpadShape = new ItemNumpadShape(findPreference(ItemNumpadShape.NAME), activity.getSettings());
ItemDropDown[] items = {
new ItemSelectTheme(findPreference(ItemSelectTheme.NAME), activity),
new ItemSelectLayoutType(
findPreference(ItemSelectLayoutType.NAME),
activity,
(layout) -> {
(layout) -> { // on layout change
numpadKeyHeight.onLayoutChange(layout);
alignment.onLayoutChange(layout);
keyboardWidth.onLayoutChange(layout);
numpadShape.onLayoutChange(layout);
}
),
new ItemSelectSettingsFontSize(findPreference(ItemSelectSettingsFontSize.NAME), this),
numpadKeyHeight,
alignment,
keyboardWidth
keyboardWidth,
numpadShape
};
for (ItemDropDown item : items) {

View file

@ -1,7 +1,6 @@
package io.github.sspanak.tt9.preferences.screens.appearance;
import android.content.Context;
import android.os.Build;
import android.view.Gravity;
import androidx.preference.DropDownPreference;
@ -30,18 +29,13 @@ public class ItemAlignment extends ItemDropDown {
Context context = item.getContext();
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
item.setVisible(false);
return this;
}
LinkedHashMap<Integer, String> options = new LinkedHashMap<>();
options.put(Gravity.START, context.getString(R.string.virtual_numpad_alignment_left));
options.put(Gravity.CENTER_HORIZONTAL, context.getString(R.string.virtual_numpad_alignment_center));
options.put(Gravity.END, context.getString(R.string.virtual_numpad_alignment_right));
super.populateIntegers(options);
super.setValue(settings.getAlignment() + "");
super.setValue(String.valueOf(settings.getAlignment()));
onLayoutChange(settings.getMainViewLayout());
return this;
@ -49,7 +43,8 @@ public class ItemAlignment extends ItemDropDown {
void onLayoutChange(int mainViewLayout) {
if (item != null) {
item.setEnabled(mainViewLayout != SettingsStore.LAYOUT_STEALTH);
item.setVisible(mainViewLayout != SettingsStore.LAYOUT_STEALTH);
item.setIconSpaceReserved(false);
}
}
}

View file

@ -43,7 +43,8 @@ public class ItemNumpadKeyHeight extends ItemDropDown {
void onLayoutChange(int mainViewLayout) {
if (item != null) {
item.setEnabled(mainViewLayout == SettingsStore.LAYOUT_NUMPAD);
item.setVisible(mainViewLayout == SettingsStore.LAYOUT_NUMPAD);
item.setIconSpaceReserved(false);
}
}
}

View file

@ -0,0 +1,49 @@
package io.github.sspanak.tt9.preferences.screens.appearance;
import android.content.Context;
import androidx.preference.DropDownPreference;
import java.util.LinkedHashMap;
import io.github.sspanak.tt9.R;
import io.github.sspanak.tt9.preferences.items.ItemDropDown;
import io.github.sspanak.tt9.preferences.settings.SettingsStore;
public class ItemNumpadShape extends ItemDropDown {
static final String NAME = "pref_numpad_shape";
private final SettingsStore settings;
public ItemNumpadShape(DropDownPreference item, SettingsStore settings) {
super(item);
this.settings = settings;
}
@Override
public ItemDropDown populate() {
if (item == null) {
return this;
}
Context context = item.getContext();
LinkedHashMap<Integer, String> options = new LinkedHashMap<>();
options.put(SettingsStore.NUMPAD_SHAPE_SQUARE, context.getString(R.string.pref_numpad_shape_square));
options.put(SettingsStore.NUMPAD_SHAPE_V, context.getString(R.string.pref_numpad_shape_v));
options.put(SettingsStore.NUMPAD_SHAPE_LONG_SPACE, context.getString(R.string.pref_numpad_shape_long_space));
super.populateIntegers(options);
super.setValue(String.valueOf(settings.getNumpadShape()));
onLayoutChange(settings.getMainViewLayout());
return this;
}
void onLayoutChange(int mainViewLayout) {
if (item != null) {
item.setVisible(mainViewLayout == SettingsStore.LAYOUT_NUMPAD);
item.setIconSpaceReserved(false);
}
}
}

View file

@ -24,13 +24,15 @@ public class SettingsStore extends SettingsUI {
public final static byte SLOW_QUERY_TIME = 50; // ms
public final static int SLOW_QUERY_TIMEOUT = 3000; // ms
public final static float SOFT_KEY_AMOUNT_OF_KEY_SIZE_FOR_SWIPE = 0.5f; // 1 = full key size
public final static int SOFT_KEY_DOUBLE_CLICK_DELAY = 500; // ms
public final static int SOFT_KEY_REPEAT_DELAY = 40; // ms
public final static float SOFT_KEY_SCALE_SCREEN_COMPENSATION_NORMAL_HEIGHT = 360; // dp
public final static float SOFT_KEY_SCALE_SCREEN_COMPENSATION_NORMAL_WIDTH = 640; // dp
public final static float SOFT_KEY_SCALE_SCREEN_COMPENSATION_MAX = 1.4f;
public final static int SOFT_KEY_DOUBLE_CLICK_DELAY = 500; // ms
public final static int SOFT_KEY_REPEAT_DELAY = 40; // ms
public final static int SOFT_KEY_TITLE_MAX_CHARS = 5;
public final static int SOFT_KEY_TITLE_MAX_CHARS_INDIC = 3;
public final static float SOFT_KEY_V_SHAPE_RATIO_INNER = 1.1f;
public final static float SOFT_KEY_V_SHAPE_RATIO_OUTER = (float) Math.pow(SOFT_KEY_V_SHAPE_RATIO_INNER, 2);
public final static int SUGGESTIONS_MAX = 20;
public final static int SUGGESTIONS_MIN = 8;
public final static int SUGGESTIONS_POSITIONS_LIMIT = 100;

View file

@ -19,6 +19,10 @@ public class SettingsUI extends SettingsTyping {
public final static int LAYOUT_SMALL = 3;
public final static int LAYOUT_NUMPAD = 4;
public final static int NUMPAD_SHAPE_SQUARE = 0;
public final static int NUMPAD_SHAPE_V = 1;
public final static int NUMPAD_SHAPE_LONG_SPACE = 2;
private final int DEFAULT_LAYOUT;
private final boolean DEFAULT_STATUS_ICON;
@ -82,6 +86,23 @@ public class SettingsUI extends SettingsTyping {
return getStringifiedInt("pref_numpad_key_height", getNumpadKeyDefaultHeight());
}
public int getNumpadShape() {
return getStringifiedInt("pref_numpad_shape", NUMPAD_SHAPE_SQUARE);
}
public boolean isNumpadShapeLongSpace() { return getNumpadShape() == NUMPAD_SHAPE_LONG_SPACE; }
public boolean isNumpadShapeSquare() { return getNumpadShape() == NUMPAD_SHAPE_SQUARE; }
public boolean isNumpadShapeV() { return getNumpadShape() == NUMPAD_SHAPE_V; }
public int getSettingsFontSize() {
int defaultSize = DeviceInfo.isQinF21() || DeviceInfo.isLgX100S() ? FONT_SIZE_LARGE : FONT_SIZE_DEFAULT;
return getStringifiedInt("pref_font_size", defaultSize);
}
public int getTheme() {
return getStringifiedInt("pref_theme", AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
}
public int getDefaultWidthPercent() {
if (!DeviceInfo.isLandscapeOrientation(context)) {
return 100;
@ -107,15 +128,6 @@ public class SettingsUI extends SettingsTyping {
return getStringifiedInt("pref_numpad_width", getDefaultWidthPercent());
}
public int getSettingsFontSize() {
int defaultSize = DeviceInfo.isQinF21() || DeviceInfo.isLgX100S() ? FONT_SIZE_LARGE : FONT_SIZE_DEFAULT;
return getStringifiedInt("pref_font_size", defaultSize);
}
public int getTheme() {
return getStringifiedInt("pref_theme", AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
}
public void setMainViewLayout(int layout) {
if (layout != LAYOUT_STEALTH && layout != LAYOUT_TRAY && layout != LAYOUT_SMALL && layout != LAYOUT_NUMPAD) {
Logger.w(getClass().getSimpleName(), "Ignoring invalid main view layout: " + layout);

View file

@ -2,9 +2,7 @@ package io.github.sspanak.tt9.ui.main;
import android.content.res.Resources;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import androidx.annotation.NonNull;
@ -13,8 +11,8 @@ import java.util.ArrayList;
import io.github.sspanak.tt9.R;
import io.github.sspanak.tt9.hacks.DeviceInfo;
import io.github.sspanak.tt9.ime.TraditionalT9;
import io.github.sspanak.tt9.preferences.settings.SettingsStore;
import io.github.sspanak.tt9.ui.main.keys.SoftKey;
import io.github.sspanak.tt9.ui.main.keys.SoftKeyArrow;
import io.github.sspanak.tt9.ui.main.keys.SoftKeySettings;
class MainLayoutNumpad extends BaseMainLayout {
@ -101,7 +99,7 @@ class MainLayoutNumpad extends BaseMainLayout {
* be adjusted so that the entire Main View would take up around 50% of the screen in landscape mode
* and 75% in portrait mode. Returns the adjusted height of a single key.
*/
private int getKeyHeightCompat() {
private int calculateKeyHeight() {
int keyHeight = tt9.getSettings().getNumpadKeyHeight();
int screenHeight = DeviceInfo.getScreenHeight(tt9.getApplicationContext());
@ -115,46 +113,33 @@ class MainLayoutNumpad extends BaseMainLayout {
}
void setKeyHeight(int height) {
private void setKeyHeight(int height) {
if (view == null || height <= 0) {
return;
}
for (SoftKey key : getKeys()) {
if ((key instanceof SoftKeyArrow)) {
continue;
}
// adjust the key height
ViewGroup.LayoutParams layout = key.getLayoutParams();
if (layout != null) {
layout.height = height;
key.setLayoutParams(layout);
}
// adjust the overlay height (if it exists)
ViewParent parent = key.getParent();
if (!(parent instanceof RelativeLayout)) {
continue;
}
layout = ((RelativeLayout) parent).getLayoutParams();
if (layout != null) {
layout.height = height;
((RelativeLayout) parent).setLayoutParams(layout);
}
key.setHeight(height);
}
}
private int getKeyColumnHeight() {
int keyHeight = calculateKeyHeight();
int lastKeyHeight = tt9.getSettings().isNumpadShapeV() ? Math.round(keyHeight * SettingsStore.SOFT_KEY_V_SHAPE_RATIO_OUTER) : keyHeight;
return keyHeight * 3 + lastKeyHeight;
}
int getHeight(boolean forceRecalculate) {
if (height <= 0 || forceRecalculate) {
Resources resources = tt9.getResources();
height =
+ Math.round(resources.getDimension(R.dimen.numpad_status_bar_spacing_top))
+ resources.getDimensionPixelSize(R.dimen.numpad_status_bar_spacing_bottom)
+ resources.getDimensionPixelSize(R.dimen.numpad_suggestion_height)
+ getKeyHeightCompat() * 4
+ getKeyColumnHeight()
+ Math.round(resources.getDimension(R.dimen.numpad_keys_spacing_bottom));
}
@ -177,7 +162,7 @@ class MainLayoutNumpad extends BaseMainLayout {
@NonNull
@Override
protected ArrayList<SoftKey> getKeys() {
if (!keys.isEmpty()) {
if (!keys.isEmpty() || view == null) {
return keys;
}
@ -219,6 +204,8 @@ class MainLayoutNumpad extends BaseMainLayout {
keys.add(table.findViewById(R.id.soft_key_107));
keys.add(table.findViewById(R.id.soft_key_108));
keys.add(table.findViewById(R.id.soft_key_109));
keys.add(table.findViewById(R.id.soft_key_punctuation_101));
keys.add(table.findViewById(R.id.soft_key_punctuation_102));
keys.addAll(getKeysFromContainer(view.findViewById(R.id.status_bar_container)));
@ -229,9 +216,9 @@ class MainLayoutNumpad extends BaseMainLayout {
@Override
void render() {
getView();
setKeyHeight(getKeyHeightCompat());
setWidth(tt9.getSettings().getWidthPercent(), tt9.getSettings().getAlignment());
enableClickHandlers();
setKeyHeight(calculateKeyHeight());
setWidth(tt9.getSettings().getWidthPercent(), tt9.getSettings().getAlignment());
for (SoftKey key : getKeys()) {
key.render();
}

View file

@ -6,6 +6,7 @@ import android.text.SpannableString;
import android.text.style.RelativeSizeSpan;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.RelativeLayout;
import android.widget.TextView;
@ -74,6 +75,29 @@ public class SoftKey extends BaseClickableKey {
}
public void setHeight(int height) {
if (height <= 0) {
return;
}
// adjust the key height
ViewGroup.LayoutParams layout = getLayoutParams();
if (layout != null) {
layout.height = height;
setLayoutParams(layout);
}
// adjust the overlay height (if it exists)
getOverlayWrapper();
layout = overlay != null ? overlay.getLayoutParams() : null;
if (layout != null) {
layout.height = height;
overlay.setLayoutParams(layout);
}
}
/**
* getTitle
* Generates the name of the key, for example: "OK", "Backspace", "1", etc...

View file

@ -13,6 +13,8 @@ public class SoftKeyArrow extends SoftKey {
public SoftKeyArrow(Context context, AttributeSet attrs) { super(context, attrs); }
public SoftKeyArrow(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); }
@Override public void setHeight(int height) {}
@Override
protected boolean handlePress() {
hold = false;

View file

@ -5,6 +5,7 @@ import android.util.AttributeSet;
import android.view.Gravity;
import io.github.sspanak.tt9.R;
import io.github.sspanak.tt9.preferences.settings.SettingsStore;
import io.github.sspanak.tt9.ui.Vibration;
public class SoftKeyLF4 extends BaseSwipeableKey {
@ -72,6 +73,15 @@ public class SoftKeyLF4 extends BaseSwipeableKey {
return tt9 != null && !tt9.isInputModeNumeric();
}
@Override
public void setHeight(int height) {
if (tt9 != null && tt9.getSettings().isMainLayoutNumpad() && tt9.getSettings().isNumpadShapeV()) {
height = Math.round(height * SettingsStore.SOFT_KEY_V_SHAPE_RATIO_OUTER);
}
super.setHeight(height);
}
@Override
public void render() {
if (tt9 != null && tt9.isInputModeNumeric()) {

View file

@ -4,6 +4,8 @@ import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import io.github.sspanak.tt9.preferences.settings.SettingsStore;
public class SoftKeyOk extends SoftKey {
public SoftKeyOk(Context context) { super(context); }
public SoftKeyOk(Context context, AttributeSet attrs) { super(context, attrs); }
@ -26,6 +28,15 @@ public class SoftKeyOk extends SoftKey {
return false;
}
@Override
public void setHeight(int height) {
if (tt9 != null && tt9.getSettings().isMainLayoutNumpad() && tt9.getSettings().isNumpadShapeV()) {
height = Math.round(height * SettingsStore.SOFT_KEY_V_SHAPE_RATIO_OUTER);
}
super.setHeight(height);
}
@Override
public void render() {
if (tt9 != null) {

View file

@ -5,34 +5,26 @@ import android.util.AttributeSet;
import io.github.sspanak.tt9.R;
import io.github.sspanak.tt9.languages.LanguageKind;
import io.github.sspanak.tt9.preferences.settings.SettingsStore;
import io.github.sspanak.tt9.util.chars.Characters;
public class SoftKeyPunctuation extends SoftKey {
public SoftKeyPunctuation(Context context) {
super(context);
}
public SoftKeyPunctuation(Context context, AttributeSet attrs) {
super(context, attrs);
}
public SoftKeyPunctuation(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
public SoftKeyPunctuation(Context context) { super(context); }
public SoftKeyPunctuation(Context context, AttributeSet attrs) { super(context, attrs); }
public SoftKeyPunctuation(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); }
@Override
protected boolean handleRelease() {
return validateTT9Handler() && tt9.onText(getKeyChar(), false);
return
tt9 != null
&& !tt9.isTextEditingActive()
&& tt9.onText(getKeyChar(), false);
}
@Override
protected String getTitle() {
String keyChar = getKeyChar();
return switch (keyChar) {
case "" -> "PUNC";
case "*" -> "";
default -> keyChar;
};
return "*".equals(keyChar) ? "" : keyChar;
}
private String getKeyChar() {
@ -66,4 +58,13 @@ public class SoftKeyPunctuation extends SoftKey {
return "?";
}
@Override
public void setHeight(int height) {
if (tt9 != null && tt9.getSettings().isMainLayoutNumpad() && tt9.getSettings().isNumpadShapeV()) {
height = Math.round(height * SettingsStore.SOFT_KEY_V_SHAPE_RATIO_INNER);
}
super.setHeight(height);
}
}

View file

@ -9,12 +9,7 @@
<View style="@style/TTheme.Keyboard.TopSeparator" />
<include layout="@layout/panel_numpad_status_bar" />
<LinearLayout
android:id="@+id/main_soft_keys"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout style="@style/TTheme.Numpad.Column.Container" android:id="@+id/main_soft_keys">
<include layout="@layout/panel_numpad_left" />
<include layout="@layout/panel_numpad_digits" />
<include layout="@layout/panel_numpad_text_editing" />

View file

@ -27,7 +27,9 @@
<include layout="@layout/key_overlay_icons" />
</RelativeLayout>
<View style="@style/TTheme.Numpad.Key.Large.Placeholder" />
<io.github.sspanak.tt9.ui.main.keys.SoftKeyPunctuation
style="@style/TTheme.Numpad.Key.Large.Placeholder"
android:id="@+id/soft_key_punctuation_101" />
</LinearLayout>
@ -93,7 +95,9 @@
<include layout="@layout/key_overlay_icons" />
</RelativeLayout>
<View style="@style/TTheme.Numpad.Key.Large.Placeholder" />
<io.github.sspanak.tt9.ui.main.keys.SoftKeyPunctuation
style="@style/TTheme.Numpad.Key.Large.Placeholder"
android:id="@+id/soft_key_punctuation_102" />
</LinearLayout>
</merge>

View file

@ -191,4 +191,7 @@
<string name="punctuation_order_forbidden_char">Забранен символ:%1$s</string>
<string name="punctuation_order_forbidden_chars">Забранени символи:%1$s</string>
<string name="pref_category_geometry">Геометрия</string>
<string name="pref_numpad_shape">Форма</string>
<string name="pref_numpad_shape_square">Квадрат</string>
<string name="pref_numpad_shape_v">V-образна</string>
</resources>

View file

@ -179,4 +179,7 @@
<string name="punctuation_order_forbidden_chars">Verbotene Zeichen:%1$s</string>
<string name="function_filter_suggestions_not_available">Das Filtern ist in dieser Sprache nicht möglich.</string>
<string name="pref_category_geometry">Geometrie</string>
<string name="pref_numpad_shape">Form</string>
<string name="pref_numpad_shape_square">Quadrat</string>
<string name="pref_numpad_shape_v">V-Form</string>
</resources>

View file

@ -189,4 +189,7 @@
<string name="punctuation_order_forbidden_char">Carácter prohibido:%1$s</string>
<string name="punctuation_order_forbidden_chars">Caracteres prohibidos:%1$s</string>
<string name="pref_category_geometry">Geometría</string>
<string name="pref_numpad_shape">Forma</string>
<string name="pref_numpad_shape_square">Cuadrado</string>
<string name="pref_numpad_shape_v">Forma de V</string>
</resources>

View file

@ -187,4 +187,7 @@
<string name="punctuation_order_forbidden_char">Caractère interdit:%1$s</string>
<string name="punctuation_order_forbidden_chars">Caractères interdits:%1$s</string>
<string name="pref_category_geometry">Géométrie</string>
<string name="pref_numpad_shape">Forme</string>
<string name="pref_numpad_shape_square">Carré</string>
<string name="pref_numpad_shape_v">Forme en V</string>
</resources>

View file

@ -179,5 +179,8 @@
<string name="punctuation_order_forbidden_chars">Caratteri vietati:%1$s</string>
<string name="function_filter_suggestions_not_available">Il filtraggio non è possibile in questa lingua.</string>
<string name="pref_category_geometry">Geometria</string>
<string name="pref_numpad_shape">Forma</string>
<string name="pref_numpad_shape_square">Quadrato</string>
<string name="pref_numpad_shape_v">Forma a V</string>
</resources>

View file

@ -192,4 +192,7 @@
<string name="punctuation_order_forbidden_chars">תווים אסורים:%1$s</string>
<string name="function_filter_suggestions_not_available">לא ניתן לסנן בשפה זו.</string>
<string name="pref_category_geometry">גיאומטריה</string>
<string name="pref_numpad_shape">צורה</string>
<string name="pref_numpad_shape_square">ריבוע</string>
<string name="pref_numpad_shape_v">צורת V</string>
</resources>

View file

@ -198,4 +198,7 @@
<string name="punctuation_order_forbidden_char">Draudžiamas simbolis:%1$s</string>
<string name="punctuation_order_forbidden_chars">Draudžiami simboliai:%1$s</string>
<string name="pref_category_geometry">Geometrija</string>
<string name="pref_numpad_shape">Forma</string>
<string name="pref_numpad_shape_square">Kvadratas</string>
<string name="pref_numpad_shape_v">V formos</string>
</resources>

View file

@ -178,4 +178,7 @@
<string name="punctuation_order_forbidden_chars">Verboden tekens:%1$s</string>
<string name="function_filter_suggestions_not_available">Het filteren is niet mogelijk in deze taal.</string>
<string name="pref_category_geometry">Geometrie</string>
<string name="pref_numpad_shape">Vorm</string>
<string name="pref_numpad_shape_square">Vierkant</string>
<string name="pref_numpad_shape_v">V-vorm</string>
</resources>

View file

@ -192,4 +192,7 @@
<string name="punctuation_order_forbidden_chars">Caracteres proibidos:%1$s</string>
<string name="function_filter_suggestions_not_available">Não é possível filtrar neste idioma.</string>
<string name="pref_category_geometry">Geometria</string>
<string name="pref_numpad_shape">Forma</string>
<string name="pref_numpad_shape_square">Quadrado</string>
<string name="pref_numpad_shape_v">Forma em V</string>
</resources>

View file

@ -189,4 +189,7 @@
<string name="punctuation_order_forbidden_char">Запрещённый символ:%1$s</string>
<string name="punctuation_order_forbidden_chars">Запрещённые символы:%1$s</string>
<string name="pref_category_geometry">Геометрия</string>
<string name="pref_numpad_shape">Форма</string>
<string name="pref_numpad_shape_square">Квадрат</string>
<string name="pref_numpad_shape_v">V-образная форма</string>
</resources>

View file

@ -192,4 +192,7 @@
<string name="punctuation_order_forbidden_char">Yasaklı karakter:%1$s</string>
<string name="punctuation_order_forbidden_chars">Yasaklı karakterler:%1$s</string>
<string name="pref_category_geometry">Geometri</string>
<string name="pref_numpad_shape">Şekil</string>
<string name="pref_numpad_shape_square">Kare</string>
<string name="pref_numpad_shape_v">V-şekli</string>
</resources>

View file

@ -200,4 +200,7 @@
<string name="punctuation_order_forbidden_char">Заборонений символ:%1$s</string>
<string name="punctuation_order_forbidden_chars">Заборонені символи:%1$s</string>
<string name="pref_category_geometry">Геометрія</string>
<string name="pref_numpad_shape">Форма</string>
<string name="pref_numpad_shape_square">Квадрат</string>
<string name="pref_numpad_shape_v">V-подібна</string>
</resources>

View file

@ -83,6 +83,10 @@
<string name="pref_layout_tray">Suggestion list only</string>
<string name="pref_numpad_alignment">Alignment</string>
<string name="pref_numpad_key_height">Height</string>
<string name="pref_numpad_shape">Shape</string>
<string name="pref_numpad_shape_square">Square</string>
<string name="pref_numpad_shape_v">V-Shape</string>
<string name="pref_numpad_shape_long_space">Long Spacebar</string>
<string name="pref_numpad_width">Width</string>
<string name="pref_predict_word_pairs">Learn Word Pairs</string>
<string name="pref_predict_word_pairs_summary">Remember commonly used phrases to improve the suggestions accuracy.</string>

View file

@ -203,6 +203,13 @@
Numpad Columns
*******************************************-->
<style name="TTheme.Numpad.Column.Container" parent="">
<item name="android:gravity">bottom</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:orientation">horizontal</item>
</style>
<style name="TTheme.Numpad.Column" parent="">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">wrap_content</item>
@ -338,10 +345,9 @@
<item name="rippleColor">@color/key_ok_ripple</item>
</style>
<style name="TTheme.Numpad.Key.Large.Placeholder">
<item name="android:layout_height">@dimen/numpad_key_height</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_margin">@dimen/numpad_key_spacing</item>
<style name="TTheme.Numpad.Key.Large.Placeholder" parent="TTheme.Numpad.Key.Number">
<item name="android:textColor">@android:color/transparent</item>
<item name="android:background">@android:color/transparent</item>
</style>
</resources>

View file

@ -15,6 +15,10 @@
app:title="@string/pref_layout" />
<PreferenceCategory app:title="@string/pref_category_geometry">
<DropDownPreference
app:key="pref_numpad_shape"
app:title="@string/pref_numpad_shape" />
<DropDownPreference
app:key="pref_numpad_alignment"
app:title="@string/pref_numpad_alignment" />