[DO NOT MERGE] Resolver/Chooser - Fix 'no apps available' inset
When zero apps match a filter, the empty view is set to visible and shown. There is harm in making sure the inset always get applied to the empty view so that when resolver determines it needs to be visible, it is set to be shown. Test: atest ResolverActivityTest, ChooserActivityTest Bug: 146133961 Change-Id: I7412df84f8f482219635ccd73dff8e4a21355a18
This commit is contained in:
@@ -414,13 +414,13 @@ public class ResolverActivity extends Activity {
|
||||
mFooterSpacer.setLayoutParams(new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT,
|
||||
mSystemWindowInsets.bottom));
|
||||
((ListView) mAdapterView).addFooterView(mFooterSpacer);
|
||||
} else {
|
||||
View emptyView = findViewById(R.id.empty);
|
||||
if (emptyView != null) {
|
||||
emptyView.setPadding(0, 0, 0, mSystemWindowInsets.bottom
|
||||
+ getResources().getDimensionPixelSize(
|
||||
R.dimen.chooser_edge_margin_normal) * 2);
|
||||
}
|
||||
}
|
||||
|
||||
View emptyView = findViewById(R.id.empty);
|
||||
if (emptyView != null) {
|
||||
emptyView.setPadding(0, 0, 0, mSystemWindowInsets.bottom
|
||||
+ getResources().getDimensionPixelSize(
|
||||
R.dimen.chooser_edge_margin_normal) * 2);
|
||||
}
|
||||
|
||||
return insets.consumeSystemWindowInsets();
|
||||
|
||||
Reference in New Issue
Block a user