mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-28 19:59:55 +00:00
Ignore spacer columns when calculating emoji page size (#1721)
This commit is contained in:
parent
76ebf99921
commit
9193c95c2b
2 changed files with 4 additions and 4 deletions
|
@ -112,12 +112,12 @@ final class DynamicGridKeyboard extends Keyboard {
|
|||
}
|
||||
|
||||
public int getDynamicOccupiedHeight() {
|
||||
final int row = (mGridKeys.size() - 1) / mColumnsNum + 1;
|
||||
final int row = (mGridKeys.size() - 1) / getOccupiedColumnCount() + 1;
|
||||
return row * mVerticalStep;
|
||||
}
|
||||
|
||||
public int getColumnsCount() {
|
||||
return mColumnsNum;
|
||||
public int getOccupiedColumnCount() {
|
||||
return mColumnsNum - mEmptyColumnIndices.size();
|
||||
}
|
||||
|
||||
public void addPendingKey(final Key usedKey) {
|
||||
|
|
|
@ -324,7 +324,7 @@ final class EmojiCategory {
|
|||
final DynamicGridKeyboard tempKeyboard = new DynamicGridKeyboard(mPrefs,
|
||||
mLayoutSet.getKeyboard(KeyboardId.ELEMENT_EMOJI_RECENTS),
|
||||
0, 0, ResourceUtils.getKeyboardWidth(mContext, Settings.getValues()));
|
||||
return MAX_LINE_COUNT_PER_PAGE * tempKeyboard.getColumnsCount();
|
||||
return MAX_LINE_COUNT_PER_PAGE * tempKeyboard.getOccupiedColumnCount();
|
||||
}
|
||||
|
||||
private static final Comparator<Key> EMOJI_KEY_COMPARATOR = (lhs, rhs) -> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue