summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2014-03-29 15:02:29 +0800
committeremancebo <emancebo@cyngn.com>2014-09-04 10:40:20 -0700
commitb46f99cd31ecd5de4f5ff1e66709ffd0e769dbba (patch)
treec8913bcb1135052f62f219b237b546330a4ca068
parent1f40c218c2befe1faa77c85b48ef62e93d72a039 (diff)
downloadandroid_packages_apps_Gallery2-b46f99cd31ecd5de4f5ff1e66709ffd0e769dbba.tar.gz
android_packages_apps_Gallery2-b46f99cd31ecd5de4f5ff1e66709ffd0e769dbba.tar.bz2
android_packages_apps_Gallery2-b46f99cd31ecd5de4f5ff1e66709ffd0e769dbba.zip
Gallery2: Make icon display completely.
The icon size is to big for the device screen. Adjust the icon size to the right width. CRs-fixed: 639562 Change-Id: Ibde082d48d4f12009f5293de049798cf221adda4
-rw-r--r--res/layout/filtershow_control_style_chooser.xml2
-rw-r--r--src/com/android/gallery3d/filtershow/controller/StyleChooser.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/res/layout/filtershow_control_style_chooser.xml b/res/layout/filtershow_control_style_chooser.xml
index 9588ea208..d0004ffe2 100644
--- a/res/layout/filtershow_control_style_chooser.xml
+++ b/res/layout/filtershow_control_style_chooser.xml
@@ -18,7 +18,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/com.example.imagefilterharness"
android:layout_width="match_parent"
- android:layout_height="32dp"
+ android:layout_height="wrap_content"
android:orientation="horizontal" >
<HorizontalScrollView
android:id="@+id/scrollList"
diff --git a/src/com/android/gallery3d/filtershow/controller/StyleChooser.java b/src/com/android/gallery3d/filtershow/controller/StyleChooser.java
index f5afec921..dc31401e0 100644
--- a/src/com/android/gallery3d/filtershow/controller/StyleChooser.java
+++ b/src/com/android/gallery3d/filtershow/controller/StyleChooser.java
@@ -41,7 +41,7 @@ public class StyleChooser implements Control {
int n = mParameter.getNumberOfStyles();
mIconButton.clear();
Resources res = context.getResources();
- int dim = res.getDimensionPixelSize(R.dimen.draw_style_icon_dim);
+ int dim = mTopView.getMeasuredWidth() / n;
LayoutParams lp = new LayoutParams(dim, dim);
for (int i = 0; i < n; i++) {
final ImageButton button = new ImageButton(context);