Merge "Updates the padding of the reset button to meet for SetupWizard style." into tm-dev am: fc481ece26 am: 411bcd1c43

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18349802

Change-Id: I2a3f032e01c55be88fdac31a1d671f43edfcd438
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
PETER LIANG
2022-05-13 12:53:43 +00:00
committed by Automerger Merge Worker
2 changed files with 21 additions and 0 deletions

View File

@@ -27,8 +27,11 @@ 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;
/**
* A {@link androidx.preference.PreferenceFragmentCompat} that displays the settings page related
@@ -47,6 +50,8 @@ public class TextReadingPreferenceFragmentForSetupWizard extends TextReadingPref
icon.setTintList(Utils.getColorAttr(getContext(), android.R.attr.colorPrimary));
AccessibilitySetupWizardUtils.updateGlifPreferenceLayout(getContext(), layout, title,
/* description= */ null, icon);
updateResetButtonPadding();
}
@Override
@@ -66,4 +71,14 @@ 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);
}
}