Merge "Remove loading spinner from Premium SMS access" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
611db9e8be
@@ -452,6 +452,7 @@
|
||||
|
||||
<!-- Text padding for EmptyTextSettings -->
|
||||
<dimen name="empty_text_padding">24dp</dimen>
|
||||
<dimen name="empty_text_layout_height">450dp</dimen>
|
||||
|
||||
<!-- Choose SIM Activity dimens -->
|
||||
<dimen name="subtitle_bottom_padding">24dp</dimen>
|
||||
|
@@ -68,7 +68,7 @@ public class PremiumSmsAccess extends EmptyTextSettings
|
||||
@Override
|
||||
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
setLoading(true, false);
|
||||
setEmptyText(R.string.premium_sms_none);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -138,8 +138,6 @@ public class PremiumSmsAccess extends EmptyTextSettings
|
||||
|
||||
private void updatePrefs(ArrayList<AppEntry> apps) {
|
||||
if (apps == null) return;
|
||||
setEmptyText(R.string.premium_sms_none);
|
||||
setLoading(false, true);
|
||||
final PreferenceScreen screen = getPreferenceScreen();
|
||||
screen.removeAll();
|
||||
screen.setOrderingAsAdded(true);
|
||||
|
@@ -43,8 +43,10 @@ public abstract class EmptyTextSettings extends SettingsPreferenceFragment {
|
||||
TypedValue value = new TypedValue();
|
||||
getContext().getTheme().resolveAttribute(android.R.attr.textAppearanceMedium, value, true);
|
||||
mEmpty.setTextAppearance(value.resourceId);
|
||||
final int layoutHeight = getContext().getResources()
|
||||
.getDimensionPixelSize(R.dimen.empty_text_layout_height);
|
||||
((ViewGroup) view.findViewById(android.R.id.list_container)).addView(mEmpty,
|
||||
new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
|
||||
new LayoutParams(LayoutParams.MATCH_PARENT, layoutHeight));
|
||||
setEmptyView(mEmpty);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user