new task item styles

This commit is contained in:
Negue 2017-01-11 23:46:26 +01:00
parent 8d499f5110
commit 91781936a4
9 changed files with 542 additions and 377 deletions

View file

@ -1,158 +1,189 @@
<?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">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:foreground="?selectableItemBackground"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<FrameLayout
<FrameLayout
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"
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginBottom="1dp"/>
<CheckBox
android:layout_gravity="end"
android:layout_marginBottom="1dp"
android:background="@color/task_border_gray" />
<CheckBox
android:id="@+id/checkBox"
android:layout_width="@dimen/checkbox_size"
android:layout_height="@dimen/checkbox_size"
android:gravity="center"
android:layout_gravity="center"
android:button="@drawable/daily_checkbox"
android:layout_gravity="center" />
</FrameLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="wrap_content"
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"
android:id="@+id/linearLayout"
android:layout_weight="1">
<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"
android:layout_height="wrap_content"
android:maxLines="3" />
android:gravity="center" />
</FrameLayout>
<LinearLayout
android:id="@+id/taskIconWrapper"
android:orientation="horizontal"
android:id="@+id/linearLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingBottom="@dimen/task_top_bottom_padding"
android:paddingEnd="@dimen/task_text_padding"
android:paddingLeft="@dimen/task_text_padding"
android:paddingRight="@dimen/task_text_padding"
android:paddingStart="@dimen/task_text_padding"
android:paddingTop="@dimen/task_top_bottom_padding">
<net.pherth.android.emoji_library.EmojiTextView
android:id="@+id/checkedTextView"
style="@style/Subheader3"
android:textColor="#000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/task_icon_space">
tools:text="Daily Title" />
<TextView
<net.pherth.android.emoji_library.EmojiTextView
android:id="@+id/notesTextView"
style="@style/Caption3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="3"
tools:text="Notes" />
<LinearLayout
android:id="@+id/taskIconWrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/task_icon_space"
android:orientation="horizontal">
<TextView
android:id="@+id/specialTaskText"
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"
android:textColor="@color/task_secondary_text"/>
<TextView
style="@style/Caption3"
tools:visibility="visible"
tools:text="special" />
<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:textColor="@color/task_secondary_text"
tools:text="10" />
<ImageView
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:layout_marginStart="@dimen/task_icon_space"
android:contentDescription="@string/belongs_to_challenge"
app:srcCompat="@drawable/task_icon_challenge" />
<ImageView
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"/>
android:contentDescription="@string/has_reminder"
app:srcCompat="@drawable/task_icon_reminder" />
<ImageView
android:id="@+id/iconviewTag"
android:layout_width="@dimen/task_icon_size"
android:layout_height="@dimen/task_icon_size"
android:layout_marginStart="@dimen/task_icon_space"
android:contentDescription="@string/has_tag"
app:srcCompat="@drawable/task_icon_tag" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout android:orientation="vertical"
android:id="@+id/checklistIndicatorWrapper"
android:layout_width="@dimen/checklist_wrapper_width"
android:layout_height="match_parent"
android:gravity="center">
<TextView
<LinearLayout
android:id="@+id/checklistIndicatorWrapper"
android:layout_width="@dimen/checklist_wrapper_width"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
tools:background="@color/md_green_300">
<TextView
android:id="@+id/checkListCompletedTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@color/white"
android:gravity="center"/>
<View
style="@style/Body3"
tools:text="1" />
<View
android:id="@+id/checklistDivider"
android:layout_width="@dimen/checklist_divider_width"
android:layout_height="@dimen/hairline_height"
android:background="@color/white"/>
<TextView
android:background="@color/white" />
<TextView
android:id="@+id/checkListAllTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@color/white"
android:gravity="center"/>
</LinearLayout>
<View
style="@style/Body3"
tools:text="13" />
</LinearLayout>
<View
android:id="@+id/rightBorderView"
android:layout_width="@dimen/task_right_border_width"
android:layout_height="match_parent"
android:gravity="center" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/task_border_gray"
android:layout_gravity="bottom"/>
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="bottom"
android:background="@color/task_border_gray" />
</FrameLayout>
<View
android:id="@+id/checklistSeparator"
android:layout_width="match_parent"
android:layout_height="@dimen/hairline_height"
android:background="@color/cell_separator" />
android:id="@+id/checklistSeparator"
android:layout_width="match_parent"
android:layout_height="@dimen/hairline_height"
android:background="@color/cell_separator" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/checklistView"
android:orientation="vertical" />
android:id="@+id/checklistView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
<View
android:id="@+id/checklistBottomSpace"
android:layout_width="match_parent"
android:layout_height="10dp"
android:background="@color/checklist_separator" />
android:id="@+id/checklistBottomSpace"
android:layout_width="match_parent"
android:layout_height="10dp"
android:background="@color/checklist_separator" />
</LinearLayout>

