Skip to content

Commit

Permalink
minor style adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Helium314 committed Sep 1, 2024
1 parent 419995c commit d3b4a34
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import helium314.keyboard.latin.utils.ResourceUtils

internal class EmojiLayoutParams(res: Resources) {
private val emojiListBottomMargin: Int
private val emojiKeyboardHeight: Int
val emojiKeyboardHeight: Int
private val emojiCategoryPageIdViewHeight: Int
val bottomRowKeyboardHeight: Int

Expand Down Expand Up @@ -59,4 +59,4 @@ internal class EmojiLayoutParams(res: Resources) {
lp.height = emojiCategoryPageIdViewHeight
v.layoutParams = lp
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public EmojiPalettesView(final Context context, final AttributeSet attrs, final
mEmojiLayoutParams = new EmojiLayoutParams(res);
builder.setSubtype(RichInputMethodSubtype.getEmojiSubtype());
builder.setKeyboardGeometry(ResourceUtils.getKeyboardWidth(res, Settings.getInstance().getCurrent()),
mEmojiLayoutParams.getBottomRowKeyboardHeight());
mEmojiLayoutParams.getEmojiKeyboardHeight());
final KeyboardLayoutSet layoutSet = builder.build();
final TypedArray emojiPalettesViewAttr = context.obtainStyledAttributes(attrs,
R.styleable.EmojiPalettesView, defStyle, R.style.EmojiPalettesView);
Expand Down Expand Up @@ -203,14 +203,6 @@ public void onScrolled(@NonNull @NotNull RecyclerView recyclerView, int dx, int

setCurrentCategoryAndPageId(mEmojiCategory.getCurrentCategoryId(), mEmojiCategory.getCurrentCategoryPageId(), true);

// {@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
// if the event is canceled by moving off the finger from the view.
// The text on alphabet keys are set at
// {@link #startEmojiPalettes(String,int,float,Typeface)}.

mEmojiCategoryPageIndicatorView.setColors(mColors.get(ColorType.EMOJI_CATEGORY_SELECTED), mColors.get(ColorType.STRIP_BACKGROUND));
initialized = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import helium314.keyboard.keyboard.Keyboard
import helium314.keyboard.keyboard.KeyboardId
import helium314.keyboard.keyboard.internal.keyboard_parser.EmojiParser
import helium314.keyboard.keyboard.internal.keyboard_parser.KeyboardParser
import helium314.keyboard.keyboard.internal.keyboard_parser.RawKeyboardParser
import helium314.keyboard.keyboard.internal.keyboard_parser.addLocaleKeyTextsToParams
import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyCode
import helium314.keyboard.latin.R
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class KeyboardParser(private val params: KeyboardParams, private val context: Co
return keysInRows
}

fun createRows(baseKeys: MutableList<MutableList<KeyData>>): ArrayList<ArrayList<KeyParams>> {
private fun createRows(baseKeys: MutableList<MutableList<KeyData>>): ArrayList<ArrayList<KeyParams>> {
// add padding for number layouts in landscape mode (maybe do it some other way later)
if (params.mId.isNumberLayout && params.mId.mElementId != KeyboardId.ELEMENT_NUMPAD
&& context.resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/clipboard_history_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</helium314.keyboard.keyboard.clipboard.ClipboardHistoryView>
</helium314.keyboard.keyboard.clipboard.ClipboardHistoryView>

0 comments on commit d3b4a34

Please sign in to comment.