Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dslul committed Sep 10, 2020
1 parent e0cd866 commit 449749c
Show file tree
Hide file tree
Showing 41 changed files with 122 additions and 1,143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ public final class KeyboardTheme implements Comparable<KeyboardTheme> {
VERSION_CODES.BASE),
new KeyboardTheme(THEME_ID_LIGHT_BORDER, "LXXLightBorder", R.style.KeyboardTheme_LXX_Light_Border,
// This has never been selected as default theme.
Build.VERSION_CODES.LOLLIPOP),
Build.VERSION_CODES.BASE),
new KeyboardTheme(THEME_ID_DARK_BORDER, "LXXDarkBorder", R.style.KeyboardTheme_LXX_Dark_Border,
// This has never been selected as default theme.
VERSION_CODES.BASE),
VERSION_CODES.LOLLIPOP),
};

static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public final class EmojiPalettesView extends LinearLayout implements OnTabChange

private ImageButton mDeleteKey;
private TextView mAlphabetKeyLeft;
private TextView mAlphabetKeyRight;
private View mSpacebar;
// TODO: Remove this workaround.
private View mSpacebarIcon;
Expand Down Expand Up @@ -206,7 +205,7 @@ protected void onFinishInflate() {
mDeleteKey.setTag(Constants.CODE_DELETE);
mDeleteKey.setOnTouchListener(mDeleteKeyOnTouchListener);

// {@link #mAlphabetKeyLeft}, {@link #mAlphabetKeyRight, and spaceKey depend on
// {@link #mAlphabetKeyLeft} and spaceKey depend on
// {@link View.OnClickListener} as well as {@link View.OnTouchListener}.
// {@link View.OnTouchListener} is used as the trigger of key-press, while
// {@link View.OnClickListener} is used as the trigger of key-release which does not occur
Expand All @@ -218,11 +217,6 @@ protected void onFinishInflate() {
mAlphabetKeyLeft.setTag(Constants.CODE_ALPHA_FROM_EMOJI);
mAlphabetKeyLeft.setOnTouchListener(this);
mAlphabetKeyLeft.setOnClickListener(this);
mAlphabetKeyRight = findViewById(R.id.emoji_keyboard_alphabet_right);
mAlphabetKeyRight.setBackgroundResource(mFunctionalKeyBackgroundId);
mAlphabetKeyRight.setTag(Constants.CODE_ALPHA_FROM_EMOJI);
mAlphabetKeyRight.setOnTouchListener(this);
mAlphabetKeyRight.setOnClickListener(this);
mSpacebar = findViewById(R.id.emoji_keyboard_space);
mSpacebar.setBackgroundResource(mSpacebarBackgroundId);
mSpacebar.setTag(Constants.CODE_SPACE);
Expand Down Expand Up @@ -387,7 +381,6 @@ public void startEmojiPalettes(final String switchToAlphaLabel,
final KeyDrawParams params = new KeyDrawParams();
params.updateParams(mEmojiLayoutParams.getActionBarHeight(), keyVisualAttr);
setupAlphabetKey(mAlphabetKeyLeft, switchToAlphaLabel, params);
setupAlphabetKey(mAlphabetKeyRight, switchToAlphaLabel, params);
mEmojiPager.setAdapter(mEmojiPalettesAdapter);
mEmojiPager.setCurrentItem(mCurrentPagerPosition);
}
Expand Down
19 changes: 4 additions & 15 deletions app/src/main/res/layout/emoji_palettes_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,6 @@
android:visibility="gone" />
</FrameLayout>
</TabHost>
<include layout="@layout/suggestion_divider" />
<!-- TODO: Implement KeyView and replace this. -->
<!-- Provide audio and haptic feedback by ourselves based on the keyboard settings.
We just need to ignore the system's audio and haptic feedback settings. -->
<ImageButton
android:id="@+id/emoji_keyboard_delete"
android:layout_width="0dip"
android:layout_weight="12.5"
android:layout_height="match_parent"
android:hapticFeedbackEnabled="false"
android:soundEffectsEnabled="false"
android:contentDescription="@string/spoken_description_delete" />
</LinearLayout>
<androidx.viewpager.widget.ViewPager
android:id="@+id/emoji_keyboard_pager"
Expand Down Expand Up @@ -120,13 +108,14 @@
<!-- TODO: Implement KeyView and replace this. -->
<!-- Provide audio and haptic feedback by ourselves based on the keyboard settings.
We just need to ignore the system's audio and haptic feedback settings. -->
<TextView
android:id="@+id/emoji_keyboard_alphabet_right"
<ImageButton
android:id="@+id/emoji_keyboard_delete"
android:layout_width="0dip"
android:layout_weight="0.15"
android:gravity="center"
android:layout_height="match_parent"
android:hapticFeedbackEnabled="false"
android:soundEffectsEnabled="false" />
android:soundEffectsEnabled="false"
android:contentDescription="@string/spoken_description_delete" />
</LinearLayout>
</org.dslul.openboard.inputmethod.keyboard.emoji.EmojiPalettesView>
25 changes: 0 additions & 25 deletions app/src/main/res/values-v17/setup-styles.xml

This file was deleted.

41 changes: 21 additions & 20 deletions app/src/main/res/values/setup-styles.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2013, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<resources>
<style name="setupTitleStyle" parent="setupTitleStyleCommon" />
<style name="setupStepActionLabelStyle" parent="setupStepActionLabelStyleCommon" />
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="setupTitleStyle" parent="setupTitleStyleCommon">
<item name="android:layout_alignParentStart">true</item>
</style>
<style name="setupStepActionLabelStyle" parent="setupStepActionLabelStyleCommon">
<item name="android:paddingStart">12dp</item>
<item name="android:paddingEnd">24dp</item>
</style>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ mobile devices. [CHAR LIMIT=25] -->
<!-- The keyboard theme name, Holo Blue. This is marked as translatable="false" because this is a proper name of system-wide UI Theme. -->
<string name="keyboard_theme_holo_blue" translatable="false">Holo Blue</string>
<!-- The keyboard theme name, Material Dark. This is marked as translatable="false" because this is a proper name of system-wide UI Theme. -->
<string name="keyboard_theme_material_dark" translatable="false">Material Dark</string>
<string name="keyboard_theme_material_dark" translatable="false">Material Dark (AMOLED)</string>
<!-- The keyboard theme name, Material Light. This is marked as translatable="false" because this is a proper name of system-wide UI Theme. -->
<string name="keyboard_theme_material_light" translatable="false">Material Light</string>
<string name="keyboard_theme_dark_border" translatable="false">Material Dark Border</string>
Expand Down
26 changes: 0 additions & 26 deletions app/src/main/res/xml-hu-rZZ/kbd_qwerty.xml

This file was deleted.

51 changes: 0 additions & 51 deletions app/src/main/res/xml-v16/keystyle_devanagari_sign_anusvara.xml

This file was deleted.

42 changes: 0 additions & 42 deletions app/src/main/res/xml-v16/keystyle_devanagari_sign_candrabindu.xml

This file was deleted.

50 changes: 0 additions & 50 deletions app/src/main/res/xml-v16/keystyle_devanagari_sign_nukta.xml

This file was deleted.

53 changes: 0 additions & 53 deletions app/src/main/res/xml-v16/keystyle_devanagari_sign_virama.xml

This file was deleted.

Loading

0 comments on commit 449749c

Please sign in to comment.