Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1583)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/ClearBrowsingDataCheckBoxPreference.java

Issue 2730703003: Change CBD layout and texts (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/ClearBrowsingDataCheckBoxPreference.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ClearBrowsingDataCheckBoxPreference.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ClearBrowsingDataCheckBoxPreference.java
index a7d360c9b24213b7462a693e6c22ca8c3b75ea6c..8736fa4f0181089143177dd18e5ab5c700943b9a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ClearBrowsingDataCheckBoxPreference.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ClearBrowsingDataCheckBoxPreference.java
@@ -31,25 +31,32 @@ public class ClearBrowsingDataCheckBoxPreference extends ChromeBaseCheckBoxPrefe
if (mView != null) return mView;
mView = (LinearLayout) super.onCreateView(parent);
+ setupLayout(mView);
+ return mView;
+ }
+
+ /**
+ * This method modifies the default CheckBoxPreference layout.
+ * @param view The view of this preference.
+ */
+ protected void setupLayout(LinearLayout view) {
// Checkboxes in the Clear Browsing Data dialog will show and hide the results of
// BrowsingDataCounter. It is important that they will not change height when doing so.
// We will therefore set a fixed height.
int height = getContext().getResources().getDimensionPixelSize(
R.dimen.clear_browsing_data_checkbox_height);
- mView.setMinimumHeight(height);
+ view.setMinimumHeight(height);
// The title and summary are enclosed in a common RelativeLayout. We must remove
// its vertical padding for it to be correctly vertically centered in the fixed-height view.
- View textLayout = (View) mView.findViewById(android.R.id.title).getParent();
+ View textLayout = (View) view.findViewById(android.R.id.title).getParent();
ApiCompatibilityUtils.setPaddingRelative(
textLayout,
ApiCompatibilityUtils.getPaddingStart(textLayout),
0,
ApiCompatibilityUtils.getPaddingEnd(textLayout),
0);
-
- return mView;
}
public void announceForAccessibility(CharSequence announcement) {

Powered by Google App Engine
This is Rietveld 408576698