Introduce Default Ime height.
Assume IME_DEFAULT_HEIGHT_DP = 300. When ime is yet to be shown but the UI is ready, then use IME_DEFAULT_HEIGHT_DP. For the 2nd time onwards save the actual ime height and use it when the keyboard is not shown yet. Bug: 285166099 Test: Manual Change-Id: I33e38cbd5c2910f4a6dc4cc83c8dc4b6d94fbcff
This commit is contained in:
1 parent
0b5cc64ec2
commit
5730f03c9f
4 files changed
+31
-9
No files matched your search
@@ -59,6 +59,7 @@ public class StatsLogManager implements ResourceBasedOverride {
|
||||
private InstanceId mInstanceId;
|
||||
|
||||
protected @Nullable ActivityContext mActivityContext = null;
|
||||
protected @Nullable Context mContext = null;
|
||||
private KeyboardStateManager mKeyboardStateManager;
|
||||
|
||||
/**
|
||||
@@ -1035,7 +1036,9 @@ public class StatsLogManager implements ResourceBasedOverride {
|
||||
*/
|
||||
public KeyboardStateManager keyboardStateManager() {
|
||||
if (mKeyboardStateManager == null) {
|
||||
mKeyboardStateManager = new KeyboardStateManager();
|
||||
mKeyboardStateManager = new KeyboardStateManager(
|
||||
mContext != null ? mContext.getResources().getDimensionPixelSize(
|
||||
R.dimen.default_ime_height) : 0);
|
||||
}
|
||||
return mKeyboardStateManager;
|
||||
}
|
||||
@@ -1071,6 +1074,7 @@ public class StatsLogManager implements ResourceBasedOverride {
|
||||
StatsLogManager manager = Overrides.getObject(StatsLogManager.class,
|
||||
context.getApplicationContext(), R.string.stats_log_manager_class);
|
||||
manager.mActivityContext = ActivityContext.lookupContextNoThrow(context);
|
||||
manager.mContext = context;
|
||||
return manager;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user