Show message when no habits are found

This commit is contained in:
2016-02-13 08:37:23 -05:00
parent dd1322e759
commit 3d79f5d928
8 changed files with 97 additions and 56 deletions

View File

@@ -17,6 +17,27 @@
dslv:use_default_controller="true"
/>
<LinearLayout
android:id="@+id/tvEmpty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tvStarEmpty"
style="@style/habitsListEmptyStyle"
android:text="@string/fa_star_half_o"
android:textSize="80sp"/>
<TextView
android:text="@string/no_habits_found"
style="@style/habitsListEmptyStyle"/>
</LinearLayout>
<LinearLayout style="@style/habitsListHeaderStyle">
<TextView

View File

@@ -1,30 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="DragSortListView">
<attr name="collapsed_height" format="dimension"/>
<attr name="drag_scroll_start" format="float"/>
<attr name="max_drag_scroll_speed" format="float"/>
<attr name="float_background_color" format="color"/>
<attr name="remove_mode">
<enum name="clickRemove" value="0"/>
<enum name="flingRemove" value="1"/>
</attr>
<attr name="track_drag_sort" format="boolean"/>
<attr name="float_alpha" format="float"/>
<attr name="slide_shuffle_speed" format="float"/>
<attr name="remove_animation_duration" format="integer"/>
<attr name="drop_animation_duration" format="integer"/>
<attr name="drag_enabled" format="boolean"/>
<attr name="sort_enabled" format="boolean"/>
<attr name="remove_enabled" format="boolean"/>
<attr name="drag_start_mode">
<enum name="onDown" value="0"/>
<enum name="onMove" value="1"/>
<enum name="onLongPress" value="2"/>
</attr>
<attr name="drag_handle_id" format="integer"/>
<attr name="fling_handle_id" format="integer"/>
<attr name="click_remove_id" format="integer"/>
<attr name="use_default_controller" format="boolean"/>
</declare-styleable>
<!--<declare-styleable name="DragSortListView">-->
<!--<attr name="collapsed_height" format="dimension"/>-->
<!--<attr name="drag_scroll_start" format="float"/>-->
<!--<attr name="max_drag_scroll_speed" format="float"/>-->
<!--<attr name="float_background_color" format="color"/>-->
<!--<attr name="remove_mode">-->
<!--<enum name="clickRemove" value="0"/>-->
<!--<enum name="flingRemove" value="1"/>-->
<!--</attr>-->
<!--<attr name="track_drag_sort" format="boolean"/>-->
<!--<attr name="float_alpha" format="float"/>-->
<!--<attr name="slide_shuffle_speed" format="float"/>-->
<!--<attr name="remove_animation_duration" format="integer"/>-->
<!--<attr name="drop_animation_duration" format="integer"/>-->
<!--<attr name="drag_enabled" format="boolean"/>-->
<!--<attr name="sort_enabled" format="boolean"/>-->
<!--<attr name="remove_enabled" format="boolean"/>-->
<!--<attr name="drag_start_mode">-->
<!--<enum name="onDown" value="0"/>-->
<!--<enum name="onMove" value="1"/>-->
<!--<enum name="onLongPress" value="2"/>-->
<!--</attr>-->
<!--<attr name="drag_handle_id" format="integer"/>-->
<!--<attr name="fling_handle_id" format="integer"/>-->
<!--<attr name="click_remove_id" format="integer"/>-->
<!--<attr name="use_default_controller" format="boolean"/>-->
<!--</declare-styleable>-->
</resources>

View File

@@ -56,5 +56,6 @@
<string name="discard">Discard</string>
<string name="save">Save</string>
<string name="streaks">Streaks</string>
<string name="no_habits_found">You have no active habits</string>
</resources>

View File

@@ -80,4 +80,14 @@
<item name="android:textSize">10sp</item>
<item name="android:textColor">#606060</item>
</style>
<style name="habitsListEmptyStyle">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:gravity">center</item>
<item name="android:layout_marginTop">20dp</item>
<item name="android:textColor">#c0c0c0</item>
</style>
</resources>