summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/anim/slide_in_left.xml21
-rw-r--r--res/anim/slide_in_right.xml21
-rw-r--r--res/anim/slide_out_left.xml21
-rw-r--r--res/anim/slide_out_right.xml21
-rw-r--r--res/drawable-nodpi/filtershow_icon_vignette.pngbin0 -> 7235 bytes
-rw-r--r--res/layout-land/filtershow_activity.xml142
-rw-r--r--res/layout-land/filtershow_category_panel_new.xml32
-rw-r--r--res/layout-land/filtershow_editor_panel.xml126
-rw-r--r--res/layout-land/filtershow_main_panel.xml98
-rw-r--r--res/layout-land/filtershow_state_panel_new.xml33
-rw-r--r--res/layout/filtershow_activity.xml219
-rw-r--r--res/layout/filtershow_category_panel_new.xml41
-rw-r--r--res/layout/filtershow_control_title_slider.xml9
-rw-r--r--res/layout/filtershow_editor_panel.xml159
-rw-r--r--res/layout/filtershow_imagestate_row.xml59
-rw-r--r--res/layout/filtershow_main_panel.xml101
-rw-r--r--res/layout/filtershow_seekbar.xml2
-rw-r--r--res/layout/filtershow_state_panel_new.xml40
-rw-r--r--res/values-large/filtershow_values.xml20
-rw-r--r--res/values-xlarge/filtershow_values.xml20
-rw-r--r--res/values/attrs.xml3
-rw-r--r--res/values/dimensions.xml1
-rw-r--r--res/values/filtershow_color.xml10
-rw-r--r--res/values/filtershow_strings.xml1
-rw-r--r--res/values/filtershow_values.xml20
-rw-r--r--res/values/filtershow_values_attrs.xml10
-rw-r--r--src/com/android/gallery3d/filtershow/presets/ImagePreset.java19
27 files changed, 762 insertions, 487 deletions
diff --git a/res/anim/slide_in_left.xml b/res/anim/slide_in_left.xml
new file mode 100644
index 000000000..6b1de4bd6
--- /dev/null
+++ b/res/anim/slide_in_left.xml
@@ -0,0 +1,21 @@
+<?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.
+-->
+
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+ android:fromXDelta="-100%"
+ android:toXDelta="0%"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:duration="300"/> \ No newline at end of file
diff --git a/res/anim/slide_in_right.xml b/res/anim/slide_in_right.xml
new file mode 100644
index 000000000..12f7efeba
--- /dev/null
+++ b/res/anim/slide_in_right.xml
@@ -0,0 +1,21 @@
+<?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.
+-->
+
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+ android:fromXDelta="100%"
+ android:toXDelta="0"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:duration="300"/> \ No newline at end of file
diff --git a/res/anim/slide_out_left.xml b/res/anim/slide_out_left.xml
new file mode 100644
index 000000000..be28e55b0
--- /dev/null
+++ b/res/anim/slide_out_left.xml
@@ -0,0 +1,21 @@
+<?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.
+-->
+
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+ android:fromXDelta="0%"
+ android:toXDelta="100%"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:duration="300"/> \ No newline at end of file
diff --git a/res/anim/slide_out_right.xml b/res/anim/slide_out_right.xml
new file mode 100644
index 000000000..4c786e69b
--- /dev/null
+++ b/res/anim/slide_out_right.xml
@@ -0,0 +1,21 @@
+<?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.
+-->
+
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+ android:fromXDelta="0"
+ android:toXDelta="-100%"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:duration="300"/> \ No newline at end of file
diff --git a/res/drawable-nodpi/filtershow_icon_vignette.png b/res/drawable-nodpi/filtershow_icon_vignette.png
new file mode 100644
index 000000000..88d1a9652
--- /dev/null
+++ b/res/drawable-nodpi/filtershow_icon_vignette.png
Binary files differ
diff --git a/res/layout-land/filtershow_activity.xml b/res/layout-land/filtershow_activity.xml
index 311a3e639..4d098e6f7 100644
--- a/res/layout-land/filtershow_activity.xml
+++ b/res/layout-land/filtershow_activity.xml
@@ -16,7 +16,6 @@
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:iconbutton="http://schemas.android.com/apk/res/com.android.gallery3d"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/mainView"
@@ -46,32 +45,20 @@
android:layout_height="wrap_content"
android:layout_weight="1" />
- <com.android.gallery3d.filtershow.imageshow.ImageTinyPlanet
- android:id="@+id/imageTinyPlanet"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1" />
-
</LinearLayout>
<LinearLayout
android:id="@+id/mainPanel"
android:layout_width="350dip"
android:layout_height="match_parent"
- android:orientation="vertical">
+ android:orientation="vertical"
+ android:animateLayoutChanges="true" >
- <FrameLayout android:id="@+id/state_panel_container"
+ <FrameLayout android:id="@+id/main_panel_container"
android:layout_width="350dip"
android:layout_height="0dip"
android:layout_weight="1" />
- <ViewStub android:id="@+id/historyPanelStub"
- android:inflatedId="@+id/historyPanel"
- android:layout="@layout/filtershow_history_panel"
- android:layout_width="match_parent"
- android:layout_height="0dip"
- android:visibility="gone"/>
-
<FrameLayout
android:layout_gravity="bottom"
android:layout_width="match_parent"
@@ -91,129 +78,6 @@
</FrameLayout>
- <com.android.gallery3d.filtershow.CenteredLinearLayout
- xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:id="@+id/filtersPanel"
- android:layout_width="match_parent"
- android:layout_height="177dip"
- android:layout_gravity="center|bottom"
- custom:max_width="600dip"
- android:orientation="vertical">
-
- <FrameLayout
- android:id="@+id/secondRowPanel"
- android:layout_width="fill_parent"
- android:layout_height="128dip">
-
- <LinearLayout
- android:id="@+id/filterButtonsList"
- android:layout_width="fill_parent"
- android:layout_height="@dimen/thumbnail_size"
- android:orientation="horizontal"
- android:visibility="gone">
-
- <ViewStub android:id="@+id/editorPanelStub"
- android:inflatedId="@+id/editorPanel"
- android:layout="@layout/filtershow_editor_panel"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:visibility="visible"/>
-
- </LinearLayout>
-
- <HorizontalScrollView
- android:id="@+id/fxList"
- android:layout_width="match_parent"
- android:layout_height="@dimen/thumbnail_size"
- android:background="@color/background_main_toolbar"
- android:scrollbars="none">
-
- <LinearLayout
- android:id="@+id/listFilters"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginLeft="@dimen/thumbnail_margin"
- android:orientation="horizontal">
- </LinearLayout>
- </HorizontalScrollView>
-
- <HorizontalScrollView
- android:id="@+id/bordersList"
- android:layout_width="match_parent"
- android:layout_height="@dimen/thumbnail_size"
- android:background="@color/background_main_toolbar"
- android:visibility="gone"
- android:scrollbars="none">
-
- <LinearLayout
- android:id="@+id/listBorders"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginLeft="@dimen/thumbnail_margin"
- android:orientation="horizontal">
- </LinearLayout>
- </HorizontalScrollView>
-
- <HorizontalScrollView
- android:id="@+id/geometryList"
- android:layout_width="fill_parent"
- android:layout_height="@dimen/thumbnail_size"
- android:background="@color/background_main_toolbar"
- android:visibility="gone"
- android:scrollbars="none">
-
- <LinearLayout
- android:id="@+id/listGeometry"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_gravity="left"
- android:orientation="horizontal"/>
-
- </HorizontalScrollView>
-
- <HorizontalScrollView
- android:id="@+id/colorsFxList"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="@color/background_main_toolbar"
- android:visibility="gone"
- android:scrollbars="none">
-
- <LinearLayout
- android:id="@+id/listColorsFx"
- android:layout_width="wrap_content"
- android:layout_height="@dimen/thumbnail_size"
- android:background="@color/background_main_toolbar"
- android:layout_marginLeft="@dimen/thumbnail_margin"
- android:orientation="horizontal">
-
- </LinearLayout>
- </HorizontalScrollView>
- </FrameLayout>
-
- <View
- android:background="@color/toolbar_separation_line"
- android:layout_height="1dip"
- android:layout_width="match_parent"/>
-
- <com.android.gallery3d.filtershow.CenteredLinearLayout
- android:layout_width="match_parent"
- android:layout_height="48dip"
- android:layout_gravity="center"
- custom:max_width="400dip"
- android:orientation="vertical">
-
- <ViewStub android:id="@+id/stateCategoryStub"
- android:inflatedId="@+id/imageCategoryPanel"
- android:layout="@layout/filtershow_category_panel"
- android:layout_width="match_parent"
- android:layout_height="48dip"
- android:visibility="visible"/>
-
- </com.android.gallery3d.filtershow.CenteredLinearLayout>
-
- </com.android.gallery3d.filtershow.CenteredLinearLayout>
-
</LinearLayout>
</LinearLayout>
diff --git a/res/layout-land/filtershow_category_panel_new.xml b/res/layout-land/filtershow_category_panel_new.xml
new file mode 100644
index 000000000..10a6c97ba
--- /dev/null
+++ b/res/layout-land/filtershow_category_panel_new.xml
@@ -0,0 +1,32 @@
+<?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"
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ListView
+ android:id="@+id/listItems"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_margin="8dip"
+ android:divider="@android:color/transparent"
+ android:dividerHeight="8dip" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/res/layout-land/filtershow_editor_panel.xml b/res/layout-land/filtershow_editor_panel.xml
new file mode 100644
index 000000000..85ab010db
--- /dev/null
+++ b/res/layout-land/filtershow_editor_panel.xml
@@ -0,0 +1,126 @@
+<?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"
+ android:id="@+id/top"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:visibility="visible">
+
+ <Button
+ android:id="@+id/toggle_state"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/imageState"
+ android:background="@color/background_main_toolbar"
+ />
+
+ <FrameLayout android:id="@+id/state_panel_container"
+ android:layout_width="match_parent"
+ android:layout_height="0dip"
+ android:visibility="visible"
+ android:layout_gravity="top"
+ android:layout_weight="1" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_gravity="bottom">
+
+ <LinearLayout
+ android:id="@+id/controlArea"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layout_alignParentBottom="true"
+ android:visibility="visible">
+
+ <SeekBar
+ android:id="@+id/primarySeekBar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ style="@style/FilterShowSlider"/>
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="56dip"
+ android:background="@color/background_main_toolbar"
+ android:orientation="horizontal"
+ android:baselineAligned="false"
+ android:visibility="visible">
+
+ <ImageButton
+ android:id="@+id/cancelFilter"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_gravity="left|center_vertical"
+ android:background="@android:color/transparent"
+ android:layout_weight=".1"
+ android:gravity="center"
+ android:src="@drawable/ic_menu_cancel_holo_light"
+ android:textSize="18dip"/>
+
+ <ImageView
+ android:layout_width="2dp"
+ android:layout_height="fill_parent"
+ android:src="@drawable/filtershow_vertical_bar"/>
+
+ <LinearLayout
+ android:id="@+id/panelAccessoryViewList"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="horizontal"
+ android:visibility="visible">
+
+ <com.android.gallery3d.filtershow.editors.SwapButton
+ android:id="@+id/applyEffect"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_gravity="center"
+ android:background="@android:color/transparent"
+ android:gravity="center"
+ android:text="@string/apply_effect"
+ android:textSize="18dip"
+ android:drawableRight="@drawable/filtershow_menu_marker"/>
+
+ </LinearLayout>
+
+ <ImageView
+ android:layout_width="2dp"
+ android:layout_height="fill_parent"
+ android:src="@drawable/filtershow_vertical_bar"/>
+
+ <ImageButton
+ android:id="@+id/applyFilter"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_gravity="right|center_vertical"
+ android:layout_weight=".1"
+ android:background="@android:color/transparent"
+ android:gravity="center"
+ android:src="@drawable/ic_menu_done_holo_light"
+ android:textSize="18dip"/>
+ </LinearLayout>
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/res/layout-land/filtershow_main_panel.xml b/res/layout-land/filtershow_main_panel.xml
new file mode 100644
index 000000000..705eb690b
--- /dev/null
+++ b/res/layout-land/filtershow_main_panel.xml
@@ -0,0 +1,98 @@
+<?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"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:baselineAligned="false"
+ android:orientation="vertical"
+ android:animateLayoutChanges="true"
+ android:visibility="visible" >
+
+ <FrameLayout android:id="@+id/state_panel_container"
+ android:layout_width="match_parent"
+ android:layout_height="0dip"
+ android:visibility="visible"
+ android:layout_gravity="top"
+ android:layout_weight="1" />
+
+ <FrameLayout android:id="@+id/category_panel_container"
+ android:layout_width="match_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1"/>
+
+ <View
+ android:background="@color/toolbar_separation_line"
+ android:layout_height="1dip"
+ android:layout_width="match_parent"/>
+
+ <com.android.gallery3d.filtershow.CenteredLinearLayout
+ xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
+ android:layout_width="match_parent"
+ android:layout_height="48dip"
+ android:layout_gravity="center|bottom"
+ custom:max_width="400dip"
+ android:orientation="vertical">
+
+ <LinearLayout android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:background="@color/background_main_toolbar">
+
+ <ImageButton
+ android:id="@+id/fxButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@drawable/filtershow_button_background"
+ android:scaleType="centerInside"
+ android:src="@drawable/ic_photoeditor_effects"/>
+
+ <ImageButton
+ android:id="@+id/borderButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@drawable/filtershow_button_background"
+ android:padding="2dip"
+ android:scaleType="centerInside"
+ android:src="@drawable/ic_photoeditor_border"/>
+
+ <ImageButton
+ android:id="@+id/geometryButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@drawable/filtershow_button_background"
+ android:padding="2dip"
+ android:scaleType="centerInside"
+ android:src="@drawable/ic_photoeditor_fix"/>
+
+ <ImageButton
+ android:id="@+id/colorsButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@drawable/filtershow_button_background"
+ android:padding="2dip"
+ android:scaleType="centerInside"
+ android:src="@drawable/ic_photoeditor_color"/>
+
+ </LinearLayout>
+
+ </com.android.gallery3d.filtershow.CenteredLinearLayout>
+
+</LinearLayout> \ No newline at end of file
diff --git a/res/layout-land/filtershow_state_panel_new.xml b/res/layout-land/filtershow_state_panel_new.xml
new file mode 100644
index 000000000..c83cd8833
--- /dev/null
+++ b/res/layout-land/filtershow_state_panel_new.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ScrollView
+ android:layout_width="match_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1"
+ android:scrollbars="none">
+
+ <com.android.gallery3d.filtershow.state.StatePanelTrack
+ android:id="@+id/listStates"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ custom:elemSize="72dip"
+ custom:elemEndSize="32dip"
+ android:layout_margin="8dip"
+ android:animateLayoutChanges="true" />
+
+ </ScrollView>
+
+ <View
+ android:background="@color/state_panel_separation_line"
+ android:layout_height="6dip"
+ android:layout_width="match_parent"
+ android:paddingTop="8dip"/>
+
+</LinearLayout>
diff --git a/res/layout/filtershow_activity.xml b/res/layout/filtershow_activity.xml
index c3c593b4a..f5684ff8a 100644
--- a/res/layout/filtershow_activity.xml
+++ b/res/layout/filtershow_activity.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright (C) 2012 The Android Open Source Project
+ 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.
@@ -16,199 +16,72 @@
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:iconbutton="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:id="@+id/mainView"
- android:background="@drawable/filtershow_tiled_background">
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:id="@+id/mainView"
+ android:background="@drawable/filtershow_tiled_background">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:orientation="horizontal"
- android:animateLayoutChanges="false">
+ android:orientation="vertical">
<LinearLayout
- android:id="@+id/mainPanel"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="vertical" >
-
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1" >
-
- <FrameLayout
- android:id="@+id/editorContainer"
+ android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1" />
-
- <com.android.gallery3d.filtershow.imageshow.ImageShow
- android:id="@+id/imageShow"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ android:orientation="horizontal">
- <com.android.gallery3d.filtershow.imageshow.ImageTinyPlanet
- android:id="@+id/imageTinyPlanet"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
+ <FrameLayout
+ android:id="@+id/editorContainer"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"/>
- <ProgressBar
- android:id="@+id/loading"
- style="@android:style/Widget.Holo.ProgressBar.Large"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:indeterminate="true"
- android:indeterminateOnly="true"
- android:background="@color/background_screen" />
+ <com.android.gallery3d.filtershow.imageshow.ImageShow
+ android:id="@+id/imageShow"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1" />
- </FrameLayout>
+ </LinearLayout>
<com.android.gallery3d.filtershow.CenteredLinearLayout
- xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:id="@+id/filtersPanel"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- custom:max_width="600dip"
- android:orientation="vertical">
-
- <FrameLayout
- android:id="@+id/secondRowPanel"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content" >
-
- <LinearLayout
- android:id="@+id/filterButtonsList"
- android:layout_width="fill_parent"
- android:layout_height="@dimen/thumbnail_size"
- android:orientation="horizontal"
- android:visibility="gone" >
-
- <ViewStub android:id="@+id/editorPanelStub"
- android:inflatedId="@+id/editorPanel"
- android:layout="@layout/filtershow_editor_panel"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="visible" />
- </LinearLayout>
-
- <HorizontalScrollView
- android:id="@+id/fxList"
- android:layout_width="match_parent"
- android:layout_height="@dimen/thumbnail_size"
- android:background="@color/background_main_toolbar"
- android:scrollbars="none" >
-
- <LinearLayout
- android:id="@+id/listFilters"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginLeft="@dimen/thumbnail_margin"
- android:orientation="horizontal" >
- </LinearLayout>
- </HorizontalScrollView>
-
- <HorizontalScrollView
- android:id="@+id/bordersList"
+ xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
+ android:id="@+id/mainPanel"
android:layout_width="match_parent"
- android:layout_height="@dimen/thumbnail_size"
- android:background="@color/background_main_toolbar"
- android:visibility="gone"
- android:scrollbars="none" >
-
- <LinearLayout
- android:id="@+id/listBorders"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_marginLeft="@dimen/thumbnail_margin"
- android:orientation="horizontal" >
- </LinearLayout>
- </HorizontalScrollView>
-
- <HorizontalScrollView
- android:id="@+id/geometryList"
- android:layout_width="fill_parent"
- android:layout_height="@dimen/thumbnail_size"
- android:background="@color/background_main_toolbar"
- android:visibility="gone"
- android:scrollbars="none" >
-
- <LinearLayout
- android:id="@+id/listGeometry"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_gravity="left"
- android:orientation="horizontal" />
-
- </HorizontalScrollView>
-
- <HorizontalScrollView
- android:id="@+id/colorsFxList"
- android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:background="@color/background_main_toolbar"
- android:visibility="gone"
- android:scrollbars="none" >
-
- <LinearLayout
- android:id="@+id/listColorsFx"
- android:layout_width="wrap_content"
- android:layout_height="@dimen/thumbnail_size"
- android:background="@color/background_main_toolbar"
- android:layout_marginLeft="@dimen/thumbnail_margin"
- android:orientation="horizontal" >
-
- </LinearLayout>
- </HorizontalScrollView>
- </FrameLayout>
-
- <View
- android:background="@color/toolbar_separation_line"
- android:layout_height="1dip"
- android:layout_width="match_parent" />
+ android:layout_gravity="center|bottom"
+ custom:max_width="650dip"
+ android:orientation="vertical" >
- <com.android.gallery3d.filtershow.CenteredLinearLayout
- xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- custom:max_width="400dip"
- android:orientation="vertical">
-
- <ViewStub android:id="@+id/stateCategoryStub"
- android:inflatedId="@+id/imageCategoryPanel"
- android:layout="@layout/filtershow_category_panel"
- android:layout_width="match_parent"
- android:layout_height="48dip"
- android:visibility="visible" />
+ <FrameLayout android:id="@+id/main_panel_container"
+ android:layout_gravity="center"
+ android:layout_width="match_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1" />
- </com.android.gallery3d.filtershow.CenteredLinearLayout>
+ <FrameLayout
+ android:layout_gravity="bottom"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone">
- </com.android.gallery3d.filtershow.CenteredLinearLayout>
- </LinearLayout>
+ <ProgressBar
+ android:id="@+id/loading"
+ style="@android:style/Widget.Holo.ProgressBar.Large"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:indeterminate="true"
+ android:indeterminateOnly="true"
+ android:background="@color/background_screen"/>
- <ViewStub android:id="@+id/statePanelStub"
- android:inflatedId="@+id/imageStatePanel"
- android:layout="@layout/filtershow_state_panel"
- android:layout_width="200dip"
- android:layout_height="match_parent"
- android:layout_gravity="right"
- android:visibility="visible" />
+ </FrameLayout>
- </LinearLayout>
+ </com.android.gallery3d.filtershow.CenteredLinearLayout>
- <ViewStub android:id="@+id/historyPanelStub"
- android:inflatedId="@+id/historyPanel"
- android:layout="@layout/filtershow_history_panel"
- android:layout_width="200dip"
- android:layout_height="match_parent"
- android:layout_gravity="right"
- android:visibility="invisible" />
+ </LinearLayout>
</FrameLayout>
diff --git a/res/layout/filtershow_category_panel_new.xml b/res/layout/filtershow_category_panel_new.xml
new file mode 100644
index 000000000..0dce4986f
--- /dev/null
+++ b/res/layout/filtershow_category_panel_new.xml
@@ -0,0 +1,41 @@
+<?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:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <HorizontalScrollView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:scrollbars="none"
+ android:background="@color/background_main_toolbar" >
+
+ <com.android.gallery3d.filtershow.category.CategoryTrack
+ android:id="@+id/listItems"
+ android:layout_width="match_parent"
+ android:layout_height="128dip"
+ custom:iconSize="84dip"
+ android:divider="@android:color/transparent"
+ android:dividerPadding="8dip"
+ />
+
+ </HorizontalScrollView>
+
+</LinearLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_control_title_slider.xml b/res/layout/filtershow_control_title_slider.xml
index a2c65cf66..ac0815366 100644
--- a/res/layout/filtershow_control_title_slider.xml
+++ b/res/layout/filtershow_control_title_slider.xml
@@ -16,19 +16,20 @@
-->
<GridLayout 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="150dp"
+ android:layout_height="wrap_content"
android:columnCount="2"
android:orientation="horizontal" >
<TextView
android:id="@+id/controlName"
- android:layout_gravity="left" />
+ android:layout_gravity="left"
+ android:layout_marginLeft="8dip" />
<TextView
android:id="@+id/controlValue"
- android:layout_gravity="right" />
+ android:layout_gravity="right"
+ android:layout_marginRight="8dip" />
<SeekBar
android:id="@+id/controlValueSeekBar"
diff --git a/res/layout/filtershow_editor_panel.xml b/res/layout/filtershow_editor_panel.xml
index 6822d987b..c559319d4 100644
--- a/res/layout/filtershow_editor_panel.xml
+++ b/res/layout/filtershow_editor_panel.xml
@@ -18,92 +18,101 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/top"
android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_weight="0"
- android:baselineAligned="false"
+ android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="visible" >
<LinearLayout
- android:id="@+id/controlArea"
android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1"
- android:orientation="horizontal"
- android:visibility="visible" >
-
- <SeekBar
- android:id="@+id/primarySeekBar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:layout_weight="1"
- style="@style/FilterShowSlider" />
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
- </LinearLayout>
+ <LinearLayout
+ android:id="@+id/controlArea"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layout_alignParentBottom="true"
+ android:visibility="visible">
+
+ <SeekBar
+ android:id="@+id/primarySeekBar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ style="@style/FilterShowSlider"/>
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="56dip"
- android:layout_weight="0"
- android:layout_gravity="bottom"
- android:background="@color/background_main_toolbar"
- android:orientation="horizontal"
- android:baselineAligned="false"
- android:visibility="visible" >
-
- <ImageButton
- android:id="@+id/cancelFilter"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_gravity="left|center_vertical"
- android:background="@android:color/transparent"
- android:layout_weight=".1"
- android:gravity="center"
- android:src="@drawable/ic_menu_cancel_holo_light"
- android:textSize="18dip" />
-
- <ImageView
- android:layout_width="2dp"
- android:layout_height="fill_parent"
- android:src="@drawable/filtershow_vertical_bar" />
+ </LinearLayout>
<LinearLayout
- android:id="@+id/panelAccessoryViewList"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:orientation="horizontal"
- android:visibility="visible" >
-
- <com.android.gallery3d.filtershow.editors.SwapButton
- android:id="@+id/applyEffect"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:layout_gravity="center"
- android:background="@android:color/transparent"
- android:gravity="center"
- android:text="@string/apply_effect"
- android:textSize="18dip"
- android:drawableRight="@drawable/filtershow_menu_marker"/>
-
+ android:layout_width="match_parent"
+ android:layout_height="56dip"
+ android:background="@color/background_main_toolbar"
+ android:orientation="horizontal"
+ android:baselineAligned="false"
+ android:visibility="visible">
+
+ <ImageButton
+ android:id="@+id/cancelFilter"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_gravity="left|center_vertical"
+ android:background="@android:color/transparent"
+ android:layout_weight=".1"
+ android:gravity="center"
+ android:src="@drawable/ic_menu_cancel_holo_light"
+ android:textSize="18dip"/>
+
+ <ImageView
+ android:layout_width="2dp"
+ android:layout_height="fill_parent"
+ android:src="@drawable/filtershow_vertical_bar"/>
+
+ <LinearLayout
+ android:id="@+id/panelAccessoryViewList"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:orientation="horizontal"
+ android:visibility="visible">
+
+ <com.android.gallery3d.filtershow.editors.SwapButton
+ android:id="@+id/applyEffect"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:layout_gravity="center"
+ android:background="@android:color/transparent"
+ android:gravity="center"
+ android:text="@string/apply_effect"
+ android:textSize="18dip"
+ android:drawableRight="@drawable/filtershow_menu_marker"/>
+
+ </LinearLayout>
+
+ <ImageView
+ android:layout_width="2dp"
+ android:layout_height="fill_parent"
+ android:src="@drawable/filtershow_vertical_bar"/>
+
+ <ImageButton
+ android:id="@+id/applyFilter"
+ android:layout_width="wrap_content"
+ android:layout_height="fill_parent"
+ android:layout_gravity="right|center_vertical"
+ android:layout_weight=".1"
+ android:background="@android:color/transparent"
+ android:gravity="center"
+ android:src="@drawable/ic_menu_done_holo_light"
+ android:textSize="18dip"/>
</LinearLayout>
- <ImageView
- android:layout_width="2dp"
- android:layout_height="fill_parent"
- android:src="@drawable/filtershow_vertical_bar" />
-
- <ImageButton
- android:id="@+id/applyFilter"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:layout_gravity="right|center_vertical"
- android:layout_weight=".1"
- android:background="@android:color/transparent"
- android:gravity="center"
- android:src="@drawable/ic_menu_done_holo_light"
- android:textSize="18dip" />
+ <FrameLayout android:id="@+id/state_panel_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:visibility="visible"
+ android:layout_gravity="top"
+ android:layout_weight="1" />
+
</LinearLayout>
</LinearLayout>
diff --git a/res/layout/filtershow_imagestate_row.xml b/res/layout/filtershow_imagestate_row.xml
deleted file mode 100644
index d62f54c29..000000000
--- a/res/layout/filtershow_imagestate_row.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2012 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.
--->
-
-<com.android.gallery3d.filtershow.MovableLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="128dip"
- android:orientation="horizontal"
- android:background="@drawable/filtershow_button_background">
-
- <ImageView
- android:id="@+id/selectedMark"
- android:src="@drawable/camera_crop"
- android:background="@android:color/transparent"
- android:layout_width="32dip"
- android:layout_height="match_parent"
- android:scaleType="centerInside"
- android:visibility="visible"
- android:layout_weight="1"
- >
- </ImageView>
-
- <TextView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/imagestate_label"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:gravity="left"
- android:padding="10dip"
- android:textSize="16dip" >
- </TextView>
-
- <TextView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/imagestate_parameter"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_weight="1"
- android:gravity="right"
- android:padding="10dip"
- android:textSize="16dip"
- android:textStyle="bold" >
- </TextView>
-
-</com.android.gallery3d.filtershow.MovableLinearLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_main_panel.xml b/res/layout/filtershow_main_panel.xml
new file mode 100644
index 000000000..768d3df25
--- /dev/null
+++ b/res/layout/filtershow_main_panel.xml
@@ -0,0 +1,101 @@
+<?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"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:baselineAligned="false"
+ android:orientation="vertical"
+ android:animateLayoutChanges="false"
+ android:visibility="visible"
+ android:background="@color/background_main_toolbar" >
+
+ <FrameLayout android:id="@+id/state_panel_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:visibility="visible"
+ android:layout_gravity="top"
+ android:layout_weight="1" />
+
+ <FrameLayout android:id="@+id/category_panel_container"
+ android:layout_width="wrap_content"
+ android:visibility="visible"
+ android:layout_height="0dip"
+ android:layout_gravity="center"
+ android:layout_weight="1"/>
+
+ <View
+ android:background="@color/toolbar_separation_line"
+ android:layout_height="1dip"
+ android:layout_width="match_parent"/>
+
+ <com.android.gallery3d.filtershow.CenteredLinearLayout
+ xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
+ android:layout_width="match_parent"
+ android:layout_height="48dip"
+ android:layout_gravity="center|bottom"
+ custom:max_width="400dip"
+ android:orientation="vertical">
+
+ <LinearLayout android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:background="@color/background_main_toolbar">
+
+ <ImageButton
+ android:id="@+id/fxButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@drawable/filtershow_button_background"
+ android:scaleType="centerInside"
+ android:src="@drawable/ic_photoeditor_effects"/>
+
+ <ImageButton
+ android:id="@+id/borderButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@drawable/filtershow_button_background"
+ android:padding="2dip"
+ android:scaleType="centerInside"
+ android:src="@drawable/ic_photoeditor_border"/>
+
+ <ImageButton
+ android:id="@+id/geometryButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@drawable/filtershow_button_background"
+ android:padding="2dip"
+ android:scaleType="centerInside"
+ android:src="@drawable/ic_photoeditor_fix"/>
+
+ <ImageButton
+ android:id="@+id/colorsButton"
+ android:layout_width="@dimen/thumbnail_size"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:background="@drawable/filtershow_button_background"
+ android:padding="2dip"
+ android:scaleType="centerInside"
+ android:src="@drawable/ic_photoeditor_color"/>
+
+ </LinearLayout>
+
+ </com.android.gallery3d.filtershow.CenteredLinearLayout>
+
+</LinearLayout> \ No newline at end of file
diff --git a/res/layout/filtershow_seekbar.xml b/res/layout/filtershow_seekbar.xml
index 53f59801e..6463ca8e1 100644
--- a/res/layout/filtershow_seekbar.xml
+++ b/res/layout/filtershow_seekbar.xml
@@ -19,7 +19,6 @@
android:id="@+id/top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="0"
android:orientation="vertical"
android:visibility="visible" >
@@ -27,7 +26,6 @@
android:id="@+id/primarySeekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
style="@style/FilterShowSlider" />
</LinearLayout>
diff --git a/res/layout/filtershow_state_panel_new.xml b/res/layout/filtershow_state_panel_new.xml
index 771122192..ea891a309 100644
--- a/res/layout/filtershow_state_panel_new.xml
+++ b/res/layout/filtershow_state_panel_new.xml
@@ -1,47 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:custom="http://schemas.android.com/apk/res/com.android.gallery3d"
android:orientation="horizontal"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="wrap_content">
- <!--
- <com.example.StatePanel.VerticalStatePanelTrack
- android:id="@+id/listStates"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_margin="8dip"
- android:background="@android:color/holo_red_dark" />
- -->
-
- <ScrollView
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:scrollbars="none">
-
- <com.android.gallery3d.filtershow.state.StatePanelTrack
- android:id="@+id/listStates"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_margin="8dip"
- android:animateLayoutChanges="true" />
-
- </ScrollView>
-
- <!--
<HorizontalScrollView
android:layout_width="match_parent"
- android:layout_height="128dip"
+ android:layout_height="wrap_content"
android:scrollbars="none">
- <com.example.StatePanel.StatePanelTrack
+ <com.android.gallery3d.filtershow.state.StatePanelTrack
android:id="@+id/listStates"
+ android:orientation="horizontal"
android:layout_width="match_parent"
- android:layout_height="128dip"
+ android:layout_height="48dip"
+ custom:elemEndSize="128dip"
+ custom:elemSize="128dip"
+ android:layout_margin="8dip"
android:animateLayoutChanges="true" />
</HorizontalScrollView>
- -->
+
</LinearLayout>
diff --git a/res/values-large/filtershow_values.xml b/res/values-large/filtershow_values.xml
new file mode 100644
index 000000000..1098ee0bd
--- /dev/null
+++ b/res/values-large/filtershow_values.xml
@@ -0,0 +1,20 @@
+<?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.
+-->
+
+<resources>
+ <!-- Specify the screen orientation -->
+ <bool name="only_use_portrait">false</bool>
+</resources> \ No newline at end of file
diff --git a/res/values-xlarge/filtershow_values.xml b/res/values-xlarge/filtershow_values.xml
new file mode 100644
index 000000000..1098ee0bd
--- /dev/null
+++ b/res/values-xlarge/filtershow_values.xml
@@ -0,0 +1,20 @@
+<?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.
+-->
+
+<resources>
+ <!-- Specify the screen orientation -->
+ <bool name="only_use_portrait">false</bool>
+</resources> \ No newline at end of file
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 582ddcb4e..5a00a695a 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -18,9 +18,6 @@
<attr name="listPreferredItemHeightSmall" format="dimension" />
<attr name="switchStyle" format="reference" />
</declare-styleable>
- <declare-styleable name="CenteredLinearLayout">
- <attr name="max_width" format="dimension" />
- </declare-styleable>
<!-- Camera resources below -->
diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml
index aba596f16..94697d1f4 100644
--- a/res/values/dimensions.xml
+++ b/res/values/dimensions.xml
@@ -50,6 +50,7 @@
<!-- configuration for filtershow UI -->
<dimen name="thumbnail_size">96dip</dimen>
<dimen name="thumbnail_margin">3dip</dimen>
+ <dimen name="action_item_height">175dip</dimen>
<!-- configuration for album set page -->
<dimen name="album_set_item_image_height">120dp</dimen>
diff --git a/res/values/filtershow_color.xml b/res/values/filtershow_color.xml
index 70191fdc3..f6bf7fbc8 100644
--- a/res/values/filtershow_color.xml
+++ b/res/values/filtershow_color.xml
@@ -26,7 +26,15 @@
<color name="toolbar_separation_line">#333333</color>
<color name="slider_dot_color">#6464FF</color>
<color name="slider_line_color">#33B5E5</color>
+ <color name="state_panel_separation_line">#232323</color>
<color name="filtershow_background">#333333</color>
<color name="filtershow_graphic">#717171</color>
-
+ <color name="filtershow_stateview_end_background">#232323</color>
+ <color name="filtershow_stateview_end_text">#a7a7a7</color>
+ <color name="filtershow_stateview_background">#464646</color>
+ <color name="filtershow_stateview_text">#FFFFFF</color>
+ <color name="filtershow_stateview_selected_background">#c8c8c8</color>
+ <color name="filtershow_stateview_selected_text">#000000</color>
+ <color name="filtershow_categoryview_background">#1a1a1a</color>
+ <color name="filtershow_categoryview_text">#a7a7a7</color>
</resources> \ No newline at end of file
diff --git a/res/values/filtershow_strings.xml b/res/values/filtershow_strings.xml
index b8d4929f3..c8ad2a997 100644
--- a/res/values/filtershow_strings.xml
+++ b/res/values/filtershow_strings.xml
@@ -15,7 +15,6 @@
-->
<resources>
-
<!-- Title for the image editor activity [CHAR LIMIT=NONE]-->
<string name="title_activity_filter_show">Photo Editor</string>
diff --git a/res/values/filtershow_values.xml b/res/values/filtershow_values.xml
new file mode 100644
index 000000000..f516a39ba
--- /dev/null
+++ b/res/values/filtershow_values.xml
@@ -0,0 +1,20 @@
+<?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.
+-->
+
+<resources>
+ <!-- Specify the screen orientation -->
+ <bool name="only_use_portrait">true</bool>
+</resources> \ No newline at end of file
diff --git a/res/values/filtershow_values_attrs.xml b/res/values/filtershow_values_attrs.xml
index 67c645dd8..32a3a871b 100644
--- a/res/values/filtershow_values_attrs.xml
+++ b/res/values/filtershow_values_attrs.xml
@@ -19,4 +19,14 @@
<attr name="android:text"/>
<attr name="android:textColor"/>
</declare-styleable>
+ <declare-styleable name="CenteredLinearLayout">
+ <attr name="max_width" format="dimension" />
+ </declare-styleable>
+ <declare-styleable name="StatePanelTrack">
+ <attr name="elemSize" format="dimension" />
+ <attr name="elemEndSize" format="dimension" />
+ </declare-styleable>
+ <declare-styleable name="CategoryTrack">
+ <attr name="iconSize" format="dimension" />
+ </declare-styleable>
</resources> \ No newline at end of file
diff --git a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java
index ca97761ed..e0ff0b3e6 100644
--- a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java
+++ b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java
@@ -28,6 +28,7 @@ import com.android.gallery3d.filtershow.filters.FilterRepresentation;
import com.android.gallery3d.filtershow.filters.ImageFilter;
import com.android.gallery3d.filtershow.imageshow.GeometryMetadata;
import com.android.gallery3d.filtershow.imageshow.MasterImage;
+import com.android.gallery3d.filtershow.state.State;
import com.android.gallery3d.filtershow.state.StateAdapter;
import java.util.Vector;
@@ -369,6 +370,11 @@ public class ImagePreset {
}
public void removeFilter(FilterRepresentation filterRepresentation) {
+ if (filterRepresentation.getPriority() == FilterRepresentation.TYPE_BORDER) {
+ setBorder(null);
+ setHistoryName("Remove");
+ return;
+ }
for (int i = 0; i < mFilters.size(); i++) {
if (mFilters.elementAt(i).getFilterClass() == filterRepresentation.getFilterClass()) {
mFilters.remove(i);
@@ -539,7 +545,20 @@ public class ImagePreset {
if (imageStateAdapter == null) {
return;
}
+ imageStateAdapter.clear();
+ imageStateAdapter.addOriginal();
+ // TODO: supports Geometry representations in the state panel.
+ if (false && mGeoData != null && mGeoData.hasModifications()) {
+ State geo = new State("Geometry");
+ geo.setFilterRepresentation(mGeoData);
+ imageStateAdapter.add(geo);
+ }
imageStateAdapter.addAll(mFilters);
+ if (mBorder != null) {
+ State border = new State(mBorder.getName());
+ border.setFilterRepresentation(mBorder);
+ imageStateAdapter.add(border);
+ }
}
public void setPartialRendering(boolean partialRendering, Rect bounds) {