Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d33ca91 authored by Mill Chen's avatar Mill Chen
Browse files

Remove loading spinner from Premium SMS access

The loading spinner in the page is displayed by default, regardless of
whether or not how many apps are in the page. This change is trying to
remove the loading spinner from the page since this page doesn't have
many apps in it.

Bug: 222441974
Test: visual verify
Change-Id: I9b2b031122e6b6d521466ccf53e39185cfcab687
parent 0aa436da
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -443,6 +443,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>
+1 −3
Original line number Diff line number Diff line
@@ -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);
+3 −1
Original line number Diff line number Diff line
@@ -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);
    }