Merge "Remove UI param for straighten." into gb-ub-photos-bryce
diff --git a/res/anim/slide_in_left.xml b/res/anim/slide_in_left.xml
new file mode 100644
index 0000000..6b1de4b
--- /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 0000000..12f7efe
--- /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 0000000..be28e55
--- /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 0000000..4c786e6
--- /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 0000000..88d1a96
--- /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 311a3e6..4d098e6 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 0000000..10a6c97
--- /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 0000000..85ab010
--- /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 0000000..705eb69
--- /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 0000000..c83cd88
--- /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 c3c593b..f5684ff 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" >
+ android:layout_weight="1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
<FrameLayout
- android:id="@+id/editorContainer"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1" />
+ android:id="@+id/editorContainer"
+ 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:id="@+id/imageShow"
+ android:layout_width="match_parent"
+ 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" />
-
- <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" />
-
- </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"
+ 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: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" >
+ android:layout_gravity="center|bottom"
+ custom:max_width="650dip"
+ android:orientation="vertical" >
- <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" >
+ <FrameLayout android:id="@+id/main_panel_container"
+ android:layout_gravity="center"
+ android:layout_width="match_parent"
+ android:layout_height="0dip"
+ android:layout_weight="1" />
- </LinearLayout>
- </HorizontalScrollView>
- </FrameLayout>
+ <FrameLayout
+ android:layout_gravity="bottom"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:visibility="gone">
- <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="wrap_content"
- android:layout_gravity="center"
- custom:max_width="400dip"
- android:orientation="vertical">
+ <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/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>
+ </FrameLayout>
</com.android.gallery3d.filtershow.CenteredLinearLayout>
</LinearLayout>
- <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" />
-
- </LinearLayout>
-
- <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" />
-
</FrameLayout>
diff --git a/res/layout/filtershow_category_panel_new.xml b/res/layout/filtershow_category_panel_new.xml
new file mode 100644
index 0000000..0dce498
--- /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 a2c65cf..ac08153 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 6822d98..c559319 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" />
-
- </LinearLayout>
-
- <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" />
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
<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" >
+ android:id="@+id/controlArea"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:layout_alignParentBottom="true"
+ 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"/>
+ <SeekBar
+ android:id="@+id/primarySeekBar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ style="@style/FilterShowSlider"/>
</LinearLayout>
- <ImageView
- android:layout_width="2dp"
- android:layout_height="fill_parent"
- android:src="@drawable/filtershow_vertical_bar" />
+ <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/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" />
+ <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>
+
+ <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 d62f54c..0000000
--- 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 0000000..768d3df
--- /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 53f5980..6463ca8 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 7711221..ea891a3 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-af/filtershow_strings.xml b/res/values-af/filtershow_strings.xml
index 1ecb0bf..4493aa5 100644
--- a/res/values-af/filtershow_strings.xml
+++ b/res/values-af/filtershow_strings.xml
@@ -21,16 +21,13 @@
<!-- no translation found for original_picture_text (3076213290079909698) -->
<skip />
<string name="setting_wallpaper" msgid="4679087092300036632">"Stel muurpapier"</string>
- <!-- no translation found for download_failure (5923323939788582895) -->
- <skip />
+ <string name="download_failure" msgid="5923323939788582895">"Kon foto nie aflaai nie. Netwerk nie beskikbaar nie."</string>
<string name="original" msgid="3524493791230430897">"Oorspronklike"</string>
<string name="borders" msgid="2067345080568684614">"Grense"</string>
<string name="filtershow_undo" msgid="6781743189243585101">"Ontdoen"</string>
<string name="filtershow_redo" msgid="4219489910543059747">"Herdoen"</string>
- <!-- no translation found for show_imagestate_panel (281932769701043015) -->
- <skip />
- <!-- no translation found for hide_imagestate_panel (7207643485811695257) -->
- <skip />
+ <string name="show_imagestate_panel" msgid="281932769701043015">"Wys toegepaste effekte"</string>
+ <string name="hide_imagestate_panel" msgid="7207643485811695257">"Versteek toegepaste effekte"</string>
<string name="menu_settings" msgid="6428291655769260831">"Instellings"</string>
<string name="unsaved" msgid="8704442449002374375">"Daar is ongestoorde veranderinge aan hierdie prent."</string>
<string name="save_before_exit" msgid="2680660633675916712">"Wil jy stoor voor jy uitgaan?"</string>
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index e4ba1de..0962a2c 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -235,8 +235,7 @@
<string name="pref_camera_id_entry_back" msgid="5142699735103692485">"Terug"</string>
<string name="pref_camera_id_entry_front" msgid="5668958706828733669">"Voorkant"</string>
<string name="pref_camera_recordlocation_title" msgid="371208839215448917">"Stoor ligging"</string>
- <!-- no translation found for pref_camera_location_label (2254270920298609161) -->
- <skip />
+ <string name="pref_camera_location_label" msgid="2254270920298609161">"LIGGING"</string>
<string name="pref_camera_timer_title" msgid="3105232208281893389">"Aftel-tydhouer"</string>
<plurals name="pref_camera_timer_entry">
<item quantity="one" msgid="1654523400981245448">"1 sekonde"</item>
@@ -296,31 +295,23 @@
<string name="pref_camera_scenemode_entry_night" msgid="7606898503102476329">"Nag"</string>
<string name="pref_camera_scenemode_entry_sunset" msgid="181661154611507212">"Sonsondergang"</string>
<string name="pref_camera_scenemode_entry_party" msgid="907053529286788253">"Partytjie"</string>
- <!-- no translation found for pref_camera_scenemode_label_auto (4475096836397300237) -->
- <skip />
+ <string name="pref_camera_scenemode_label_auto" msgid="4475096836397300237">"GEEN"</string>
<string name="pref_camera_scenemode_label_action" msgid="964748409622151496">"HANDELING"</string>
<string name="pref_camera_scenemode_label_night" msgid="1269871886845854574">"NAG"</string>
<string name="pref_camera_scenemode_label_sunset" msgid="2802732082948866877">"SONSONDERGANG"</string>
<string name="pref_camera_scenemode_label_party" msgid="1409459091844374828">"PARTYTJIE"</string>
- <!-- no translation found for pref_camera_countdown_label (7592784692450586126) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_off (4987856883590176585) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_one (1101814103087928898) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_three (1047399297342955649) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_ten (6274681535347260279) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_fifteen (4544824246687597089) -->
- <skip />
+ <string name="pref_camera_countdown_label" msgid="7592784692450586126">"AFTEL-TYDHOUER"</string>
+ <string name="pref_camera_countdown_label_off" msgid="4987856883590176585">"TYDHOUER AF"</string>
+ <string name="pref_camera_countdown_label_one" msgid="1101814103087928898">"1 SEKONDE"</string>
+ <string name="pref_camera_countdown_label_three" msgid="1047399297342955649">"3 SEKONDES"</string>
+ <string name="pref_camera_countdown_label_ten" msgid="6274681535347260279">"10 SEKONDES"</string>
+ <string name="pref_camera_countdown_label_fifteen" msgid="4544824246687597089">"15 SEKONDES"</string>
<string name="not_selectable_in_scene_mode" msgid="2970291701448555126">"Kan nie in toneelmodus gekies word nie."</string>
<string name="pref_exposure_title" msgid="1229093066434614811">"Beligting"</string>
<string name="pref_exposure_label" msgid="552624394642497940">"BELIGTING"</string>
<!-- no translation found for pref_camera_hdr_default (1336869406134365882) -->
<skip />
- <!-- no translation found for pref_camera_hdr_label (7217211253357027510) -->
- <skip />
+ <string name="pref_camera_hdr_label" msgid="7217211253357027510">"HDR"</string>
<string name="pref_camera_id_label_back" msgid="8745553500400332333">"VOORSTE KAMERA"</string>
<string name="pref_camera_id_label_front" msgid="8699439330056996709">"AGTERSTE KAMERA"</string>
<string name="dialog_ok" msgid="6263301364153382152">"OK"</string>
diff --git a/res/values-am/filtershow_strings.xml b/res/values-am/filtershow_strings.xml
index 72c70f7..04fb893 100644
--- a/res/values-am/filtershow_strings.xml
+++ b/res/values-am/filtershow_strings.xml
@@ -21,16 +21,13 @@
<!-- no translation found for original_picture_text (3076213290079909698) -->
<skip />
<string name="setting_wallpaper" msgid="4679087092300036632">"ልጥፍ በማዘጋጀት ላይ"</string>
- <!-- no translation found for download_failure (5923323939788582895) -->
- <skip />
+ <string name="download_failure" msgid="5923323939788582895">"ፎቶን ማውረድ አልተቻለም። አውታረ መረብ አይገኝም።"</string>
<string name="original" msgid="3524493791230430897">"የመጀመሪያው"</string>
<string name="borders" msgid="2067345080568684614">"ድንበሮች"</string>
<string name="filtershow_undo" msgid="6781743189243585101">"ቀልብስ"</string>
<string name="filtershow_redo" msgid="4219489910543059747">"ድገም"</string>
- <!-- no translation found for show_imagestate_panel (281932769701043015) -->
- <skip />
- <!-- no translation found for hide_imagestate_panel (7207643485811695257) -->
- <skip />
+ <string name="show_imagestate_panel" msgid="281932769701043015">"የተተገበሩ ተጽዕኖዎችን አሳይ"</string>
+ <string name="hide_imagestate_panel" msgid="7207643485811695257">"የተተገበሩ ተጽዕኖዎችን ደብቅ"</string>
<string name="menu_settings" msgid="6428291655769260831">"ቅንብሮች"</string>
<string name="unsaved" msgid="8704442449002374375">"በዚህ ምስል ላይ"</string>
<string name="save_before_exit" msgid="2680660633675916712">"ከመውጣትዎ በፊት ማስቀመጥ ይፈልጋሉ?"</string>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 4398386..7682220 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -235,8 +235,7 @@
<string name="pref_camera_id_entry_back" msgid="5142699735103692485">"ተመለስ"</string>
<string name="pref_camera_id_entry_front" msgid="5668958706828733669">"የፊት"</string>
<string name="pref_camera_recordlocation_title" msgid="371208839215448917">"ሥፍራ"</string>
- <!-- no translation found for pref_camera_location_label (2254270920298609161) -->
- <skip />
+ <string name="pref_camera_location_label" msgid="2254270920298609161">"አካባቢ"</string>
<string name="pref_camera_timer_title" msgid="3105232208281893389">"ሰዓት ቆጣሪ"</string>
<plurals name="pref_camera_timer_entry">
<item quantity="one" msgid="1654523400981245448">"1 ሰከንድ"</item>
@@ -296,31 +295,23 @@
<string name="pref_camera_scenemode_entry_night" msgid="7606898503102476329">"ማታ"</string>
<string name="pref_camera_scenemode_entry_sunset" msgid="181661154611507212">"ፀሀይ ስትጠልቅ"</string>
<string name="pref_camera_scenemode_entry_party" msgid="907053529286788253">"ፓርቲ"</string>
- <!-- no translation found for pref_camera_scenemode_label_auto (4475096836397300237) -->
- <skip />
+ <string name="pref_camera_scenemode_label_auto" msgid="4475096836397300237">"ምንም"</string>
<string name="pref_camera_scenemode_label_action" msgid="964748409622151496">"እርምጃ"</string>
<string name="pref_camera_scenemode_label_night" msgid="1269871886845854574">"ማታ"</string>
<string name="pref_camera_scenemode_label_sunset" msgid="2802732082948866877">"ፀሀይ ስትጠልቅ"</string>
<string name="pref_camera_scenemode_label_party" msgid="1409459091844374828">"ድግስ"</string>
- <!-- no translation found for pref_camera_countdown_label (7592784692450586126) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_off (4987856883590176585) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_one (1101814103087928898) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_three (1047399297342955649) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_ten (6274681535347260279) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_fifteen (4544824246687597089) -->
- <skip />
+ <string name="pref_camera_countdown_label" msgid="7592784692450586126">"ሰዓት ቆጣሪ"</string>
+ <string name="pref_camera_countdown_label_off" msgid="4987856883590176585">"ሰዓት ቆጣሪ ጠፍቷል"</string>
+ <string name="pref_camera_countdown_label_one" msgid="1101814103087928898">"1 ሰከንድ"</string>
+ <string name="pref_camera_countdown_label_three" msgid="1047399297342955649">"3 ሰከንዶች"</string>
+ <string name="pref_camera_countdown_label_ten" msgid="6274681535347260279">"10 ሰከንዶች"</string>
+ <string name="pref_camera_countdown_label_fifteen" msgid="4544824246687597089">"15 ሰከንዶች"</string>
<string name="not_selectable_in_scene_mode" msgid="2970291701448555126">" በትዕይንት ሁኔታ መመረጥ የሚችል አይደለም።"</string>
<string name="pref_exposure_title" msgid="1229093066434614811">"የተጋለጠ"</string>
<string name="pref_exposure_label" msgid="552624394642497940">"ተጋላጭነት"</string>
<!-- no translation found for pref_camera_hdr_default (1336869406134365882) -->
<skip />
- <!-- no translation found for pref_camera_hdr_label (7217211253357027510) -->
- <skip />
+ <string name="pref_camera_hdr_label" msgid="7217211253357027510">"ኤች ዲ አር"</string>
<string name="pref_camera_id_label_back" msgid="8745553500400332333">"የፊት ካሜራ"</string>
<string name="pref_camera_id_label_front" msgid="8699439330056996709">"የኋላ ካሜራ"</string>
<string name="dialog_ok" msgid="6263301364153382152">"እሺ"</string>
diff --git a/res/values-ar/filtershow_strings.xml b/res/values-ar/filtershow_strings.xml
index e1adf32..926136e 100644
--- a/res/values-ar/filtershow_strings.xml
+++ b/res/values-ar/filtershow_strings.xml
@@ -21,16 +21,13 @@
<!-- no translation found for original_picture_text (3076213290079909698) -->
<skip />
<string name="setting_wallpaper" msgid="4679087092300036632">"جارٍ تعيين الخلفية"</string>
- <!-- no translation found for download_failure (5923323939788582895) -->
- <skip />
+ <string name="download_failure" msgid="5923323939788582895">"تعذر تنزيل الصورة. الشبكة غير متاحة."</string>
<string name="original" msgid="3524493791230430897">"أصلية"</string>
<string name="borders" msgid="2067345080568684614">"حدود"</string>
<string name="filtershow_undo" msgid="6781743189243585101">"تراجع"</string>
<string name="filtershow_redo" msgid="4219489910543059747">"إعادة"</string>
- <!-- no translation found for show_imagestate_panel (281932769701043015) -->
- <skip />
- <!-- no translation found for hide_imagestate_panel (7207643485811695257) -->
- <skip />
+ <string name="show_imagestate_panel" msgid="281932769701043015">"إظهار التأثيرات المطبقة"</string>
+ <string name="hide_imagestate_panel" msgid="7207643485811695257">"إخفاء التأثيرات المطبقة"</string>
<string name="menu_settings" msgid="6428291655769260831">"إعدادات"</string>
<string name="unsaved" msgid="8704442449002374375">"هناك تغييرات في هذه الصورة لم يتم حفظها."</string>
<string name="save_before_exit" msgid="2680660633675916712">"هل تريد الحفظ قبل الخروج؟"</string>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index 583c060..e0f0ad4 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -235,8 +235,7 @@
<string name="pref_camera_id_entry_back" msgid="5142699735103692485">"رجوع"</string>
<string name="pref_camera_id_entry_front" msgid="5668958706828733669">"الأمام"</string>
<string name="pref_camera_recordlocation_title" msgid="371208839215448917">"تخزين الموقع"</string>
- <!-- no translation found for pref_camera_location_label (2254270920298609161) -->
- <skip />
+ <string name="pref_camera_location_label" msgid="2254270920298609161">"الموقع"</string>
<string name="pref_camera_timer_title" msgid="3105232208281893389">"مؤقت العد التنازلي"</string>
<plurals name="pref_camera_timer_entry">
<item quantity="one" msgid="1654523400981245448">"ثانية واحدة"</item>
@@ -296,31 +295,23 @@
<string name="pref_camera_scenemode_entry_night" msgid="7606898503102476329">"ليلي"</string>
<string name="pref_camera_scenemode_entry_sunset" msgid="181661154611507212">"الغروب"</string>
<string name="pref_camera_scenemode_entry_party" msgid="907053529286788253">"مجموعة"</string>
- <!-- no translation found for pref_camera_scenemode_label_auto (4475096836397300237) -->
- <skip />
+ <string name="pref_camera_scenemode_label_auto" msgid="4475096836397300237">"لا شيء"</string>
<string name="pref_camera_scenemode_label_action" msgid="964748409622151496">"حركة"</string>
<string name="pref_camera_scenemode_label_night" msgid="1269871886845854574">"ليلاً"</string>
<string name="pref_camera_scenemode_label_sunset" msgid="2802732082948866877">"الغروب"</string>
<string name="pref_camera_scenemode_label_party" msgid="1409459091844374828">"حفلة"</string>
- <!-- no translation found for pref_camera_countdown_label (7592784692450586126) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_off (4987856883590176585) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_one (1101814103087928898) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_three (1047399297342955649) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_ten (6274681535347260279) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_fifteen (4544824246687597089) -->
- <skip />
+ <string name="pref_camera_countdown_label" msgid="7592784692450586126">"موقّت العد التنازلي"</string>
+ <string name="pref_camera_countdown_label_off" msgid="4987856883590176585">"إيقاف الموقّت"</string>
+ <string name="pref_camera_countdown_label_one" msgid="1101814103087928898">"ثانية واحدة"</string>
+ <string name="pref_camera_countdown_label_three" msgid="1047399297342955649">"3 ثوانٍ"</string>
+ <string name="pref_camera_countdown_label_ten" msgid="6274681535347260279">"10 ثوانٍ"</string>
+ <string name="pref_camera_countdown_label_fifteen" msgid="4544824246687597089">"15 ثانية"</string>
<string name="not_selectable_in_scene_mode" msgid="2970291701448555126">"لا يمكن تحديده في وضع المشهد."</string>
<string name="pref_exposure_title" msgid="1229093066434614811">"التعرض"</string>
<string name="pref_exposure_label" msgid="552624394642497940">"التعرض للضوء"</string>
<!-- no translation found for pref_camera_hdr_default (1336869406134365882) -->
<skip />
- <!-- no translation found for pref_camera_hdr_label (7217211253357027510) -->
- <skip />
+ <string name="pref_camera_hdr_label" msgid="7217211253357027510">"نطاق عالي الديناميكية"</string>
<string name="pref_camera_id_label_back" msgid="8745553500400332333">"الكاميرا الأمامية"</string>
<string name="pref_camera_id_label_front" msgid="8699439330056996709">"الكاميرا الخلفية"</string>
<string name="dialog_ok" msgid="6263301364153382152">"موافق"</string>
diff --git a/res/values-be/filtershow_strings.xml b/res/values-be/filtershow_strings.xml
index ca156f7..049ba6e 100644
--- a/res/values-be/filtershow_strings.xml
+++ b/res/values-be/filtershow_strings.xml
@@ -21,16 +21,13 @@
<!-- no translation found for original_picture_text (3076213290079909698) -->
<skip />
<string name="setting_wallpaper" msgid="4679087092300036632">"Усталёўка шпалер..."</string>
- <!-- no translation found for download_failure (5923323939788582895) -->
- <skip />
+ <string name="download_failure" msgid="5923323939788582895">"Не атрымалася спампаваць фота. Сетка недаступная."</string>
<string name="original" msgid="3524493791230430897">"Арыгiнал"</string>
<string name="borders" msgid="2067345080568684614">"Межы"</string>
<string name="filtershow_undo" msgid="6781743189243585101">"Вярнуць"</string>
<string name="filtershow_redo" msgid="4219489910543059747">"Паўтарыць"</string>
- <!-- no translation found for show_imagestate_panel (281932769701043015) -->
- <skip />
- <!-- no translation found for hide_imagestate_panel (7207643485811695257) -->
- <skip />
+ <string name="show_imagestate_panel" msgid="281932769701043015">"Паказваць прымененыя эфекты"</string>
+ <string name="hide_imagestate_panel" msgid="7207643485811695257">"Хаваць прымененыя эфекты"</string>
<string name="menu_settings" msgid="6428291655769260831">"Налады"</string>
<string name="unsaved" msgid="8704442449002374375">"Існуюць незахаваныя змяненні ў гэтай выяве."</string>
<string name="save_before_exit" msgid="2680660633675916712">"Жадаеце захавацца перад выхадам?"</string>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index d2dbc8c..b304450 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -235,8 +235,7 @@
<string name="pref_camera_id_entry_back" msgid="5142699735103692485">"Назад"</string>
<string name="pref_camera_id_entry_front" msgid="5668958706828733669">"Перад"</string>
<string name="pref_camera_recordlocation_title" msgid="371208839215448917">"Месцазнаходжанне крамы"</string>
- <!-- no translation found for pref_camera_location_label (2254270920298609161) -->
- <skip />
+ <string name="pref_camera_location_label" msgid="2254270920298609161">"МЕСЦАЗНАХОДЖАННЕ"</string>
<string name="pref_camera_timer_title" msgid="3105232208281893389">"Таймер зваротнага адлiку"</string>
<plurals name="pref_camera_timer_entry">
<item quantity="one" msgid="1654523400981245448">"1 секунда"</item>
@@ -296,31 +295,23 @@
<string name="pref_camera_scenemode_entry_night" msgid="7606898503102476329">"Ноч"</string>
<string name="pref_camera_scenemode_entry_sunset" msgid="181661154611507212">"Заход"</string>
<string name="pref_camera_scenemode_entry_party" msgid="907053529286788253">"Вечарына"</string>
- <!-- no translation found for pref_camera_scenemode_label_auto (4475096836397300237) -->
- <skip />
+ <string name="pref_camera_scenemode_label_auto" msgid="4475096836397300237">"НЯМА"</string>
<string name="pref_camera_scenemode_label_action" msgid="964748409622151496">"ДЗЕЯННЕ"</string>
<string name="pref_camera_scenemode_label_night" msgid="1269871886845854574">"НОЧ"</string>
<string name="pref_camera_scenemode_label_sunset" msgid="2802732082948866877">"ЗАХОД"</string>
<string name="pref_camera_scenemode_label_party" msgid="1409459091844374828">"ВЕЧАРЫНА"</string>
- <!-- no translation found for pref_camera_countdown_label (7592784692450586126) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_off (4987856883590176585) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_one (1101814103087928898) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_three (1047399297342955649) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_ten (6274681535347260279) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_fifteen (4544824246687597089) -->
- <skip />
+ <string name="pref_camera_countdown_label" msgid="7592784692450586126">"ТАЙМЕР ЗВАРОТНАГА АДЛІКУ"</string>
+ <string name="pref_camera_countdown_label_off" msgid="4987856883590176585">"ТАЙМЕР АДКЛЮЧАНЫ"</string>
+ <string name="pref_camera_countdown_label_one" msgid="1101814103087928898">"1 СЕКУНДА"</string>
+ <string name="pref_camera_countdown_label_three" msgid="1047399297342955649">"3 СЕКУНДЫ"</string>
+ <string name="pref_camera_countdown_label_ten" msgid="6274681535347260279">"10 СЕКУНД"</string>
+ <string name="pref_camera_countdown_label_fifteen" msgid="4544824246687597089">"15 СЕКУНД"</string>
<string name="not_selectable_in_scene_mode" msgid="2970291701448555126">"Немагчыма выбраць у рэжыме здымкi."</string>
<string name="pref_exposure_title" msgid="1229093066434614811">"Экспазіцыя"</string>
<string name="pref_exposure_label" msgid="552624394642497940">"ЭКСПАЗIЦЫЯ"</string>
<!-- no translation found for pref_camera_hdr_default (1336869406134365882) -->
<skip />
- <!-- no translation found for pref_camera_hdr_label (7217211253357027510) -->
- <skip />
+ <string name="pref_camera_hdr_label" msgid="7217211253357027510">"HDR"</string>
<string name="pref_camera_id_label_back" msgid="8745553500400332333">"ПЯРЭДНЯЯ КАМЕРА"</string>
<string name="pref_camera_id_label_front" msgid="8699439330056996709">"ЗАДНЯЯ КАМЕРА"</string>
<string name="dialog_ok" msgid="6263301364153382152">"ОК"</string>
diff --git a/res/values-ca/filtershow_strings.xml b/res/values-ca/filtershow_strings.xml
index a45fb41..7da09b9 100644
--- a/res/values-ca/filtershow_strings.xml
+++ b/res/values-ca/filtershow_strings.xml
@@ -21,16 +21,13 @@
<!-- no translation found for original_picture_text (3076213290079909698) -->
<skip />
<string name="setting_wallpaper" msgid="4679087092300036632">"S\'està establint el fons de pantalla"</string>
- <!-- no translation found for download_failure (5923323939788582895) -->
- <skip />
+ <string name="download_failure" msgid="5923323939788582895">"No s\'ha pogut baixar la foto. La xarxa no està disponible."</string>
<string name="original" msgid="3524493791230430897">"Original"</string>
<string name="borders" msgid="2067345080568684614">"Vores"</string>
<string name="filtershow_undo" msgid="6781743189243585101">"Desfés"</string>
<string name="filtershow_redo" msgid="4219489910543059747">"Refés"</string>
- <!-- no translation found for show_imagestate_panel (281932769701043015) -->
- <skip />
- <!-- no translation found for hide_imagestate_panel (7207643485811695257) -->
- <skip />
+ <string name="show_imagestate_panel" msgid="281932769701043015">"Mostra els efectes aplicats"</string>
+ <string name="hide_imagestate_panel" msgid="7207643485811695257">"Amaga els efectes aplicats"</string>
<string name="menu_settings" msgid="6428291655769260831">"Configuració"</string>
<string name="unsaved" msgid="8704442449002374375">"Hi ha canvis sense desar en aquesta imatge."</string>
<string name="save_before_exit" msgid="2680660633675916712">"Vols desar abans de sortir?"</string>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index facd004..7b23c80 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -235,8 +235,7 @@
<string name="pref_camera_id_entry_back" msgid="5142699735103692485">"Enrere"</string>
<string name="pref_camera_id_entry_front" msgid="5668958706828733669">"Frontal"</string>
<string name="pref_camera_recordlocation_title" msgid="371208839215448917">"Emmagatzema la ubicació"</string>
- <!-- no translation found for pref_camera_location_label (2254270920298609161) -->
- <skip />
+ <string name="pref_camera_location_label" msgid="2254270920298609161">"UBICACIÓ"</string>
<string name="pref_camera_timer_title" msgid="3105232208281893389">"Temporitzador de compte enrere"</string>
<plurals name="pref_camera_timer_entry">
<item quantity="one" msgid="1654523400981245448">"1 segon"</item>
@@ -296,31 +295,23 @@
<string name="pref_camera_scenemode_entry_night" msgid="7606898503102476329">"Nocturn"</string>
<string name="pref_camera_scenemode_entry_sunset" msgid="181661154611507212">"Posta del sol"</string>
<string name="pref_camera_scenemode_entry_party" msgid="907053529286788253">"Festa"</string>
- <!-- no translation found for pref_camera_scenemode_label_auto (4475096836397300237) -->
- <skip />
+ <string name="pref_camera_scenemode_label_auto" msgid="4475096836397300237">"CAP"</string>
<string name="pref_camera_scenemode_label_action" msgid="964748409622151496">"ACCIÓ"</string>
<string name="pref_camera_scenemode_label_night" msgid="1269871886845854574">"NIT"</string>
<string name="pref_camera_scenemode_label_sunset" msgid="2802732082948866877">"POSTA DE SOL"</string>
<string name="pref_camera_scenemode_label_party" msgid="1409459091844374828">"FESTA"</string>
- <!-- no translation found for pref_camera_countdown_label (7592784692450586126) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_off (4987856883590176585) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_one (1101814103087928898) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_three (1047399297342955649) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_ten (6274681535347260279) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_fifteen (4544824246687597089) -->
- <skip />
+ <string name="pref_camera_countdown_label" msgid="7592784692450586126">"TEMPORITZADOR DE COMPTE ENRERE"</string>
+ <string name="pref_camera_countdown_label_off" msgid="4987856883590176585">"TEMPORITZADOR DESACTIVAT"</string>
+ <string name="pref_camera_countdown_label_one" msgid="1101814103087928898">"1 SEGON"</string>
+ <string name="pref_camera_countdown_label_three" msgid="1047399297342955649">"3 SEGONS"</string>
+ <string name="pref_camera_countdown_label_ten" msgid="6274681535347260279">"10 SEGONS"</string>
+ <string name="pref_camera_countdown_label_fifteen" msgid="4544824246687597089">"15 SEGONS"</string>
<string name="not_selectable_in_scene_mode" msgid="2970291701448555126">"No es pot seleccionar en mode d\'escena."</string>
<string name="pref_exposure_title" msgid="1229093066434614811">"Exposició"</string>
<string name="pref_exposure_label" msgid="552624394642497940">"EXPOSICIÓ"</string>
<!-- no translation found for pref_camera_hdr_default (1336869406134365882) -->
<skip />
- <!-- no translation found for pref_camera_hdr_label (7217211253357027510) -->
- <skip />
+ <string name="pref_camera_hdr_label" msgid="7217211253357027510">"HDR"</string>
<string name="pref_camera_id_label_back" msgid="8745553500400332333">"CÀMERA FRONTAL"</string>
<string name="pref_camera_id_label_front" msgid="8699439330056996709">"CÀMERA POSTERIOR"</string>
<string name="dialog_ok" msgid="6263301364153382152">"D\'acord"</string>
diff --git a/res/values-el/filtershow_strings.xml b/res/values-el/filtershow_strings.xml
index 8afcaaa..bfbd589 100644
--- a/res/values-el/filtershow_strings.xml
+++ b/res/values-el/filtershow_strings.xml
@@ -21,16 +21,13 @@
<!-- no translation found for original_picture_text (3076213290079909698) -->
<skip />
<string name="setting_wallpaper" msgid="4679087092300036632">"Ορισμός ταπετσαρίας…"</string>
- <!-- no translation found for download_failure (5923323939788582895) -->
- <skip />
+ <string name="download_failure" msgid="5923323939788582895">"Δεν ήταν δυνατή η λήψη φωτογραφιών. Το δίκτυο δεν είναι διαθέσιμο."</string>
<string name="original" msgid="3524493791230430897">"Αρχική"</string>
<string name="borders" msgid="2067345080568684614">"Σύνορα"</string>
<string name="filtershow_undo" msgid="6781743189243585101">"Αναίρεση"</string>
<string name="filtershow_redo" msgid="4219489910543059747">"Επανάληψη"</string>
- <!-- no translation found for show_imagestate_panel (281932769701043015) -->
- <skip />
- <!-- no translation found for hide_imagestate_panel (7207643485811695257) -->
- <skip />
+ <string name="show_imagestate_panel" msgid="281932769701043015">"Εμφάνιση εφαρμοσμένων εφέ"</string>
+ <string name="hide_imagestate_panel" msgid="7207643485811695257">"Απόκρυψη εφαρμοσμένων εφέ"</string>
<string name="menu_settings" msgid="6428291655769260831">"Ρυθμίσεις"</string>
<string name="unsaved" msgid="8704442449002374375">"Υπάρχουν μη αποθηκευμένες αλλαγές σε αυτήν την εικόνα."</string>
<string name="save_before_exit" msgid="2680660633675916712">"Θέλετε να γίνει αποθήκευση πριν από την έξοδο;"</string>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index 0cff7ed..a4afe6b 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -235,8 +235,7 @@
<string name="pref_camera_id_entry_back" msgid="5142699735103692485">"Πίσω"</string>
<string name="pref_camera_id_entry_front" msgid="5668958706828733669">"Μπροστά"</string>
<string name="pref_camera_recordlocation_title" msgid="371208839215448917">"Αποθήκευση τοποθεσίας"</string>
- <!-- no translation found for pref_camera_location_label (2254270920298609161) -->
- <skip />
+ <string name="pref_camera_location_label" msgid="2254270920298609161">"ΤΟΠΟΘΕΣΙΑ"</string>
<string name="pref_camera_timer_title" msgid="3105232208281893389">"Χρονόμετρο αντίστροφης μέτρησης"</string>
<plurals name="pref_camera_timer_entry">
<item quantity="one" msgid="1654523400981245448">"1 δευτερόλεπτο"</item>
@@ -296,31 +295,23 @@
<string name="pref_camera_scenemode_entry_night" msgid="7606898503102476329">"Νύχτα"</string>
<string name="pref_camera_scenemode_entry_sunset" msgid="181661154611507212">"Ηλιοβασίλεμα"</string>
<string name="pref_camera_scenemode_entry_party" msgid="907053529286788253">"Πάρτι"</string>
- <!-- no translation found for pref_camera_scenemode_label_auto (4475096836397300237) -->
- <skip />
+ <string name="pref_camera_scenemode_label_auto" msgid="4475096836397300237">"ΚΑΜΙΑ"</string>
<string name="pref_camera_scenemode_label_action" msgid="964748409622151496">"ΔΡΑΣΗ"</string>
<string name="pref_camera_scenemode_label_night" msgid="1269871886845854574">"ΝΥΧΤΑ"</string>
<string name="pref_camera_scenemode_label_sunset" msgid="2802732082948866877">"ΗΛΙΟΒΑΣΙΛΕΜΑ"</string>
<string name="pref_camera_scenemode_label_party" msgid="1409459091844374828">"ΠΑΡΤΙ"</string>
- <!-- no translation found for pref_camera_countdown_label (7592784692450586126) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_off (4987856883590176585) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_one (1101814103087928898) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_three (1047399297342955649) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_ten (6274681535347260279) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_fifteen (4544824246687597089) -->
- <skip />
+ <string name="pref_camera_countdown_label" msgid="7592784692450586126">"ΧΡΟΝΟΜΕΤΡΟ ΑΝΤΙΣΤΡΟΦΗΣ ΜΕΤΡΗΣΗΣ"</string>
+ <string name="pref_camera_countdown_label_off" msgid="4987856883590176585">"ΑΝΕΝΕΡΓΟ ΧΡΟΝΟΜΕΤΡΟ"</string>
+ <string name="pref_camera_countdown_label_one" msgid="1101814103087928898">"1 ΔΕΥΤΕΡΟΛΕΠΤΟ"</string>
+ <string name="pref_camera_countdown_label_three" msgid="1047399297342955649">"3 ΔΕΥΤΕΡΟΛΕΠΤΑ"</string>
+ <string name="pref_camera_countdown_label_ten" msgid="6274681535347260279">"10 ΔΕΥΤΕΡΟΛΕΠΤΑ"</string>
+ <string name="pref_camera_countdown_label_fifteen" msgid="4544824246687597089">"15 ΔΕΥΤΕΡΟΛΕΠΤΑ"</string>
<string name="not_selectable_in_scene_mode" msgid="2970291701448555126">"Δεν υπάρχει δυνατότητα επιλογής στη λειτουργία σκηνής."</string>
<string name="pref_exposure_title" msgid="1229093066434614811">"Έκθεση"</string>
<string name="pref_exposure_label" msgid="552624394642497940">"ΕΚΘΕΣΗ"</string>
<!-- no translation found for pref_camera_hdr_default (1336869406134365882) -->
<skip />
- <!-- no translation found for pref_camera_hdr_label (7217211253357027510) -->
- <skip />
+ <string name="pref_camera_hdr_label" msgid="7217211253357027510">"Υψηλό δυναμικό εύρος (HDR)"</string>
<string name="pref_camera_id_label_back" msgid="8745553500400332333">"ΜΠΡΟΣΤΙΝΗ ΚΑΜΕΡΑ"</string>
<string name="pref_camera_id_label_front" msgid="8699439330056996709">"ΠΙΣΩ ΚΑΜΕΡΑ"</string>
<string name="dialog_ok" msgid="6263301364153382152">"OK"</string>
diff --git a/res/values-iw/filtershow_strings.xml b/res/values-iw/filtershow_strings.xml
index 870a1de..b584872 100644
--- a/res/values-iw/filtershow_strings.xml
+++ b/res/values-iw/filtershow_strings.xml
@@ -21,16 +21,13 @@
<!-- no translation found for original_picture_text (3076213290079909698) -->
<skip />
<string name="setting_wallpaper" msgid="4679087092300036632">"מגדיר טפט"</string>
- <!-- no translation found for download_failure (5923323939788582895) -->
- <skip />
+ <string name="download_failure" msgid="5923323939788582895">"לא ניתן היה להוריד את התמונה. הרשת לא זמינה."</string>
<string name="original" msgid="3524493791230430897">"מקור"</string>
<string name="borders" msgid="2067345080568684614">"גבולות"</string>
<string name="filtershow_undo" msgid="6781743189243585101">"בטל"</string>
<string name="filtershow_redo" msgid="4219489910543059747">"בצע מחדש"</string>
- <!-- no translation found for show_imagestate_panel (281932769701043015) -->
- <skip />
- <!-- no translation found for hide_imagestate_panel (7207643485811695257) -->
- <skip />
+ <string name="show_imagestate_panel" msgid="281932769701043015">"הצג אפקטים שהוחלו"</string>
+ <string name="hide_imagestate_panel" msgid="7207643485811695257">"הסתר אפקטים שהוחלו"</string>
<string name="menu_settings" msgid="6428291655769260831">"הגדרות"</string>
<string name="unsaved" msgid="8704442449002374375">"יש בתמונה הזו שינויים שלא נשמרו."</string>
<string name="save_before_exit" msgid="2680660633675916712">"האם אתה רוצה לשמור לפני היציאה?"</string>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index 584a428..1d1a9af 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -235,8 +235,7 @@
<string name="pref_camera_id_entry_back" msgid="5142699735103692485">"הקודם"</string>
<string name="pref_camera_id_entry_front" msgid="5668958706828733669">"חזיתית"</string>
<string name="pref_camera_recordlocation_title" msgid="371208839215448917">"מיקום אחסון"</string>
- <!-- no translation found for pref_camera_location_label (2254270920298609161) -->
- <skip />
+ <string name="pref_camera_location_label" msgid="2254270920298609161">"מיקום"</string>
<string name="pref_camera_timer_title" msgid="3105232208281893389">"טיימר לספירה לאחור"</string>
<plurals name="pref_camera_timer_entry">
<item quantity="one" msgid="1654523400981245448">"שנייה אחת"</item>
@@ -296,31 +295,23 @@
<string name="pref_camera_scenemode_entry_night" msgid="7606898503102476329">"לילה"</string>
<string name="pref_camera_scenemode_entry_sunset" msgid="181661154611507212">"שקיעה"</string>
<string name="pref_camera_scenemode_entry_party" msgid="907053529286788253">"מסיבה"</string>
- <!-- no translation found for pref_camera_scenemode_label_auto (4475096836397300237) -->
- <skip />
+ <string name="pref_camera_scenemode_label_auto" msgid="4475096836397300237">"ללא"</string>
<string name="pref_camera_scenemode_label_action" msgid="964748409622151496">"פעולה"</string>
<string name="pref_camera_scenemode_label_night" msgid="1269871886845854574">"לילה"</string>
<string name="pref_camera_scenemode_label_sunset" msgid="2802732082948866877">"שקיעה"</string>
<string name="pref_camera_scenemode_label_party" msgid="1409459091844374828">"מסיבה"</string>
- <!-- no translation found for pref_camera_countdown_label (7592784692450586126) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_off (4987856883590176585) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_one (1101814103087928898) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_three (1047399297342955649) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_ten (6274681535347260279) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_fifteen (4544824246687597089) -->
- <skip />
+ <string name="pref_camera_countdown_label" msgid="7592784692450586126">"טיימר לספירה לאחור"</string>
+ <string name="pref_camera_countdown_label_off" msgid="4987856883590176585">"טיימר כבוי"</string>
+ <string name="pref_camera_countdown_label_one" msgid="1101814103087928898">"שנייה אחת"</string>
+ <string name="pref_camera_countdown_label_three" msgid="1047399297342955649">"3 שניות"</string>
+ <string name="pref_camera_countdown_label_ten" msgid="6274681535347260279">"10 שניות"</string>
+ <string name="pref_camera_countdown_label_fifteen" msgid="4544824246687597089">"15 שניות"</string>
<string name="not_selectable_in_scene_mode" msgid="2970291701448555126">"לא ניתן לבחירה במצב נוף."</string>
<string name="pref_exposure_title" msgid="1229093066434614811">"חשיפה"</string>
<string name="pref_exposure_label" msgid="552624394642497940">"חשיפה"</string>
<!-- no translation found for pref_camera_hdr_default (1336869406134365882) -->
<skip />
- <!-- no translation found for pref_camera_hdr_label (7217211253357027510) -->
- <skip />
+ <string name="pref_camera_hdr_label" msgid="7217211253357027510">"HDR"</string>
<string name="pref_camera_id_label_back" msgid="8745553500400332333">"מצלמה חזיתית"</string>
<string name="pref_camera_id_label_front" msgid="8699439330056996709">"מצלמה אחורית"</string>
<string name="dialog_ok" msgid="6263301364153382152">"אישור"</string>
diff --git a/res/values-ko/filtershow_strings.xml b/res/values-ko/filtershow_strings.xml
index 36b9e7e..933aa68 100644
--- a/res/values-ko/filtershow_strings.xml
+++ b/res/values-ko/filtershow_strings.xml
@@ -21,16 +21,13 @@
<!-- no translation found for original_picture_text (3076213290079909698) -->
<skip />
<string name="setting_wallpaper" msgid="4679087092300036632">"배경화면 설정 중"</string>
- <!-- no translation found for download_failure (5923323939788582895) -->
- <skip />
+ <string name="download_failure" msgid="5923323939788582895">"네트워크를 사용할 수 없기 때문에 사진을 다운로드할 수 없습니다."</string>
<string name="original" msgid="3524493791230430897">"원본"</string>
<string name="borders" msgid="2067345080568684614">"테두리"</string>
<string name="filtershow_undo" msgid="6781743189243585101">"실행취소"</string>
<string name="filtershow_redo" msgid="4219489910543059747">"다시실행"</string>
- <!-- no translation found for show_imagestate_panel (281932769701043015) -->
- <skip />
- <!-- no translation found for hide_imagestate_panel (7207643485811695257) -->
- <skip />
+ <string name="show_imagestate_panel" msgid="281932769701043015">"적용된 효과 표시"</string>
+ <string name="hide_imagestate_panel" msgid="7207643485811695257">"적용된 효과 숨기기"</string>
<string name="menu_settings" msgid="6428291655769260831">"설정"</string>
<string name="unsaved" msgid="8704442449002374375">"이 이미지에 저장하지 않은 변경사항이 있습니다."</string>
<string name="save_before_exit" msgid="2680660633675916712">"저장하고 나서 종료하시겠습니까?"</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index cc314d9..874fd23 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -235,8 +235,7 @@
<string name="pref_camera_id_entry_back" msgid="5142699735103692485">"후방"</string>
<string name="pref_camera_id_entry_front" msgid="5668958706828733669">"전방"</string>
<string name="pref_camera_recordlocation_title" msgid="371208839215448917">"위치 저장"</string>
- <!-- no translation found for pref_camera_location_label (2254270920298609161) -->
- <skip />
+ <string name="pref_camera_location_label" msgid="2254270920298609161">"위치"</string>
<string name="pref_camera_timer_title" msgid="3105232208281893389">"카운트다운 타이머"</string>
<plurals name="pref_camera_timer_entry">
<item quantity="one" msgid="1654523400981245448">"1초"</item>
@@ -296,31 +295,23 @@
<string name="pref_camera_scenemode_entry_night" msgid="7606898503102476329">"야간"</string>
<string name="pref_camera_scenemode_entry_sunset" msgid="181661154611507212">"일몰"</string>
<string name="pref_camera_scenemode_entry_party" msgid="907053529286788253">"파티"</string>
- <!-- no translation found for pref_camera_scenemode_label_auto (4475096836397300237) -->
- <skip />
+ <string name="pref_camera_scenemode_label_auto" msgid="4475096836397300237">"없음"</string>
<string name="pref_camera_scenemode_label_action" msgid="964748409622151496">"작업"</string>
<string name="pref_camera_scenemode_label_night" msgid="1269871886845854574">"밤"</string>
<string name="pref_camera_scenemode_label_sunset" msgid="2802732082948866877">"일몰"</string>
<string name="pref_camera_scenemode_label_party" msgid="1409459091844374828">"파티"</string>
- <!-- no translation found for pref_camera_countdown_label (7592784692450586126) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_off (4987856883590176585) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_one (1101814103087928898) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_three (1047399297342955649) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_ten (6274681535347260279) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_fifteen (4544824246687597089) -->
- <skip />
+ <string name="pref_camera_countdown_label" msgid="7592784692450586126">"카운트다운 타이머"</string>
+ <string name="pref_camera_countdown_label_off" msgid="4987856883590176585">"타이머 중지"</string>
+ <string name="pref_camera_countdown_label_one" msgid="1101814103087928898">"1초"</string>
+ <string name="pref_camera_countdown_label_three" msgid="1047399297342955649">"3초"</string>
+ <string name="pref_camera_countdown_label_ten" msgid="6274681535347260279">"10초"</string>
+ <string name="pref_camera_countdown_label_fifteen" msgid="4544824246687597089">"15초"</string>
<string name="not_selectable_in_scene_mode" msgid="2970291701448555126">"장면 모드에서 선택할 수 없습니다."</string>
<string name="pref_exposure_title" msgid="1229093066434614811">"노출"</string>
<string name="pref_exposure_label" msgid="552624394642497940">"노출"</string>
<!-- no translation found for pref_camera_hdr_default (1336869406134365882) -->
<skip />
- <!-- no translation found for pref_camera_hdr_label (7217211253357027510) -->
- <skip />
+ <string name="pref_camera_hdr_label" msgid="7217211253357027510">"HDR"</string>
<string name="pref_camera_id_label_back" msgid="8745553500400332333">"전방 카메라"</string>
<string name="pref_camera_id_label_front" msgid="8699439330056996709">"후방 카메라"</string>
<string name="dialog_ok" msgid="6263301364153382152">"확인"</string>
diff --git a/res/values-large/filtershow_values.xml b/res/values-large/filtershow_values.xml
new file mode 100644
index 0000000..1098ee0
--- /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-ms/filtershow_strings.xml b/res/values-ms/filtershow_strings.xml
index 559b667..cac3e7d 100644
--- a/res/values-ms/filtershow_strings.xml
+++ b/res/values-ms/filtershow_strings.xml
@@ -21,16 +21,13 @@
<!-- no translation found for original_picture_text (3076213290079909698) -->
<skip />
<string name="setting_wallpaper" msgid="4679087092300036632">"Menetapkan kertas dinding"</string>
- <!-- no translation found for download_failure (5923323939788582895) -->
- <skip />
+ <string name="download_failure" msgid="5923323939788582895">"Tidak dapat memuat turun foto. Rangkaian tidak tersedia."</string>
<string name="original" msgid="3524493791230430897">"Asli"</string>
<string name="borders" msgid="2067345080568684614">"Sempadan"</string>
<string name="filtershow_undo" msgid="6781743189243585101">"Buat asal"</string>
<string name="filtershow_redo" msgid="4219489910543059747">"Buat semula"</string>
- <!-- no translation found for show_imagestate_panel (281932769701043015) -->
- <skip />
- <!-- no translation found for hide_imagestate_panel (7207643485811695257) -->
- <skip />
+ <string name="show_imagestate_panel" msgid="281932769701043015">"Tunjukkan Kesan Digunakan"</string>
+ <string name="hide_imagestate_panel" msgid="7207643485811695257">"Sembunyikan Kesan Digunakan"</string>
<string name="menu_settings" msgid="6428291655769260831">"Tetapan"</string>
<string name="unsaved" msgid="8704442449002374375">"Terdapat perubahan kepada imej ini yang tidak disimpan."</string>
<string name="save_before_exit" msgid="2680660633675916712">"Adakah anda ingin simpan sebelum keluar?"</string>
diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml
index 212c70b..3f5d185 100644
--- a/res/values-ms/strings.xml
+++ b/res/values-ms/strings.xml
@@ -235,8 +235,7 @@
<string name="pref_camera_id_entry_back" msgid="5142699735103692485">"Belakang"</string>
<string name="pref_camera_id_entry_front" msgid="5668958706828733669">"Depan"</string>
<string name="pref_camera_recordlocation_title" msgid="371208839215448917">"Lokasi stor"</string>
- <!-- no translation found for pref_camera_location_label (2254270920298609161) -->
- <skip />
+ <string name="pref_camera_location_label" msgid="2254270920298609161">"LOKASI"</string>
<string name="pref_camera_timer_title" msgid="3105232208281893389">"Pemasa hitung detik"</string>
<plurals name="pref_camera_timer_entry">
<item quantity="one" msgid="1654523400981245448">"1 saat"</item>
@@ -296,31 +295,23 @@
<string name="pref_camera_scenemode_entry_night" msgid="7606898503102476329">"Malam"</string>
<string name="pref_camera_scenemode_entry_sunset" msgid="181661154611507212">"Matahari Terbenam"</string>
<string name="pref_camera_scenemode_entry_party" msgid="907053529286788253">"Parti"</string>
- <!-- no translation found for pref_camera_scenemode_label_auto (4475096836397300237) -->
- <skip />
+ <string name="pref_camera_scenemode_label_auto" msgid="4475096836397300237">"TIADA"</string>
<string name="pref_camera_scenemode_label_action" msgid="964748409622151496">"TINDAKAN"</string>
<string name="pref_camera_scenemode_label_night" msgid="1269871886845854574">"MALAM"</string>
<string name="pref_camera_scenemode_label_sunset" msgid="2802732082948866877">"MATAHARI TERBENAM"</string>
<string name="pref_camera_scenemode_label_party" msgid="1409459091844374828">"PARTI"</string>
- <!-- no translation found for pref_camera_countdown_label (7592784692450586126) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_off (4987856883590176585) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_one (1101814103087928898) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_three (1047399297342955649) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_ten (6274681535347260279) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_fifteen (4544824246687597089) -->
- <skip />
+ <string name="pref_camera_countdown_label" msgid="7592784692450586126">"PEMASA HITUNG DETIK"</string>
+ <string name="pref_camera_countdown_label_off" msgid="4987856883590176585">"PEMASA DIMATIKAN"</string>
+ <string name="pref_camera_countdown_label_one" msgid="1101814103087928898">"1 SAAT"</string>
+ <string name="pref_camera_countdown_label_three" msgid="1047399297342955649">"3 SAAT"</string>
+ <string name="pref_camera_countdown_label_ten" msgid="6274681535347260279">"10 SAAT"</string>
+ <string name="pref_camera_countdown_label_fifteen" msgid="4544824246687597089">"15 SAAT"</string>
<string name="not_selectable_in_scene_mode" msgid="2970291701448555126">"Tidak boleh dipilih dalam mod pemandangan."</string>
<string name="pref_exposure_title" msgid="1229093066434614811">"Dedahan"</string>
<string name="pref_exposure_label" msgid="552624394642497940">"DEDAHAN"</string>
<!-- no translation found for pref_camera_hdr_default (1336869406134365882) -->
<skip />
- <!-- no translation found for pref_camera_hdr_label (7217211253357027510) -->
- <skip />
+ <string name="pref_camera_hdr_label" msgid="7217211253357027510">"HDR"</string>
<string name="pref_camera_id_label_back" msgid="8745553500400332333">"KAMERA DEPAN"</string>
<string name="pref_camera_id_label_front" msgid="8699439330056996709">"KAMERA BELAKANG"</string>
<string name="dialog_ok" msgid="6263301364153382152">"OK"</string>
diff --git a/res/values-rm/filtershow_strings.xml b/res/values-rm/filtershow_strings.xml
new file mode 100644
index 0000000..590ad0c
--- /dev/null
+++ b/res/values-rm/filtershow_strings.xml
@@ -0,0 +1,169 @@
+<?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.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- no translation found for title_activity_filter_show (2036539130684382763) -->
+ <skip />
+ <!-- no translation found for cannot_load_image (5023634941212959976) -->
+ <skip />
+ <!-- no translation found for original_picture_text (3076213290079909698) -->
+ <skip />
+ <!-- no translation found for setting_wallpaper (4679087092300036632) -->
+ <skip />
+ <!-- no translation found for download_failure (5923323939788582895) -->
+ <skip />
+ <!-- no translation found for original (3524493791230430897) -->
+ <skip />
+ <!-- no translation found for borders (2067345080568684614) -->
+ <!-- no translation found for borders (4461692156695893616) -->
+ <skip />
+ <!-- no translation found for filtershow_undo (6781743189243585101) -->
+ <skip />
+ <!-- no translation found for filtershow_redo (4219489910543059747) -->
+ <skip />
+ <!-- no translation found for show_imagestate_panel (281932769701043015) -->
+ <skip />
+ <!-- no translation found for hide_imagestate_panel (7207643485811695257) -->
+ <skip />
+ <!-- no translation found for menu_settings (6428291655769260831) -->
+ <skip />
+ <!-- no translation found for unsaved (8704442449002374375) -->
+ <skip />
+ <!-- no translation found for save_before_exit (2680660633675916712) -->
+ <skip />
+ <!-- no translation found for save_and_exit (3628425023766687419) -->
+ <skip />
+ <!-- no translation found for exit (242642957038770113) -->
+ <skip />
+ <!-- no translation found for history (455767361472692409) -->
+ <skip />
+ <!-- no translation found for reset (9013181350779592937) -->
+ <skip />
+ <!-- no translation found for history_original (150973253194312841) -->
+ <skip />
+ <!-- no translation found for imageState (8632586742752891968) -->
+ <skip />
+ <!-- no translation found for compare_original (8140838959007796977) -->
+ <skip />
+ <!-- no translation found for apply_effect (1218288221200568947) -->
+ <skip />
+ <!-- no translation found for reset_effect (7712605581024929564) -->
+ <skip />
+ <!-- no translation found for aspect (4025244950820813059) -->
+ <skip />
+ <!-- no translation found for aspect1to1_effect (1159104543795779123) -->
+ <skip />
+ <!-- no translation found for aspect4to3_effect (7968067847241223578) -->
+ <skip />
+ <!-- no translation found for aspect3to4_effect (7078163990979248864) -->
+ <skip />
+ <!-- no translation found for aspect4to6_effect (1410129351686165654) -->
+ <skip />
+ <!-- no translation found for aspect5to7_effect (5122395569059384741) -->
+ <skip />
+ <!-- no translation found for aspect7to5_effect (5780001758108328143) -->
+ <skip />
+ <!-- no translation found for aspect9to16_effect (7740468012919660728) -->
+ <skip />
+ <!-- no translation found for aspectNone_effect (6263330561046574134) -->
+ <skip />
+ <!-- no translation found for aspectOriginal_effect (5678516555493036594) -->
+ <skip />
+ <!-- no translation found for Fixed (8017376448916924565) -->
+ <skip />
+ <!-- no translation found for tinyplanet (2783694326474415761) -->
+ <skip />
+ <string name="exposure" msgid="6526397045949374905">"Exposiziun"</string>
+ <!-- no translation found for sharpness (6463103068318055412) -->
+ <skip />
+ <!-- no translation found for contrast (2310908487756769019) -->
+ <skip />
+ <!-- no translation found for vibrance (3326744578577835915) -->
+ <skip />
+ <!-- no translation found for saturation (7026791551032438585) -->
+ <skip />
+ <!-- no translation found for bwfilter (8927492494576933793) -->
+ <skip />
+ <!-- no translation found for wbalance (6346581563387083613) -->
+ <skip />
+ <!-- no translation found for hue (6231252147971086030) -->
+ <skip />
+ <!-- no translation found for shadow_recovery (3928572915300287152) -->
+ <skip />
+ <!-- no translation found for highlight_recovery (8262208470735204243) -->
+ <skip />
+ <!-- no translation found for curvesRGB (915010781090477550) -->
+ <skip />
+ <!-- no translation found for vignette (934721068851885390) -->
+ <skip />
+ <!-- no translation found for redeye (4508883127049472069) -->
+ <skip />
+ <!-- no translation found for imageDraw (6918552177844486656) -->
+ <skip />
+ <!-- no translation found for straighten (26025591664983528) -->
+ <!-- no translation found for straighten (5217801513491493491) -->
+ <skip />
+ <string name="crop" msgid="5781263790107850771">"Retagliar"</string>
+ <string name="rotate" msgid="2796802553793795371">"Rotar"</string>
+ <!-- no translation found for mirror (5482518108154883096) -->
+ <skip />
+ <!-- no translation found for negative (6998313764388022201) -->
+ <skip />
+ <!-- no translation found for none (6633966646410296520) -->
+ <!-- no translation found for none (3601545724573307541) -->
+ <skip />
+ <!-- no translation found for edge (7036064886242147551) -->
+ <skip />
+ <!-- no translation found for kmeans (1630263230946107457) -->
+ <skip />
+ <!-- no translation found for downsample (3552938534146980104) -->
+ <skip />
+ <!-- no translation found for curves_channel_rgb (7909209509638333690) -->
+ <skip />
+ <!-- no translation found for curves_channel_red (4199710104162111357) -->
+ <skip />
+ <!-- no translation found for curves_channel_green (3733003466905031016) -->
+ <skip />
+ <!-- no translation found for curves_channel_blue (9129211507395079371) -->
+ <skip />
+ <!-- no translation found for draw_style (2036125061987325389) -->
+ <skip />
+ <!-- no translation found for draw_size (4360005386104151209) -->
+ <skip />
+ <!-- no translation found for draw_color (2119030386987211193) -->
+ <skip />
+ <!-- no translation found for draw_style_line (9216476853904429628) -->
+ <skip />
+ <!-- no translation found for draw_style_brush_spatter (7612691122932981554) -->
+ <skip />
+ <!-- no translation found for draw_style_brush_marker (8468302322165644292) -->
+ <skip />
+ <!-- no translation found for draw_clear (6728155515454921052) -->
+ <skip />
+ <!-- no translation found for color_pick_select (734312818059057394) -->
+ <skip />
+ <!-- no translation found for color_pick_title (6195567431995308876) -->
+ <skip />
+ <!-- no translation found for draw_size_title (3121649039610273977) -->
+ <skip />
+ <!-- no translation found for draw_size_accept (6781529716526190028) -->
+ <skip />
+ <!-- no translation found for state_panel_original (9069584409934164419) -->
+ <skip />
+ <!-- no translation found for state_panel_result (318640531123298676) -->
+ <skip />
+</resources>
diff --git a/res/values-th/filtershow_strings.xml b/res/values-th/filtershow_strings.xml
index cabb5cc..311e89e 100644
--- a/res/values-th/filtershow_strings.xml
+++ b/res/values-th/filtershow_strings.xml
@@ -21,16 +21,13 @@
<!-- no translation found for original_picture_text (3076213290079909698) -->
<skip />
<string name="setting_wallpaper" msgid="4679087092300036632">"กำลังตั้งค่าวอลเปเปอร์"</string>
- <!-- no translation found for download_failure (5923323939788582895) -->
- <skip />
+ <string name="download_failure" msgid="5923323939788582895">"ไม่สามารถดาวน์โหลดภาพ เครือข่ายไม่พร้อมใช้งาน"</string>
<string name="original" msgid="3524493791230430897">"ต้นฉบับ"</string>
<string name="borders" msgid="2067345080568684614">"ขอบ"</string>
<string name="filtershow_undo" msgid="6781743189243585101">"เลิกทำ"</string>
<string name="filtershow_redo" msgid="4219489910543059747">"ทำซ้ำ"</string>
- <!-- no translation found for show_imagestate_panel (281932769701043015) -->
- <skip />
- <!-- no translation found for hide_imagestate_panel (7207643485811695257) -->
- <skip />
+ <string name="show_imagestate_panel" msgid="281932769701043015">"แสดงเอฟเฟ็กต์ที่ใช้"</string>
+ <string name="hide_imagestate_panel" msgid="7207643485811695257">"ซ่อนเอฟเฟ็กต์ที่ใช้"</string>
<string name="menu_settings" msgid="6428291655769260831">"การตั้งค่า"</string>
<string name="unsaved" msgid="8704442449002374375">"มีการเปลี่ยนแปลงที่ไม่ได้บันทึกไปยังภาพนี้"</string>
<string name="save_before_exit" msgid="2680660633675916712">"คุณต้องการบันทึกก่อนที่จะออกหรือไม่"</string>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index dc9dce7..d3cabce 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -235,8 +235,7 @@
<string name="pref_camera_id_entry_back" msgid="5142699735103692485">"ย้อนกลับ"</string>
<string name="pref_camera_id_entry_front" msgid="5668958706828733669">"ด้านหน้า"</string>
<string name="pref_camera_recordlocation_title" msgid="371208839215448917">"ตำแหน่งจัดเก็บ"</string>
- <!-- no translation found for pref_camera_location_label (2254270920298609161) -->
- <skip />
+ <string name="pref_camera_location_label" msgid="2254270920298609161">"ตำแหน่ง"</string>
<string name="pref_camera_timer_title" msgid="3105232208281893389">"ตัวจับเวลาถอยหลัง"</string>
<plurals name="pref_camera_timer_entry">
<item quantity="one" msgid="1654523400981245448">"1 วินาที"</item>
@@ -296,31 +295,23 @@
<string name="pref_camera_scenemode_entry_night" msgid="7606898503102476329">"กลางคืน"</string>
<string name="pref_camera_scenemode_entry_sunset" msgid="181661154611507212">"ดวงอาทิตย์ตก"</string>
<string name="pref_camera_scenemode_entry_party" msgid="907053529286788253">"งานเลี้ยง"</string>
- <!-- no translation found for pref_camera_scenemode_label_auto (4475096836397300237) -->
- <skip />
+ <string name="pref_camera_scenemode_label_auto" msgid="4475096836397300237">"ไม่มี"</string>
<string name="pref_camera_scenemode_label_action" msgid="964748409622151496">"การทำงาน"</string>
<string name="pref_camera_scenemode_label_night" msgid="1269871886845854574">"กลางคืน"</string>
<string name="pref_camera_scenemode_label_sunset" msgid="2802732082948866877">"ดวงอาทิตย์ตก"</string>
<string name="pref_camera_scenemode_label_party" msgid="1409459091844374828">"ปาร์ตี้"</string>
- <!-- no translation found for pref_camera_countdown_label (7592784692450586126) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_off (4987856883590176585) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_one (1101814103087928898) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_three (1047399297342955649) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_ten (6274681535347260279) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_fifteen (4544824246687597089) -->
- <skip />
+ <string name="pref_camera_countdown_label" msgid="7592784692450586126">"ตัวจับเวลาถอยหลัง"</string>
+ <string name="pref_camera_countdown_label_off" msgid="4987856883590176585">"ตัวจับเวลาปิด"</string>
+ <string name="pref_camera_countdown_label_one" msgid="1101814103087928898">"1 วินาที"</string>
+ <string name="pref_camera_countdown_label_three" msgid="1047399297342955649">"3 วินาที"</string>
+ <string name="pref_camera_countdown_label_ten" msgid="6274681535347260279">"10 วินาที"</string>
+ <string name="pref_camera_countdown_label_fifteen" msgid="4544824246687597089">"15 วินาที"</string>
<string name="not_selectable_in_scene_mode" msgid="2970291701448555126">"ไม่สามารถเลือกได้ในโหมดสำเร็จรูป"</string>
<string name="pref_exposure_title" msgid="1229093066434614811">"การรับแสง"</string>
<string name="pref_exposure_label" msgid="552624394642497940">"การรับแสง"</string>
<!-- no translation found for pref_camera_hdr_default (1336869406134365882) -->
<skip />
- <!-- no translation found for pref_camera_hdr_label (7217211253357027510) -->
- <skip />
+ <string name="pref_camera_hdr_label" msgid="7217211253357027510">"HDR"</string>
<string name="pref_camera_id_label_back" msgid="8745553500400332333">"กล้องด้านหน้า"</string>
<string name="pref_camera_id_label_front" msgid="8699439330056996709">"กล้องด้านหลัง"</string>
<string name="dialog_ok" msgid="6263301364153382152">"ตกลง"</string>
diff --git a/res/values-tl/filtershow_strings.xml b/res/values-tl/filtershow_strings.xml
index 949a84f..e0d5b10 100644
--- a/res/values-tl/filtershow_strings.xml
+++ b/res/values-tl/filtershow_strings.xml
@@ -21,16 +21,13 @@
<!-- no translation found for original_picture_text (3076213290079909698) -->
<skip />
<string name="setting_wallpaper" msgid="4679087092300036632">"Itinatakda ang wallpaper"</string>
- <!-- no translation found for download_failure (5923323939788582895) -->
- <skip />
+ <string name="download_failure" msgid="5923323939788582895">"Hindi ma-download ang larawan. Hindi available ang network."</string>
<string name="original" msgid="3524493791230430897">"Orihinal"</string>
<string name="borders" msgid="2067345080568684614">"Mga Border"</string>
<string name="filtershow_undo" msgid="6781743189243585101">"I-undo"</string>
<string name="filtershow_redo" msgid="4219489910543059747">"I-redo"</string>
- <!-- no translation found for show_imagestate_panel (281932769701043015) -->
- <skip />
- <!-- no translation found for hide_imagestate_panel (7207643485811695257) -->
- <skip />
+ <string name="show_imagestate_panel" msgid="281932769701043015">"Ipakita Mga Inilapat na Effect"</string>
+ <string name="hide_imagestate_panel" msgid="7207643485811695257">"Itago Mga Inilapat na Effect"</string>
<string name="menu_settings" msgid="6428291655769260831">"Mga Setting"</string>
<string name="unsaved" msgid="8704442449002374375">"May mga hindi naka-save na pagbabago sa larawang ito."</string>
<string name="save_before_exit" msgid="2680660633675916712">"Gusto mo bang mag-save bago lumabas?"</string>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 3e618d4..0b655ce 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -235,8 +235,7 @@
<string name="pref_camera_id_entry_back" msgid="5142699735103692485">"Bumalik"</string>
<string name="pref_camera_id_entry_front" msgid="5668958706828733669">"Harap"</string>
<string name="pref_camera_recordlocation_title" msgid="371208839215448917">"Iimbak ang lokasyon"</string>
- <!-- no translation found for pref_camera_location_label (2254270920298609161) -->
- <skip />
+ <string name="pref_camera_location_label" msgid="2254270920298609161">"LOKASYON"</string>
<string name="pref_camera_timer_title" msgid="3105232208281893389">"Timer ng countdown"</string>
<plurals name="pref_camera_timer_entry">
<item quantity="one" msgid="1654523400981245448">"1 segundo"</item>
@@ -296,31 +295,23 @@
<string name="pref_camera_scenemode_entry_night" msgid="7606898503102476329">"Gabi"</string>
<string name="pref_camera_scenemode_entry_sunset" msgid="181661154611507212">"Paglubog ng araw"</string>
<string name="pref_camera_scenemode_entry_party" msgid="907053529286788253">"Partido"</string>
- <!-- no translation found for pref_camera_scenemode_label_auto (4475096836397300237) -->
- <skip />
+ <string name="pref_camera_scenemode_label_auto" msgid="4475096836397300237">"WALA"</string>
<string name="pref_camera_scenemode_label_action" msgid="964748409622151496">"ACTION"</string>
<string name="pref_camera_scenemode_label_night" msgid="1269871886845854574">"NIGHT"</string>
<string name="pref_camera_scenemode_label_sunset" msgid="2802732082948866877">"SUNSET"</string>
<string name="pref_camera_scenemode_label_party" msgid="1409459091844374828">"PARTY"</string>
- <!-- no translation found for pref_camera_countdown_label (7592784692450586126) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_off (4987856883590176585) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_one (1101814103087928898) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_three (1047399297342955649) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_ten (6274681535347260279) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_fifteen (4544824246687597089) -->
- <skip />
+ <string name="pref_camera_countdown_label" msgid="7592784692450586126">"COUNTDOWN TIMER"</string>
+ <string name="pref_camera_countdown_label_off" msgid="4987856883590176585">"NAKA-OFF ANG TIMER"</string>
+ <string name="pref_camera_countdown_label_one" msgid="1101814103087928898">"1 SEGUNDO"</string>
+ <string name="pref_camera_countdown_label_three" msgid="1047399297342955649">"3 SEGUNDO"</string>
+ <string name="pref_camera_countdown_label_ten" msgid="6274681535347260279">"10 SEGUNDO"</string>
+ <string name="pref_camera_countdown_label_fifteen" msgid="4544824246687597089">"15 SEGUNDO"</string>
<string name="not_selectable_in_scene_mode" msgid="2970291701448555126">"Hindi mapipili sa mode ng scene."</string>
<string name="pref_exposure_title" msgid="1229093066434614811">"Pagkakalantad"</string>
<string name="pref_exposure_label" msgid="552624394642497940">"EXPOSURE"</string>
<!-- no translation found for pref_camera_hdr_default (1336869406134365882) -->
<skip />
- <!-- no translation found for pref_camera_hdr_label (7217211253357027510) -->
- <skip />
+ <string name="pref_camera_hdr_label" msgid="7217211253357027510">"HDR"</string>
<string name="pref_camera_id_label_back" msgid="8745553500400332333">"CAMERA SA HARAP"</string>
<string name="pref_camera_id_label_front" msgid="8699439330056996709">"CAMERA SA LIKOD"</string>
<string name="dialog_ok" msgid="6263301364153382152">"OK"</string>
diff --git a/res/values-xlarge/filtershow_values.xml b/res/values-xlarge/filtershow_values.xml
new file mode 100644
index 0000000..1098ee0
--- /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-zu/filtershow_strings.xml b/res/values-zu/filtershow_strings.xml
index 0f7e86b..93e04d2 100644
--- a/res/values-zu/filtershow_strings.xml
+++ b/res/values-zu/filtershow_strings.xml
@@ -21,16 +21,13 @@
<!-- no translation found for original_picture_text (3076213290079909698) -->
<skip />
<string name="setting_wallpaper" msgid="4679087092300036632">"Isetha isithombe sangemuva"</string>
- <!-- no translation found for download_failure (5923323939788582895) -->
- <skip />
+ <string name="download_failure" msgid="5923323939788582895">"Ayikwazanga ukulanda isithombe. Inethiwekhi ayitholakali."</string>
<string name="original" msgid="3524493791230430897">"Oluqobo"</string>
<string name="borders" msgid="2067345080568684614">"Imingcele"</string>
<string name="filtershow_undo" msgid="6781743189243585101">"Hlehlisa"</string>
<string name="filtershow_redo" msgid="4219489910543059747">"Yenza kabusha"</string>
- <!-- no translation found for show_imagestate_panel (281932769701043015) -->
- <skip />
- <!-- no translation found for hide_imagestate_panel (7207643485811695257) -->
- <skip />
+ <string name="show_imagestate_panel" msgid="281932769701043015">"Bonisa imiphumela esetshenzisiwe"</string>
+ <string name="hide_imagestate_panel" msgid="7207643485811695257">"Fihla imiphumela esetshenzisiwe"</string>
<string name="menu_settings" msgid="6428291655769260831">"Izilungiselelo"</string>
<string name="unsaved" msgid="8704442449002374375">"Kukhona ushintsho olungalondolozwanga kulesi sithombe."</string>
<string name="save_before_exit" msgid="2680660633675916712">"Ufuna ukulondoloza ngaphambi kokuphuma?"</string>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index aed35d5..b453cf6 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -237,8 +237,7 @@
<string name="pref_camera_id_entry_back" msgid="5142699735103692485">"Emuva"</string>
<string name="pref_camera_id_entry_front" msgid="5668958706828733669">"Phambili"</string>
<string name="pref_camera_recordlocation_title" msgid="371208839215448917">"Gcina indawo"</string>
- <!-- no translation found for pref_camera_location_label (2254270920298609161) -->
- <skip />
+ <string name="pref_camera_location_label" msgid="2254270920298609161">"INDAWO"</string>
<string name="pref_camera_timer_title" msgid="3105232208281893389">"Isikali sesikhathi esibala ngokwehla"</string>
<plurals name="pref_camera_timer_entry">
<item quantity="one" msgid="1654523400981245448">"1 isekhondi"</item>
@@ -298,31 +297,23 @@
<string name="pref_camera_scenemode_entry_night" msgid="7606898503102476329">"Ebusuku"</string>
<string name="pref_camera_scenemode_entry_sunset" msgid="181661154611507212">"Ukushona kwelanga"</string>
<string name="pref_camera_scenemode_entry_party" msgid="907053529286788253">"Phathi"</string>
- <!-- no translation found for pref_camera_scenemode_label_auto (4475096836397300237) -->
- <skip />
+ <string name="pref_camera_scenemode_label_auto" msgid="4475096836397300237">"LUTHO"</string>
<string name="pref_camera_scenemode_label_action" msgid="964748409622151496">"ISENZO"</string>
<string name="pref_camera_scenemode_label_night" msgid="1269871886845854574">"EBUSUKU"</string>
<string name="pref_camera_scenemode_label_sunset" msgid="2802732082948866877">"UKUSHONA KWELANGA"</string>
<string name="pref_camera_scenemode_label_party" msgid="1409459091844374828">"IPHATHI"</string>
- <!-- no translation found for pref_camera_countdown_label (7592784692450586126) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_off (4987856883590176585) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_one (1101814103087928898) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_three (1047399297342955649) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_ten (6274681535347260279) -->
- <skip />
- <!-- no translation found for pref_camera_countdown_label_fifteen (4544824246687597089) -->
- <skip />
+ <string name="pref_camera_countdown_label" msgid="7592784692450586126">"ISIKHALI SESHIKHATHI ESIBALA NGOKWEHLA"</string>
+ <string name="pref_camera_countdown_label_off" msgid="4987856883590176585">"ISIKALI SESIKHATHI SIVALIWE"</string>
+ <string name="pref_camera_countdown_label_one" msgid="1101814103087928898">"1 ISEKHONDI"</string>
+ <string name="pref_camera_countdown_label_three" msgid="1047399297342955649">"3 AMASEKHONDI"</string>
+ <string name="pref_camera_countdown_label_ten" msgid="6274681535347260279">"10 AMASEKHONDI"</string>
+ <string name="pref_camera_countdown_label_fifteen" msgid="4544824246687597089">"15 AMASEKHONDI"</string>
<string name="not_selectable_in_scene_mode" msgid="2970291701448555126">"Akukhetheki esimweni sokubuka"</string>
<string name="pref_exposure_title" msgid="1229093066434614811">"Isibonelelo"</string>
<string name="pref_exposure_label" msgid="552624394642497940">"UKUBONISWA"</string>
<!-- no translation found for pref_camera_hdr_default (1336869406134365882) -->
<skip />
- <!-- no translation found for pref_camera_hdr_label (7217211253357027510) -->
- <skip />
+ <string name="pref_camera_hdr_label" msgid="7217211253357027510">"I-HDR"</string>
<string name="pref_camera_id_label_back" msgid="8745553500400332333">"IKHAMERA EPHAMBILI"</string>
<string name="pref_camera_id_label_front" msgid="8699439330056996709">"IKHAMERA ENGEMUVA"</string>
<string name="dialog_ok" msgid="6263301364153382152">"KULUNGILE"</string>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 582ddcb..5a00a69 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 aba596f..94697d1 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 70191fd..f6bf7fb 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 b8d4929..c8ad2a9 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 0000000..f516a39
--- /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 67c645d..32a3a87 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/camera/ui/CameraRootView.java b/src/com/android/camera/ui/CameraRootView.java
index cce6495..9e3469f 100644
--- a/src/com/android/camera/ui/CameraRootView.java
+++ b/src/com/android/camera/ui/CameraRootView.java
@@ -32,6 +32,10 @@
public class CameraRootView extends RelativeLayout
implements RotatableLayout.RotationListener {
+ private int mTopMargin = 0;
+ private int mBottomMargin = 0;
+ private int mLeftMargin = 0;
+ private int mRightMargin = 0;
private int mOffset = 0;
public CameraRootView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -45,7 +49,23 @@
super.fitSystemWindows(insets);
// insets include status bar, navigation bar, etc
// In this case, we are only concerned with the size of nav bar
- if (mOffset > 0) return true;
+ if (mOffset > 0) {
+ // Add margin if necessary to the view to ensure nothing is covered
+ // by navigation bar
+ FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams();
+ int right, bottom;
+ if (insets.right > 0) {
+ // navigation bar on the right
+ right = mRightMargin > 0 ? 0 : insets.right;
+ bottom = 0;
+ } else {
+ // navigation bar on the bottom
+ bottom = mBottomMargin > 0 ? 0 : insets.bottom;
+ right = 0;
+ }
+ lp.setMargins(mLeftMargin, mTopMargin, mRightMargin + right, mBottomMargin + bottom);
+ return true;
+ }
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams();
if (insets.bottom > 0) {
mOffset = insets.bottom;
@@ -54,10 +74,11 @@
}
Configuration config = getResources().getConfiguration();
if (config.orientation == Configuration.ORIENTATION_PORTRAIT) {
- lp.setMargins(0, 0, 0, mOffset);
+ mBottomMargin = mOffset;
} else if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {
- lp.setMargins(0, 0, mOffset, 0);
+ mRightMargin = mOffset;
}
+ lp.setMargins( mLeftMargin, mTopMargin, mRightMargin, mBottomMargin);
CameraControls controls = (CameraControls) findViewById(R.id.camera_controls);
if (controls != null) {
controls.setRotationListener(this);
@@ -69,10 +90,10 @@
@Override
public void onRotation(int rotation) {
FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams();
- int b = lp.bottomMargin;
- int t = lp.topMargin;
- int l = lp.leftMargin;
- int r = lp.rightMargin;
+ int b = mBottomMargin;
+ int t = mTopMargin;
+ int l = mLeftMargin;
+ int r = mRightMargin;
rotation = (rotation + 360) % 360;
if (rotation == 90) {
lp.setMargins(b, l, t, r);
@@ -81,5 +102,9 @@
} else if (rotation == 180) {
lp.setMargins(r, b, l, t);
}
+ mLeftMargin = lp.leftMargin;
+ mTopMargin = lp.topMargin;
+ mRightMargin = lp.rightMargin;
+ mBottomMargin = lp.bottomMargin;
}
}
diff --git a/src/com/android/gallery3d/filtershow/EditorPlaceHolder.java b/src/com/android/gallery3d/filtershow/EditorPlaceHolder.java
index 38424ec..30d4dde 100644
--- a/src/com/android/gallery3d/filtershow/EditorPlaceHolder.java
+++ b/src/com/android/gallery3d/filtershow/EditorPlaceHolder.java
@@ -12,7 +12,7 @@
import java.util.Vector;
public class EditorPlaceHolder {
- private static final String LOGTAG = "PanelController";
+ private static final String LOGTAG = "EditorPlaceHolder";
private FilterShowActivity mActivity = null;
private FrameLayout mContainer = null;
@@ -88,4 +88,5 @@
public Editor getEditor(int editorId) {
return mEditors.get(editorId);
}
+
}
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index 20061ee..56680b0 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -21,66 +21,54 @@
import android.app.ProgressDialog;
import android.app.WallpaperManager;
import android.content.ContentValues;
-import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
+import android.content.pm.ActivityInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Bitmap;
-import android.graphics.Color;
import android.graphics.Point;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
-import android.provider.MediaStore;
+import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
-import android.view.*;
+import android.view.Display;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
import android.view.View.OnClickListener;
+import android.view.WindowManager;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.FrameLayout;
-import android.widget.ImageButton;
-import android.widget.LinearLayout;
-import android.widget.ListView;
import android.widget.ShareActionProvider;
import android.widget.ShareActionProvider.OnShareTargetSelectedListener;
-import android.widget.Toast;
+import android.widget.Toast;
import com.android.gallery3d.R;
import com.android.gallery3d.data.LocalAlbum;
import com.android.gallery3d.filtershow.cache.CachingPipeline;
import com.android.gallery3d.filtershow.cache.FilteringPipeline;
import com.android.gallery3d.filtershow.cache.ImageLoader;
+import com.android.gallery3d.filtershow.category.*;
import com.android.gallery3d.filtershow.crop.CropExtras;
-import com.android.gallery3d.filtershow.editors.BasicEditor;
-import com.android.gallery3d.filtershow.editors.EditorCrop;
-import com.android.gallery3d.filtershow.editors.EditorDraw;
-import com.android.gallery3d.filtershow.editors.EditorFlip;
-import com.android.gallery3d.filtershow.editors.EditorInfo;
-import com.android.gallery3d.filtershow.editors.EditorManager;
-import com.android.gallery3d.filtershow.editors.EditorRedEye;
-import com.android.gallery3d.filtershow.editors.EditorRotate;
-import com.android.gallery3d.filtershow.editors.EditorStraighten;
-import com.android.gallery3d.filtershow.editors.EditorTinyPlanet;
-import com.android.gallery3d.filtershow.editors.ImageOnlyEditor;
+import com.android.gallery3d.filtershow.editors.*;
import com.android.gallery3d.filtershow.filters.*;
import com.android.gallery3d.filtershow.imageshow.GeometryMetadata;
import com.android.gallery3d.filtershow.imageshow.ImageCrop;
import com.android.gallery3d.filtershow.imageshow.ImageShow;
-import com.android.gallery3d.filtershow.imageshow.ImageTinyPlanet;
import com.android.gallery3d.filtershow.imageshow.MasterImage;
import com.android.gallery3d.filtershow.presets.ImagePreset;
import com.android.gallery3d.filtershow.provider.SharedImageProvider;
import com.android.gallery3d.filtershow.state.StateAdapter;
-import com.android.gallery3d.filtershow.state.StatePanel;
import com.android.gallery3d.filtershow.tools.BitmapTask;
import com.android.gallery3d.filtershow.tools.SaveCopyTask;
-import com.android.gallery3d.filtershow.ui.FilterIconButton;
import com.android.gallery3d.filtershow.ui.FramedTextButton;
import com.android.gallery3d.filtershow.ui.Spline;
import com.android.gallery3d.util.GalleryUtils;
@@ -94,8 +82,6 @@
public class FilterShowActivity extends FragmentActivity implements OnItemClickListener,
OnShareTargetSelectedListener {
- private String mPanelFragmentTag = "StatePanel";
-
// fields for supporting crop action
public static final String CROP_ACTION = "com.android.camera.action.CROP";
private CropExtras mCropExtras = null;
@@ -107,10 +93,8 @@
public static final String TINY_PLANET_ACTION = "com.android.camera.action.TINY_PLANET";
public static final String LAUNCH_FULLSCREEN = "launch-fullscreen";
public static final int MAX_BMAP_IN_INTENT = 990000;
- private final PanelController mPanelController = new PanelController();
private ImageLoader mImageLoader = null;
private ImageShow mImageShow = null;
- private ImageTinyPlanet mImageTinyPlanet = null;
private View mSaveButton = null;
@@ -133,16 +117,24 @@
private WeakReference<ProgressDialog> mSavingProgressDialog;
private LoadBitmapTask mLoadBitmapTask;
- private FilterIconButton mNullFxFilter;
- private FilterIconButton mNullBorderFilter;
- private int mIconSeedSize = 140;
+ private boolean mLoading = true;
- private View mImageCategoryPanel = null;
+ private CategoryAdapter mCategoryLooksAdapter = null;
+ private CategoryAdapter mCategoryBordersAdapter = null;
+ private CategoryAdapter mCategoryGeometryAdapter = null;
+ private CategoryAdapter mCategoryFiltersAdapter = null;
+ private int mCurrentPanel = MainPanel.LOOKS;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ boolean onlyUsePortrait = getResources().getBoolean(R.bool.only_use_portrait);
+ if (onlyUsePortrait) {
+ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+ }
+ MasterImage.setMaster(mMasterImage);
+
clearGalleryBitmapPool();
CachingPipeline.createRenderscriptContext(this);
@@ -151,27 +143,45 @@
fillEditors();
loadXML();
-
- if (getResources().getConfiguration().orientation
- == Configuration.ORIENTATION_LANDSCAPE) {
- mShowingImageStatePanel = true;
- }
-
- if (mShowingImageStatePanel && (savedInstanceState == null)) {
- loadImageStatePanel();
- }
+ loadMainPanel();
setDefaultPreset();
processIntent();
}
+ public boolean isShowingImageStatePanel() {
+ return mShowingImageStatePanel;
+ }
+
+ public void loadMainPanel() {
+ if (findViewById(R.id.main_panel_container) == null) {
+ return;
+ }
+ MainPanel panel = new MainPanel();
+ FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
+ transaction.replace(R.id.main_panel_container, panel, MainPanel.FRAGMENT_TAG);
+ transaction.commit();
+ }
+
+ public void loadEditorPanel(FilterRepresentation representation,
+ Editor currentEditor) {
+ if (representation.getEditorId() == ImageOnlyEditor.ID) {
+ currentEditor.getImageShow().select();
+ currentEditor.reflectCurrentFilter();
+ return;
+ }
+ EditorPanel panel = new EditorPanel();
+ panel.setEditor(currentEditor.getID());
+ FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
+ transaction.remove(getSupportFragmentManager().findFragmentByTag(MainPanel.FRAGMENT_TAG));
+ transaction.replace(R.id.main_panel_container, panel, MainPanel.FRAGMENT_TAG);
+ transaction.commit();
+ }
+
private void loadXML() {
setContentView(R.layout.filtershow_activity);
- ((ViewStub) findViewById(R.id.stateCategoryStub)).inflate();
- ((ViewStub) findViewById(R.id.editorPanelStub)).inflate();
-
ActionBar actionBar = getActionBar();
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
actionBar.setCustomView(R.layout.filtershow_actionbar);
@@ -185,70 +195,38 @@
});
mImageShow = (ImageShow) findViewById(R.id.imageShow);
- mImageTinyPlanet = (ImageTinyPlanet) findViewById(R.id.imageTinyPlanet);
mImageViews.add(mImageShow);
- mImageViews.add(mImageTinyPlanet);
setupEditors();
mEditorPlaceHolder.hide();
mImageShow.setImageLoader(mImageLoader);
- mImageTinyPlanet.setImageLoader(mImageLoader);
- mPanelController.clear();
- mPanelController.setActivity(this);
- mPanelController.setEditorPlaceHolder(mEditorPlaceHolder);
-
- mPanelController.addImageView(findViewById(R.id.imageShow));
- mPanelController.addImageView(findViewById(R.id.imageTinyPlanet));
-
- mPanelController.addPanel(R.id.fxButton, R.id.fxList, 0);
- mPanelController.addPanel(R.id.borderButton, R.id.bordersList, 1);
- mPanelController.addPanel(R.id.geometryButton, R.id.geometryList, 2);
- mPanelController.addPanel(R.id.colorsButton, R.id.colorsFxList, 3);
-
- fillFx((LinearLayout) findViewById(R.id.listFilters), R.id.fxButton);
- setupBorders();
+ fillFx();
+ fillBorders();
fillGeometry();
fillFilters();
- mPanelController.addView(findViewById(R.id.applyEffect));
-
setupStatePanel();
-
- mImageCategoryPanel = findViewById(R.id.imageCategoryPanel);
- }
-
- public void hideCategoryPanel() {
- mImageCategoryPanel.setVisibility(View.GONE);
- }
-
- public void showCategoryPanel() {
- mImageCategoryPanel.setVisibility(View.VISIBLE);
}
public void setupStatePanel() {
mImageLoader.setAdapter(mMasterImage.getHistory());
- mPanelController.setRowPanel(findViewById(R.id.secondRowPanel));
- mPanelController.setUtilityPanel(this, findViewById(R.id.filterButtonsList));
- mPanelController.setCurrentPanel(R.id.fxButton);
- }
-
- private void fillPanel(Vector<FilterRepresentation> representations, int layoutId, int buttonId) {
- ImageButton button = (ImageButton) findViewById(buttonId);
- LinearLayout layout = (LinearLayout) findViewById(layoutId);
-
- for (FilterRepresentation representation : representations) {
- setupFilterRepresentationButton(representation, layout, button);
- }
}
private void fillFilters() {
Vector<FilterRepresentation> filtersRepresentations = new Vector<FilterRepresentation>();
FiltersManager filtersManager = FiltersManager.getManager();
filtersManager.addEffects(filtersRepresentations);
- fillPanel(filtersRepresentations, R.id.listColorsFx, R.id.colorsButton);
+
+ mCategoryFiltersAdapter = new CategoryAdapter(this);
+ for (FilterRepresentation representation : filtersRepresentations) {
+ if (representation.getTextId() != 0) {
+ representation.setName(getString(representation.getTextId()));
+ }
+ mCategoryFiltersAdapter.add(new Action(this, representation));
+ }
}
private void fillGeometry() {
@@ -265,11 +243,18 @@
geometry.setTextId(editorInfo.getTextId());
geometry.setOverlayId(editorInfo.getOverlayId());
geometry.setOverlayOnly(editorInfo.getOverlayOnly());
+ if (geometry.getTextId() != 0) {
+ geometry.setName(getString(geometry.getTextId()));
+ }
filtersRepresentations.add(geometry);
}
filtersManager.addTools(filtersRepresentations);
- fillPanel(filtersRepresentations, R.id.listGeometry, R.id.geometryButton);
+
+ mCategoryGeometryAdapter = new CategoryAdapter(this);
+ for (FilterRepresentation representation : filtersRepresentations) {
+ mCategoryGeometryAdapter.add(new Action(this, representation));
+ }
}
private void processIntent() {
@@ -285,41 +270,6 @@
} else {
pickImage();
}
-
- // Handle behavior for various actions
- if (mAction.equalsIgnoreCase(CROP_ACTION)) {
- Bundle extras = intent.getExtras();
- if (extras != null) {
- mCropExtras = new CropExtras(extras.getInt(CropExtras.KEY_OUTPUT_X, 0),
- extras.getInt(CropExtras.KEY_OUTPUT_Y, 0),
- extras.getBoolean(CropExtras.KEY_SCALE, true) &&
- extras.getBoolean(CropExtras.KEY_SCALE_UP_IF_NEEDED, false),
- extras.getInt(CropExtras.KEY_ASPECT_X, 0),
- extras.getInt(CropExtras.KEY_ASPECT_Y, 0),
- extras.getBoolean(CropExtras.KEY_SET_AS_WALLPAPER, false),
- extras.getBoolean(CropExtras.KEY_RETURN_DATA, false),
- (Uri) extras.getParcelable(MediaStore.EXTRA_OUTPUT),
- extras.getString(CropExtras.KEY_OUTPUT_FORMAT),
- extras.getBoolean(CropExtras.KEY_SHOW_WHEN_LOCKED, false),
- extras.getFloat(CropExtras.KEY_SPOTLIGHT_X),
- extras.getFloat(CropExtras.KEY_SPOTLIGHT_Y));
-
- if (mCropExtras.getShowWhenLocked()) {
- getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
- }
- mImageShow.getImagePreset().mGeoData.setCropExtras(mCropExtras);
-
- // FIXME: moving to editors breaks the crop action
- EditorCrop crop = (EditorCrop) mEditorPlaceHolder.getEditor(EditorCrop.ID);
-
- crop.setExtras(mCropExtras);
- String s = getString(R.string.Fixed);
- crop.setAspectString(s);
- crop.setCropActionFlag(true);
- mPanelController.setFixedAspect(mCropExtras.getAspectX() > 0
- && mCropExtras.getAspectY() > 0);
- }
- }
}
private void setupEditors() {
@@ -347,6 +297,9 @@
Resources res = getResources();
FiltersManager.setResources(res);
+ CategoryView.setMargin((int) getPixelsFromDip(8));
+ CategoryView.setTextSize((int) getPixelsFromDip(16));
+
ImageShow.setDefaultBackgroundColor(res.getColor(R.color.background_screen));
// TODO: get those values from XML.
FramedTextButton.setTextSize((int) getPixelsFromDip(14));
@@ -357,9 +310,6 @@
ImageShow.setOriginalTextMargin((int) getPixelsFromDip(4));
ImageShow.setOriginalTextSize((int) getPixelsFromDip(18));
ImageShow.setOriginalText(res.getString(R.string.original_picture_text));
- mIconSeedSize = res.getDimensionPixelSize(R.dimen.thumbnail_size);
- // TODO: pick correct value
- // MasterImage.setIconSeedSize(mIconSeedSize);
Drawable curveHandle = res.getDrawable(R.drawable.camera_crop);
int curveHandleSize = (int) res.getDimension(R.dimen.crop_indicator_size);
@@ -372,26 +322,18 @@
}
private void startLoadBitmap(Uri uri) {
- final View filters = findViewById(R.id.filtersPanel);
+ mLoading = true;
final View loading = findViewById(R.id.loading);
final View imageShow = findViewById(R.id.imageShow);
imageShow.setVisibility(View.INVISIBLE);
- filters.setVisibility(View.INVISIBLE);
loading.setVisibility(View.VISIBLE);
-
- View tinyPlanetView = findViewById(EditorTinyPlanet.ID);
- if (tinyPlanetView != null) {
- mShowingTinyPlanet = false;
- tinyPlanetView.setVisibility(View.GONE);
- }
- mLoadBitmapTask = new LoadBitmapTask(tinyPlanetView);
+ mShowingTinyPlanet = false;
+ mLoadBitmapTask = new LoadBitmapTask();
mLoadBitmapTask.execute(uri);
}
- private void setupBorders() {
- LinearLayout list = (LinearLayout) findViewById(R.id.listBorders);
+ private void fillBorders() {
Vector<FilterRepresentation> borders = new Vector<FilterRepresentation>();
- ImageButton borderButton = (ImageButton) findViewById(R.id.borderButton);
// The "no border" implementation
borders.add(new FilterImageBorderRepresentation(0));
@@ -404,20 +346,95 @@
if (i == 0) {
filter.setName(getString(R.string.none));
}
- FilterIconButton b = setupFilterRepresentationButton(filter, list, borderButton);
- if (i == 0) {
- mNullBorderFilter = b;
- mNullBorderFilter.setSelected(true);
+ }
+
+ mCategoryBordersAdapter = new CategoryAdapter(this);
+ for (FilterRepresentation representation : borders) {
+ if (representation.getTextId() != 0) {
+ representation.setName(getString(representation.getTextId()));
}
+ mCategoryBordersAdapter.add(new Action(this, representation));
}
}
+ public CategoryAdapter getCategoryLooksAdapter() {
+ return mCategoryLooksAdapter;
+ }
+
+ public CategoryAdapter getCategoryBordersAdapter() {
+ return mCategoryBordersAdapter;
+ }
+
+ public CategoryAdapter getCategoryGeometryAdapter() {
+ return mCategoryGeometryAdapter;
+ }
+
+ public CategoryAdapter getCategoryFiltersAdapter() {
+ return mCategoryFiltersAdapter;
+ }
+
+ public void removeFilterRepresentation(FilterRepresentation filterRepresentation) {
+ if (filterRepresentation == null) {
+ return;
+ }
+ ImagePreset oldPreset = MasterImage.getImage().getPreset();
+ ImagePreset copy = new ImagePreset(oldPreset);
+ copy.removeFilter(filterRepresentation);
+ MasterImage.getImage().setPreset(copy, true);
+ if (MasterImage.getImage().getCurrentFilterRepresentation() == filterRepresentation) {
+ FilterRepresentation lastRepresentation = copy.getLastRepresentation();
+ MasterImage.getImage().setCurrentFilterRepresentation(lastRepresentation);
+ }
+ }
+
+ public void useFilterRepresentation(FilterRepresentation filterRepresentation) {
+ if (filterRepresentation == null) {
+ return;
+ }
+ if (MasterImage.getImage().getCurrentFilterRepresentation() == filterRepresentation) {
+ return;
+ }
+ ImagePreset oldPreset = MasterImage.getImage().getPreset();
+ ImagePreset copy = new ImagePreset(oldPreset);
+ FilterRepresentation representation = copy.getRepresentation(filterRepresentation);
+ if (representation == null) {
+ copy.addFilter(filterRepresentation);
+ } else {
+ if (filterRepresentation.allowsMultipleInstances()) {
+ representation.updateTempParametersFrom(filterRepresentation);
+ copy.setHistoryName(filterRepresentation.getName());
+ representation.synchronizeRepresentation();
+ }
+ filterRepresentation = representation;
+ }
+ MasterImage.getImage().setPreset(copy, true);
+ MasterImage.getImage().setCurrentFilterRepresentation(filterRepresentation);
+ }
+
+ public void showRepresentation(FilterRepresentation representation) {
+ useFilterRepresentation(representation);
+
+ // show representation
+ Editor mCurrentEditor = mEditorPlaceHolder.showEditor(representation.getEditorId());
+ loadEditorPanel(representation, mCurrentEditor);
+ }
+
+ public Editor getEditor(int editorID) {
+ return mEditorPlaceHolder.getEditor(editorID);
+ }
+
+ public void setCurrentPanel(int currentPanel) {
+ mCurrentPanel = currentPanel;
+ }
+
+ public int getCurrentPanel() {
+ return mCurrentPanel;
+ }
+
private class LoadBitmapTask extends AsyncTask<Uri, Boolean, Boolean> {
- View mTinyPlanetButton;
int mBitmapSize;
- public LoadBitmapTask(View button) {
- mTinyPlanetButton = button;
+ public LoadBitmapTask() {
mBitmapSize = getScreenImageSize();
}
@@ -438,13 +455,12 @@
}
if (values[0]) {
mShowingTinyPlanet = true;
- mTinyPlanetButton.setVisibility(View.VISIBLE);
}
}
@Override
protected void onPostExecute(Boolean result) {
-
+ MasterImage.setMaster(mMasterImage);
if (isCancelled()) {
return;
}
@@ -455,13 +471,6 @@
final View loading = findViewById(R.id.loading);
loading.setVisibility(View.GONE);
- final View filters = findViewById(R.id.filtersPanel);
- filters.setVisibility(View.VISIBLE);
- if (PanelController.useAnimationsLayer()) {
- float y = filters.getY();
- filters.setY(y + filters.getHeight());
- filters.animate().setDuration(600).y(y).withLayer().start();
- }
final View imageShow = findViewById(R.id.imageShow);
imageShow.setVisibility(View.VISIBLE);
@@ -475,16 +484,21 @@
float highResPreviewScale = (float) highresBitmap.getWidth() / (float) mImageLoader.getOriginalBounds().width();
pipeline.setHighResPreviewScaleFactor(highResPreviewScale);
}
+ if (!mShowingTinyPlanet) {
+ mCategoryFiltersAdapter.removeTinyPlanet();
+ }
pipeline.turnOnPipeline(true);
MasterImage.getImage().setOriginalGeometry(largeBitmap);
+ mCategoryLooksAdapter.imageLoaded();
+ mCategoryBordersAdapter.imageLoaded();
+ mCategoryGeometryAdapter.imageLoaded();
+ mCategoryFiltersAdapter.imageLoaded();
mLoadBitmapTask = null;
- if (mAction == CROP_ACTION) {
- mPanelController.showComponent(findViewById(EditorCrop.ID));
- } else if (mAction == TINY_PLANET_ACTION) {
- FilterIconButton button = (FilterIconButton) findViewById(EditorTinyPlanet.ID);
- button.onClick(button);
+ if (mAction == TINY_PLANET_ACTION) {
+ showRepresentation(mCategoryFiltersAdapter.getTinyPlanet());
}
+ mLoading = false;
super.onPostExecute(result);
}
@@ -506,8 +520,7 @@
if (mLoadBitmapTask != null) {
mLoadBitmapTask.cancel(false);
}
- // TODO: Using singletons is a bad design choice for many of these
- // due static reference leaks and in general. Please refactor.
+ // TODO: refactor, don't use so many singletons.
FilteringPipeline.getPipeline().turnOnPipeline(false);
MasterImage.reset();
FilteringPipeline.reset();
@@ -520,30 +533,6 @@
super.onDestroy();
}
- private int translateMainPanel(View viewPanel) {
- int accessoryPanelWidth = viewPanel.getWidth();
- if (accessoryPanelWidth == 0) {
- // TODO: fixes this by using a fragment. Currently,
- // the first time we get called the panel hasn't been
- // layed out yet, so we get a size zero.
- accessoryPanelWidth = (int) getPixelsFromDip(200);
- }
- int mainViewWidth = findViewById(R.id.mainView).getWidth();
- int mainPanelWidth = mImageShow.getDisplayedImageBounds().width();
- if (mainPanelWidth == 0) {
- mainPanelWidth = mainViewWidth;
- }
- int filtersPanelWidth = findViewById(R.id.filtersPanel).getWidth();
- if (mainPanelWidth < filtersPanelWidth) {
- mainPanelWidth = filtersPanelWidth;
- }
- int leftOver = mainViewWidth - mainPanelWidth - accessoryPanelWidth;
- if (leftOver < 0) {
- return -accessoryPanelWidth;
- }
- return 0;
- }
-
private int getScreenImageSize() {
DisplayMetrics metrics = new DisplayMetrics();
Display display = getWindowManager().getDefaultDisplay();
@@ -649,6 +638,7 @@
@Override
public void onPause() {
super.onPause();
+ rsPause();
if (mShareActionProvider != null) {
mShareActionProvider.setOnShareTargetSelectedListener(null);
}
@@ -657,16 +647,52 @@
@Override
public void onResume() {
super.onResume();
+ rsResume();
if (mShareActionProvider != null) {
mShareActionProvider.setOnShareTargetSelectedListener(this);
}
}
+ private void rsResume() {
+ ImageFilter.setActivityForMemoryToasts(this);
+ MasterImage.setMaster(mMasterImage);
+ if (CachingPipeline.getRenderScriptContext() == null) {
+ CachingPipeline.createRenderscriptContext(this);
+ }
+ FiltersManager.setResources(getResources());
+ if (!mLoading) {
+ Bitmap largeBitmap = mImageLoader.getOriginalBitmapLarge();
+ FilteringPipeline pipeline = FilteringPipeline.getPipeline();
+ pipeline.setOriginal(largeBitmap);
+ float previewScale = (float) largeBitmap.getWidth() /
+ (float) mImageLoader.getOriginalBounds().width();
+ pipeline.setPreviewScaleFactor(previewScale);
+ Bitmap highresBitmap = mImageLoader.getOriginalBitmapHighres();
+ if (highresBitmap != null) {
+ float highResPreviewScale = (float) highresBitmap.getWidth() /
+ (float) mImageLoader.getOriginalBounds().width();
+ pipeline.setHighResPreviewScaleFactor(highResPreviewScale);
+ }
+ pipeline.turnOnPipeline(true);
+ MasterImage.getImage().setOriginalGeometry(largeBitmap);
+ }
+ }
+
+ private void rsPause() {
+ FilteringPipeline.getPipeline().turnOnPipeline(false);
+ FilteringPipeline.reset();
+ ImageFilter.resetStatics();
+ FiltersManager.getPreviewManager().freeRSFilterScripts();
+ FiltersManager.getManager().freeRSFilterScripts();
+ FiltersManager.getHighresManager().freeRSFilterScripts();
+ FiltersManager.reset();
+ CachingPipeline.destroyRenderScriptContext();
+ }
+
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.undoButton: {
- mPanelController.resetParameters();
HistoryAdapter adapter = mMasterImage.getHistory();
int position = adapter.undo();
mMasterImage.onHistoryItemClick(position);
@@ -703,36 +729,18 @@
mSaveButton.setEnabled(enable);
}
- public FilterIconButton setupFilterRepresentationButton(FilterRepresentation representation, LinearLayout panel, View button) {
- LayoutInflater inflater =
- (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
- FilterIconButton icon = (FilterIconButton) inflater.inflate(R.layout.filtericonbutton,
- panel, false);
- if (representation.getTextId() != 0) {
- representation.setName(getString(representation.getTextId()));
- }
- String text = representation.getName();
- icon.setup(text, mPanelController, panel);
- icon.setFilterRepresentation(representation);
- icon.setId(representation.getEditorId());
- mPanelController.addComponent(button, icon);
- panel.addView(icon);
- return icon;
- }
-
- private void fillFx(LinearLayout listFilters, int buttonId) {
- ImageButton button = (ImageButton) findViewById(buttonId);
-
+ private void fillFx() {
FilterFxRepresentation nullFx = new FilterFxRepresentation(getString(R.string.none), 0, R.string.none);
- mNullFxFilter = setupFilterRepresentationButton(nullFx, listFilters, button);
- mNullFxFilter.setSelected(true);
-
Vector<FilterRepresentation> filtersRepresentations = new Vector<FilterRepresentation>();
FiltersManager.getManager().addLooks(this, filtersRepresentations);
- for (FilterRepresentation representation : filtersRepresentations) {
- setupFilterRepresentationButton(representation, listFilters, button);
- }
+ mCategoryLooksAdapter = new CategoryAdapter(this);
+ int verticalItemHeight = (int) getResources().getDimension(R.dimen.action_item_height);
+ mCategoryLooksAdapter.setItemHeight(verticalItemHeight);
+ mCategoryLooksAdapter.add(new Action(this, nullFx, Action.CROP_VIEW));
+ for (FilterRepresentation representation : filtersRepresentations) {
+ mCategoryLooksAdapter.add(new Action(this, representation, Action.FULL_VIEW));
+ }
}
public void setDefaultPreset() {
@@ -764,16 +772,18 @@
// //////////////////////////////////////////////////////////////////////////////
// imageState panel...
- private void toggleImageStatePanel() {
+ public void toggleImageStatePanel() {
invalidateOptionsMenu();
- }
-
- private void loadImageStatePanel() {
- StatePanel statePanel = new StatePanel();
- if (findViewById(R.id.state_panel_container) != null) {
- FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
- transaction.replace(R.id.state_panel_container, statePanel, mPanelFragmentTag);
- transaction.commit();
+ mShowingImageStatePanel = !mShowingImageStatePanel;
+ Fragment panel = getSupportFragmentManager().findFragmentByTag(MainPanel.FRAGMENT_TAG);
+ if (panel != null) {
+ if (panel instanceof EditorPanel) {
+ EditorPanel editorPanel = (EditorPanel) panel;
+ editorPanel.showImageStatePanel(mShowingImageStatePanel);
+ } else if (panel instanceof MainPanel) {
+ MainPanel mainPanel = (MainPanel) panel;
+ mainPanel.showImageStatePanel(mShowingImageStatePanel);
+ }
}
}
@@ -783,20 +793,10 @@
super.onConfigurationChanged(newConfig);
setDefaultValues();
loadXML();
- if (getResources().getConfiguration().orientation
- == Configuration.ORIENTATION_LANDSCAPE) {
- mShowingImageStatePanel = true;
- } else if (mShowingImageStatePanel) {
- toggleImageStatePanel();
- }
- if (mShowingImageStatePanel) {
- loadImageStatePanel();
- }
- if (mShowingTinyPlanet == false) {
- View tinyPlanetView = findViewById(EditorTinyPlanet.ID);
- if (tinyPlanetView != null) {
- tinyPlanetView.setVisibility(View.GONE);
- }
+ loadMainPanel();
+
+ if (!mShowingTinyPlanet) {
+ mCategoryFiltersAdapter.removeTinyPlanet();
}
final View loading = findViewById(R.id.loading);
loading.setVisibility(View.GONE);
@@ -824,27 +824,35 @@
}
}
- public void dispatchNullFilterClick() {
- mNullFxFilter.onClick(mNullFxFilter);
- mNullBorderFilter.onClick(mNullBorderFilter);
- }
-
void resetHistory() {
- dispatchNullFilterClick();
HistoryAdapter adapter = mMasterImage.getHistory();
adapter.reset();
ImagePreset original = new ImagePreset(adapter.getItem(0));
mMasterImage.setPreset(original, true);
- mPanelController.resetParameters();
invalidateViews();
}
+ public void showDefaultImageView() {
+ mEditorPlaceHolder.hide();
+ mImageShow.setVisibility(View.VISIBLE);
+ MasterImage.getImage().setCurrentFilter(null);
+ MasterImage.getImage().setCurrentFilterRepresentation(null);
+ }
+
+ public void backToMain() {
+ Fragment currentPanel = getSupportFragmentManager().findFragmentByTag(MainPanel.FRAGMENT_TAG);
+ if (currentPanel instanceof MainPanel) {
+ return;
+ }
+ loadMainPanel();
+ showDefaultImageView();
+ }
+
@Override
public void onBackPressed() {
- if (mPanelController.onBackPressed()) {
- if (detectSpecialExitCases()) {
- saveImage();
- } else if(!mImageShow.hasModifications()) {
+ Fragment currentPanel = getSupportFragmentManager().findFragmentByTag(MainPanel.FRAGMENT_TAG);
+ if (currentPanel instanceof MainPanel) {
+ if (!mImageShow.hasModifications()) {
done();
} else {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
@@ -861,13 +869,11 @@
});
builder.show();
}
+ } else {
+ backToMain();
}
}
- public PanelController getPanelController() {
- return mPanelController;
- }
-
public void cannotLoadImage() {
CharSequence text = getString(R.string.cannot_load_image);
Toast toast = Toast.makeText(this, text, Toast.LENGTH_SHORT);
diff --git a/src/com/android/gallery3d/filtershow/ImageStateAdapter.java b/src/com/android/gallery3d/filtershow/ImageStateAdapter.java
deleted file mode 100644
index 62633e2..0000000
--- a/src/com/android/gallery3d/filtershow/ImageStateAdapter.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.gallery3d.filtershow;
-
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.android.gallery3d.R;
-import com.android.gallery3d.filtershow.filters.FilterRepresentation;
-import com.android.gallery3d.filtershow.filters.ImageFilter;
-import com.android.gallery3d.filtershow.imageshow.MasterImage;
-
-public class ImageStateAdapter extends ArrayAdapter<FilterRepresentation> {
- private static final String LOGTAG = "ImageStateAdapter";
-
- public ImageStateAdapter(Context context, int textViewResourceId) {
- super(context, textViewResourceId);
- }
-
- @Override
- public View getView(int position, View convertView, ViewGroup parent) {
- MovableLinearLayout view = (MovableLinearLayout) convertView;
- if (view == null) {
- LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(
- Context.LAYOUT_INFLATER_SERVICE);
- view = (MovableLinearLayout) inflater.inflate(R.layout.filtershow_imagestate_row, null);
- }
- FilterRepresentation filter = getItem(position);
- view.setFilterRepresentation(filter);
- ImageView markView = (ImageView) view.findViewById(R.id.selectedMark);
- if (filter == MasterImage.getImage().getCurrentFilterRepresentation()) {
- markView.setVisibility(View.VISIBLE);
- } else {
- markView.setVisibility(View.INVISIBLE);
- }
- if (filter != null) {
- TextView itemLabel = (TextView) view.findViewById(R.id.imagestate_label);
- itemLabel.setText(filter.getName());
- TextView itemParameter = (TextView) view.findViewById(R.id.imagestate_parameter);
- itemParameter.setText(filter.getStateRepresentation());
- }
- return view;
- }
-}
diff --git a/src/com/android/gallery3d/filtershow/MovableLinearLayout.java b/src/com/android/gallery3d/filtershow/MovableLinearLayout.java
deleted file mode 100644
index 9eddb41..0000000
--- a/src/com/android/gallery3d/filtershow/MovableLinearLayout.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.gallery3d.filtershow;
-
-import android.content.Context;
-import android.graphics.Color;
-import android.graphics.Point;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.MotionEvent;
-import android.widget.LinearLayout;
-
-import com.android.gallery3d.R;
-import com.android.gallery3d.filtershow.filters.FilterRepresentation;
-import com.android.gallery3d.filtershow.imageshow.MasterImage;
-
-public class MovableLinearLayout extends LinearLayout {
-
- private Point mTouchDown = new Point();
- private FilterRepresentation mFilterRepresentation;
- private int mTouchSlope = 3;
- private static final String LOGTAG = "MovableLinearLayout";
-
- public MovableLinearLayout(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- private void resetView() {
- setTranslationX(0);
- mTouchDown.x = 0;
- mTouchDown.y = 0;
- setAlpha(1.0f);
- setBackgroundResource(R.drawable.filtershow_button_background);
- }
-
- @Override
- public boolean onTouchEvent(MotionEvent event) {
- int ex = (int) event.getX();
- int ey = (int) event.getY();
- if (event.getAction() == MotionEvent.ACTION_DOWN) {
- mTouchDown.x = ex;
- mTouchDown.y = ey;
- FilterShowActivity activity = (FilterShowActivity) getContext();
- activity.getPanelController().showComponentWithRepresentation(mFilterRepresentation);
- }
- if (event.getAction() == MotionEvent.ACTION_MOVE) {
- int delta = ex - mTouchDown.x;
- if (delta > 0 && (delta - getTranslationX()) > mTouchSlope) {
- setTranslationX(delta);
- float alpha = (getWidth() - getTranslationX()) / getWidth();
- int backgroundColor = Color.argb((int) (1.0f - alpha * 255), 255, 0, 0);
- setBackgroundColor(backgroundColor);
- setAlpha(alpha);
- }
- }
- if (event.getAction() == MotionEvent.ACTION_UP
- || event.getAction() == MotionEvent.ACTION_CANCEL) {
- if (getTranslationX() > getWidth() / 4) {
- delete(mFilterRepresentation);
- } else {
- resetView();
- }
- }
- return true;
- }
-
- private void delete(FilterRepresentation filterRepresentation) {
- FilterShowActivity activity = (FilterShowActivity) getContext();
- activity.getPanelController().removeFilterRepresentation(filterRepresentation);
- }
-
- public void setFilterRepresentation(FilterRepresentation filterRepresentation) {
- mFilterRepresentation = filterRepresentation;
- resetView();
- }
-
-}
diff --git a/src/com/android/gallery3d/filtershow/PanelController.java b/src/com/android/gallery3d/filtershow/PanelController.java
deleted file mode 100644
index 2cd70e3..0000000
--- a/src/com/android/gallery3d/filtershow/PanelController.java
+++ /dev/null
@@ -1,684 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.gallery3d.filtershow;
-
-import android.content.Context;
-import android.os.Handler;
-import android.text.Html;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.ViewPropertyAnimator;
-import android.widget.Button;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import android.util.Log;
-
-import com.android.gallery3d.R;
-import com.android.gallery3d.filtershow.editors.Editor;
-import com.android.gallery3d.filtershow.editors.EditorTinyPlanet;
-import com.android.gallery3d.filtershow.editors.ImageOnlyEditor;
-import com.android.gallery3d.filtershow.filters.FilterRepresentation;
-import com.android.gallery3d.filtershow.filters.ImageFilter;
-import com.android.gallery3d.filtershow.filters.ImageFilterTinyPlanet;
-import com.android.gallery3d.filtershow.imageshow.ImageShow;
-import com.android.gallery3d.filtershow.imageshow.MasterImage;
-import com.android.gallery3d.filtershow.presets.ImagePreset;
-import com.android.gallery3d.filtershow.ui.FilterIconButton;
-
-import java.util.HashMap;
-import java.util.Set;
-import java.util.Vector;
-
-public class PanelController implements OnClickListener {
- private static int PANEL = 0;
- private static int COMPONENT = 1;
- private static int VERTICAL_MOVE = 0;
- private static int HORIZONTAL_MOVE = 1;
- private static final int ANIM_DURATION = 200;
- private static final String LOGTAG = "PanelController";
- private boolean mFixedAspect = false;
-
- final Handler mHandler = new Handler();
-
- public static boolean useAnimationsLayer() {
- int currentapiVersion = android.os.Build.VERSION.SDK_INT;
- if (currentapiVersion >= android.os.Build.VERSION_CODES.JELLY_BEAN) {
- return true;
- }
- return false;
- }
-
- public void setFixedAspect(boolean t) {
- mFixedAspect = t;
- }
-
- class Panel {
- private final View mView;
- private final View mContainer;
- private int mPosition = 0;
- private final Vector<View> mSubviews = new Vector<View>();
-
- public Panel(View view, View container, int position) {
- mView = view;
- mContainer = container;
- mPosition = position;
- }
-
- public void addView(View view) {
- mSubviews.add(view);
- }
-
- public int getPosition() {
- return mPosition;
- }
-
- public ViewPropertyAnimator unselect(int newPos, int move) {
- ViewPropertyAnimator anim = mContainer.animate();
- mView.setSelected(false);
- mContainer.setX(0);
- mContainer.setY(0);
- int delta = 0;
- int w = mRowPanel.getWidth();
- int h = mRowPanel.getHeight();
- if (move == HORIZONTAL_MOVE) {
- if (newPos > mPosition) {
- delta = -w;
- } else {
- delta = w;
- }
- anim.x(delta);
- } else if (move == VERTICAL_MOVE) {
- anim.y(h);
- }
- anim.setDuration(ANIM_DURATION);
- Runnable action = new Runnable() {
- @Override
- public void run() {
- mContainer.setVisibility(View.GONE);
- }
- };
- if (PanelController.useAnimationsLayer()) {
- anim.withLayer().withEndAction(action);
- } else {
- mHandler.postDelayed(action, ANIM_DURATION);
- }
- return anim;
- }
-
- public ViewPropertyAnimator select(int oldPos, int move) {
- mView.setSelected(true);
- mContainer.setVisibility(View.VISIBLE);
- mContainer.setX(0);
- mContainer.setY(0);
- ViewPropertyAnimator anim = mContainer.animate();
- int w = mRowPanel.getWidth();
- int h = mRowPanel.getHeight();
- if (move == HORIZONTAL_MOVE) {
- if (oldPos < mPosition) {
- mContainer.setX(w);
- } else {
- mContainer.setX(-w);
- }
- anim.x(0);
- } else if (move == VERTICAL_MOVE) {
- mContainer.setY(h);
- anim.y(0);
- }
- anim.setDuration(ANIM_DURATION);
- if (PanelController.useAnimationsLayer()) {
- anim.withLayer();
- }
- return anim;
- }
- }
-
- class UtilityPanel {
- private final Context mContext;
- private final View mView;
- private final LinearLayout mAccessoryViewList;
- private Vector<View> mAccessoryViews = new Vector<View>();
- private final Button mTextView;
- private boolean mSelected = false;
- private String mEffectName = null;
- private int mParameterValue = 0;
- private boolean mShowParameterValue = false;
-
- public UtilityPanel(Context context, View utilityPanel) {
- mView = utilityPanel;
- View accessoryViewList = mView.findViewById(R.id.panelAccessoryViewList);
- mTextView = (Button) mView.findViewById(R.id.applyEffect);
- mContext = context;
- mAccessoryViewList = (LinearLayout) accessoryViewList;
- }
-
- public boolean selected() {
- return mSelected;
- }
-
- public void hideAccessoryViews() {
- int childCount = mAccessoryViewList.getChildCount();
- for (int i = 0; i < childCount; i++) {
- View child = mAccessoryViewList.getChildAt(i);
- child.setVisibility(View.GONE);
- }
- }
-
- public void onNewValue(int value) {
- mParameterValue = value;
- updateText();
- }
-
- public void setEffectName(String effectName) {
- mEffectName = effectName;
- setShowParameter(true);
- }
-
- public void setShowParameter(boolean s) {
- mShowParameterValue = s;
- updateText();
- }
-
- public void showMenu(boolean show) {
- mTextView.setOnClickListener(null);
- if (show){
- mAccessoryViewList.setVisibility(View.VISIBLE);
- mTextView.setVisibility(View.VISIBLE);
- } else {
- mAccessoryViewList.setVisibility(View.VISIBLE);
- mTextView.setVisibility(View.VISIBLE);
- }
-
- }
-
- public View getActionControl() {
- return mView.findViewById(R.id.panelAccessoryViewList);
- }
-
- public View getEditControl() {
- return mView.findViewById(R.id.controlArea);
- }
-
- public void removeControlChildren() {
- LinearLayout controlArea = (LinearLayout) mView.findViewById(R.id.controlArea);
- controlArea.removeAllViews();
- }
-
- public Button getEditTitle() {
- return mTextView;
- }
-
- public void updateText() {
- String s;
- if (mCurrentEditor == null) {
- String apply = mContext.getString(R.string.apply_effect);
- s = apply + " " + mEffectName + " " + mParameterValue;
- } else {
- s = mCurrentEditor.calculateUserMessage(mContext, mEffectName, mParameterValue);
- }
- mTextView.setText(Html.fromHtml(s));
- }
-
- public ViewPropertyAnimator unselect() {
- ViewPropertyAnimator anim = mView.animate();
- mView.setX(0);
- mView.setY(0);
- int h = mRowPanel.getHeight();
- anim.y(-h);
- Runnable action = new Runnable() {
- @Override
- public void run() {
- mView.setVisibility(View.GONE);
- }
- };
- if (PanelController.useAnimationsLayer()) {
- anim.setDuration(ANIM_DURATION).withLayer().withEndAction(action);
- } else {
- mHandler.postDelayed(action, ANIM_DURATION);
- }
- mSelected = false;
- return anim;
- }
-
- public ViewPropertyAnimator select() {
- mView.setVisibility(View.VISIBLE);
- int h = mRowPanel.getHeight();
- mView.setX(0);
- mView.setY(-h);
- updateText();
- mSelected = true;
- ViewPropertyAnimator anim = mView.animate();
- anim.y(0);
- anim.setDuration(ANIM_DURATION);
- if (PanelController.useAnimationsLayer()) {
- anim.withLayer();
- }
- return anim;
- }
-
- }
-
- class ViewType {
- private final int mType;
- private final View mView;
-
- public ViewType(View view, int type) {
- mView = view;
- mType = type;
- }
-
- public int type() {
- return mType;
- }
- }
-
- private final HashMap<View, Panel> mPanels = new HashMap<View, Panel>();
- private final HashMap<View, ViewType> mViews = new HashMap<View, ViewType>();
- private final HashMap<String, ImageFilter> mFilters = new HashMap<String, ImageFilter>();
- private final Vector<View> mImageViews = new Vector<View>();
- private View mCurrentPanel = null;
- private View mRowPanel = null;
- private UtilityPanel mUtilityPanel = null;
- private ImageShow mCurrentImage = null;
- private Editor mCurrentEditor = null;
- private FilterShowActivity mActivity = null;
- private EditorPlaceHolder mEditorPlaceHolder = null;
-
- public void clear() {
- mPanels.clear();
- mViews.clear();
- mFilters.clear();
- mImageViews.clear();
- }
-
- public void setActivity(FilterShowActivity activity) {
- mActivity = activity;
- }
-
- public void addView(View view) {
- view.setOnClickListener(this);
- mViews.put(view, new ViewType(view, COMPONENT));
- }
-
- public View getViewFromId(int viewId) {
- for (View view : mPanels.keySet()) {
- if (view.getId() == viewId) {
- return view;
- }
- }
- return null;
- }
-
- public void addPanel(int viewId, int containerId, int position) {
- View view = mActivity.findViewById(viewId);
- View container = mActivity.findViewById(containerId);
- mPanels.put(view, new Panel(view, container, position));
- view.setOnClickListener(this);
- mViews.put(view, new ViewType(view, PANEL));
- }
-
- public void addComponent(View aPanel, View component) {
- Panel panel = mPanels.get(aPanel);
- if (panel == null) {
- return;
- }
- panel.addView(component);
- component.setOnClickListener(this);
- mViews.put(component, new ViewType(component, COMPONENT));
- }
-
- public void addFilter(ImageFilter filter) {
- mFilters.put(filter.getName(), filter);
- }
-
- public void addImageView(View view) {
- mImageViews.add(view);
- ImageShow imageShow = (ImageShow) view;
- imageShow.setPanelController(this);
- }
-
- public void resetParameters() {
- showPanel(mCurrentPanel);
- if (mCurrentImage != null) {
- mCurrentImage.resetParameter();
- mCurrentImage.select();
- if (mCurrentEditor != null) {
- mCurrentEditor.reflectCurrentFilter();
- }
- }
- }
-
- public boolean onBackPressed() {
- if (mUtilityPanel == null || !mUtilityPanel.selected()) {
- return true;
- }
- HistoryAdapter adapter = MasterImage.getImage().getHistory();
- int position = adapter.undo();
- MasterImage.getImage().onHistoryItemClick(position);
- mActivity.showCategoryPanel();
- showPanel(mCurrentPanel);
- mCurrentImage.select();
- if (mCurrentEditor != null) {
- mCurrentEditor.reflectCurrentFilter();
- }
- return false;
- }
-
- public void onNewValue(int value) {
- mUtilityPanel.onNewValue(value);
- }
-
- public void showParameter(boolean s) {
- mUtilityPanel.setShowParameter(s);
- }
-
- public void setCurrentPanel(int panelId) {
- showPanel(getViewFromId(panelId));
- }
-
- public void setRowPanel(View rowPanel) {
- mRowPanel = rowPanel;
- }
-
- public void setUtilityPanel(Context context, View utilityPanel) {
- addView(utilityPanel.findViewById(R.id.applyEffect));
- addView(utilityPanel.findViewById(R.id.applyFilter));
- // TODO rename applyFilter to panelFilterDescription
- addView(utilityPanel.findViewById(R.id.cancelFilter));
- mUtilityPanel = new UtilityPanel(context, utilityPanel);
- }
-
- @Override
- public void onClick(View view) {
- ViewType type = mViews.get(view);
- if (type.type() == PANEL) {
- showPanel(view);
- } else if (type.type() == COMPONENT) {
- showComponent(view);
- }
- }
-
- public ImageShow showImageView(int id) {
- ImageShow image = null;
- mActivity.hideImageViews();
- for (View view : mImageViews) {
- image = (ImageShow) view;
- if (view.getId() == id) {
- view.setVisibility(View.VISIBLE);
- image.select();
- } else {
- view.setVisibility(View.GONE);
- image.unselect();
- }
- }
- return image;
- }
-
- public void showDefaultImageView() {
- showImageView(R.id.imageShow);
- MasterImage.getImage().setCurrentFilter(null);
- MasterImage.getImage().setCurrentFilterRepresentation(null);
- }
-
- public void showPanel(View view) {
- view.setVisibility(View.VISIBLE);
- boolean removedUtilityPanel = false;
- Panel current = mPanels.get(mCurrentPanel);
- if (mUtilityPanel != null && mUtilityPanel.selected()) {
- ViewPropertyAnimator anim1 = mUtilityPanel.unselect();
- removedUtilityPanel = true;
- if (anim1 != null) {
- anim1.start();
- }
- if (mCurrentPanel == view) {
- ViewPropertyAnimator anim2 = current.select(-1, VERTICAL_MOVE);
- if (anim2 != null) {
- anim2.start();
- }
- showDefaultImageView();
- }
- }
-
- if (mCurrentPanel == view) {
- return;
- }
-
- Panel panel = mPanels.get(view);
- if (!removedUtilityPanel) {
- int currentPos = -1;
- if (current != null) {
- currentPos = current.getPosition();
- }
- ViewPropertyAnimator anim1 = panel.select(currentPos, HORIZONTAL_MOVE);
- if (anim1 != null) {
- anim1.start();
- }
- if (current != null) {
- ViewPropertyAnimator anim2 = current.unselect(panel.getPosition(), HORIZONTAL_MOVE);
- if (anim2 != null) {
- anim2.start();
- }
- }
- } else {
- ViewPropertyAnimator anim = panel.select(-1, VERTICAL_MOVE);
- if (anim != null) {
- anim.start();
- }
- }
-
- showDefaultImageView();
- mCurrentPanel = view;
- }
-
- public ImagePreset getImagePreset() {
- return MasterImage.getImage().getPreset();
- }
-
- public void setEffectName(String ename) {
- mUtilityPanel.setEffectName(ename);
- }
-
- public void removeFilterRepresentation(FilterRepresentation filterRepresentation) {
- if (filterRepresentation == null) {
- Log.v(LOGTAG, "RemoveFilterRepresentation: " + filterRepresentation);
- return;
- }
- ImagePreset oldPreset = MasterImage.getImage().getPreset();
- ImagePreset copy = new ImagePreset(oldPreset);
- copy.removeFilter(filterRepresentation);
- MasterImage.getImage().setPreset(copy, true);
- if (MasterImage.getImage().getCurrentFilterRepresentation() == filterRepresentation) {
- FilterRepresentation lastRepresentation = copy.getLastRepresentation();
- MasterImage.getImage().setCurrentFilterRepresentation(lastRepresentation);
- }
- // Now let's reset the panel
- if (mUtilityPanel == null || !mUtilityPanel.selected()) {
- return;
- }
- showPanel(mCurrentPanel);
- mCurrentImage.select();
- if (mCurrentEditor != null) {
- mCurrentEditor.reflectCurrentFilter();
- }
- }
-
- public void useFilterRepresentation(FilterRepresentation filterRepresentation) {
- if (filterRepresentation == null) {
- return;
- }
- if (MasterImage.getImage().getCurrentFilterRepresentation() == filterRepresentation) {
- return;
- }
- ImagePreset oldPreset = MasterImage.getImage().getPreset();
- ImagePreset copy = new ImagePreset(oldPreset);
- FilterRepresentation representation = copy.getRepresentation(filterRepresentation);
- if (representation == null) {
- copy.addFilter(filterRepresentation);
- } else {
- if (filterRepresentation.allowsMultipleInstances()) {
- representation.updateTempParametersFrom(filterRepresentation);
- copy.setHistoryName(filterRepresentation.getName());
- representation.synchronizeRepresentation();
- }
- filterRepresentation = representation;
- }
- MasterImage.getImage().setPreset(copy, true);
- MasterImage.getImage().setCurrentFilterRepresentation(filterRepresentation);
- }
-
- public void showComponentWithRepresentation(FilterRepresentation filterRepresentation) {
- if (filterRepresentation == null) {
- return;
- }
- if (filterRepresentation == MasterImage.getImage().getCurrentFilterRepresentation()) {
- return;
- }
- Set<View> views = mViews.keySet();
- for (View view : views) {
- if (view instanceof FilterIconButton) {
- FilterIconButton button = (FilterIconButton) view;
- if (button.getFilterRepresentation().getFilterClass() == filterRepresentation.getFilterClass()) {
- MasterImage.getImage().setCurrentFilterRepresentation(filterRepresentation);
- showComponent(view);
- return;
- }
- }
- }
- }
-
- public void showComponent(View view) {
-
- boolean doPanelTransition = true;
- if (view instanceof FilterIconButton) {
- FilterRepresentation f = ((FilterIconButton) view).getFilterRepresentation();
- if (f != null) {
- // FIXME: this check shouldn't be necessary (f shouldn't be null)
- doPanelTransition = f.showUtilityPanel();
- }
- }
-
- if (mUtilityPanel != null && !mUtilityPanel.selected() && doPanelTransition) {
- Panel current = mPanels.get(mCurrentPanel);
- ViewPropertyAnimator anim1 = current.unselect(-1, VERTICAL_MOVE);
- if (anim1 != null) {
- anim1.start();
- }
- if (mUtilityPanel != null) {
- ViewPropertyAnimator anim2 = mUtilityPanel.select();
- if (anim2 != null) {
- anim2.start();
- }
- }
- }
-
- if (mCurrentImage != null) {
- mCurrentImage.unselect();
- }
- mUtilityPanel.hideAccessoryViews();
- mUtilityPanel.showMenu(false);
-
- if (view instanceof FilterIconButton) {
- if (mCurrentEditor != null) {
- mCurrentEditor.detach();
- }
- mCurrentEditor = null;
- FilterIconButton component = (FilterIconButton) view;
- FilterRepresentation representation = component.getFilterRepresentation();
-
- if (representation != null) {
- mUtilityPanel.setEffectName(representation.getName());
- mUtilityPanel.setShowParameter(representation.showParameterValue());
-
- if (representation.getEditorId() != 0) {
- if (representation.getEditorId() != ImageOnlyEditor.ID) {
- mActivity.hideCategoryPanel();
- }
- if (mEditorPlaceHolder.contains(representation.getEditorId())) {
- mCurrentEditor = mEditorPlaceHolder.showEditor(
- representation.getEditorId());
- mUtilityPanel.removeControlChildren();
- mCurrentEditor.setUpEditorUI(
- mUtilityPanel.getActionControl(), mUtilityPanel.getEditControl(),
- mUtilityPanel.getEditTitle());
- mCurrentImage = mCurrentEditor.getImageShow();
- mCurrentEditor.setPanelController(this);
-
- } else {
- mCurrentImage = showImageView(representation.getEditorId());
- }
- }
- mUtilityPanel.setShowParameter(representation.showParameterValue());
-
- mCurrentImage.select();
- if (mCurrentEditor != null) {
- mCurrentEditor.reflectCurrentFilter();
- if (mCurrentEditor.useUtilityPanel()) {
- mUtilityPanel.showMenu(true);
- mCurrentEditor.openUtilityPanel(mUtilityPanel.mAccessoryViewList);
- }
- } else if (mCurrentImage.useUtilityPanel()) {
- mCurrentImage.openUtilityPanel(mUtilityPanel.mAccessoryViewList);
- }
- }
- return;
- }
-
- mActivity.showCategoryPanel();
- int id = view.getId();
- if (id == EditorTinyPlanet.ID) {
- mCurrentImage = showImageView(R.id.imageTinyPlanet);
- String ename = mCurrentImage.getContext().getString(R.string.tinyplanet);
- mUtilityPanel.setEffectName(ename);
-
- } else {
- if (id == R.id.cancelFilter) {
- cancelCurrentFilter();
- } else if (id == R.id.applyEffect || id == R.id.applyFilter) {
- if (MasterImage.getImage().getCurrentFilter() instanceof ImageFilterTinyPlanet) {
- mActivity.saveImage();
- } else {
- showPanel(mCurrentPanel);
- }
- MasterImage.getImage().invalidateFiltersOnly();
-
- }
- }
- mCurrentImage.select();
- if (mCurrentEditor != null) {
- mCurrentEditor.reflectCurrentFilter();
- if (mCurrentEditor.useUtilityPanel()) {
- mCurrentEditor.openUtilityPanel(mUtilityPanel.mAccessoryViewList);
- }
- } else if (mCurrentImage.useUtilityPanel()) {
- mCurrentImage.openUtilityPanel(mUtilityPanel.mAccessoryViewList);
- }
- }
-
- public void cancelCurrentFilter() {
- resetParameters();
- MasterImage masterImage = MasterImage.getImage();
- HistoryAdapter adapter = masterImage.getHistory();
-
- int position = adapter.undo();
- masterImage.onHistoryItemClick(position);
- mActivity.invalidateViews();
- }
-
- public void setEditorPlaceHolder(EditorPlaceHolder editorPlaceHolder) {
- mEditorPlaceHolder = editorPlaceHolder;
- }
-}
diff --git a/src/com/android/gallery3d/filtershow/cache/CachingPipeline.java b/src/com/android/gallery3d/filtershow/cache/CachingPipeline.java
index e3c7700..8760c4a 100644
--- a/src/com/android/gallery3d/filtershow/cache/CachingPipeline.java
+++ b/src/com/android/gallery3d/filtershow/cache/CachingPipeline.java
@@ -91,7 +91,9 @@
}
public static synchronized void destroyRenderScriptContext() {
- sRS.destroy();
+ if (sRS != null) {
+ sRS.destroy();
+ }
sRS = null;
sResources = null;
}
diff --git a/src/com/android/gallery3d/filtershow/category/Action.java b/src/com/android/gallery3d/filtershow/category/Action.java
new file mode 100644
index 0000000..667a897
--- /dev/null
+++ b/src/com/android/gallery3d/filtershow/category/Action.java
@@ -0,0 +1,174 @@
+/*
+ * 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.
+ */
+
+package com.android.gallery3d.filtershow.category;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
+import android.graphics.Matrix;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.graphics.RectF;
+import com.android.gallery3d.filtershow.cache.RenderingRequest;
+import com.android.gallery3d.filtershow.cache.RenderingRequestCaller;
+import com.android.gallery3d.filtershow.filters.FilterRepresentation;
+import com.android.gallery3d.filtershow.imageshow.MasterImage;
+import com.android.gallery3d.filtershow.presets.ImagePreset;
+
+public class Action implements RenderingRequestCaller {
+
+ private static final String LOGTAG = "Action";
+ private FilterRepresentation mRepresentation;
+ private String mName;
+ private Rect mImageFrame;
+ private Bitmap mImage;
+ private CategoryAdapter mAdapter;
+ public static final int FULL_VIEW = 0;
+ public static final int CROP_VIEW = 1;
+ private int mType = CROP_VIEW;
+ private Bitmap mPortraitImage;
+ private Bitmap mOverlayBitmap;
+ private Context mContext;
+
+ public Action(Context context, FilterRepresentation representation, int type) {
+ mContext = context;
+ setRepresentation(representation);
+ setType(type);
+ }
+
+ public Action(Context context, FilterRepresentation representation) {
+ this(context, representation, CROP_VIEW);
+ }
+
+ public FilterRepresentation getRepresentation() {
+ return mRepresentation;
+ }
+
+ public void setRepresentation(FilterRepresentation representation) {
+ mRepresentation = representation;
+ mName = representation.getName();
+ }
+
+ public String getName() {
+ return mName;
+ }
+
+ public void setName(String name) {
+ mName = name;
+ }
+
+ public void setImageFrame(Rect imageFrame) {
+ if (mImageFrame != null && mImageFrame.equals(imageFrame)) {
+ return;
+ }
+ Bitmap bitmap = MasterImage.getImage().getLargeThumbnailBitmap();
+ if (bitmap != null) {
+ mImageFrame = imageFrame;
+ int w = mImageFrame.width();
+ int h = mImageFrame.height();
+ if (mType == CROP_VIEW) {
+ w /= 2;
+ }
+ Bitmap bitmapCrop = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);
+ drawCenteredImage(bitmap, bitmapCrop, true);
+
+ postNewIconRenderRequest(bitmapCrop);
+ }
+ }
+
+ public Bitmap getImage() {
+ return mImage;
+ }
+
+ public void setImage(Bitmap image) {
+ mImage = image;
+ }
+
+ public void setAdapter(CategoryAdapter adapter) {
+ mAdapter = adapter;
+ }
+
+ public void setType(int type) {
+ mType = type;
+ }
+
+ private void postNewIconRenderRequest(Bitmap bitmap) {
+ if (bitmap != null && mRepresentation != null) {
+ ImagePreset preset = new ImagePreset();
+ preset.addFilter(mRepresentation);
+ RenderingRequest.post(bitmap,
+ preset, RenderingRequest.ICON_RENDERING, this);
+ }
+ }
+
+ private void drawCenteredImage(Bitmap source, Bitmap destination, boolean scale) {
+ RectF image = new RectF(0, 0, source.getWidth(), source.getHeight());
+ int border = 0;
+ if (!scale) {
+ border = destination.getWidth() - destination.getHeight();
+ if (border < 0) {
+ border = 0;
+ }
+ }
+ RectF frame = new RectF(border, 0,
+ destination.getWidth() - border,
+ destination.getHeight());
+ Matrix m = new Matrix();
+ m.setRectToRect(frame, image, Matrix.ScaleToFit.CENTER);
+ image.set(frame);
+ m.mapRect(image);
+ m.setRectToRect(image, frame, Matrix.ScaleToFit.FILL);
+ Canvas canvas = new Canvas(destination);
+ canvas.drawBitmap(source, m, new Paint());
+ }
+
+ @Override
+ public void available(RenderingRequest request) {
+ mImage = request.getBitmap();
+ if (mImage == null) {
+ return;
+ }
+ if (mRepresentation.getOverlayId() != 0 && mOverlayBitmap == null) {
+ mOverlayBitmap = BitmapFactory.decodeResource(
+ mContext.getResources(),
+ mRepresentation.getOverlayId());
+ }
+ if (mOverlayBitmap != null) {
+ drawCenteredImage(mOverlayBitmap, mImage, false);
+ }
+ if (mAdapter != null) {
+ mAdapter.notifyDataSetChanged();
+ }
+ }
+
+ public void setPortraitImage(Bitmap portraitImage) {
+ mPortraitImage = portraitImage;
+ }
+
+ public Bitmap getPortraitImage() {
+ return mPortraitImage;
+ }
+
+ public Bitmap getOverlayBitmap() {
+ return mOverlayBitmap;
+ }
+
+ public void setOverlayBitmap(Bitmap overlayBitmap) {
+ mOverlayBitmap = overlayBitmap;
+ }
+}
diff --git a/src/com/android/gallery3d/filtershow/category/CategoryAdapter.java b/src/com/android/gallery3d/filtershow/category/CategoryAdapter.java
new file mode 100644
index 0000000..e310b2f
--- /dev/null
+++ b/src/com/android/gallery3d/filtershow/category/CategoryAdapter.java
@@ -0,0 +1,134 @@
+/*
+ * 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.
+ */
+
+package com.android.gallery3d.filtershow.category;
+
+import android.content.Context;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AbsListView;
+import android.widget.ArrayAdapter;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import com.android.gallery3d.R;
+import com.android.gallery3d.filtershow.filters.FilterRepresentation;
+import com.android.gallery3d.filtershow.filters.FilterTinyPlanetRepresentation;
+import com.android.gallery3d.filtershow.filters.ImageFilter;
+import com.android.gallery3d.filtershow.filters.ImageFilterTinyPlanet;
+import com.android.gallery3d.filtershow.ui.FilterIconButton;
+
+public class CategoryAdapter extends ArrayAdapter<Action> {
+
+ private static final String LOGTAG = "CategoryAdapter";
+ private int mItemHeight = 200;
+ private ListView mContainer;
+ private int mItemWidth = ListView.LayoutParams.MATCH_PARENT;
+ private boolean mUseFilterIconButton = false;
+
+ public CategoryAdapter(Context context, int textViewResourceId) {
+ super(context, textViewResourceId);
+ }
+
+ public CategoryAdapter(Context context) {
+ this(context, 0);
+ }
+
+ public void setItemHeight(int height) {
+ mItemHeight = height;
+ }
+
+ public void setItemWidth(int width) {
+ mItemWidth = width;
+ }
+
+ @Override
+ public void add(Action action) {
+ super.add(action);
+ action.setAdapter(this);
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ if (mUseFilterIconButton) {
+ if (convertView == null) {
+ LayoutInflater inflater =
+ (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+ convertView = inflater.inflate(R.layout.filtericonbutton, parent, false);
+ }
+ FilterIconButton view = (FilterIconButton) convertView;
+ Action action = getItem(position);
+ view.setAction(action);
+ view.setup(action.getName(), null);
+ view.setLayoutParams(
+ new ListView.LayoutParams(mItemWidth, mItemHeight));
+ return view;
+ }
+ if (convertView == null) {
+ convertView = new CategoryView(getContext());
+ }
+ CategoryView view = (CategoryView) convertView;
+ view.setAction(getItem(position));
+ view.setLayoutParams(
+ new ListView.LayoutParams(mItemWidth, mItemHeight));
+ return view;
+ }
+
+ public void setContainer(ListView container) {
+ mContainer = container;
+ }
+
+ public ListView getContainer() {
+ return mContainer;
+ }
+
+ public void imageLoaded() {
+ notifyDataSetChanged();
+ }
+
+ public void setUseFilterIconButton(boolean useFilterIconButton) {
+ mUseFilterIconButton = useFilterIconButton;
+ }
+
+ public boolean isUseFilterIconButton() {
+ return mUseFilterIconButton;
+ }
+
+ public FilterRepresentation getTinyPlanet() {
+ for (int i = 0; i < getCount(); i++) {
+ Action action = getItem(i);
+ if (action.getRepresentation() != null
+ && action.getRepresentation().getFilterClass()
+ == ImageFilterTinyPlanet.class) {
+ return action.getRepresentation();
+ }
+ }
+ return null;
+ }
+
+ public void removeTinyPlanet() {
+ for (int i = 0; i < getCount(); i++) {
+ Action action = getItem(i);
+ if (action.getRepresentation() != null
+ && action.getRepresentation().getFilterClass()
+ == ImageFilterTinyPlanet.class) {
+ remove(action);
+ return;
+ }
+ }
+ }
+}
diff --git a/src/com/android/gallery3d/filtershow/category/CategoryPanel.java b/src/com/android/gallery3d/filtershow/category/CategoryPanel.java
new file mode 100644
index 0000000..9ddfcab
--- /dev/null
+++ b/src/com/android/gallery3d/filtershow/category/CategoryPanel.java
@@ -0,0 +1,101 @@
+/*
+ * 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.
+ */
+
+package com.android.gallery3d.filtershow.category;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import com.android.gallery3d.R;
+import com.android.gallery3d.filtershow.FilterShowActivity;
+
+public class CategoryPanel extends Fragment {
+
+ public static final String FRAGMENT_TAG = "CategoryPanel";
+ private static final String PARAMETER_TAG = "currentPanel";
+
+ private int mCurrentAdapter = MainPanel.LOOKS;
+ private CategoryAdapter mAdapter;
+
+ public void setAdapter(int value) {
+ mCurrentAdapter = value;
+ }
+
+ @Override
+ public void onAttach(Activity activity) {
+ super.onAttach(activity);
+ loadAdapter(mCurrentAdapter);
+ }
+
+ private void loadAdapter(int adapter) {
+ FilterShowActivity activity = (FilterShowActivity) getActivity();
+ switch (adapter) {
+ case MainPanel.LOOKS: {
+ mAdapter = activity.getCategoryLooksAdapter();
+ break;
+ }
+ case MainPanel.BORDERS: {
+ mAdapter = activity.getCategoryBordersAdapter();
+ break;
+ }
+ case MainPanel.GEOMETRY: {
+ mAdapter = activity.getCategoryGeometryAdapter();
+ break;
+ }
+ case MainPanel.FILTERS: {
+ mAdapter = activity.getCategoryFiltersAdapter();
+ break;
+ }
+ }
+ }
+
+ @Override
+ public void onSaveInstanceState(Bundle state) {
+ super.onSaveInstanceState(state);
+ state.putInt(PARAMETER_TAG, mCurrentAdapter);
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ LinearLayout main = (LinearLayout) inflater.inflate(
+ R.layout.filtershow_category_panel_new, container,
+ false);
+
+ if (savedInstanceState != null) {
+ int selectedPanel = savedInstanceState.getInt(PARAMETER_TAG);
+ loadAdapter(selectedPanel);
+ }
+
+ View panelView = main.findViewById(R.id.listItems);
+ if (panelView instanceof CategoryTrack) {
+ CategoryTrack panel = (CategoryTrack) panelView;
+ mAdapter.setUseFilterIconButton(true);
+ panel.setAdapter(mAdapter);
+ } else {
+ ListView panel = (ListView) main.findViewById(R.id.listItems);
+ panel.setAdapter(mAdapter);
+ mAdapter.setContainer(panel);
+ }
+ return main;
+ }
+
+}
diff --git a/src/com/android/gallery3d/filtershow/category/CategoryTrack.java b/src/com/android/gallery3d/filtershow/category/CategoryTrack.java
new file mode 100644
index 0000000..e0a8a2f
--- /dev/null
+++ b/src/com/android/gallery3d/filtershow/category/CategoryTrack.java
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+
+package com.android.gallery3d.filtershow.category;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.LinearLayout;
+import com.android.gallery3d.R;
+
+public class CategoryTrack extends LinearLayout {
+
+ private CategoryAdapter mAdapter;
+ private int mElemSize;
+
+ public CategoryTrack(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.CategoryTrack);
+ mElemSize = a.getDimensionPixelSize(R.styleable.CategoryTrack_iconSize, 0);
+ }
+
+ public void setAdapter(CategoryAdapter adapter) {
+ mAdapter = adapter;
+ mAdapter.setItemWidth(mElemSize);
+ mAdapter.setItemHeight(LayoutParams.MATCH_PARENT);
+ fillContent();
+ }
+
+ public void fillContent() {
+ removeAllViews();
+ int n = mAdapter.getCount();
+ for (int i = 0; i < n; i++) {
+ View view = mAdapter.getView(i, null, this);
+ addView(view, i);
+ }
+ requestLayout();
+ }
+
+}
diff --git a/src/com/android/gallery3d/filtershow/category/CategoryView.java b/src/com/android/gallery3d/filtershow/category/CategoryView.java
new file mode 100644
index 0000000..5467841
--- /dev/null
+++ b/src/com/android/gallery3d/filtershow/category/CategoryView.java
@@ -0,0 +1,104 @@
+/*
+ * 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.
+ */
+
+package com.android.gallery3d.filtershow.category;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.graphics.Typeface;
+import android.util.Log;
+import android.view.View;
+import com.android.gallery3d.R;
+import com.android.gallery3d.filtershow.FilterShowActivity;
+import com.android.gallery3d.filtershow.filters.FilterRepresentation;
+
+public class CategoryView extends View implements View.OnClickListener {
+
+ private static final String LOGTAG = "CategoryView";
+ private Paint mPaint = new Paint();
+ private Action mAction;
+ private Rect mTextBounds = new Rect();
+ private static int sMargin = 16;
+ private static int sTextSize = 32;
+ private int mTextColor;
+ private int mBackgroundColor;
+
+ public static void setTextSize(int size) {
+ sTextSize = size;
+ }
+
+ public static void setMargin(int margin) {
+ sMargin = margin;
+ }
+
+ public CategoryView(Context context) {
+ super(context);
+ setOnClickListener(this);
+ Resources res = getResources();
+ mBackgroundColor = res.getColor(R.color.filtershow_categoryview_background);
+ mTextColor = res.getColor(R.color.filtershow_categoryview_text);
+ }
+
+ public void drawText(Canvas canvas, String text) {
+ if (text == null) {
+ return;
+ }
+ text = text.toUpperCase();
+ mPaint.reset();
+ mPaint.setColor(mTextColor);
+ mPaint.setTextSize(sTextSize);
+ mPaint.setTypeface(Typeface.DEFAULT_BOLD);
+ mPaint.setAntiAlias(true);
+ float textWidth = mPaint.measureText(text);
+ mPaint.getTextBounds(text, 0, text.length(), mTextBounds);
+ int x = (int) (canvas.getWidth() - textWidth - sMargin);
+ int y = canvas.getHeight() - sMargin;
+ canvas.drawText(text, x, y, mPaint);
+ }
+
+ public void onDraw(Canvas canvas) {
+ canvas.drawColor(mBackgroundColor);
+ if (mAction != null) {
+ drawText(canvas, mAction.getName());
+ if (mAction.getImage() == null) {
+ mAction.setImageFrame(new Rect(0, 0, canvas.getWidth(), canvas.getHeight()));
+ } else {
+ Bitmap bitmap = mAction.getImage();
+ canvas.drawBitmap(bitmap, 0, 0, mPaint);
+ }
+ }
+ }
+
+ public void setAction(Action action) {
+ mAction = action;
+ invalidate();
+ }
+
+ public FilterRepresentation getRepresentation() {
+ return mAction.getRepresentation();
+ }
+
+ @Override
+ public void onClick(View view) {
+ FilterShowActivity activity = (FilterShowActivity) getContext();
+ activity.showRepresentation(mAction.getRepresentation());
+ }
+}
diff --git a/src/com/android/gallery3d/filtershow/category/MainPanel.java b/src/com/android/gallery3d/filtershow/category/MainPanel.java
new file mode 100644
index 0000000..7cadbc3
--- /dev/null
+++ b/src/com/android/gallery3d/filtershow/category/MainPanel.java
@@ -0,0 +1,238 @@
+/*
+ * 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.
+ */
+
+package com.android.gallery3d.filtershow.category;
+
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentTransaction;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageButton;
+import android.widget.LinearLayout;
+import com.android.gallery3d.R;
+import com.android.gallery3d.filtershow.FilterShowActivity;
+import com.android.gallery3d.filtershow.state.StatePanel;
+
+public class MainPanel extends Fragment {
+
+ private static final String LOGTAG = "MainPanel";
+
+ private LinearLayout mMainView;
+ private ImageButton looksButton;
+ private ImageButton bordersButton;
+ private ImageButton geometryButton;
+ private ImageButton filtersButton;
+
+ public static final String FRAGMENT_TAG = "MainPanel";
+ public static final int LOOKS = 0;
+ public static final int BORDERS = 1;
+ public static final int GEOMETRY = 2;
+ public static final int FILTERS = 3;
+
+ private int mCurrentSelected = -1;
+
+ private void selection(int position, boolean value) {
+ if (value) {
+ FilterShowActivity activity = (FilterShowActivity) getActivity();
+ activity.setCurrentPanel(position);
+ }
+ switch (position) {
+ case LOOKS: {
+ looksButton.setSelected(value);
+ break;
+ }
+ case BORDERS: {
+ bordersButton.setSelected(value);
+ break;
+ }
+ case GEOMETRY: {
+ geometryButton.setSelected(value);
+ break;
+ }
+ case FILTERS: {
+ filtersButton.setSelected(value);
+ break;
+ }
+ }
+ }
+
+ @Override
+ public void onDestroyView() {
+ super.onDestroyView();
+ if (mMainView != null) {
+ if (mMainView.getParent() != null) {
+ ViewGroup parent = (ViewGroup) mMainView.getParent();
+ parent.removeView(mMainView);
+ }
+ }
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+
+ mMainView = (LinearLayout) inflater.inflate(
+ R.layout.filtershow_main_panel, null, false);
+
+ looksButton = (ImageButton) mMainView.findViewById(R.id.fxButton);
+ bordersButton = (ImageButton) mMainView.findViewById(R.id.borderButton);
+ geometryButton = (ImageButton) mMainView.findViewById(R.id.geometryButton);
+ filtersButton = (ImageButton) mMainView.findViewById(R.id.colorsButton);
+
+ looksButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ showPanel(LOOKS);
+ }
+ });
+ bordersButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ showPanel(BORDERS);
+ }
+ });
+ geometryButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ showPanel(GEOMETRY);
+ }
+ });
+ filtersButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ showPanel(FILTERS);
+ }
+ });
+
+ FilterShowActivity activity = (FilterShowActivity) getActivity();
+ showImageStatePanel(activity.isShowingImageStatePanel());
+ showPanel(activity.getCurrentPanel());
+ return mMainView;
+ }
+
+ private boolean isRightAnimation(int newPos) {
+ if (newPos < mCurrentSelected) {
+ return false;
+ }
+ return true;
+ }
+
+ private void setCategoryFragment(CategoryPanel category, boolean fromRight) {
+ FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
+ if (fromRight) {
+ transaction.setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_right);
+ } else {
+ transaction.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_out_left);
+ }
+ transaction.replace(R.id.category_panel_container, category, CategoryPanel.FRAGMENT_TAG);
+ transaction.commit();
+ }
+
+ public void loadCategoryLookPanel() {
+ if (mCurrentSelected == LOOKS) {
+ return;
+ }
+ boolean fromRight = isRightAnimation(LOOKS);
+ selection(mCurrentSelected, false);
+ CategoryPanel categoryPanel = new CategoryPanel();
+ categoryPanel.setAdapter(LOOKS);
+ setCategoryFragment(categoryPanel, fromRight);
+ mCurrentSelected = LOOKS;
+ selection(mCurrentSelected, true);
+ }
+
+ public void loadCategoryBorderPanel() {
+ if (mCurrentSelected == BORDERS) {
+ return;
+ }
+ boolean fromRight = isRightAnimation(BORDERS);
+ selection(mCurrentSelected, false);
+ CategoryPanel categoryPanel = new CategoryPanel();
+ categoryPanel.setAdapter(BORDERS);
+ setCategoryFragment(categoryPanel, fromRight);
+ mCurrentSelected = BORDERS;
+ selection(mCurrentSelected, true);
+ }
+
+ public void loadCategoryGeometryPanel() {
+ if (mCurrentSelected == GEOMETRY) {
+ return;
+ }
+ boolean fromRight = isRightAnimation(GEOMETRY);
+ selection(mCurrentSelected, false);
+ CategoryPanel categoryPanel = new CategoryPanel();
+ categoryPanel.setAdapter(GEOMETRY);
+ setCategoryFragment(categoryPanel, fromRight);
+ mCurrentSelected = GEOMETRY;
+ selection(mCurrentSelected, true);
+ }
+
+ public void loadCategoryFiltersPanel() {
+ if (mCurrentSelected == FILTERS) {
+ return;
+ }
+ boolean fromRight = isRightAnimation(FILTERS);
+ selection(mCurrentSelected, false);
+ CategoryPanel categoryPanel = new CategoryPanel();
+ categoryPanel.setAdapter(FILTERS);
+ setCategoryFragment(categoryPanel, fromRight);
+ mCurrentSelected = FILTERS;
+ selection(mCurrentSelected, true);
+ }
+
+ public void showPanel(int currentPanel) {
+ switch (currentPanel) {
+ case LOOKS: {
+ loadCategoryLookPanel();
+ break;
+ }
+ case BORDERS: {
+ loadCategoryBorderPanel();
+ break;
+ }
+ case GEOMETRY: {
+ loadCategoryGeometryPanel();
+ break;
+ }
+ case FILTERS: {
+ loadCategoryFiltersPanel();
+ break;
+ }
+ }
+ }
+
+ public void showImageStatePanel(boolean show) {
+ if (mMainView.findViewById(R.id.state_panel_container) == null) {
+ return;
+ }
+ FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
+ final View container = mMainView.findViewById(R.id.state_panel_container);
+ if (show) {
+ container.setVisibility(View.VISIBLE);
+ StatePanel statePanel = new StatePanel();
+ transaction.replace(R.id.state_panel_container, statePanel, StatePanel.FRAGMENT_TAG);
+ } else {
+ container.setVisibility(View.GONE);
+ Fragment statePanel = getChildFragmentManager().findFragmentByTag(StatePanel.FRAGMENT_TAG);
+ if (statePanel != null) {
+ transaction.remove(statePanel);
+ }
+ }
+ transaction.commit();
+ }
+}
diff --git a/src/com/android/gallery3d/filtershow/editors/BasicEditor.java b/src/com/android/gallery3d/filtershow/editors/BasicEditor.java
index 987b499..44296e2 100644
--- a/src/com/android/gallery3d/filtershow/editors/BasicEditor.java
+++ b/src/com/android/gallery3d/filtershow/editors/BasicEditor.java
@@ -51,9 +51,6 @@
super.reflectCurrentFilter();
if (getLocalRepresentation() != null && getLocalRepresentation() instanceof FilterBasicRepresentation) {
FilterBasicRepresentation interval = (FilterBasicRepresentation) getLocalRepresentation();
- Context context = mContext;
- interval.getTextId();
-
}
}
diff --git a/src/com/android/gallery3d/filtershow/editors/Editor.java b/src/com/android/gallery3d/filtershow/editors/Editor.java
index dc13b3e..b543750 100644
--- a/src/com/android/gallery3d/filtershow/editors/Editor.java
+++ b/src/com/android/gallery3d/filtershow/editors/Editor.java
@@ -32,7 +32,6 @@
import android.widget.SeekBar.OnSeekBarChangeListener;
import com.android.gallery3d.R;
-import com.android.gallery3d.filtershow.PanelController;
import com.android.gallery3d.filtershow.cache.ImageLoader;
import com.android.gallery3d.filtershow.controller.Control;
import com.android.gallery3d.filtershow.filters.FilterRepresentation;
@@ -50,19 +49,16 @@
protected FrameLayout mFrameLayout;
protected SeekBar mSeekBar;
Button mEditTitle;
- protected PanelController mPanelController;
+ protected Button mFilterTitle;
protected int mID;
private final String LOGTAG = "Editor";
protected FilterRepresentation mLocalRepresentation = null;
protected byte mShowParameter = SHOW_VALUE_UNDEFINED;
+ private Button mButton;
public static byte SHOW_VALUE_UNDEFINED = -1;
public static byte SHOW_VALUE_OFF = 0;
public static byte SHOW_VALUE_INT = 1;
- public void setPanelController(PanelController panelController) {
- this.mPanelController = panelController;
- }
-
public String calculateUserMessage(Context context, String effectName, Object parameterValue) {
return effectName + " " + parameterValue;
}
@@ -83,8 +79,11 @@
return true;
}
- public void setUpEditorUI(View actionButton, View editControl, Button editTitle) {
- this.mEditTitle = editTitle;
+ public void setUpEditorUI(View actionButton, View editControl,
+ Button editTitle, Button stateButton) {
+ mEditTitle = editTitle;
+ mFilterTitle = stateButton;
+ mButton = editTitle;
setMenuIcon(true);
setUtilityPanelUI(actionButton, editControl);
}
@@ -115,13 +114,12 @@
mSeekBar.setVisibility(View.INVISIBLE);
}
- Button button = (Button) actionButton.findViewById(R.id.applyEffect);
- if (button != null) {
+ if (mButton != null) {
if (showsPopupIndicator()) {
- button.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0,
+ mButton.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0,
R.drawable.filtershow_menu_marker, 0);
} else {
- button.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, 0);
+ mButton.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, 0);
}
}
}
@@ -200,24 +198,38 @@
boolean show = filterRepresentation.showParameterValue();
mShowParameter = show ? SHOW_VALUE_INT : SHOW_VALUE_OFF;
}
- }
+ }
return mLocalRepresentation;
}
public void commitLocalRepresentation() {
ImagePreset preset = MasterImage.getImage().getPreset();
preset.updateFilterRepresentation(getLocalRepresentation());
- if (mPanelController != null) {
- mPanelController.onNewValue(-1);
+ if (mButton != null) {
+ updateText();
}
}
+ protected void updateText() {
+ String s = "";
+ if (mLocalRepresentation != null) {
+ s = mContext.getString(mLocalRepresentation.getTextId());
+ }
+ mButton.setText(calculateUserMessage(mContext, s, ""));
+ }
+
/**
* called after the filter is set and the select is called
*/
public void reflectCurrentFilter() {
mLocalRepresentation = null;
+ FilterRepresentation representation = getLocalRepresentation();
+ if (representation != null && mFilterTitle != null && representation.getTextId() != 0) {
+ String text = mContext.getString(representation.getTextId()).toUpperCase();
+ mFilterTitle.setText(text);
+ updateText();
+ }
}
public boolean useUtilityPanel() {
@@ -235,6 +247,7 @@
mEditTitle.setCompoundDrawablesRelativeWithIntrinsicBounds(
0, 0, on ? R.drawable.filtershow_menu_marker : 0, 0);
}
+
protected void createMenu(int[] strId, View button) {
PopupMenu pmenu = new PopupMenu(mContext, button);
Menu menu = pmenu.getMenu();
@@ -269,6 +282,8 @@
}
public void detach() {
-
+ if (mImageShow != null) {
+ mImageShow.unselect();
+ }
}
}
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorPanel.java b/src/com/android/gallery3d/filtershow/editors/EditorPanel.java
new file mode 100644
index 0000000..e35bc8f
--- /dev/null
+++ b/src/com/android/gallery3d/filtershow/editors/EditorPanel.java
@@ -0,0 +1,145 @@
+/*
+ * 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.
+ */
+
+package com.android.gallery3d.filtershow.editors;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentTransaction;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.ImageButton;
+import android.widget.LinearLayout;
+import com.android.gallery3d.R;
+import com.android.gallery3d.filtershow.FilterShowActivity;
+import com.android.gallery3d.filtershow.HistoryAdapter;
+import com.android.gallery3d.filtershow.category.MainPanel;
+import com.android.gallery3d.filtershow.imageshow.MasterImage;
+import com.android.gallery3d.filtershow.state.StatePanel;
+
+public class EditorPanel extends Fragment {
+
+ private static final String LOGTAG = "EditorPanel";
+
+ private LinearLayout mMainView;
+ private Editor mEditor;
+ private int mEditorID;
+
+ public void setEditor(int editor) {
+ mEditorID = editor;
+ }
+
+ @Override
+ public void onAttach(Activity activity) {
+ super.onAttach(activity);
+ FilterShowActivity filterShowActivity = (FilterShowActivity) activity;
+ mEditor = filterShowActivity.getEditor(mEditorID);
+ }
+
+ public void cancelCurrentFilter() {
+ MasterImage masterImage = MasterImage.getImage();
+ HistoryAdapter adapter = masterImage.getHistory();
+
+ int position = adapter.undo();
+ masterImage.onHistoryItemClick(position);
+ ((FilterShowActivity)getActivity()).invalidateViews();
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ FilterShowActivity activity = (FilterShowActivity) getActivity();
+ if (mMainView != null) {
+ if (mMainView.getParent() != null) {
+ ViewGroup parent = (ViewGroup) mMainView.getParent();
+ parent.removeView(mMainView);
+ }
+ showImageStatePanel(activity.isShowingImageStatePanel());
+ return mMainView;
+ }
+ mMainView = (LinearLayout) inflater.inflate(R.layout.filtershow_editor_panel, null);
+
+ View actionControl = mMainView.findViewById(R.id.panelAccessoryViewList);
+ View editControl = mMainView.findViewById(R.id.controlArea);
+ ImageButton cancelButton = (ImageButton) mMainView.findViewById(R.id.cancelFilter);
+ ImageButton applyButton = (ImageButton) mMainView.findViewById(R.id.applyFilter);
+ Button editTitle = (Button) mMainView.findViewById(R.id.applyEffect);
+ cancelButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ cancelCurrentFilter();
+ FilterShowActivity activity = (FilterShowActivity) getActivity();
+ activity.backToMain();
+ }
+ });
+ applyButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ MasterImage.getImage().invalidateFiltersOnly();
+ FilterShowActivity activity = (FilterShowActivity) getActivity();
+ activity.backToMain();
+ }
+ });
+
+ Button toggleState = (Button) mMainView.findViewById(R.id.toggle_state);
+
+ mEditor = activity.getEditor(mEditorID);
+ if (mEditor != null) {
+ mEditor.setUpEditorUI(actionControl, editControl, editTitle, toggleState);
+ mEditor.getImageShow().select();
+ mEditor.reflectCurrentFilter();
+ if (mEditor.useUtilityPanel()) {
+ mEditor.openUtilityPanel((LinearLayout) actionControl);
+ }
+ }
+
+ showImageStatePanel(activity.isShowingImageStatePanel());
+ return mMainView;
+ }
+
+ @Override
+ public void onDetach() {
+ if (mEditor != null) {
+ mEditor.detach();
+ }
+ super.onDetach();
+ }
+
+ public void showImageStatePanel(boolean show) {
+ if (mMainView.findViewById(R.id.state_panel_container) == null) {
+ return;
+ }
+ FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
+ Fragment panel = getActivity().getSupportFragmentManager().findFragmentByTag(
+ MainPanel.FRAGMENT_TAG);
+ if (panel == null || panel instanceof MainPanel) {
+ transaction.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);
+ }
+ if (show) {
+ StatePanel statePanel = new StatePanel();
+ transaction.replace(R.id.state_panel_container, statePanel, StatePanel.FRAGMENT_TAG);
+ } else {
+ Fragment statePanel = getChildFragmentManager().findFragmentByTag(StatePanel.FRAGMENT_TAG);
+ if (statePanel != null) {
+ transaction.remove(statePanel);
+ }
+ }
+ transaction.commit();
+ }
+}
diff --git a/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java b/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java
index 33ed143..02a1c71 100644
--- a/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java
+++ b/src/com/android/gallery3d/filtershow/editors/ParametricEditor.java
@@ -195,15 +195,6 @@
}
@Override
- public void commitLocalRepresentation() {
- super.commitLocalRepresentation();
- FilterRepresentation rep = getLocalRepresentation();
- if (mPanelController != null) {
- mPanelController.onNewValue(-1);
- }
- }
-
- @Override
public void onProgressChanged(SeekBar sbar, int progress, boolean arg2) {
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java
index 0a7ee3c..e06f544 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java
@@ -16,11 +16,17 @@
package com.android.gallery3d.filtershow.filters;
+import android.content.res.Resources;
import android.graphics.Bitmap;
+import android.graphics.Canvas;
import android.graphics.Matrix;
+import android.graphics.Rect;
+import com.android.gallery3d.R;
+import com.android.gallery3d.filtershow.presets.ImagePreset;
public class ImageFilterVignette extends SimpleImageFilter {
private static final String LOGTAG = "ImageFilterVignette";
+ private Bitmap mOverlayBitmap;
public ImageFilterVignette() {
mName = "Vignette";
@@ -51,6 +57,18 @@
@Override
public Bitmap apply(Bitmap bitmap, float scaleFactor, int quality) {
+ if (SIMPLE_ICONS && ImagePreset.QUALITY_ICON == quality) {
+ if (mOverlayBitmap == null) {
+ Resources res = getEnvironment().getCachingPipeline().getResources();
+ mOverlayBitmap = IconUtilities.getFXBitmap(res,
+ R.drawable.filtershow_icon_vignette);
+ }
+ Canvas c = new Canvas(bitmap);
+ int dim = Math.max(bitmap.getWidth(), bitmap.getHeight());
+ Rect r = new Rect(0, 0, dim, dim);
+ c.drawBitmap(mOverlayBitmap, null, r, null);
+ return bitmap;
+ }
FilterVignetteRepresentation rep = (FilterVignetteRepresentation) getParameters();
if (rep == null) {
return bitmap;
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageGeometry.java b/src/com/android/gallery3d/filtershow/imageshow/ImageGeometry.java
index 68a74dc..0c51b16 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/ImageGeometry.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageGeometry.java
@@ -284,9 +284,6 @@
default:
setNoAction();
}
- if (getPanelController() != null) {
- getPanelController().onNewValue(getLocalValue());
- }
invalidate();
return true;
}
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java b/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
index 045c1a5..e19a755 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
@@ -28,7 +28,6 @@
import android.net.Uri;
import android.os.Handler;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.GestureDetector;
import android.view.GestureDetector.OnDoubleTapListener;
import android.view.GestureDetector.OnGestureListener;
@@ -38,7 +37,6 @@
import android.widget.LinearLayout;
import com.android.gallery3d.filtershow.FilterShowActivity;
-import com.android.gallery3d.filtershow.PanelController;
import com.android.gallery3d.filtershow.cache.ImageLoader;
import com.android.gallery3d.filtershow.filters.ImageFilter;
import com.android.gallery3d.filtershow.presets.ImagePreset;
@@ -101,8 +99,6 @@
return new GeometryMetadata(getImagePreset().mGeoData);
}
- private PanelController mController = null;
-
private FilterShowActivity mActivity = null;
public static void setDefaultBackgroundColor(int value) {
@@ -156,18 +152,7 @@
// TODO: implement reset
}
- public void setPanelController(PanelController controller) {
- mController = controller;
- }
-
- public PanelController getPanelController() {
- return mController;
- }
-
public void onNewValue(int parameter) {
- if (getPanelController() != null) {
- getPanelController().onNewValue(parameter);
- }
invalidate();
mActivity.enableSave(hasModifications());
}
@@ -409,7 +394,8 @@
}
public void drawPartialImage(Canvas canvas, Bitmap image) {
- if (!mTouchShowOriginal)
+ boolean showsOriginal = MasterImage.getImage().showsOriginal();
+ if (!showsOriginal && !mTouchShowOriginal)
return;
canvas.save();
if (image != null) {
@@ -429,6 +415,9 @@
} else {
px = (int) (mTouch.x - mImageBounds.left);
py = mImageBounds.height();
+ if (showsOriginal) {
+ px = mImageBounds.width();
+ }
}
Rect d = new Rect(mImageBounds.left, mImageBounds.top,
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java b/src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java
index 866b1b0..5f906ea 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageStraighten.java
@@ -92,9 +92,6 @@
@Override
public void onNewValue(int value) {
setLocalStraighten(GeometryMath.clamp(value, MIN_STRAIGHTEN_ANGLE, MAX_STRAIGHTEN_ANGLE));
- if (getPanelController() != null) {
- getPanelController().onNewValue((int) getLocalStraighten());
- }
invalidate();
}
diff --git a/src/com/android/gallery3d/filtershow/imageshow/MasterImage.java b/src/com/android/gallery3d/filtershow/imageshow/MasterImage.java
index 304d2db..5e5d70b 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/MasterImage.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/MasterImage.java
@@ -72,6 +72,8 @@
private Point mImageShowSize = new Point();
+ private boolean mShowsOriginal;
+
final private static int NEW_GEOMETRY = 1;
private final Handler mHandler = new Handler() {
@@ -89,6 +91,11 @@
private MasterImage() {
}
+ // TODO: remove singleton
+ public static void setMaster(MasterImage master) {
+ sMasterImage = master;
+ }
+
public static MasterImage getImage() {
if (sMasterImage == null) {
sMasterImage = new MasterImage();
@@ -478,6 +485,10 @@
return mLoader.getOriginalBitmapSmall();
}
+ public Bitmap getLargeThumbnailBitmap() {
+ return mLoader.getOriginalBitmapLarge();
+ }
+
public float getMaxScaleFactor() {
return mMaxScaleFactor;
}
@@ -489,4 +500,13 @@
public boolean supportsHighRes() {
return mSupportsHighRes;
}
+
+ public void setShowsOriginal(boolean value) {
+ mShowsOriginal = value;
+ notifyObservers();
+ }
+
+ public boolean showsOriginal() {
+ return mShowsOriginal;
+ }
}
diff --git a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java
index ca97761..e0ff0b3 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.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 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 @@
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) {
diff --git a/src/com/android/gallery3d/filtershow/state/StateAdapter.java b/src/com/android/gallery3d/filtershow/state/StateAdapter.java
index ae81e0b..58f9a7f 100644
--- a/src/com/android/gallery3d/filtershow/state/StateAdapter.java
+++ b/src/com/android/gallery3d/filtershow/state/StateAdapter.java
@@ -22,7 +22,9 @@
import android.widget.ArrayAdapter;
import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.FilterShowActivity;
+import com.android.gallery3d.filtershow.editors.ImageOnlyEditor;
import com.android.gallery3d.filtershow.filters.FilterRepresentation;
+import com.android.gallery3d.filtershow.imageshow.MasterImage;
import java.util.Vector;
@@ -49,7 +51,15 @@
State state = getItem(position);
view.setState(state);
view.setOrientation(mOrientation);
- view.setBackgroundAlpha(1.0f);
+ FilterRepresentation currentRep = MasterImage.getImage().getCurrentFilterRepresentation();
+ FilterRepresentation stateRep = state.getFilterRepresentation();
+ if (currentRep != null && stateRep != null
+ && currentRep.getFilterClass() == stateRep.getFilterClass()
+ && currentRep.getEditorId() != ImageOnlyEditor.ID) {
+ view.setSelected(true);
+ } else {
+ view.setSelected(false);
+ }
return view;
}
@@ -73,15 +83,16 @@
}
}
- public void addAll(Vector<FilterRepresentation> filters) {
- clear();
+ public void addOriginal() {
add(new State(mOriginalText));
+ }
+
+ public void addAll(Vector<FilterRepresentation> filters) {
for (FilterRepresentation filter : filters) {
State state = new State(filter.getName());
state.setFilterRepresentation(filter);
add(state);
}
- add(new State(mResultText));
notifyDataSetChanged();
}
@@ -94,6 +105,6 @@
super.remove(state);
FilterRepresentation filterRepresentation = state.getFilterRepresentation();
FilterShowActivity activity = (FilterShowActivity) getContext();
- activity.getPanelController().removeFilterRepresentation(filterRepresentation);
+ activity.removeFilterRepresentation(filterRepresentation);
}
}
diff --git a/src/com/android/gallery3d/filtershow/state/StatePanel.java b/src/com/android/gallery3d/filtershow/state/StatePanel.java
index fd33b05..df470f2 100644
--- a/src/com/android/gallery3d/filtershow/state/StatePanel.java
+++ b/src/com/android/gallery3d/filtershow/state/StatePanel.java
@@ -18,6 +18,7 @@
import android.os.Bundle;
import android.support.v4.app.Fragment;
+import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -27,18 +28,17 @@
public class StatePanel extends Fragment {
private static final String LOGTAG = "StatePanel";
- StatePanelTrack track;
+ private StatePanelTrack track;
+ private LinearLayout mMainView;
+ public static final String FRAGMENT_TAG = "StatePanel";
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
- LinearLayout main = (LinearLayout) inflater.inflate(
- R.layout.filtershow_state_panel_new, container,
- false);
-
- View panel = main.findViewById(R.id.listStates);
+ mMainView = (LinearLayout) inflater.inflate(R.layout.filtershow_state_panel_new, null);
+ View panel = mMainView.findViewById(R.id.listStates);
track = (StatePanelTrack) panel;
track.setAdapter(MasterImage.getImage().getState());
- return main;
+ return mMainView;
}
}
diff --git a/src/com/android/gallery3d/filtershow/state/StatePanelTrack.java b/src/com/android/gallery3d/filtershow/state/StatePanelTrack.java
index 1f6c272..4fb1b11 100644
--- a/src/com/android/gallery3d/filtershow/state/StatePanelTrack.java
+++ b/src/com/android/gallery3d/filtershow/state/StatePanelTrack.java
@@ -18,16 +18,22 @@
import android.animation.LayoutTransition;
import android.content.Context;
+import android.content.res.TypedArray;
import android.graphics.Point;
import android.graphics.Rect;
import android.util.AttributeSet;
+import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
+import android.view.ViewGroup;
import android.widget.Adapter;
import android.widget.LinearLayout;
+import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.FilterShowActivity;
+import com.android.gallery3d.filtershow.editors.ImageOnlyEditor;
import com.android.gallery3d.filtershow.filters.FilterRepresentation;
+import com.android.gallery3d.filtershow.imageshow.MasterImage;
public class StatePanelTrack extends LinearLayout implements PanelTrack {
@@ -39,12 +45,34 @@
private boolean mStartedDrag = false;
private StateAdapter mAdapter;
private DragListener mDragListener = new DragListener(this);
- GestureDetector mGestureDetector;
- private int mContainerWidth = 668; // TODO: get this from XML
- private int mContainerHeight = 200;
+ private float mDeleteSlope = 0.2f;
+ private GestureDetector mGestureDetector;
+ private int mElemWidth;
+ private int mElemHeight;
+ private int mElemSize;
+ private int mElemEndSize;
+ private int mEndElemWidth;
+ private int mEndElemHeight;
+ private long mTouchTime;
+ private int mMaxTouchDelay = 300; // 300ms delay for touch
+ private static final boolean ALLOWS_DRAG = false;
public StatePanelTrack(Context context, AttributeSet attrs) {
super(context, attrs);
+ TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.StatePanelTrack);
+ mElemSize = a.getDimensionPixelSize(R.styleable.StatePanelTrack_elemSize, 0);
+ mElemEndSize = a.getDimensionPixelSize(R.styleable.StatePanelTrack_elemEndSize, 0);
+ if (getOrientation() == LinearLayout.HORIZONTAL) {
+ mElemWidth = mElemSize;
+ mElemHeight = LayoutParams.MATCH_PARENT;
+ mEndElemWidth = mElemEndSize;
+ mEndElemHeight = LayoutParams.MATCH_PARENT;
+ } else {
+ mElemWidth = LayoutParams.MATCH_PARENT;
+ mElemHeight = mElemSize;
+ mEndElemWidth = LayoutParams.MATCH_PARENT;
+ mEndElemHeight = mElemEndSize;
+ }
GestureDetector.SimpleOnGestureListener simpleOnGestureListener
= new GestureDetector.SimpleOnGestureListener(){
@Override
@@ -100,23 +128,11 @@
return null;
}
- @Override
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec){
- int w = MeasureSpec.getSize(widthMeasureSpec);
- if (w > 0) {
- mContainerWidth = w;
- }
- super.onMeasure(widthMeasureSpec, heightMeasureSpec);
- fillContent(false);
- }
-
public void fillContent(boolean animate) {
if (!animate) {
this.setLayoutTransition(null);
}
int n = mAdapter.getCount();
- int w = mContainerWidth;
- int h = mContainerHeight;
for (int i = 0; i < getChildCount(); i++) {
StateView child = (StateView) getChildAt(i);
child.resetPosition();
@@ -124,10 +140,7 @@
removeView(child);
}
}
- LayoutParams params;
- params = new LayoutParams(w, h);
- LayoutParams paramsEnds;
- paramsEnds = new LayoutParams(w, h/2);
+ LayoutParams params = new LayoutParams(mElemWidth, mElemHeight);
for (int i = 0; i < n; i++) {
State s = mAdapter.getItem(i);
if (findChildWithState(s) == null) {
@@ -135,6 +148,7 @@
addView(view, i, params);
}
}
+
for (int i = 0; i < n; i++) {
State state = mAdapter.getItem(i);
StateView view = (StateView) getChildAt(i);
@@ -143,19 +157,10 @@
view.setType(StateView.BEGIN);
} else if (i == n - 1) {
view.setType(StateView.END);
+ } else {
+ view.setType(StateView.DEFAULT);
}
view.resetPosition();
- if (i == 0 || (i == n -1)) {
- if (view.getWidth() != w || view.getHeight() != h/2) {
- view.setLayoutParams(paramsEnds);
- requestLayout();
- }
- } else {
- if (view.getWidth() != w || view.getHeight() != h) {
- view.setLayoutParams(params);
- requestLayout();
- }
- }
}
if (!animate) {
@@ -180,12 +185,9 @@
cancelEvent.setAction(MotionEvent.ACTION_CANCEL);
mGestureDetector.onTouchEvent(cancelEvent);
mCurrentSelectedView = mCurrentView;
- mCurrentSelectedView.setSelected(true);
// We have to send the event to the gesture detector
mGestureDetector.onTouchEvent(event);
- FilterShowActivity activity = (FilterShowActivity) getContext();
- activity.getPanelController().showComponentWithRepresentation(
- mCurrentSelectedView.getState().getFilterRepresentation());
+ mTouchTime = System.currentTimeMillis();
}
@Override
@@ -201,12 +203,16 @@
if (mCurrentView == null) {
return false;
}
+ if (mTouchTime == 0) {
+ mTouchTime = System.currentTimeMillis();
+ }
mGestureDetector.onTouchEvent(event);
if (mTouchPoint == null) {
mTouchPoint = new Point();
mTouchPoint.x = (int) event.getX();
mTouchPoint.y = (int) event.getY();
}
+
if (event.getActionMasked() == MotionEvent.ACTION_MOVE) {
float translation = event.getY() - mTouchPoint.y;
float alpha = 1.0f - (Math.abs(translation) / mCurrentView.getHeight());
@@ -218,13 +224,26 @@
mCurrentView.setTranslationY(translation);
}
mCurrentView.setBackgroundAlpha(alpha);
- if (alpha < 0.7) {
+ if (ALLOWS_DRAG && alpha < 0.7) {
setOnDragListener(mDragListener);
DragShadowBuilder shadowBuilder = new DragShadowBuilder(mCurrentView);
mCurrentView.startDrag(null, shadowBuilder, mCurrentView, 0);
mStartedDrag = true;
}
}
+ if (!mExited && mCurrentView != null
+ && mCurrentView.getBackgroundAlpha() > mDeleteSlope
+ && event.getActionMasked() == MotionEvent.ACTION_UP
+ && System.currentTimeMillis() - mTouchTime < mMaxTouchDelay) {
+ FilterRepresentation representation = mCurrentView.getState().getFilterRepresentation();
+ if (representation != MasterImage.getImage().getCurrentFilterRepresentation()) {
+ FilterShowActivity activity = (FilterShowActivity) getContext();
+ activity.showRepresentation(representation);
+ }
+ if (representation.getEditorId() != ImageOnlyEditor.ID) {
+ mCurrentView.setSelected(true);
+ }
+ }
if (event.getActionMasked() == MotionEvent.ACTION_UP
|| (!mStartedDrag && event.getActionMasked() == MotionEvent.ACTION_CANCEL)) {
checkEndState();
@@ -234,18 +253,33 @@
public void checkEndState() {
mTouchPoint = null;
- if (mExited || mCurrentView.getAlpha() < 0.2) {
+ mTouchTime = 0;
+ if (mExited || mCurrentView.getBackgroundAlpha() < mDeleteSlope) {
int origin = findChild(mCurrentView);
if (origin != -1) {
State current = mAdapter.getItem(origin);
+ FilterRepresentation currentRep = MasterImage.getImage().getCurrentFilterRepresentation();
+ FilterRepresentation removedRep = current.getFilterRepresentation();
mAdapter.remove(current);
fillContent(true);
+ if (currentRep != null && removedRep != null
+ && currentRep.getFilterClass() == removedRep.getFilterClass()) {
+ FilterShowActivity activity = (FilterShowActivity) getContext();
+ activity.backToMain();
+ return;
+ }
}
} else {
mCurrentView.setBackgroundAlpha(1.0f);
mCurrentView.setTranslationX(0);
mCurrentView.setTranslationY(0);
}
+ if (mCurrentSelectedView != null) {
+ mCurrentSelectedView.invalidate();
+ }
+ if (mCurrentView != null) {
+ mCurrentView.invalidate();
+ }
mCurrentView = null;
mExited = false;
mStartedDrag = false;
diff --git a/src/com/android/gallery3d/filtershow/state/StateView.java b/src/com/android/gallery3d/filtershow/state/StateView.java
index eb19b52..45ca382 100644
--- a/src/com/android/gallery3d/filtershow/state/StateView.java
+++ b/src/com/android/gallery3d/filtershow/state/StateView.java
@@ -17,16 +17,21 @@
package com.android.gallery3d.filtershow.state;
import android.content.Context;
+import android.content.res.Resources;
import android.graphics.*;
import android.util.AttributeSet;
+import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewParent;
import android.widget.LinearLayout;
+import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.FilterShowActivity;
+import com.android.gallery3d.filtershow.imageshow.MasterImage;
public class StateView extends View {
+ private static final String LOGTAG = "StateView";
private Path mPath = new Path();
private Paint mPaint = new Paint();
@@ -51,6 +56,14 @@
private boolean mDuplicateButton;
private State mState;
+ private int mEndsBackgroundColor;
+ private int mEndsTextColor;
+ private int mBackgroundColor;
+ private int mTextColor;
+ private int mSelectedBackgroundColor;
+ private int mSelectedTextColor;
+ private Rect mTextBounds = new Rect();
+
public StateView(Context context) {
this(context, DEFAULT);
}
@@ -58,10 +71,13 @@
public StateView(Context context, int type) {
super(context);
mType = type;
- }
-
- public StateView(Context context, AttributeSet attrs) {
- super(context, attrs);
+ Resources res = getResources();
+ mEndsBackgroundColor = res.getColor(R.color.filtershow_stateview_end_background);
+ mEndsTextColor = res.getColor(R.color.filtershow_stateview_end_text);
+ mBackgroundColor = res.getColor(R.color.filtershow_stateview_background);
+ mTextColor = res.getColor(R.color.filtershow_stateview_text);
+ mSelectedBackgroundColor = res.getColor(R.color.filtershow_stateview_selected_background);
+ mSelectedTextColor = res.getColor(R.color.filtershow_stateview_selected_text);
}
public String getText() {
@@ -94,6 +110,13 @@
if (parent instanceof PanelTrack) {
((PanelTrack) getParent()).onTouch(event, this);
}
+ if (mType == BEGIN) {
+ MasterImage.getImage().setShowsOriginal(true);
+ }
+ }
+ if (event.getActionMasked() == MotionEvent.ACTION_UP
+ || event.getActionMasked() == MotionEvent.ACTION_CANCEL) {
+ MasterImage.getImage().setShowsOriginal(false);
}
return true;
}
@@ -104,17 +127,19 @@
}
mPaint.reset();
if (isSelected()) {
- mPaint.setColor(Color.BLACK);
+ mPaint.setColor(mSelectedTextColor);
} else {
- mPaint.setColor(Color.WHITE);
+ mPaint.setColor(mTextColor);
}
+ if (mType == BEGIN) {
+ mPaint.setColor(mEndsTextColor);
+ }
+ mPaint.setTypeface(Typeface.DEFAULT_BOLD);
+ mPaint.setAntiAlias(true);
mPaint.setTextSize(mTextSize);
- float textWidth = mPaint.measureText(mText);
- int x = (int) ((canvas.getWidth() - textWidth) / 2);
- int y = canvas.getHeight() - sMargin;
- if (canvas.getHeight() > canvas.getWidth()) {
- y = canvas.getHeight() - (canvas.getHeight() - canvas.getWidth() - 2 * sMargin) / 2;
- }
+ mPaint.getTextBounds(mText, 0, mText.length(), mTextBounds);
+ int x = (canvas.getWidth() - mTextBounds.width()) / 2;
+ int y = mTextBounds.height() + (canvas.getHeight() - mTextBounds.height()) / 2;
canvas.drawText(mText, x, y, mPaint);
}
@@ -137,16 +162,16 @@
}
}
- if (mType == DEFAULT) {
+ if (mType == DEFAULT || mType == END) {
if (mDuplicateButton) {
mPaint.setARGB(255, 200, 0, 0);
} else if (isSelected()) {
- mPaint.setARGB(255, 200, 200, 200);
+ mPaint.setColor(mSelectedBackgroundColor);
} else {
- mPaint.setARGB(255, 70, 70, 70);
+ mPaint.setColor(mBackgroundColor);
}
} else {
- mPaint.setARGB(255, 150, 150, 150);
+ mPaint.setColor(mEndsBackgroundColor);
}
canvas.drawPath(mPath, mPaint);
drawText(canvas);
@@ -220,14 +245,15 @@
}
public void setBackgroundAlpha(float alpha) {
- if (mType != DEFAULT) {
+ if (mType == BEGIN) {
return;
}
mAlpha = alpha;
+ setAlpha(alpha);
invalidate();
}
- public float getAlpha() {
+ public float getBackgroundAlpha() {
return mAlpha;
}
@@ -246,15 +272,15 @@
public void setState(State state) {
mState = state;
- mText = mState.getText();
+ mText = mState.getText().toUpperCase();
mType = mState.getType();
- setBackgroundAlpha(1.0f);
invalidate();
}
public void resetPosition() {
setTranslationX(0);
setTranslationY(0);
+ setBackgroundAlpha(1.0f);
}
public boolean isDraggable() {
diff --git a/src/com/android/gallery3d/filtershow/ui/FilterIconButton.java b/src/com/android/gallery3d/filtershow/ui/FilterIconButton.java
index 7d4071d..a15060b 100644
--- a/src/com/android/gallery3d/filtershow/ui/FilterIconButton.java
+++ b/src/com/android/gallery3d/filtershow/ui/FilterIconButton.java
@@ -21,13 +21,13 @@
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.util.AttributeSet;
-import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;
-import com.android.gallery3d.filtershow.PanelController;
+import com.android.gallery3d.filtershow.FilterShowActivity;
import com.android.gallery3d.filtershow.cache.RenderingRequest;
import com.android.gallery3d.filtershow.cache.RenderingRequestCaller;
+import com.android.gallery3d.filtershow.category.Action;
import com.android.gallery3d.filtershow.filters.FilterRepresentation;
import com.android.gallery3d.filtershow.imageshow.GeometryListener;
import com.android.gallery3d.filtershow.imageshow.MasterImage;
@@ -40,11 +40,9 @@
private static final String LOGTAG = "FilterIconButton";
private Bitmap mOverlayBitmap = null;
private boolean mOverlayOnly = false;
- private PanelController mController = null;
private FilterRepresentation mFilterRepresentation = null;
- private LinearLayout mParentContainer = null;
- private View.OnClickListener mListener = null;
private Bitmap mIconBitmap = null;
+ private Action mAction;
public FilterIconButton(Context context) {
super(context);
}
@@ -57,42 +55,46 @@
super(context, attrs, defStyle);
}
- public void setup(String text, PanelController controller, LinearLayout parent) {
- mController = controller;
+ public void setup(String text, LinearLayout parent) {
setText(text);
setContentDescription(text);
- mParentContainer = parent;
super.setOnClickListener(this);
MasterImage.getImage().addGeometryListener(this);
invalidate();
}
@Override
- public void setOnClickListener(View.OnClickListener listener) {
- mListener = listener;
- }
-
- @Override
public void onClick(View v) {
- if (mController != null) {
- mController.useFilterRepresentation(mFilterRepresentation);
- mParentContainer.dispatchSetSelected(false);
- setSelected(true);
- }
- if (mListener != null && mListener != this) {
- mListener.onClick(v);
- }
+ FilterShowActivity activity = (FilterShowActivity) getContext();
+ activity.showRepresentation(mFilterRepresentation);
}
public FilterRepresentation getFilterRepresentation() {
return mFilterRepresentation;
}
- public void setFilterRepresentation(FilterRepresentation filterRepresentation) {
+ public void setAction(Action action) {
+ mAction = action;
+ if (action == null) {
+ return;
+ }
+ if (mAction.getPortraitImage() != null) {
+ mIconBitmap = mAction.getPortraitImage();
+ setIcon(mIconBitmap);
+ }
+ setFilterRepresentation(mAction.getRepresentation());
+ }
+
+ private void setFilterRepresentation(FilterRepresentation filterRepresentation) {
mFilterRepresentation = filterRepresentation;
if (mFilterRepresentation != null && mFilterRepresentation.getOverlayId() != 0) {
- mOverlayBitmap = BitmapFactory.decodeResource(getResources(),
+ if (mAction.getOverlayBitmap() == null) {
+ mOverlayBitmap = BitmapFactory.decodeResource(getResources(),
mFilterRepresentation.getOverlayId());
+ mAction.setOverlayBitmap(mOverlayBitmap);
+ } else {
+ mOverlayBitmap = mAction.getOverlayBitmap();
+ }
}
mOverlayOnly = mFilterRepresentation.getOverlayOnly();
if (mOverlayOnly) {
@@ -106,8 +108,9 @@
protected void onDraw(Canvas canvas) {
if (mIconBitmap == null && !mOverlayOnly) {
postNewIconRenderRequest();
+ } else {
+ super.onDraw(canvas);
}
- super.onDraw(canvas);
}
@Override
@@ -125,6 +128,9 @@
IconFactory.drawIcon(mIconBitmap, mOverlayBitmap, false);
}
setIcon(mIconBitmap);
+ if (mAction != null) {
+ mAction.setPortraitImage(mIconBitmap);
+ }
}
}
@@ -139,7 +145,7 @@
private void postNewIconRenderRequest() {
Bitmap dst = MasterImage.getImage().getThumbnailBitmap();
- if (dst != null) {
+ if (dst != null && mAction != null) {
ImagePreset mPreset = new ImagePreset();
mPreset.addFilter(mFilterRepresentation);
RenderingRequest.post(dst.copy(Bitmap.Config.ARGB_8888, true),
diff --git a/src/com/android/gallery3d/filtershow/ui/ImageCurves.java b/src/com/android/gallery3d/filtershow/ui/ImageCurves.java
index be5df0a..4755b90 100644
--- a/src/com/android/gallery3d/filtershow/ui/ImageCurves.java
+++ b/src/com/android/gallery3d/filtershow/ui/ImageCurves.java
@@ -179,6 +179,9 @@
@Override
public void onDraw(Canvas canvas) {
super.onDraw(canvas);
+ if (mFilterCurvesRepresentation == null) {
+ return;
+ }
gPaint.setAntiAlias(true);