summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-08-15 16:06:26 -0700
committerJohn Hoford <hoford@google.com>2013-08-19 09:04:00 -0700
commita4f38c0f8f70c998391780b672eea5d5e49277c7 (patch)
treebcd3443ff8baf1404e60b120ebbd91766e828076 /res
parent9c5d6700209699c3f1a47b6fa37618ddcd2f24c3 (diff)
downloadandroid_packages_apps_Gallery2-a4f38c0f8f70c998391780b672eea5d5e49277c7.tar.gz
android_packages_apps_Gallery2-a4f38c0f8f70c998391780b672eea5d5e49277c7.tar.bz2
android_packages_apps_Gallery2-a4f38c0f8f70c998391780b672eea5d5e49277c7.zip
fix first draw bug
bug:8579593 Change-Id: Ifb4727fcf23b0696db14427f00aa2a911b4a367b
Diffstat (limited to 'res')
-rw-r--r--res/drawable/filtershow_color_picker_circle.xml4
-rw-r--r--res/layout/filtershow_color_picker.xml49
-rw-r--r--res/layout/filtershow_control_color_chooser.xml83
-rw-r--r--res/layout/filtershow_control_style_chooser.xml4
-rw-r--r--res/menu/filtershow_menu_draw.xml15
-rw-r--r--res/values/filtershow_color.xml2
-rw-r--r--res/values/filtershow_strings.xml2
7 files changed, 115 insertions, 44 deletions
diff --git a/res/drawable/filtershow_color_picker_circle.xml b/res/drawable/filtershow_color_picker_circle.xml
index 4444e0fcf..915425222 100644
--- a/res/drawable/filtershow_color_picker_circle.xml
+++ b/res/drawable/filtershow_color_picker_circle.xml
@@ -15,10 +15,12 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="oval" >
+ android:shape="rectangle" >
<size android:width="20dp" android:height="20dp"/>
<corners
android:radius="10dp" />
<solid android:color="@color/red"/>
+ <stroke android:width="2dp"
+ android:color="#ff000000"/>
</shape>
diff --git a/res/layout/filtershow_color_picker.xml b/res/layout/filtershow_color_picker.xml
index fc4972961..db3249181 100644
--- a/res/layout/filtershow_color_picker.xml
+++ b/res/layout/filtershow_color_picker.xml
@@ -15,44 +15,37 @@
limitations under the License.
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
android:id="@+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/default_background"
- tools:context=".ColorPickerActivity" >
+ >
- <com.android.gallery3d.filtershow.colorpicker.ColorRectView
+ <com.android.gallery3d.filtershow.colorpicker.ColorOpacityView
+ android:id="@+id/colorOpacityView"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1"/>
+
+ <com.android.gallery3d.filtershow.colorpicker.ColorSVRectView
android:id="@+id/colorRectView"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_marginLeft="10dp"
- android:layout_marginTop="10dp"
- android:layout_marginBottom="10dp"
- android:layout_marginRight="1dp"
- android:layout_above="@+id/colorOpacityView"
- android:layout_toLeftOf="@+id/colorValueView" />
-
- <com.android.gallery3d.filtershow.colorpicker.ColorValueView
- android:id="@+id/colorValueView"
- android:layout_width="90dp"
- android:layout_height="fill_parent"
- android:layout_alignParentRight = "true"
- android:layout_above="@+id/colorOpacityView" />
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="4"
+ android:layout_marginRight="1dp" />
- <com.android.gallery3d.filtershow.colorpicker.ColorOpacityView
- android:id="@+id/colorOpacityView"
- android:layout_width="match_parent"
- android:layout_height="90dp"
- android:layout_above="@+id/btnSelect" />
+ <com.android.gallery3d.filtershow.colorpicker.ColorHueView
+ android:id="@+id/ColorHueView"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
<Button
android:id="@+id/btnSelect"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/color_pick_select"
- android:layout_alignParentBottom = "true"
- />
+ android:text="@string/color_pick_select" />
-</RelativeLayout> \ No newline at end of file
+</LinearLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_control_color_chooser.xml b/res/layout/filtershow_control_color_chooser.xml
new file mode 100644
index 000000000..088286a3f
--- /dev/null
+++ b/res/layout/filtershow_control_color_chooser.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<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="wrap_content"
+ android:orientation="horizontal" >
+ <HorizontalScrollView
+ android:id="@+id/scrollList"
+ android:layout_width="0dp"
+ android:layout_weight="5"
+ android:layout_height="match_parent"
+ android:scrollbars="none" >
+
+ <LinearLayout
+ android:id="@+id/listStyles"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:orientation="horizontal" >
+
+ <Button
+ android:id="@+id/draw_color_button01"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:background="@drawable/filtershow_color_picker_circle"
+ android:layout_margin="2dp" />
+ <Button
+ android:id="@+id/draw_color_button02"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:background="@drawable/filtershow_color_picker_circle"
+ android:layout_margin="2dp" />
+ <Button
+ android:id="@+id/draw_color_button03"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:background="@drawable/filtershow_color_picker_circle"
+ android:layout_margin="2dp" />
+ <Button
+ android:id="@+id/draw_color_button04"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:background="@drawable/filtershow_color_picker_circle"
+ android:layout_margin="2dp" />
+ <Button
+ android:id="@+id/draw_color_button05"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:background="@drawable/filtershow_color_picker_circle"
+ android:layout_margin="2dp" />
+
+ </LinearLayout>
+ </HorizontalScrollView>
+ <Button
+ android:id="@+id/draw_color_popupbutton"
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@android:drawable/ic_menu_more"
+ android:layout_margin="1dp"
+ />
+</LinearLayout>
+
diff --git a/res/layout/filtershow_control_style_chooser.xml b/res/layout/filtershow_control_style_chooser.xml
index a5bc984df..b0426e3d1 100644
--- a/res/layout/filtershow_control_style_chooser.xml
+++ b/res/layout/filtershow_control_style_chooser.xml
@@ -18,12 +18,12 @@
<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="match_parent"
+ android:layout_height="wrap_content"
android:orientation="horizontal" >
<HorizontalScrollView
android:id="@+id/scrollList"
android:layout_width="match_parent"
- android:layout_height="match_parent"
+ android:layout_height="wrap_content"
android:scrollbars="none" >
<LinearLayout
diff --git a/res/menu/filtershow_menu_draw.xml b/res/menu/filtershow_menu_draw.xml
index 55414ea14..205111d94 100644
--- a/res/menu/filtershow_menu_draw.xml
+++ b/res/menu/filtershow_menu_draw.xml
@@ -22,21 +22,12 @@
android:id="@+id/draw_menu_style"
android:title="@string/draw_style"/>
<item
- android:id="@+id/draw_menu_opacity"
- android:title="@string/draw_opacity"/>
- <item
- android:id="@+id/draw_menu_value"
- android:title="@string/draw_value"/>
- <item
- android:id="@+id/draw_menu_saturation"
- android:title="@string/draw_saturation"/>
- <item
- android:id="@+id/draw_menu_hue"
- android:title="@string/draw_hue"/>
- <item
android:id="@+id/draw_menu_size"
android:title="@string/draw_size"/>
<item
+ android:id="@+id/draw_menu_color"
+ android:title="@string/draw_color"/>
+ <item
android:id="@+id/draw_menu_clear"
android:title="@string/draw_clear"/>
</group>
diff --git a/res/values/filtershow_color.xml b/res/values/filtershow_color.xml
index c97088620..4fb4495e7 100644
--- a/res/values/filtershow_color.xml
+++ b/res/values/filtershow_color.xml
@@ -47,5 +47,7 @@
<color name="gradcontrol_line_color">#FFFFFF</color>
<color name="gradcontrol_line_shadow">#000000</color>
<color name="draw_rect_border">#888888</color>
+ <color name="color_chooser_unslected_border">#00000000</color>
+ <color name="color_chooser_slected_border">#a7a7a7</color>
</resources> \ No newline at end of file
diff --git a/res/values/filtershow_strings.xml b/res/values/filtershow_strings.xml
index 8f4e96181..a79bdb0b7 100644
--- a/res/values/filtershow_strings.xml
+++ b/res/values/filtershow_strings.xml
@@ -225,7 +225,7 @@
<!-- Label for the Brightness to draw in [CHAR LIMIT=14] -->
<string name="draw_value">Brightness</string>
<!-- Label for the color to draw in [CHAR LIMIT=14] -->
- <string name="draw_opacity">Opacity</string>
+ <string name="draw_color">Color</string>
<!-- Label for the line style of drawing in [CHAR LIMIT=14] -->
<string name="draw_style_line">Lines</string>
<!-- Label for the Marker brush style of drawing in [CHAR LIMIT=14] -->