Avoid the reset item having inconsistent alignment with the others under SuW.
Replaces the LayoutPreference with native Preference for the reset preference which is used for resettings the status of all preferences. Bug: 232528123 Test: make RunSettingsRoboTests ROBOTEST_FILTER=TextReadingResetControllerTest,TextReadingResetPreferenceTest Change-Id: I00719f13dc78039269ee373c6b35e12e7ff595ce
This commit is contained in:
@@ -27,10 +27,8 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settingslib.Utils;
|
||||
import com.android.settingslib.widget.LayoutPreference;
|
||||
|
||||
import com.google.android.setupdesign.GlifPreferenceLayout;
|
||||
import com.google.android.setupdesign.util.LayoutStyler;
|
||||
|
||||
|
||||
/**
|
||||
@@ -50,8 +48,6 @@ public class TextReadingPreferenceFragmentForSetupWizard extends TextReadingPref
|
||||
icon.setTintList(Utils.getColorAttr(getContext(), android.R.attr.colorPrimary));
|
||||
AccessibilitySetupWizardUtils.updateGlifPreferenceLayout(getContext(), layout, title,
|
||||
/* description= */ null, icon);
|
||||
|
||||
updateResetButtonPadding();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -71,14 +67,4 @@ public class TextReadingPreferenceFragmentForSetupWizard extends TextReadingPref
|
||||
// Hides help center in action bar and footer bar in SuW
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the padding of the reset button to meet for SetupWizard style.
|
||||
*/
|
||||
private void updateResetButtonPadding() {
|
||||
final LayoutPreference resetPreference = (LayoutPreference) findPreference(RESET_KEY);
|
||||
final ViewGroup parentView =
|
||||
(ViewGroup) resetPreference.findViewById(R.id.reset_button).getParent();
|
||||
LayoutStyler.applyPartnerCustomizationLayoutPaddingStyle(parentView);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user