Loading java/res/drawable/ic_ime_switch.xml 0 → 100644 +15 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- SPDX-FileCopyrightText: Material Design Authors / Google LLC SPDX-License-Identifier: Apache-2.0 --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="?android:attr/colorControlNormal" android:pathData="M17,13H13V17H11V13H7V11H11V7H13V11H17M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" /> </vector> java/res/layout/main_keyboard_frame.xml +40 −20 Original line number Diff line number Diff line Loading @@ -18,8 +18,13 @@ */ --> <LinearLayout <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" Loading @@ -43,3 +48,18 @@ android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> <ImageButton android:id="@+id/floating_button" android:layout_width="48dp" android:layout_height="48dp" android:layout_gravity="top|end" android:layout_marginTop="8dp" android:layout_marginEnd="8dp" android:background="?attr/selectableItemBackgroundBorderless" android:src="@drawable/ic_ime_switch" android:contentDescription="@string/ime_switch_button" android:focusable="true" android:clickable="true" /> </FrameLayout> java/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -579,4 +579,7 @@ Tip: You can download and remove dictionaries by going to <b>Languages & This resource is copied from packages/apps/Settings/res/values/strings.xml --> <!-- This resource is corresponding to msgid="5433275485499039199" --> <string name="user_dict_fast_scroll_alphabet">\u0020ABCDEFGHIJKLMNOPQRSTUVWXYZ</string> <!-- Speach to text --> <string name="ime_switch_button">STT</string> </resources> java/src/com/android/inputmethod/latin/LatinIME.java +12 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ import android.view.WindowManager; import android.view.inputmethod.CompletionInfo; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodSubtype; import android.widget.ImageButton; import androidx.annotation.NonNull; Loading Loading @@ -868,6 +869,17 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (hasSuggestionStripView()) { mSuggestionStripView.setListener(this, view); } ImageButton floatingButton = view.findViewById(R.id.floating_button); if (floatingButton != null) { floatingButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Log.d(TAG, "Clicked"); //launchSettings(SettingsActivity.EXTRA_ENTRY_VALUE_LONG_PRESS_COMMA); } }); } } @Override Loading Loading
java/res/drawable/ic_ime_switch.xml 0 → 100644 +15 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- SPDX-FileCopyrightText: Material Design Authors / Google LLC SPDX-License-Identifier: Apache-2.0 --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="?android:attr/colorControlNormal" android:pathData="M17,13H13V17H11V13H7V11H11V7H13V11H17M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z" /> </vector>
java/res/layout/main_keyboard_frame.xml +40 −20 Original line number Diff line number Diff line Loading @@ -18,8 +18,13 @@ */ --> <LinearLayout <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom"> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" Loading @@ -43,3 +48,18 @@ android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> <ImageButton android:id="@+id/floating_button" android:layout_width="48dp" android:layout_height="48dp" android:layout_gravity="top|end" android:layout_marginTop="8dp" android:layout_marginEnd="8dp" android:background="?attr/selectableItemBackgroundBorderless" android:src="@drawable/ic_ime_switch" android:contentDescription="@string/ime_switch_button" android:focusable="true" android:clickable="true" /> </FrameLayout>
java/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -579,4 +579,7 @@ Tip: You can download and remove dictionaries by going to <b>Languages & This resource is copied from packages/apps/Settings/res/values/strings.xml --> <!-- This resource is corresponding to msgid="5433275485499039199" --> <string name="user_dict_fast_scroll_alphabet">\u0020ABCDEFGHIJKLMNOPQRSTUVWXYZ</string> <!-- Speach to text --> <string name="ime_switch_button">STT</string> </resources>
java/src/com/android/inputmethod/latin/LatinIME.java +12 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ import android.view.WindowManager; import android.view.inputmethod.CompletionInfo; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodSubtype; import android.widget.ImageButton; import androidx.annotation.NonNull; Loading Loading @@ -868,6 +869,17 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (hasSuggestionStripView()) { mSuggestionStripView.setListener(this, view); } ImageButton floatingButton = view.findViewById(R.id.floating_button); if (floatingButton != null) { floatingButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Log.d(TAG, "Clicked"); //launchSettings(SettingsActivity.EXTRA_ENTRY_VALUE_LONG_PRESS_COMMA); } }); } } @Override Loading