mirror of
https://github.com/Docile-Alligator/Infinity-For-Reddit.git
synced 2026-02-05 00:35:25 +00:00
Refine ime insetin CustomizeCommentFilterActivity and CustomizePostFilterActivity.
This commit is contained in:
@ -66,7 +66,8 @@
|
||||
android:exported="false"
|
||||
android:label="@string/customize_comment_filter_activity_label"
|
||||
android:parentActivityName=".activities.SettingsActivity"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:windowSoftInputMode="adjustResize" />
|
||||
<activity
|
||||
android:name=".activities.CommentFilterPreferenceActivity"
|
||||
android:exported="false"
|
||||
|
||||
@ -94,24 +94,31 @@ public class CustomizeCommentFilterActivity extends BaseActivity {
|
||||
@NonNull
|
||||
@Override
|
||||
public WindowInsetsCompat onApplyWindowInsets(@NonNull View v, @NonNull WindowInsetsCompat insets) {
|
||||
Insets allInsets = insets.getInsets(
|
||||
Insets windowInsets = insets.getInsets(
|
||||
WindowInsetsCompat.Type.systemBars()
|
||||
| WindowInsetsCompat.Type.displayCutout()
|
||||
);
|
||||
Insets imeInsets = insets.getInsets(WindowInsetsCompat.Type.ime());
|
||||
|
||||
setMargins(binding.toolbarCustomizeCommentFilterActivity,
|
||||
allInsets.left,
|
||||
allInsets.top,
|
||||
allInsets.right,
|
||||
windowInsets.left,
|
||||
windowInsets.top,
|
||||
windowInsets.right,
|
||||
BaseActivity.IGNORE_MARGIN);
|
||||
|
||||
binding.contentWrapperViewCustomizeCommentFilterActivity.setPadding(
|
||||
allInsets.left,
|
||||
windowInsets.left,
|
||||
0,
|
||||
allInsets.right,
|
||||
allInsets.bottom
|
||||
windowInsets.right,
|
||||
windowInsets.bottom
|
||||
);
|
||||
|
||||
setMargins(binding.contentWrapperViewCustomizeCommentFilterActivity,
|
||||
BaseActivity.IGNORE_MARGIN,
|
||||
BaseActivity.IGNORE_MARGIN,
|
||||
BaseActivity.IGNORE_MARGIN,
|
||||
imeInsets.bottom);
|
||||
|
||||
return WindowInsetsCompat.CONSUMED;
|
||||
}
|
||||
});
|
||||
@ -246,6 +253,7 @@ public class CustomizeCommentFilterActivity extends BaseActivity {
|
||||
|
||||
binding.excludeUsersCardViewCustomizeCommentFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor);
|
||||
binding.excludeUsersExplanationTextViewCustomizeCommentFilterActivity.setTextColor(primaryTextColor);
|
||||
binding.excludeUsersTextInputLayoutCustomizeCommentFilterActivity.setBoxStrokeColor(primaryTextColor);
|
||||
binding.excludeUsersTextInputLayoutCustomizeCommentFilterActivity.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor));
|
||||
binding.excludeUsersTextInputEditTextCustomizeCommentFilterActivity.setTextColor(primaryTextColor);
|
||||
binding.addUsersImageViewCustomizeCommentFilterActivity.setImageDrawable(Utils.getTintedDrawable(this, R.drawable.ic_add_24dp, primaryIconColor));
|
||||
|
||||
@ -99,25 +99,31 @@ public class CustomizePostFilterActivity extends BaseActivity {
|
||||
@NonNull
|
||||
@Override
|
||||
public WindowInsetsCompat onApplyWindowInsets(@NonNull View v, @NonNull WindowInsetsCompat insets) {
|
||||
Insets allInsets = insets.getInsets(
|
||||
Insets windowInsets = insets.getInsets(
|
||||
WindowInsetsCompat.Type.systemBars()
|
||||
| WindowInsetsCompat.Type.displayCutout()
|
||||
| WindowInsetsCompat.Type.ime()
|
||||
);
|
||||
Insets imeInsets = insets.getInsets(WindowInsetsCompat.Type.ime());
|
||||
|
||||
setMargins(binding.toolbarCustomizePostFilterActivity,
|
||||
allInsets.left,
|
||||
allInsets.top,
|
||||
allInsets.right,
|
||||
windowInsets.left,
|
||||
windowInsets.top,
|
||||
windowInsets.right,
|
||||
BaseActivity.IGNORE_MARGIN);
|
||||
|
||||
binding.contentWrapperViewCustomizePostFilterActivity.setPadding(
|
||||
allInsets.left,
|
||||
windowInsets.left,
|
||||
0,
|
||||
allInsets.right,
|
||||
allInsets.bottom
|
||||
windowInsets.right,
|
||||
windowInsets.bottom
|
||||
);
|
||||
|
||||
setMargins(binding.contentWrapperViewCustomizePostFilterActivity,
|
||||
BaseActivity.IGNORE_MARGIN,
|
||||
BaseActivity.IGNORE_MARGIN,
|
||||
BaseActivity.IGNORE_MARGIN,
|
||||
imeInsets.bottom);
|
||||
|
||||
return WindowInsetsCompat.CONSUMED;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user