View file

@ -45,7 +45,7 @@
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="@dimen/checklist_wrapper_width"
android:layout_height="wrap_content"
android:layout_gravity="center">
@ -59,7 +59,7 @@
tools:visibility="visible">
<TextView
style="@style/Body3"
style="@style/Caption4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
@ -73,7 +73,7 @@
<TextView
android:id="@+id/checkListAllTextView"
style="@style/Body3"
style="@style/Caption4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"

View file

@ -45,7 +45,7 @@
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="@dimen/checklist_wrapper_width"
android:layout_height="wrap_content"
android:layout_gravity="center">
@ -59,7 +59,7 @@
tools:visibility="visible">
<TextView
style="@style/Body3"
style="@style/Caption4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
@ -73,7 +73,7 @@
<TextView
android:id="@+id/checkListAllTextView"
style="@style/Body3"
style="@style/Caption4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"

View file

@ -1,133 +1,149 @@
<?xml version="1.0" encoding="utf-8"?>
<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">
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
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">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:baselineAligned="false"
android:foreground="?selectableItemBackground"
android:orientation="horizontal">
<FrameLayout
android:layout_width="54dp"
android:layout_height="match_parent"
android:id="@+id/btnPlusWrapper">
android:id="@+id/btnPlusWrapper"
android:layout_width="54dp"
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"/>
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_gravity="end"
android:layout_marginBottom="1dp"
android:background="@color/task_border_gray" />
<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" />
android:id="@+id/btnPlusIconView"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:scaleType="center"
android:src="@drawable/habit_plus" />
<Button
android:id="@+id/btnPlus"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/selection_highlight"
style="@style/HabitButton" />
android:id="@+id/btnPlus"
style="@style/HabitButton"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/selection_highlight" />
</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" />
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingBottom="@dimen/task_top_bottom_padding"
android:paddingEnd="@dimen/task_text_padding"
android:paddingLeft="@dimen/task_text_padding"
android:paddingRight="@dimen/task_text_padding"
android:paddingStart="@dimen/task_text_padding"
android:paddingTop="@dimen/task_top_bottom_padding">
<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" />
android:id="@+id/checkedTextView"
style="@style/Subheader3"
android:textColor="#000"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="Habit Title" />
<net.pherth.android.emoji_library.EmojiTextView
android:id="@+id/notesTextView"
style="@style/Caption3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="3"
tools:text="Notes"/>
<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">
android:id="@+id/taskIconWrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/task_icon_space"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/specialTaskText"
android:layout_weight="1"
android:textColor="@color/task_secondary_text" />
android:id="@+id/specialTaskText"
style="@style/Caption3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/task_secondary_text"
tools:text="special" />
<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"/>
android:id="@+id/iconviewChallenge"
android:layout_width="@dimen/task_icon_size"
android:layout_height="@dimen/task_icon_size"
android:layout_marginStart="@dimen/task_icon_space"
android:contentDescription="@string/belongs_to_challenge"
app:srcCompat="@drawable/task_icon_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"/>
android:id="@+id/iconviewReminder"
android:layout_width="@dimen/task_icon_size"
android:layout_height="@dimen/task_icon_size"
android:layout_marginStart="@dimen/task_icon_space"
android:contentDescription="@string/has_reminder"
app:srcCompat="@drawable/task_icon_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"/>
android:id="@+id/iconviewTag"
android:layout_width="@dimen/task_icon_size"
android:layout_height="@dimen/task_icon_size"
android:layout_marginStart="@dimen/task_icon_space"
android:contentDescription="@string/has_tag"
app:srcCompat="@drawable/task_icon_tag" />
</LinearLayout>
</LinearLayout>
<FrameLayout
android:layout_width="54dp"
android:layout_height="match_parent"
android:id="@+id/btnMinusWrapper">
android:id="@+id/btnMinusWrapper"
android:layout_width="54dp"
android:layout_height="match_parent">
<View
android:layout_gravity="start"
android:layout_width="1dp"
android:background="@color/task_border_gray"
android:layout_height="match_parent"
android:layout_marginBottom="1dp"/>
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:layout_marginBottom="1dp"
android:background="@color/task_border_gray" />
<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" />
android:id="@+id/btnMinusIconView"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:scaleType="center"
android:src="@drawable/habit_minus" />
<Button
android:id="@+id/btnMinus"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/selection_highlight"
style="@style/HabitButton"/>
android:id="@+id/btnMinus"
style="@style/HabitButton"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/selection_highlight" />
</FrameLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/task_border_gray"
android:layout_gravity="bottom"/>
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="bottom"
android:background="@color/task_border_gray" />
</FrameLayout>

