summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2014-03-29 15:02:29 +0800
committercretin45 <cretin45@gmail.com>2014-12-15 14:47:58 -0800
commit7cdee29768006b3b14a7ab29bc677dbb60f1ab4f (patch)
tree4015ffe58d8816138255e294115d287332997069
parent17fbdae922e6d971af27958b11d21aafbad1cfad (diff)
downloadandroid_packages_apps_Gallery2-7cdee29768006b3b14a7ab29bc677dbb60f1ab4f.tar.gz
android_packages_apps_Gallery2-7cdee29768006b3b14a7ab29bc677dbb60f1ab4f.tar.bz2
android_packages_apps_Gallery2-7cdee29768006b3b14a7ab29bc677dbb60f1ab4f.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);