update task design
BIN
Habitica/res/drawable-hdpi/habit_minus.png
Normal file
|
After Width: | Height: | Size: 793 B |
BIN
Habitica/res/drawable-hdpi/habit_minus_disabled.png
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
Habitica/res/drawable-hdpi/habit_plus.png
Normal file
|
After Width: | Height: | Size: 895 B |
BIN
Habitica/res/drawable-hdpi/habit_plus_disabled.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
Habitica/res/drawable-hdpi/task_icon_calendar.png
Normal file
|
After Width: | Height: | Size: 287 B |
BIN
Habitica/res/drawable-hdpi/task_icon_challenge.png
Normal file
|
After Width: | Height: | Size: 723 B |
BIN
Habitica/res/drawable-hdpi/task_icon_reminder.png
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
Habitica/res/drawable-hdpi/task_icon_streak.png
Normal file
|
After Width: | Height: | Size: 297 B |
BIN
Habitica/res/drawable-hdpi/task_icon_tag.png
Normal file
|
After Width: | Height: | Size: 563 B |
BIN
Habitica/res/drawable-mdpi/habit_minus.png
Normal file
|
After Width: | Height: | Size: 529 B |
BIN
Habitica/res/drawable-mdpi/habit_minus_disabled.png
Normal file
|
After Width: | Height: | Size: 593 B |
BIN
Habitica/res/drawable-mdpi/habit_plus.png
Normal file
|
After Width: | Height: | Size: 543 B |
BIN
Habitica/res/drawable-mdpi/habit_plus_disabled.png
Normal file
|
After Width: | Height: | Size: 599 B |
BIN
Habitica/res/drawable-mdpi/task_icon_calendar.png
Normal file
|
After Width: | Height: | Size: 171 B |
BIN
Habitica/res/drawable-mdpi/task_icon_challenge.png
Normal file
|
After Width: | Height: | Size: 478 B |
BIN
Habitica/res/drawable-mdpi/task_icon_reminder.png
Normal file
|
After Width: | Height: | Size: 635 B |
BIN
Habitica/res/drawable-mdpi/task_icon_streak.png
Normal file
|
After Width: | Height: | Size: 203 B |
BIN
Habitica/res/drawable-mdpi/task_icon_tag.png
Normal file
|
After Width: | Height: | Size: 437 B |
BIN
Habitica/res/drawable-xhdpi/habit_minus.png
Normal file
|
After Width: | Height: | Size: 997 B |
BIN
Habitica/res/drawable-xhdpi/habit_minus_disabled.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Habitica/res/drawable-xhdpi/habit_plus.png
Normal file
|
After Width: | Height: | Size: 1 KiB |
BIN
Habitica/res/drawable-xhdpi/habit_plus_disabled.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
Habitica/res/drawable-xhdpi/task_icon_calendar.png
Normal file
|
After Width: | Height: | Size: 242 B |
BIN
Habitica/res/drawable-xhdpi/task_icon_challenge.png
Normal file
|
After Width: | Height: | Size: 969 B |
BIN
Habitica/res/drawable-xhdpi/task_icon_reminder.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
Habitica/res/drawable-xhdpi/task_icon_streak.png
Normal file
|
After Width: | Height: | Size: 320 B |
BIN
Habitica/res/drawable-xhdpi/task_icon_tag.png
Normal file
|
After Width: | Height: | Size: 672 B |
BIN
Habitica/res/drawable-xxhdpi/habit_minus.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
Habitica/res/drawable-xxhdpi/habit_minus_disabled.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
Habitica/res/drawable-xxhdpi/habit_plus.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
Habitica/res/drawable-xxhdpi/habit_plus_disabled.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
Habitica/res/drawable-xxhdpi/task_icon_calendar.png
Normal file
|
After Width: | Height: | Size: 292 B |
BIN
Habitica/res/drawable-xxhdpi/task_icon_challenge.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
Habitica/res/drawable-xxhdpi/task_icon_reminder.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
Habitica/res/drawable-xxhdpi/task_icon_streak.png
Normal file
|
After Width: | Height: | Size: 441 B |
BIN
Habitica/res/drawable-xxhdpi/task_icon_tag.png
Normal file
|
After Width: | Height: | Size: 1,014 B |
|
|
@ -1,11 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:foreground="?selectableItemBackground">
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
@ -14,6 +18,12 @@
|
|||
android:id="@+id/checkBoxHolder"
|
||||
android:layout_width="@dimen/button_width"
|
||||
android:layout_height="match_parent">
|
||||
<View
|
||||
android:layout_gravity="end"
|
||||
android:background="@color/task_border_gray"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="1dp"/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkBox"
|
||||
android:layout_width="@dimen/checkbox_size"
|
||||
|
|
@ -25,7 +35,7 @@
|
|||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="@dimen/task_text_padding"
|
||||
android:paddingStart="@dimen/task_text_padding"
|
||||
android:paddingRight="@dimen/task_text_padding"
|
||||
|
|
@ -45,10 +55,54 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="3" />
|
||||
<TextView
|
||||
android:id="@+id/streakTextView"
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/taskIconWrapper"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/task_icon_space">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/specialTaskText"
|
||||
android:layout_weight="1"
|
||||
android:drawableStart="@drawable/task_icon_calendar"
|
||||
android:visibility="invisible"
|
||||
android:textColor="@color/task_secondary_text"/>
|
||||
<TextView
|
||||
android:id="@+id/streakTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/task_icon_size"
|
||||
android:layout_marginStart="@dimen/task_icon_space"
|
||||
android:drawableStart="@drawable/task_icon_streak"
|
||||
tools:text="10"
|
||||
android:textColor="@color/task_secondary_text" />
|
||||
<ImageView
|
||||
android:layout_width="@dimen/task_icon_size"
|
||||
android:layout_height="@dimen/task_icon_size"
|
||||
app:srcCompat="@drawable/task_icon_challenge"
|
||||
android:id="@+id/iconviewChallenge"
|
||||
android:layout_marginStart="@dimen/task_icon_space"
|
||||
android:contentDescription="@string/belongs_to_challenge"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/task_icon_size"
|
||||
android:layout_height="@dimen/task_icon_size"
|
||||
app:srcCompat="@drawable/task_icon_reminder"
|
||||
android:id="@+id/iconviewReminder"
|
||||
android:layout_marginStart="@dimen/task_icon_space"
|
||||
android:contentDescription="@string/has_reminder"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/task_icon_size"
|
||||
android:layout_height="@dimen/task_icon_size"
|
||||
app:srcCompat="@drawable/task_icon_tag"
|
||||
android:id="@+id/iconviewTag"
|
||||
android:layout_marginStart="@dimen/task_icon_space"
|
||||
android:contentDescription="@string/has_tag"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout android:orientation="vertical"
|
||||
android:id="@+id/checklistIndicatorWrapper"
|
||||
|
|
@ -79,6 +133,12 @@
|
|||
android:layout_height="match_parent"
|
||||
android:gravity="center" />
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/task_border_gray"
|
||||
android:layout_gravity="bottom"/>
|
||||
</FrameLayout>
|
||||
<View
|
||||
android:id="@+id/checklistSeparator"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
|||
|
|
@ -1,91 +1,133 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal"
|
||||
android:foreground="?selectableItemBackground">
|
||||
<LinearLayout
|
||||
android:layout_width="80dp"
|
||||
<FrameLayout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="horizontal"
|
||||
android:foreground="?selectableItemBackground"
|
||||
android:baselineAligned="false">
|
||||
<FrameLayout
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/btnPlusWrapper">
|
||||
<View
|
||||
android:layout_gravity="end"
|
||||
android:background="@color/task_border_gray"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:id="@+id/btnLayout"
|
||||
android:baselineAligned="false">
|
||||
<FrameLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginBottom="1dp"/>
|
||||
<ImageView
|
||||
android:id="@+id/btnPlusIconView"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/habit_plus"
|
||||
android:scaleType="center"
|
||||
android:layout_gravity="center" />
|
||||
<Button
|
||||
android:id="@+id/btnPlus"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/btnPlusWrapper">
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/btnPlusBackground"/>
|
||||
<ImageView
|
||||
android:id="@+id/btnPlusIconView"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/plus"
|
||||
android:scaleType="center"
|
||||
android:layout_gravity="center" />
|
||||
<Button
|
||||
android:id="@+id/btnPlus"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selection_highlight"
|
||||
style="@style/HabitButton" />
|
||||
</FrameLayout>
|
||||
<FrameLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/btnMinusWrapper">
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/btnMinusBackground"/>
|
||||
<ImageView
|
||||
android:id="@+id/btnMinusIconView"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/minus"
|
||||
android:scaleType="center"
|
||||
android:layout_gravity="center" />
|
||||
<Button
|
||||
android:id="@+id/btnMinus"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selection_highlight"
|
||||
style="@style/HabitButton"/>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/task_text_padding"
|
||||
android:paddingStart="@dimen/task_text_padding"
|
||||
android:paddingRight="@dimen/task_text_padding"
|
||||
android:paddingEnd="@dimen/task_text_padding"
|
||||
android:paddingBottom="@dimen/task_top_bottom_padding"
|
||||
android:paddingTop="@dimen/task_top_bottom_padding">
|
||||
<net.pherth.android.emoji_library.EmojiTextView
|
||||
android:id="@+id/checkedTextView"
|
||||
style="@style/CardTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:background="@drawable/selection_highlight"
|
||||
style="@style/HabitButton" />
|
||||
</FrameLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/task_text_padding"
|
||||
android:paddingStart="@dimen/task_text_padding"
|
||||
android:paddingRight="@dimen/task_text_padding"
|
||||
android:paddingEnd="@dimen/task_text_padding"
|
||||
android:paddingBottom="@dimen/task_top_bottom_padding"
|
||||
android:paddingTop="@dimen/task_top_bottom_padding">
|
||||
<net.pherth.android.emoji_library.EmojiTextView
|
||||
android:id="@+id/checkedTextView"
|
||||
style="@style/CardTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<net.pherth.android.emoji_library.EmojiTextView
|
||||
android:id="@+id/notesTextView"
|
||||
style="@style/CardText"
|
||||
android:layout_width="match_parent"
|
||||
<net.pherth.android.emoji_library.EmojiTextView
|
||||
android:id="@+id/notesTextView"
|
||||
style="@style/CardText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="3" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/taskIconWrapper"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/task_icon_space">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="3" />
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:id="@+id/rightBorderView"
|
||||
android:layout_width="@dimen/task_right_border_width"
|
||||
android:id="@+id/specialTaskText"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/task_secondary_text" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/task_icon_size"
|
||||
android:layout_height="@dimen/task_icon_size"
|
||||
app:srcCompat="@drawable/task_icon_challenge"
|
||||
android:id="@+id/iconviewChallenge"
|
||||
android:layout_marginStart="@dimen/task_icon_space"
|
||||
android:contentDescription="@string/belongs_to_challenge"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/task_icon_size"
|
||||
android:layout_height="@dimen/task_icon_size"
|
||||
app:srcCompat="@drawable/task_icon_reminder"
|
||||
android:id="@+id/iconviewReminder"
|
||||
android:layout_marginStart="@dimen/task_icon_space"
|
||||
android:contentDescription="@string/has_reminder"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/task_icon_size"
|
||||
android:layout_height="@dimen/task_icon_size"
|
||||
app:srcCompat="@drawable/task_icon_tag"
|
||||
android:id="@+id/iconviewTag"
|
||||
android:layout_marginStart="@dimen/task_icon_space"
|
||||
android:contentDescription="@string/has_tag"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/btnMinusWrapper">
|
||||
<View
|
||||
android:layout_gravity="start"
|
||||
android:layout_width="1dp"
|
||||
android:background="@color/task_border_gray"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center" />
|
||||
</LinearLayout>
|
||||
android:layout_marginBottom="1dp"/>
|
||||
<ImageView
|
||||
android:id="@+id/btnMinusIconView"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/habit_minus"
|
||||
android:scaleType="center"
|
||||
android:layout_gravity="center" />
|
||||
<Button
|
||||
android:id="@+id/btnMinus"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/selection_highlight"
|
||||
style="@style/HabitButton"/>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/task_border_gray"
|
||||
android:layout_gravity="bottom"/>
|
||||
</FrameLayout>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
android:foreground="?selectableItemBackground">
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:id="@+id/card_view"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -15,6 +18,12 @@
|
|||
android:id="@+id/checkBoxHolder"
|
||||
android:layout_width="@dimen/button_width"
|
||||
android:layout_height="match_parent">
|
||||
<View
|
||||
android:layout_gravity="end"
|
||||
android:background="@color/task_border_gray"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="1dp"/>
|
||||
<CheckBox
|
||||
android:id="@+id/checkBox"
|
||||
android:layout_width="@dimen/checkbox_size"
|
||||
|
|
@ -46,10 +55,45 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="3" />
|
||||
<TextView
|
||||
android:id="@+id/duedateTextView"
|
||||
<LinearLayout
|
||||
android:id="@+id/taskIconWrapper"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/task_icon_space">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/specialTaskText"
|
||||
android:layout_weight="1"
|
||||
android:drawableStart="@drawable/task_icon_calendar"
|
||||
android:textColor="@color/task_secondary_text"
|
||||
android:visibility="invisible"/>
|
||||
<ImageView
|
||||
android:layout_width="@dimen/task_icon_size"
|
||||
android:layout_height="@dimen/task_icon_size"
|
||||
app:srcCompat="@drawable/task_icon_challenge"
|
||||
android:id="@+id/iconviewChallenge"
|
||||
android:layout_marginStart="@dimen/task_icon_space"
|
||||
android:contentDescription="@string/belongs_to_challenge"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/task_icon_size"
|
||||
android:layout_height="@dimen/task_icon_size"
|
||||
app:srcCompat="@drawable/task_icon_reminder"
|
||||
android:id="@+id/iconviewReminder"
|
||||
android:layout_marginStart="@dimen/task_icon_space"
|
||||
android:contentDescription="@string/has_reminder"/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/task_icon_size"
|
||||
android:layout_height="@dimen/task_icon_size"
|
||||
app:srcCompat="@drawable/task_icon_tag"
|
||||
android:id="@+id/iconviewTag"
|
||||
android:layout_marginStart="@dimen/task_icon_space"
|
||||
android:contentDescription="@string/has_tag"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout android:orientation="vertical"
|
||||
android:id="@+id/checklistIndicatorWrapper"
|
||||
|
|
@ -80,11 +124,12 @@
|
|||
android:layout_height="match_parent"
|
||||
android:gravity="center" />
|
||||
</LinearLayout>
|
||||
<View
|
||||
android:id="@id/checklistSeparator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/hairline_height"
|
||||
android:background="@color/cell_separator" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/task_border_gray"
|
||||
android:layout_gravity="bottom"/>
|
||||
</FrameLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
|||
|
|
@ -93,6 +93,8 @@
|
|||
<color name="checkbox_checked_fill">#c8ffffff</color>
|
||||
<color name="checkbox_stroke">#32000000</color>
|
||||
|
||||
<color name="habit_inactive_gray">#F9F9F9</color>
|
||||
|
||||
<!-- Preferences -->
|
||||
<color name="preference_fallback_accent_color">@color/colorAccent</color>
|
||||
<!-- buttons -->
|
||||
|
|
@ -103,5 +105,6 @@
|
|||
<color name="widget_background">#c8432874</color>
|
||||
|
||||
<color name="gem_view_background">#10bda8ff</color>
|
||||
|
||||
<color name="task_border_gray">#1a000000</color>
|
||||
<color name="task_secondary_text">#B2B2B2</color>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -84,4 +84,6 @@
|
|||
<dimen name="habit_circle_background_size">40dp</dimen>
|
||||
<dimen name="bar_size_slim">13dp</dimen>
|
||||
<dimen name="widget_rounding">5dp</dimen>
|
||||
<dimen name="task_icon_space">12dp</dimen>
|
||||
<dimen name="task_icon_size">18dp</dimen>
|
||||
</resources>
|
||||
|
|
@ -442,5 +442,8 @@ To start, which parts of your life do you want to improve?</string>
|
|||
|
||||
<!-- Login Incentives -->
|
||||
<string name="see_you_tomorrow">See you tomorrow!</string>
|
||||
<string name="belongs_to_challenge">Belongs to Challenge</string>
|
||||
<string name="has_reminder">Has Reminder</string>
|
||||
<string name="has_tag">Has Tag</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -161,7 +161,6 @@ public class TaskRecyclerViewFragment extends BaseFragment implements View.OnCli
|
|||
if (recyclerView.getAdapter() == null) {
|
||||
this.setInnerAdapter();
|
||||
}
|
||||
recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
|
||||
}
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ import android.content.Context;
|
|||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import butterknife.BindColor;
|
||||
|
|
@ -37,6 +39,26 @@ public class BaseTaskViewHolder extends RecyclerView.ViewHolder implements View.
|
|||
@BindColor(R.color.task_gray)
|
||||
int taskGray;
|
||||
|
||||
@Nullable
|
||||
@BindView(R.id.specialTaskText)
|
||||
TextView specialTaskTextView;
|
||||
|
||||
@Nullable
|
||||
@BindView(R.id.iconviewChallenge)
|
||||
ImageView iconViewChallenge;
|
||||
|
||||
@Nullable
|
||||
@BindView(R.id.iconviewReminder)
|
||||
ImageView iconViewReminder;
|
||||
|
||||
@Nullable
|
||||
@BindView(R.id.iconviewTag)
|
||||
ImageView iconViewTag;
|
||||
|
||||
@Nullable
|
||||
@BindView(R.id.taskIconWrapper)
|
||||
LinearLayout taskIconWrapper;
|
||||
|
||||
public BaseTaskViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
|
||||
|
|
@ -87,6 +109,59 @@ public class BaseTaskViewHolder extends RecyclerView.ViewHolder implements View.
|
|||
if (this.rightBorderView != null) {
|
||||
this.rightBorderView.setBackgroundResource(this.task.getLightTaskColor());
|
||||
}
|
||||
if (this.iconViewReminder != null) {
|
||||
this.iconViewReminder.setVisibility(this.task.getReminders().size() > 0 ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
if (this.iconViewTag != null) {
|
||||
this.iconViewTag.setVisibility(this.task.getTags().size() > 0 ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
|
||||
if (this.iconViewChallenge != null) {
|
||||
this.iconViewChallenge.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
this.configureSpecialTaskTextView(task);
|
||||
|
||||
if (this.taskIconWrapper != null) {
|
||||
this.taskIconWrapper.setVisibility(getTaskIconWrapperIsVisible() ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
protected void configureSpecialTaskTextView(Task task) {
|
||||
if (this.specialTaskTextView != null) {
|
||||
this.specialTaskTextView.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
protected Boolean getTaskIconWrapperIsVisible() {
|
||||
Boolean isVisible = false;
|
||||
|
||||
if (this.iconViewReminder != null) {
|
||||
if (this.iconViewReminder.getVisibility() == View.VISIBLE) {
|
||||
isVisible = true;
|
||||
}
|
||||
}
|
||||
if (this.iconViewTag != null) {
|
||||
if (this.iconViewTag.getVisibility() == View.VISIBLE) {
|
||||
isVisible = true;
|
||||
}
|
||||
}
|
||||
if (this.iconViewChallenge != null) {
|
||||
if (this.iconViewChallenge.getVisibility() == View.VISIBLE) {
|
||||
isVisible = true;
|
||||
}
|
||||
}
|
||||
if (this.iconViewReminder != null) {
|
||||
if (this.iconViewReminder.getVisibility() == View.VISIBLE) {
|
||||
isVisible = true;
|
||||
}
|
||||
}
|
||||
if (this.specialTaskTextView != null) {
|
||||
if (this.specialTaskTextView.getVisibility() == View.VISIBLE) {
|
||||
isVisible = true;
|
||||
}
|
||||
}
|
||||
return isVisible;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ public abstract class ChecklistedViewHolder extends BaseTaskViewHolder implement
|
|||
CheckBox checkbox;
|
||||
@BindView(R.id.checklistView)
|
||||
LinearLayout checklistView;
|
||||
@BindView(R.id.checklistSeparator)
|
||||
View checklistSeparator;
|
||||
@BindView(R.id.checklistBottomSpace)
|
||||
View checklistBottomSpace;
|
||||
@BindView(R.id.checklistIndicatorWrapper)
|
||||
|
|
@ -101,12 +99,10 @@ public abstract class ChecklistedViewHolder extends BaseTaskViewHolder implement
|
|||
expandCheckboxTouchArea(checkboxHolder, checkbox);
|
||||
this.checklistView.addView(itemView);
|
||||
}
|
||||
this.checklistSeparator.setVisibility(View.VISIBLE);
|
||||
this.checklistView.setVisibility(View.VISIBLE);
|
||||
this.checklistBottomSpace.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
this.checklistView.removeAllViewsInLayout();
|
||||
this.checklistSeparator.setVisibility(View.GONE);
|
||||
this.checklistView.setVisibility(View.GONE);
|
||||
this.checklistBottomSpace.setVisibility(View.GONE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public class DailyViewHolder extends ChecklistedViewHolder {
|
|||
this.checklistIndicatorWrapper.setBackgroundColor(this.taskGray);
|
||||
}
|
||||
if (task.streak != null && task.streak > 0) {
|
||||
this.streakTextView.setText(itemView.getContext().getString(R.string.daily_streak, task.streak));
|
||||
this.streakTextView.setText(String.valueOf(task.streak));
|
||||
this.streakTextView.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
this.streakTextView.setVisibility(View.GONE);
|
||||
|
|
@ -39,4 +39,13 @@ public class DailyViewHolder extends ChecklistedViewHolder {
|
|||
public Boolean shouldDisplayAsActive() {
|
||||
return this.task.isDisplayedActive(this.dailyResetOffset);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Boolean getTaskIconWrapperIsVisible() {
|
||||
Boolean isVisible = super.getTaskIconWrapperIsVisible();
|
||||
if (this.streakTextView.getVisibility() == View.VISIBLE) {
|
||||
isVisible = true;
|
||||
}
|
||||
return isVisible;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import android.graphics.Color;
|
|||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.OnClick;
|
||||
|
|
@ -19,18 +20,14 @@ public class HabitViewHolder extends BaseTaskViewHolder {
|
|||
@BindView(R.id.btnPlusWrapper)
|
||||
FrameLayout btnPlusWrapper;
|
||||
@BindView(R.id.btnPlusIconView)
|
||||
View btnPlusIconView;
|
||||
@BindView(R.id.btnPlusBackground)
|
||||
View btnPlusBackground;
|
||||
ImageView btnPlusIconView;
|
||||
@BindView(R.id.btnPlus)
|
||||
Button btnPlus;
|
||||
|
||||
@BindView(R.id.btnMinusWrapper)
|
||||
FrameLayout btnMinusWrapper;
|
||||
@BindView(R.id.btnMinusIconView)
|
||||
View btnMinusIconView;
|
||||
@BindView(R.id.btnMinusBackground)
|
||||
View btnMinusBackground;
|
||||
ImageView btnMinusIconView;
|
||||
@BindView(R.id.btnMinus)
|
||||
Button btnMinus;
|
||||
|
||||
|
|
@ -42,14 +39,20 @@ public class HabitViewHolder extends BaseTaskViewHolder {
|
|||
public void bindHolder(Task newTask, int position) {
|
||||
super.bindHolder(newTask, position);
|
||||
|
||||
this.btnPlusWrapper.setVisibility(this.task.getUp() ? View.VISIBLE : View.GONE);
|
||||
this.btnPlusBackground.setBackgroundResource(this.task.getLightTaskColor());
|
||||
|
||||
this.btnMinusWrapper.setVisibility(this.task.getDown() ? View.VISIBLE : View.GONE);
|
||||
if (task.getUp()) {
|
||||
this.btnMinusBackground.setBackgroundResource(this.task.getMediumTaskColor());
|
||||
if (this.task.up) {
|
||||
this.btnPlusWrapper.setBackgroundResource(this.task.getLightTaskColor());
|
||||
this.btnPlusIconView.setImageResource(R.drawable.habit_plus);
|
||||
} else {
|
||||
this.btnMinusBackground.setBackgroundResource(this.task.getLightTaskColor());
|
||||
this.btnPlusWrapper.setBackgroundResource(R.color.habit_inactive_gray);
|
||||
this.btnPlusIconView.setImageResource(R.drawable.habit_plus_disabled);
|
||||
}
|
||||
|
||||
if (this.task.down) {
|
||||
this.btnMinusWrapper.setBackgroundResource(this.task.getLightTaskColor());
|
||||
this.btnMinusIconView.setImageResource(R.drawable.habit_minus);
|
||||
} else {
|
||||
this.btnMinusWrapper.setBackgroundResource(R.color.habit_inactive_gray);
|
||||
this.btnMinusIconView.setImageResource(R.drawable.habit_minus_disabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
package com.habitrpg.android.habitica.ui.viewHolders.tasks;
|
||||
|
||||
import com.habitrpg.android.habitica.R;
|
||||
import com.magicmicky.habitrpgwrapper.lib.models.tasks.Task;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import butterknife.BindView;
|
||||
import java.text.DateFormat;
|
||||
|
||||
public class TodoViewHolder extends ChecklistedViewHolder {
|
||||
|
||||
@BindView(R.id.duedateTextView)
|
||||
TextView duedateTextView;
|
||||
private DateFormat dateFormatter;
|
||||
|
||||
public TodoViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
dateFormatter = android.text.format.DateFormat.getDateFormat(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -25,11 +23,18 @@ public class TodoViewHolder extends ChecklistedViewHolder {
|
|||
} else {
|
||||
this.checklistIndicatorWrapper.setBackgroundResource(this.task.getLightTaskColor());
|
||||
}
|
||||
if (task.duedate != null) {
|
||||
this.duedateTextView.setText(itemView.getContext().getString(R.string.todo_due, task.duedate));
|
||||
this.duedateTextView.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
this.duedateTextView.setVisibility(View.GONE);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureSpecialTaskTextView(Task task) {
|
||||
if (this.specialTaskTextView != null) {
|
||||
if (task.duedate != null) {
|
||||
this.specialTaskTextView.setText(dateFormatter.format(task.duedate));
|
||||
this.specialTaskTextView.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
this.specialTaskTextView.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||