View file

@ -1,57 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout 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">
<LinearLayout
android:id="@+id/gearElementsLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:clickable="false">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/rewardImageView"
android:layout_width="60dp"
android:padding="5dp"
android:layout_height="60dp"
android:layout_gravity="center_vertical" />
android:clickable="false"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/textReward"
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingBottom="@dimen/task_top_bottom_padding"
android:paddingTop="@dimen/task_top_bottom_padding"
android:paddingLeft="@dimen/task_text_padding"
android:paddingStart="@dimen/task_text_padding"
android:paddingEnd="@dimen/reward_spacing"
android:paddingRight="@dimen/reward_spacing"
android:layout_gravity="center_vertical">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/rewardImageView"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_gravity="center_vertical"
android:padding="5dp" />
<net.pherth.android.emoji_library.EmojiTextView
android:id="@+id/checkedTextView"
style="@style/CardTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<LinearLayout
android:id="@+id/textReward"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:orientation="vertical"
android:paddingBottom="@dimen/task_top_bottom_padding"
android:paddingEnd="@dimen/reward_spacing"
android:paddingLeft="@dimen/task_text_padding"
android:paddingRight="@dimen/reward_spacing"
android:paddingStart="@dimen/task_text_padding"
android:paddingTop="@dimen/task_top_bottom_padding">
<net.pherth.android.emoji_library.EmojiTextView
android:id="@+id/notesTextView"
style="@style/CardText"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<net.pherth.android.emoji_library.EmojiTextView
android:id="@+id/checkedTextView"
style="@style/Subheader3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000"
tools:text="Title" />
</LinearLayout>
<net.pherth.android.emoji_library.EmojiTextView
android:id="@+id/notesTextView"
style="@style/Caption3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:text="Notes"/>
<Button
android:id="@+id/btnReward"
android:layout_width="80dp"
android:layout_height="45dp"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
android:textColor="@color/white"
android:layout_gravity="center_vertical"
android:textSize="15sp"
android:drawableLeft="@drawable/ic_header_gold"
android:drawableStart="@drawable/ic_header_gold"
android:background="@drawable/rounded_purple_square"
android:paddingLeft="6dp"
android:paddingStart="6dp" />
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/btnReward"
android:layout_width="80dp"
android:layout_height="45dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:background="@drawable/rounded_purple_square"
android:drawableLeft="@drawable/ic_header_gold"
android:drawableStart="@drawable/ic_header_gold"
android:paddingLeft="6dp"
android:paddingStart="6dp"
android:textColor="@color/white"
android:textSize="15sp" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="bottom"
android:background="@color/task_border_gray" />
</FrameLayout>

View file

