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

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

Issue 788053007: Styling tweaks for preferences (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restrict padding manipulation to L+ Created 5 years, 11 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
« no previous file with comments | « chrome/android/java/res/values/dimens.xml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/Preferences.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Preferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/Preferences.java
index 3d021d68d495bcf9114789ea5a35987e3c2d8442..f6b0647be4caee3cc3f57a2044b43754f475fc29 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Preferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/Preferences.java
@@ -11,6 +11,7 @@ import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Resources;
import android.graphics.BitmapFactory;
import android.nfc.NfcAdapter;
+import android.os.Build;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceFragment;
@@ -145,6 +146,18 @@ public abstract class Preferences extends ActionBarActivity implements
}
@Override
+ public void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ Fragment fragment = getFragmentManager().findFragmentById(android.R.id.content);
+ if (fragment instanceof PreferenceFragment && fragment.getView() != null) {
+ // Set list view padding to 0 so dividers are the full width of the screen.
+ fragment.getView().findViewById(android.R.id.list).setPadding(0, 0, 0, 0);
+ }
+ }
+ }
+
+ @Override
protected void onResume() {
super.onResume();
« no previous file with comments | « chrome/android/java/res/values/dimens.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698