diff options
author | Michael Kaiser <patheticpat@googlemail.com> | 2013-04-15 17:42:38 +0200 |
---|---|---|
committer | Michael Kaiser <patheticpat@googlemail.com> | 2013-04-15 18:53:52 +0200 |
commit | a66d225b9feff54bdd5bb597102839fe2cdbc75f (patch) | |
tree | d07a9a8fb00ad69bd1e61b46b13fc6a8cfa6fce1 /res | |
parent | 4707139def5500f1039de669e53822d47855008c (diff) | |
download | AntennaPod-a66d225b9feff54bdd5bb597102839fe2cdbc75f.zip |
Make removal of queued items undoable
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable-xhdpi/ic_undobar_undo.png | bin | 0 -> 1558 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/undobar.9.png | bin | 0 -> 1665 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/undobar_button_focused.9.png | bin | 0 -> 1141 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/undobar_button_pressed.9.png | bin | 0 -> 1123 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/undobar_divider.9.png | bin | 0 -> 963 bytes | |||
-rw-r--r-- | res/drawable/undobar_button.xml | 22 | ||||
-rw-r--r-- | res/layout/organize_queue.xml | 7 | ||||
-rw-r--r-- | res/values/integers.xml | 3 | ||||
-rw-r--r-- | res/values/strings.xml | 4 | ||||
-rw-r--r-- | res/values/styles.xml | 40 |
10 files changed, 73 insertions, 3 deletions
diff --git a/res/drawable-xhdpi/ic_undobar_undo.png b/res/drawable-xhdpi/ic_undobar_undo.png Binary files differnew file mode 100644 index 000000000..91c8429ad --- /dev/null +++ b/res/drawable-xhdpi/ic_undobar_undo.png diff --git a/res/drawable-xhdpi/undobar.9.png b/res/drawable-xhdpi/undobar.9.png Binary files differnew file mode 100644 index 000000000..22fa2205b --- /dev/null +++ b/res/drawable-xhdpi/undobar.9.png diff --git a/res/drawable-xhdpi/undobar_button_focused.9.png b/res/drawable-xhdpi/undobar_button_focused.9.png Binary files differnew file mode 100644 index 000000000..d284ca7cb --- /dev/null +++ b/res/drawable-xhdpi/undobar_button_focused.9.png diff --git a/res/drawable-xhdpi/undobar_button_pressed.9.png b/res/drawable-xhdpi/undobar_button_pressed.9.png Binary files differnew file mode 100644 index 000000000..e990659f0 --- /dev/null +++ b/res/drawable-xhdpi/undobar_button_pressed.9.png diff --git a/res/drawable-xhdpi/undobar_divider.9.png b/res/drawable-xhdpi/undobar_divider.9.png Binary files differnew file mode 100644 index 000000000..1b067d4e7 --- /dev/null +++ b/res/drawable-xhdpi/undobar_divider.9.png diff --git a/res/drawable/undobar_button.xml b/res/drawable/undobar_button.xml new file mode 100644 index 000000000..a4de91b49 --- /dev/null +++ b/res/drawable/undobar_button.xml @@ -0,0 +1,22 @@ +<!-- + + Copyright 2012 Roman Nurik + + 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. + +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/undobar_button_pressed" android:state_pressed="true"/> + <item android:drawable="@drawable/undobar_button_focused" android:state_focused="true"/> + <item android:drawable="@android:color/transparent"/> +</selector> diff --git a/res/layout/organize_queue.xml b/res/layout/organize_queue.xml index b73263632..1c6a4ad4e 100644 --- a/res/layout/organize_queue.xml +++ b/res/layout/organize_queue.xml @@ -32,4 +32,9 @@ android:gravity="center" android:text="@string/no_items_label" /> -</LinearLayout>
\ No newline at end of file + <LinearLayout android:id="@+id/undobar" style="@style/UndoBar"> + <TextView android:id="@+id/undobar_message" style="@style/UndoBarMessage" /> + <Button android:id="@+id/undobar_button" style="@style/UndoBarButton" /> + </LinearLayout> + +</LinearLayout> diff --git a/res/values/integers.xml b/res/values/integers.xml new file mode 100644 index 000000000..d7f7eca68 --- /dev/null +++ b/res/values/integers.xml @@ -0,0 +1,3 @@ +<resources> + <integer name="undobar_hide_delay">5000</integer> +</resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index 5bc40db54..fce513f3e 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -122,6 +122,8 @@ <!-- Queue operations --> <string name="clear_queue_label">Clear queue</string> <string name="organize_queue_label">Organize queue</string> + <string name="undo">Undo</string> + <string name="removed_from_queue">Item removed</string> <!-- Flattr --> <string name="flattr_auth_label">Flattr sign-in</string> @@ -239,4 +241,4 @@ <string name="folder_not_empty_dialog_msg">The folder you have selected is not empty. Media downloads and other files will be placed directly in this folder. Continue anyway?</string> <string name="set_to_default_folder">Choose default folder</string> -</resources>
\ No newline at end of file +</resources> diff --git a/res/values/styles.xml b/res/values/styles.xml index c5e3abde3..f32ea3894 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -92,4 +92,42 @@ <item name="android:textColor">#FFFFFF</item> </style> -</resources>
\ No newline at end of file + <style name="UndoBar"> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">48dp</item> + <item name="android:layout_gravity">bottom</item> + <item name="android:layout_marginLeft">8dp</item> + <item name="android:layout_marginRight">8dp</item> + <item name="android:layout_marginBottom">16dp</item> + <item name="android:orientation">horizontal</item> + <item name="android:background">@drawable/undobar</item> + <item name="android:clickable">true</item> + <item name="android:showDividers">middle</item> + <item name="android:divider">@drawable/undobar_divider</item> + <item name="android:dividerPadding">10dp</item> + </style> + <style name="UndoBarMessage"> + <item name="android:layout_width">0dp</item> + <item name="android:layout_weight">1</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_marginLeft">16dp</item> + <item name="android:layout_gravity">center_vertical</item> + <item name="android:layout_marginRight">16dp</item> + <item name="android:textAppearance">?android:textAppearanceMedium</item> + <item name="android:textColor">#fff</item> + </style> + <style name="UndoBarButton"> + <item name="android:layout_width">wrap_content</item> + <item name="android:layout_height">match_parent</item> + <item name="android:paddingLeft">16dp</item> + <item name="android:paddingRight">16dp</item> + <item name="android:background">@drawable/undobar_button</item> + <item name="android:drawableLeft">@drawable/ic_undobar_undo</item> + <item name="android:drawablePadding">12dp</item> + <item name="android:textAppearance">?android:textAppearanceSmall</item> + <item name="android:textAllCaps">true</item> + <item name="android:textStyle">bold</item> + <item name="android:textColor">#fff</item> + <item name="android:text">@string/undo</item> + </style> +</resources> |