@ -1,144 +1,174 @@
<?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:orientation="vertical"
android:background="@color/white"
android:foreground="?selectableItemBackground">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:foreground="?selectableItemBackground"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<FrameLayout
<FrameLayout
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"
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_marginBottom="1dp"/>
<CheckBox
android:layout_gravity="end"
android:layout_marginBottom="1dp"
android:background="@color/task_border_gray" />
<CheckBox
android:id="@+id/checkBox"
android:layout_width="@dimen/checkbox_size"
android:layout_height="@dimen/checkbox_size"
android:gravity="center"
android:layout_gravity="center"
android:button="@drawable/todo_checkbox"
android:layout_gravity="center" />
</FrameLayout>
<LinearLayout
android:gravity="center" />
</FrameLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
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"
android:layout_weight="1">
<net.pherth.android.emoji_library.EmojiTextView
android:paddingEnd="@dimen/task_text_padding"
android:paddingLeft="@dimen/task_text_padding"
android:paddingRight="@dimen/task_text_padding"
android:paddingStart="@dimen/task_text_padding"
android:paddingTop="@dimen/task_top_bottom_padding">
<net.pherth.android.emoji_library.EmojiTextView
android:id="@+id/checkedTextView"
style="@style/CardTitle"
style="@style/Subheader3"
android:textColor="#000"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
tools:text="To-Do Title" />
<net.pherth.android.emoji_library.EmojiTextView
<net.pherth.android.emoji_library.EmojiTextView
android:id="@+id/notesTextView"
style="@style/CardText"
style="@style/Caption3"
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">
android:maxLines="3"
tools:text="Notes" />
<TextView
<LinearLayout
android:id="@+id/taskIconWrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/task_icon_space"
android:orientation="horizontal">
<TextView
android:id="@+id/specialTaskText"
style="@style/Caption3"
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:visibility="invisible"
tools:visibility="visible"
tools:text="special" />
<ImageView
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:layout_marginStart="@dimen/task_icon_space"
android:contentDescription="@string/belongs_to_challenge"
app:srcCompat="@drawable/task_icon_challenge" />
<ImageView
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"/>
android:contentDescription="@string/has_reminder"
app:srcCompat="@drawable/task_icon_reminder" />
<ImageView
android:id="@+id/iconviewTag"
android:layout_width="@dimen/task_icon_size"
android:layout_height="@dimen/task_icon_size"
android:layout_marginStart="@dimen/task_icon_space"
android:contentDescription="@string/has_tag"
app:srcCompat="@drawable/task_icon_tag" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout android:orientation="vertical"
android:id="@+id/checklistIndicatorWrapper"
android:layout_width="@dimen/checklist_wrapper_width"
android:layout_height="match_parent"
android:gravity="center">
<TextView
<LinearLayout
android:id="@+id/checklistIndicatorWrapper"
android:layout_width="@dimen/checklist_wrapper_width"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
tools:background="@color/md_green_300">
<TextView
android:id="@+id/checkListCompletedTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@color/white"
android:gravity="center"/>
<View
style="@style/Body3"
tools:text="1"/>
<View
android:id="@+id/checklistDivider"
android:layout_width="@dimen/checklist_divider_width"
android:layout_height="@dimen/hairline_height"
android:background="@color/white"/>
<TextView
android:background="@color/white" />
<TextView
android:id="@+id/checkListAllTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@color/white"
android:gravity="center"/>
</LinearLayout>
<View
style="@style/Body3"
tools:text="13" />
</LinearLayout>
<View
android:id="@+id/rightBorderView"
android:layout_width="5dp"
android:layout_height="match_parent"
android:gravity="center" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/task_border_gray"
android:layout_gravity="bottom"/>
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="bottom"
android:background="@color/task_border_gray" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/checklistView"
android:orientation="vertical" />
android:id="@+id/checklistView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
<View
android:id="@+id/checklistBottomSpace"
android:layout_width="match_parent"
android:layout_height="10dp"
android:background="@color/checklist_separator" />
android:id="@+id/checklistBottomSpace"
android:layout_width="match_parent"
android:layout_height="10dp"
android:background="@color/checklist_separator" />
</LinearLayout>

View file

