diff options
author | John Reck <jreck@google.com> | 2011-09-26 09:25:43 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2011-09-26 15:54:21 -0700 |
commit | 95f88e4825f6330938bd589ed39f1537469338e4 (patch) | |
tree | 4e2c0d8c18da8060847803ea6cc75dfcc228dcbc /src/com/android/browser/BreadCrumbView.java | |
parent | ce16fbf9f9e7afdc02f696fbdccc4f54bf09a8da (diff) | |
download | packages_apps_Browser-95f88e4825f6330938bd589ed39f1537469338e4.zip packages_apps_Browser-95f88e4825f6330938bd589ed39f1537469338e4.tar.gz packages_apps_Browser-95f88e4825f6330938bd589ed39f1537469338e4.tar.bz2 |
Update add bookmark dialog
Bug: 5362468
Don't put listviews inside scrollviews
Update the buttons to fancy style
Cleanup padding and sizes
Change-Id: I6b255a194a150b9efb01157475815e654df8231c
Diffstat (limited to 'src/com/android/browser/BreadCrumbView.java')
-rw-r--r-- | src/com/android/browser/BreadCrumbView.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/com/android/browser/BreadCrumbView.java b/src/com/android/browser/BreadCrumbView.java index 6706deb..aa77744 100644 --- a/src/com/android/browser/BreadCrumbView.java +++ b/src/com/android/browser/BreadCrumbView.java @@ -40,6 +40,7 @@ import java.util.List; */ public class BreadCrumbView extends LinearLayout implements OnClickListener { private static final int DIVIDER_PADDING = 12; // dips + private static final int CRUMB_PADDING = 8; // dips public interface Controller { public void onTop(BreadCrumbView view, int level, Object data); @@ -53,6 +54,7 @@ public class BreadCrumbView extends LinearLayout implements OnClickListener { private float mDividerPadding; private int mMaxVisible = -1; private Context mContext; + private int mCrumbPadding; /** * @param context @@ -89,7 +91,9 @@ public class BreadCrumbView extends LinearLayout implements OnClickListener { TypedArray a = mContext.obtainStyledAttributes(com.android.internal.R.styleable.Theme); mSeparatorDrawable = a.getDrawable(com.android.internal.R.styleable.Theme_dividerVertical); a.recycle(); - mDividerPadding = DIVIDER_PADDING * mContext.getResources().getDisplayMetrics().density; + float density = mContext.getResources().getDisplayMetrics().density; + mDividerPadding = DIVIDER_PADDING * density; + mCrumbPadding = (int) (CRUMB_PADDING * density); addBackButton(); } @@ -359,14 +363,12 @@ public class BreadCrumbView extends LinearLayout implements OnClickListener { private TextView makeCrumbView(String name) { TextView tv = new TextView(mContext); tv.setTextAppearance(mContext, android.R.style.TextAppearance_Medium); - tv.setPadding(16, 0, 16, 0); + tv.setPadding(mCrumbPadding, 0, mCrumbPadding, 0); tv.setGravity(Gravity.CENTER_VERTICAL); tv.setText(name); tv.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT)); - tv.setMaxWidth(mContext.getResources().getInteger( - R.integer.max_width_crumb)); - tv.setMaxLines(1); + tv.setSingleLine(); tv.setEllipsize(TextUtils.TruncateAt.END); return tv; } |