Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tmatz committed Feb 27, 2021
2 parents 8202e12 + 7603e82 commit d76796f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,9 @@ public View onCreateInputView()
{
final View mainView = getLayoutInflater().inflate(R.layout.input_method, null);

final ViewGroup keyboardArea = mainView.findViewById(R.id.keyboard_area);
final View keyboardView = getLayoutInflater().inflate(R.layout.keyboard, keyboardArea);

final View gestureArea = mainView.findViewById(R.id.gesture_area);
final Button extendKey = mainView.findViewById(R.id.button_key);

setupMainView(mainView);
setupKeyboardView(keyboardView);
setupExtendKey(extendKey, gestureArea, keyboardArea);
setupKeyboardView(mainView);
setupExtendKey(mainView);
mInfoView.setup(mainView);

update();
Expand Down Expand Up @@ -236,8 +230,12 @@ public void onGestureEnded(GestureOverlayView overlay, MotionEvent e)
overlayNum.setOnTouchListener(onTouchCursorGestureListener);
}

private void setupExtendKey(final Button extendKey, final View unistrokeArea, final View keyboardArea)
private void setupExtendKey(final View view)
{
final View keyboardArea = view.findViewById(R.id.keyboard_area);
final View gestureArea = view.findViewById(R.id.gesture_area);
final Button extendKey = view.findViewById(R.id.button_key);

keyboardArea.setVisibility(View.INVISIBLE);

extendKey.setOnClickListener(
Expand All @@ -254,12 +252,12 @@ private void toggleKeyboadOn()
if (keyboardArea.getVisibility() == View.VISIBLE)
{
keyboardArea.setVisibility(View.INVISIBLE);
unistrokeArea.setVisibility(View.VISIBLE);
gestureArea.setVisibility(View.VISIBLE);
}
else
{
keyboardArea.setVisibility(View.VISIBLE);
unistrokeArea.setVisibility(View.INVISIBLE);
gestureArea.setVisibility(View.INVISIBLE);
}
}
});
Expand Down
5 changes: 1 addition & 4 deletions app/src/main/res/layout-sw600dp/input_method.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,7 @@

</LinearLayout>

<FrameLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:id="@+id/keyboard_area"/>
<include layout="@layout/keyboard" android:id="@+id/keyboard_area" />

</FrameLayout>

Expand Down
5 changes: 1 addition & 4 deletions app/src/main/res/layout/input_method.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,7 @@

</LinearLayout>

<FrameLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:id="@+id/keyboard_area"/>
<include layout="@layout/keyboard" android:id="@+id/keyboard_area" />

</FrameLayout>

Expand Down
Binary file modified app/src/main/res/raw/gestures_alphabet
Binary file not shown.
Binary file modified app/src/main/res/raw/gestures_special
Binary file not shown.

0 comments on commit d76796f

Please sign in to comment.