@ -8,39 +8,61 @@
<string name="font_family_black">sans-serif-black</string>
<string name="font_family_thin">sans-serif-thin</string>
<style name="Caption3">
<!-- Titles -->
<style name="Title1">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_regular
@string/font_family_medium
</item>
<item name="android:textSize">12sp</item>
<item name="android:textColor">
#8a000000
</item>
<!-- <item name="android:letterSpacing" tools:targetApi="lollipop">0.03</item>-->
<item name="android:textSize">20sp</item>
<item name="android:letterSpacing" tools:targetApi="lollipop">0.071</item>
</style>
<style name="Body3">
<style name="Title2">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_condensed
</item>
<item name="android:textSize">12sp</item>
<item name="android:textSize">28sp</item>
<item name="android:textColor">
#8a000000
#000
</item>
<item name="android:letterSpacing" tools:targetApi="lollipop">0.035</item>
<item name="android:letterSpacing" tools:targetApi="lollipop">0.05</item>
</style>
<style name="Body2">
<!-- Headline -->
<style name="Headline">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_condensed
</item>
<item name="android:textSize">18sp</item>
<item name="android:letterSpacing" tools:targetApi="lollipop">0.045</item>
</style>
<!-- Subheader -->
<style name="Subheader1">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_medium
</item>
<item name="android:textSize">16sp</item>
</style>
<style name="Subheader2">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_regular
</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">
#8a000000
</item>
<item name="android:letterSpacing" tools:targetApi="lollipop">0.035</item>
<item name="android:textSize">16sp</item>
<item name="android:letterSpacing" tools:targetApi="lollipop">0.08</item>
</style>
<style name="Subheader3">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_condensed
</item>
<item name="android:textSize">16sp</item>
<item name="android:letterSpacing" tools:targetApi="lollipop">0.04</item>
</style>
<!-- Body -->
<style name="Body1">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_medium
@ -57,30 +79,61 @@
<item name="android:letterSpacing" tools:targetApi="lollipop">0.035</item>
</style>
<style name="Title2">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_condensed
</item>
<item name="android:textSize">28sp</item>
<item name="android:textColor">
#000
</item>
<!--<item name="android:letterSpacing" tools:targetApi="lollipop">0.05</item>-->
</style>
<style name="Headline">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_condensed
</item>
<item name="android:textSize">18sp</item>
</style>
<style name="Headline_Regular">
<style name="Body2">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_regular
</item>
<item name="android:textSize">18sp</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">
#8a000000
</item>
<item name="android:letterSpacing" tools:targetApi="lollipop">0.035</item>
</style>
<style name="Body3">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_condensed
</item>
<item name="android:textSize">14sp</item>
<item name="android:letterSpacing" tools:targetApi="lollipop">0.035</item>
</style>
<!-- Captions -->
<style name="Caption1">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_regular
</item>
<item name="android:textSize">12sp</item>
<item name="android:textStyle">bold</item>
</style>
<style name="Caption2">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_medium
</item>
<item name="android:textSize">12sp</item>
<item name="android:letterSpacing" tools:targetApi="lollipop">0.03</item>
</style>
<style name="Caption3">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_regular
</item>
<item name="android:textSize">12sp</item>
<item name="android:textColor">
#8a000000
</item>
<item name="android:letterSpacing" tools:targetApi="lollipop">0.03</item>
</style>
<style name="Caption4">
<item name="android:fontFamily" tools:targetApi="jelly_bean">
@string/font_family_condensed
</item>
<item name="android:textSize">12sp</item>
<item name="android:textColor">
#8a000000
</item>
<item name="android:letterSpacing" tools:targetApi="lollipop">0.035</item>
</style>
</resources>

View file

@ -165,11 +165,16 @@ public class ChallengeTaskRecyclerViewFragment extends BaseFragment {
// region Challenge specific RecyclerViewAdapters
private class ChallengeHabitsRecyclerViewAdapter extends SortableTasksRecyclerViewAdapter<HabitViewHolder> {
public class ChallengeHabitsRecyclerViewAdapter extends SortableTasksRecyclerViewAdapter<HabitViewHolder> {
public ChallengeHabitsRecyclerViewAdapter(String taskType, TagsHelper tagsHelper, int layoutResource, Context newContext, String userID, SortTasksCallback sortCallback) {
super(taskType, tagsHelper, layoutResource, newContext, userID, sortCallback);
}
@Override
protected void injectThis(AppComponent component) {
component.inject(this);
}
@Override
public boolean loadFromDatabase() {
return false;
@ -194,6 +199,11 @@ public class ChallengeTaskRecyclerViewFragment extends BaseFragment {
this.dailyResetOffset = dailyResetOffset;
}
@Override
protected void injectThis(AppComponent component) {
component.inject(this);
}
@Override
public boolean loadFromDatabase() {
return false;
@ -214,6 +224,11 @@ public class ChallengeTaskRecyclerViewFragment extends BaseFragment {
super(taskType, tagsHelper, layoutResource, newContext, userID, sortCallback);
}
@Override
protected void injectThis(AppComponent component) {
component.inject(this);
}
@Override
public boolean loadFromDatabase() {
return false;
@ -233,6 +248,11 @@ public class ChallengeTaskRecyclerViewFragment extends BaseFragment {
super(taskType, tagsHelper, layoutResource, newContext, user.getId());
}
@Override
protected void injectThis(AppComponent component) {
component.inject(this);
}
@Override
public boolean loadFromDatabase() {
return false;

View file

@ -67,7 +67,6 @@ public class BaseTaskViewHolder extends RecyclerView.ViewHolder implements View.
itemView.setOnClickListener(this);
itemView.setClickable(true);
itemView.setEnabled(false);
ButterKnife.bind(this, itemView);