File tree Expand file tree Collapse file tree
java/io/github/yawnoc/strokeinput Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ public class Key {
3939 public boolean isShiftable ;
4040 public boolean isExtendedLeft ;
4141 public boolean isExtendedRight ;
42+ public boolean isPreviewable ;
4243 public String valueText ;
4344 public String displayText ; // overrides valueText drawn
4445 public String valueTextShifted ; // overrides displayText drawn when shifted
@@ -106,6 +107,11 @@ public Key(
106107 attributesArray .getBoolean (R .styleable .Key_keyIsExtendedLeft , false );
107108 isExtendedRight =
108109 attributesArray .getBoolean (R .styleable .Key_keyIsExtendedRight , false );
110+ isPreviewable =
111+ attributesArray .getBoolean (
112+ R .styleable .Row_keysArePreviewable ,
113+ parentRow .keysArePreviewable
114+ );
109115
110116 valueText = attributesArray .getString (R .styleable .Key_keyValueText );
111117 displayText = attributesArray .getString (R .styleable .Key_keyDisplayText );
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ public class Keyboard {
6868
6969 // Key properties
7070 public boolean keysAreShiftable ;
71+ public boolean keysArePreviewable ;
7172 public int keyWidth ;
7273 public int keyHeight ;
7374 public int keyFillColour ;
@@ -208,6 +209,11 @@ private void parseKeyboardAttributes(
208209
209210 keysAreShiftable =
210211 attributesArray .getBoolean (R .styleable .Keyboard_keysAreShiftable , false );
212+ keysArePreviewable =
213+ attributesArray .getBoolean (
214+ R .styleable .Keyboard_keysArePreviewable ,
215+ true
216+ );
211217
212218 keyWidth =
213219 Valuey .getDimensionOrFraction (
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ public class Row {
4040
4141 // Key properties
4242 public final boolean keysAreShiftable ;
43+ public final boolean keysArePreviewable ;
4344 public final int keyWidth ;
4445 public final int keyHeight ;
4546 public final int keyFillColour ;
@@ -80,6 +81,11 @@ public Row(
8081 R .styleable .Row_keysAreShiftable ,
8182 parentKeyboard .keysAreShiftable
8283 );
84+ keysArePreviewable =
85+ attributesArray .getBoolean (
86+ R .styleable .Row_keysArePreviewable ,
87+ parentKeyboard .keysArePreviewable
88+ );
8389
8490 keyWidth =
8591 Valuey .getDimensionOrFraction (
Original file line number Diff line number Diff line change 33 <declare-styleable name =" Keyboard" >
44 <attr name =" keyboardFillColour" format =" color" />
55 <attr name =" keysAreShiftable" format =" boolean" />
6+ <attr name =" keysArePreviewable" format =" boolean" />
67 <attr name =" keyWidth" format =" dimension|fraction" />
78 <attr name =" keyHeight" format =" dimension|fraction" />
89 <attr name =" keyFillColour" format =" color" />
1920 <declare-styleable name =" Row" >
2021 <attr name =" rowOffsetX" format =" dimension|fraction" />
2122 <attr name =" keysAreShiftable" />
23+ <attr name =" keysArePreviewable" />
2224 <attr name =" keyWidth" />
2325 <attr name =" keyHeight" />
2426 <attr name =" keyFillColour" />
3941 <attr name =" keyIsShiftable" format =" boolean" />
4042 <attr name =" keyIsExtendedLeft" format =" boolean" />
4143 <attr name =" keyIsExtendedRight" format =" boolean" />
44+ <attr name =" keyIsPreviewable" format =" boolean" />
4245 <attr name =" keyValueText" format =" string" />
4346 <attr name =" keyDisplayText" format =" string" />
4447 <attr name =" keyValueTextShifted" format =" string" />
You can’t perform that action at this time.
0 commit comments