Implement multiple selection and drag on press-and-hold
BIN
app/src/main/res/drawable-hdpi/ic_action_archive_dark.png
Normal file
|
After Width: | Height: | Size: 338 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_archive_light.png
Normal file
|
After Width: | Height: | Size: 393 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_color_dark.png
Normal file
|
After Width: | Height: | Size: 492 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_color_light.png
Normal file
|
After Width: | Height: | Size: 563 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_edit_light.png
Normal file
|
After Width: | Height: | Size: 822 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_unarchive_dark.png
Normal file
|
After Width: | Height: | Size: 337 B |
BIN
app/src/main/res/drawable-hdpi/ic_action_unarchive_light.png
Normal file
|
After Width: | Height: | Size: 410 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_archive_dark.png
Normal file
|
After Width: | Height: | Size: 214 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_archive_light.png
Normal file
|
After Width: | Height: | Size: 244 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_color_dark.png
Normal file
|
After Width: | Height: | Size: 289 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_color_light.png
Normal file
|
After Width: | Height: | Size: 319 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_edit_light.png
Normal file
|
After Width: | Height: | Size: 554 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_unarchive_dark.png
Normal file
|
After Width: | Height: | Size: 207 B |
BIN
app/src/main/res/drawable-mdpi/ic_action_unarchive_light.png
Normal file
|
After Width: | Height: | Size: 243 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_archive_dark.png
Normal file
|
After Width: | Height: | Size: 338 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_archive_light.png
Normal file
|
After Width: | Height: | Size: 390 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_color_dark.png
Normal file
|
After Width: | Height: | Size: 541 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_color_light.png
Normal file
|
After Width: | Height: | Size: 602 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_edit_light.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_action_unarchive_dark.png
Normal file
|
After Width: | Height: | Size: 337 B |
BIN
app/src/main/res/drawable-xhdpi/ic_action_unarchive_light.png
Normal file
|
After Width: | Height: | Size: 381 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_archive_dark.png
Normal file
|
After Width: | Height: | Size: 593 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_archive_light.png
Normal file
|
After Width: | Height: | Size: 674 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_color_dark.png
Normal file
|
After Width: | Height: | Size: 922 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_color_light.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_edit_light.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_unarchive_dark.png
Normal file
|
After Width: | Height: | Size: 575 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_action_unarchive_light.png
Normal file
|
After Width: | Height: | Size: 683 B |
@@ -1,6 +0,0 @@
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/grey"> <!-- ripple color -->
|
||||
|
||||
<item android:drawable="@color/white"/> <!-- normal color -->
|
||||
|
||||
</ripple>
|
||||
8
app/src/main/res/drawable/ripple_transparent.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?android:colorControlHighlight">
|
||||
|
||||
<item android:id="@android:id/mask">
|
||||
<color android:color="@android:color/white" />
|
||||
</item>
|
||||
|
||||
</ripple>
|
||||
5
app/src/main/res/drawable/ripple_white.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="?android:colorControlHighlight">
|
||||
|
||||
<item android:drawable="@color/white" />
|
||||
</ripple>
|
||||
5
app/src/main/res/drawable/selected_box.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
|
||||
<solid android:color="@color/grey_100" />
|
||||
<stroke android:width="2dip" android:color="@color/grey_500"/>
|
||||
</shape>
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/buttonPickColor"
|
||||
android:src="@drawable/ic_action_pick_color"
|
||||
android:src="@drawable/ic_action_color_light"
|
||||
style="@style/dialogFormInputColor" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -9,12 +9,9 @@
|
||||
android:id="@+id/listView"
|
||||
style="@style/habitsListStyle"
|
||||
dslv:drag_enabled="true"
|
||||
dslv:drag_handle_id="@drawable/habits_header_check"
|
||||
dslv:drag_start_mode="onMove"
|
||||
dslv:float_alpha="0.5"
|
||||
dslv:drag_start_mode="onLongPress"
|
||||
dslv:sort_enabled="true"
|
||||
dslv:track_drag_sort="false"
|
||||
dslv:use_default_controller="true"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
24
app/src/main/res/menu-v21/list_habits_context.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_edit_habit"
|
||||
android:title="@string/edit"
|
||||
android:icon="@drawable/ic_action_edit_dark"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_color"
|
||||
android:title="@string/color_picker_default_title"
|
||||
android:icon="@drawable/ic_action_color_dark"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_archive_habit"
|
||||
android:title="@string/archive"
|
||||
android:icon="@drawable/ic_action_archive_dark" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_unarchive_habit"
|
||||
android:title="@string/unarchive"
|
||||
android:icon="@drawable/ic_action_unarchive_dark"/>
|
||||
|
||||
</menu>
|
||||
@@ -1,19 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_edit_habit"
|
||||
android:title="@string/edit">
|
||||
</item>
|
||||
android:title="@string/edit"
|
||||
android:icon="@drawable/ic_action_edit_light"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_color"
|
||||
android:title="@string/color_picker_default_title"
|
||||
android:icon="@drawable/ic_action_color_light"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_archive_habit"
|
||||
android:title="@string/archive">
|
||||
</item>
|
||||
android:title="@string/archive"
|
||||
android:icon="@drawable/ic_action_archive_light" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_unarchive_habit"
|
||||
android:title="@string/unarchive">
|
||||
</item>
|
||||
android:title="@string/unarchive"
|
||||
android:icon="@drawable/ic_action_unarchive_light"/>
|
||||
|
||||
</menu>
|
||||
@@ -26,7 +26,7 @@
|
||||
<string name="check">Marcar</string>
|
||||
<string name="clear">Limpar</string>
|
||||
<string name="clear_label">Limpar</string>
|
||||
<string name="color_picker_default_title">Selecionar cor</string>
|
||||
<string name="color_picker_default_title">Mudar cor</string>
|
||||
<string name="create_habit">Criar hábito</string>
|
||||
<string name="days">dias</string>
|
||||
<string name="delete">Deletar</string>
|
||||
@@ -59,12 +59,12 @@
|
||||
<string name="streaks">Correntes</string>
|
||||
<string name="no_habits_found">Você não tem nenhum hábito ativo</string>
|
||||
<string name="time_separator"></string>
|
||||
<string name="toast_habit_archived">Hábito arquivado.</string>
|
||||
<string name="toast_habit_archived">Hábitos arquivados.</string>
|
||||
<string name="toast_habit_changed">Hábito modificado.</string>
|
||||
<string name="toast_habit_changed_back">Hábito restaurado.</string>
|
||||
<string name="toast_habit_created">Hábito criado.</string>
|
||||
<string name="toast_habit_deleted">Hábito deletado.</string>
|
||||
<string name="toast_habit_unarchived">Hábito restaurado.</string>
|
||||
<string name="toast_habit_unarchived">Hábitos restaurados.</string>
|
||||
<string name="toast_nothing_to_redo">Nada para refazer.</string>
|
||||
<string name="toast_nothing_to_undo">Nada para desfazer.</string>
|
||||
<string name="toast_repetition_toggled">Marcado.</string>
|
||||
|
||||
@@ -7,6 +7,13 @@
|
||||
</style>
|
||||
|
||||
<style name="habitsListCheckStyle" parent="habitsListCheckBasicStyle">
|
||||
<item name="android:background">@drawable/ripple_background</item>
|
||||
<item name="android:background">@drawable/ripple_transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="habitsListItemInnerPanelStyle" parent="cardStyle">
|
||||
<item name="android:orientation">horizontal</item>
|
||||
<item name="android:padding">3dp</item>
|
||||
<item name="android:background">@drawable/ripple_white</item>
|
||||
<item name="android:elevation">1dp</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -19,8 +19,8 @@
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<string name="habit_key" translatable="false"></string>
|
||||
<string name="offset_key" translatable="false"></string>
|
||||
<string name="toggle_key" translatable="false"></string>
|
||||
<item name="KEY_TIMESTAMP" type="id"/>
|
||||
<string name="habit_key" translatable="false" />
|
||||
<string name="offset_key" translatable="false" />
|
||||
<string name="toggle_key" translatable="false" />
|
||||
<item name="timestamp_key" type="id"/>
|
||||
</resources>
|
||||
@@ -9,7 +9,7 @@
|
||||
<string name="archive">Archive</string>
|
||||
<string name="unarchive">Unarchive</string>
|
||||
<string name="add_habit">Add habit</string>
|
||||
<string name="color_picker_default_title">Select a Color</string>
|
||||
<string name="color_picker_default_title">Change color</string>
|
||||
|
||||
<string name="toast_habit_created">Habit created.</string>
|
||||
<string name="toast_habit_deleted">Habit deleted.</string>
|
||||
@@ -18,8 +18,8 @@
|
||||
<string name="toast_habit_changed">Habit changed.</string>
|
||||
<string name="toast_habit_changed_back">Habit changed back.</string>
|
||||
<string name="toast_repetition_toggled">Repetition toggled.</string>
|
||||
<string name="toast_habit_archived">Habit archived.</string>
|
||||
<string name="toast_habit_unarchived">Habit unarchived.</string>
|
||||
<string name="toast_habit_archived">Habits archived.</string>
|
||||
<string name="toast_habit_unarchived">Habits unarchived.</string>
|
||||
|
||||
<string name="color_swatch_description">Color <xliff:g id="color_index" example="14">%1$d</xliff:g></string>
|
||||
<string name="color_swatch_description_selected">Color <xliff:g id="color_index" example="14">%1$d</xliff:g> selected</string>
|
||||
@@ -102,7 +102,7 @@
|
||||
<string name="snooze_interval">Snooze interval</string>
|
||||
|
||||
<string name="hint_title">Did you know?</string>
|
||||
<string name="hint_drag">To rearrange the entries, you can drag them by the star.</string>
|
||||
<string name="hint_drag">To rearrange the entries, press-and-hold on the name of the habit, then drag it.</string>
|
||||
<string name="hint_landscape">You can see more days by putting your phone in landscape mode.</string>
|
||||
|
||||
<string-array name="hints">
|
||||
|
||||