diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2017-01-18 22:31:50 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-01-18 22:31:49 -0800 |
commit | d33fa4f8efe6d6daeb93402c4dc3819af2f81344 (patch) | |
tree | 40ff04fd3fac7abf34782bf255fa89a63fb7cc91 | |
parent | 002491dada2810b749ffd1de87de1afc97bc8568 (diff) | |
parent | 554a896d0ff60d931e13f808eee35730007f5900 (diff) | |
download | android_packages_apps_Gallery2-d33fa4f8efe6d6daeb93402c4dc3819af2f81344.tar.gz android_packages_apps_Gallery2-d33fa4f8efe6d6daeb93402c4dc3819af2f81344.tar.bz2 android_packages_apps_Gallery2-d33fa4f8efe6d6daeb93402c4dc3819af2f81344.zip |
Merge "Gallery: Fix DDM UI issue"
-rwxr-xr-x | res/layout/activity_three_dimensional.xml | 158 | ||||
-rwxr-xr-x[-rw-r--r--] | res/layout/do_not_show_again_dialog.xml | 26 | ||||
-rwxr-xr-x | res/values/filtershow_strings.xml | 2 | ||||
-rwxr-xr-x | src/com/android/gallery3d/app/dualcam3d/ThreeDimensionalActivity.java | 6 | ||||
-rwxr-xr-x | src/com/android/gallery3d/app/dualcam3d/threed/Controller.java | 6 |
5 files changed, 109 insertions, 89 deletions
diff --git a/res/layout/activity_three_dimensional.xml b/res/layout/activity_three_dimensional.xml index 316c9ad71..e5819bd1a 100755 --- a/res/layout/activity_three_dimensional.xml +++ b/res/layout/activity_three_dimensional.xml @@ -1,74 +1,84 @@ -<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (c) 2016, The Linux Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
- * Neither the name of The Linux Foundation nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<merge xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- tools:context="com.android.gallery3d.app.dualcam3d.ThreeDimensionalActivity">
-
- <include layout="@layout/three_d_button" />
-
- <com.android.gallery3d.app.dualcam3d.GLView
- android:id="@+id/image"
- android:layout_width="match_parent"
- android:layout_height="match_parent" />
-
- <LinearLayout
- android:id="@+id/mode_3d"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="top|end"
- android:orientation="vertical"
- android:visibility="gone">
-
- <Button
- android:id="@+id/mode_gyro"
- android:layout_width="wrap_content"
- android:layout_height="40dp"
- android:text="@string/grad"
- android:textAlignment="center" />
-
- <Button
- android:id="@+id/mode_auto"
- android:layout_width="wrap_content"
- android:layout_height="40dp"
- android:text="@string/auto"
- android:textAlignment="center" />
-
- <Button
- android:id="@+id/mode_touch"
- android:layout_width="wrap_content"
- android:layout_height="40dp"
- android:text="@string/trueportrait_touch_up"
- android:textAlignment="center" />
- </LinearLayout>
-
-</merge>
+<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<merge xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + tools:context="com.android.gallery3d.app.dualcam3d.ThreeDimensionalActivity"> + + <com.android.gallery3d.app.dualcam3d.GLView + android:id="@+id/image" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + + <LinearLayout + android:id="@+id/mode_3d" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="top|end" + android:paddingTop="130dp" + android:paddingRight="50dp" + android:orientation="vertical"> + + <ImageButton + android:id="@+id/three_dimensional" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:background="?android:attr/actionBarItemBackground" + android:src="@drawable/three_d"/> + + <ImageButton + android:id="@+id/mode_gyro" + android:layout_width="wrap_content" + android:layout_height="40dp" + android:text="@string/grad" + android:textAlignment="center" + android:visibility="gone" /> + + <ImageButton + android:id="@+id/mode_auto" + android:layout_width="wrap_content" + android:layout_height="40dp" + android:text="@string/auto" + android:textAlignment="center" + android:visibility="gone" /> + + <ImageButton + android:id="@+id/mode_touch" + android:layout_width="wrap_content" + android:layout_height="40dp" + android:text="@string/trueportrait_touch_up" + android:textAlignment="center" + android:visibility="gone" /> + </LinearLayout> + +</merge> diff --git a/res/layout/do_not_show_again_dialog.xml b/res/layout/do_not_show_again_dialog.xml index d3d229740..cfd9fab2b 100644..100755 --- a/res/layout/do_not_show_again_dialog.xml +++ b/res/layout/do_not_show_again_dialog.xml @@ -29,27 +29,33 @@ --> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="match_parent" android:paddingTop="8dip" android:paddingBottom="8dip" android:paddingEnd="?android:attr/dialogPreferredPadding" android:paddingStart="?android:attr/dialogPreferredPadding" android:orientation="vertical" > - <TextView - android:id="@+id/message" + <ScrollView android:layout_width="wrap_content" - android:layout_height="wrap_content" - style="@android:style/TextAppearance.Material.Subhead" /> - - <Space - android:layout_width="0dp" - android:layout_height="5dp"/> + android:layout_height="match_parent" + android:layout_weight="2"> + <TextView + android:id="@+id/message" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + style="@android:style/TextAppearance.Material.Subhead" /> + </ScrollView> <CheckBox android:id="@+id/do_not_show_chk" android:layout_width="wrap_content" - android:layout_height="wrap_content" + android:layout_height="match_parent" + android:layout_gravity="center_vertical" + android:gravity="center" + android:layout_weight="1" + android:minHeight="20dp" + android:paddingEnd="6dp" style="@android:style/TextAppearance.Material.Subhead" android:text="@string/do_not_show_again" /> diff --git a/res/values/filtershow_strings.xml b/res/values/filtershow_strings.xml index bdf5acebd..1f4c0b481 100755 --- a/res/values/filtershow_strings.xml +++ b/res/values/filtershow_strings.xml @@ -221,7 +221,7 @@ <!-- Label for the "posterize" dual camera effect [CHAR LIMIT=15] --> <string name="posterize">Posterize</string> <!-- Label for the "negative" dual camera effect [CHAR LIMIT=15] --> - <string name="dc_negative">negative</string> + <string name="dc_negative">Negative</string> <!-- Label for the "blur" true portrait effect [CHAR LIMIT=15] --> <string name="blur">Blur</string> <!-- Label for the "motion blur" true portrait effect [CHAR LIMIT=15] --> diff --git a/src/com/android/gallery3d/app/dualcam3d/ThreeDimensionalActivity.java b/src/com/android/gallery3d/app/dualcam3d/ThreeDimensionalActivity.java index c1212fac6..7a172116a 100755 --- a/src/com/android/gallery3d/app/dualcam3d/ThreeDimensionalActivity.java +++ b/src/com/android/gallery3d/app/dualcam3d/ThreeDimensionalActivity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -46,7 +46,7 @@ import com.android.gallery3d.filtershow.tools.DualCameraNativeEngine; import org.codeaurora.gallery.R; public class ThreeDimensionalActivity extends Activity { - private static final String TAG = "DualCamDemo"; + private static final String TAG = ThreeDimensionalActivity.class.getSimpleName(); final static int MSG_UPDATE_IMAGE = 1; final static int MSG_UPDATE_3D_DEPTH_MAP = 2; @@ -180,4 +180,4 @@ public class ThreeDimensionalActivity extends Activity { public Controller getController() { return new Controller(mImageView, (LinearLayout) findViewById(R.id.mode_3d)); } -}
\ No newline at end of file +} diff --git a/src/com/android/gallery3d/app/dualcam3d/threed/Controller.java b/src/com/android/gallery3d/app/dualcam3d/threed/Controller.java index 72f6b1141..ff86d2bf5 100755 --- a/src/com/android/gallery3d/app/dualcam3d/threed/Controller.java +++ b/src/com/android/gallery3d/app/dualcam3d/threed/Controller.java @@ -31,6 +31,7 @@ package com.android.gallery3d.app.dualcam3d.threed; import android.view.View; import android.widget.Button; +import android.widget.ImageButton; import android.widget.LinearLayout; import com.android.gallery3d.app.dualcam3d.GLView; @@ -65,11 +66,14 @@ public class Controller implements Gyro.Listener { case R.id.mode_touch: stop(false); break; + case R.id.three_dimensional: + start(); + break; } } }; for (int i = modeView.getChildCount() - 1; i >= 0; --i) { - Button b = (Button) modeView.getChildAt(i); + ImageButton b = (ImageButton) modeView.getChildAt(i); b.setOnClickListener(listener); } } |