mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Material redesign
This commit is contained in:
BIN
res/drawable-hdpi/ic_action_add_dark.png
Normal file
BIN
res/drawable-hdpi/ic_action_add_dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 167 B |
BIN
res/drawable-mdpi/ic_action_add_dark.png
Normal file
BIN
res/drawable-mdpi/ic_action_add_dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 129 B |
@@ -10,10 +10,10 @@
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:bottom="6dp"
|
||||
android:left="4dp"
|
||||
android:bottom="5dp"
|
||||
android:left="2dp"
|
||||
android:right="4dp"
|
||||
android:top="2dp">
|
||||
android:top="1dp">
|
||||
<shape android:shape="oval" >
|
||||
<solid android:color="#ffffff" />
|
||||
</shape>
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:bottom="6dp"
|
||||
android:left="4dp"
|
||||
android:bottom="5dp"
|
||||
android:left="2dp"
|
||||
android:right="4dp"
|
||||
android:top="2dp">
|
||||
android:top="1dp">
|
||||
<shape android:shape="oval" >
|
||||
<solid android:color="#20000000" />
|
||||
</shape>
|
||||
|
||||
BIN
res/drawable-xhdpi/ic_action_add_dark.png
Normal file
BIN
res/drawable-xhdpi/ic_action_add_dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 189 B |
BIN
res/drawable-xxhdpi/ic_action_add_dark.png
Normal file
BIN
res/drawable-xxhdpi/ic_action_add_dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 253 B |
6
res/drawable/ripple_background.xml
Normal file
6
res/drawable/ripple_background.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/grey"> <!-- ripple color -->
|
||||
|
||||
<item android:drawable="@color/white"/> <!-- normal color -->
|
||||
|
||||
</ripple>
|
||||
@@ -4,6 +4,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="8dp"
|
||||
tools:context="org.isoron.uhabits.dialogs.EditHabitFragment"
|
||||
tools:ignore="MergeRootFrame" >
|
||||
|
||||
@@ -13,7 +14,9 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="8dp" >
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/namePanel"
|
||||
@@ -27,7 +30,6 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="10"
|
||||
android:background="@drawable/apptheme_edit_text_holo_light"
|
||||
android:ems="10"
|
||||
android:hint="Name"
|
||||
android:textColor="#cc2222" >
|
||||
@@ -55,6 +57,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="280dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="start">
|
||||
|
||||
@@ -126,37 +129,36 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttonPanel"
|
||||
style="?android:attr/buttonBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:divider="?android:attr/dividerHorizontal"
|
||||
android:dividerPadding="0dip"
|
||||
android:orientation="vertical"
|
||||
android:showDividers="beginning" >
|
||||
android:layout_height="48dp"
|
||||
android:gravity="end"
|
||||
android:onClick="onClick"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<LinearLayout
|
||||
style="?android:attr/buttonBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="onClick"
|
||||
android:orientation="horizontal" >
|
||||
<Button
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:id="@+id/button_discard"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="8dp"
|
||||
android:text="Discard" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_discard"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="Discard" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_save"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="Save" />
|
||||
</LinearLayout>
|
||||
<Button
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:id="@+id/button_save"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:padding="8dp"
|
||||
android:text="Save" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -17,8 +17,8 @@
|
||||
android:id="@+id/listView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#00000000"
|
||||
android:dividerHeight="0dp"
|
||||
android:divider="#10000000"
|
||||
android:dividerHeight="1dp"
|
||||
dslv:drag_enabled="true"
|
||||
dslv:drag_handle_id="@drawable/habits_header_check"
|
||||
dslv:drag_start_mode="onMove"
|
||||
@@ -31,7 +31,10 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@drawable/habits_header" >
|
||||
android:elevation="2dp"
|
||||
android:background="#ffffff"
|
||||
android:paddingRight="4dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvStarHeader"
|
||||
|
||||
@@ -7,4 +7,5 @@
|
||||
android:focusable="false"
|
||||
android:minHeight="42dp"
|
||||
android:minWidth="42dp"
|
||||
android:textSize="10sp" />
|
||||
android:textSize="10sp"
|
||||
android:textColor="#606060" />
|
||||
|
||||
@@ -2,34 +2,48 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/habits_item"
|
||||
android:background="#10000000"
|
||||
android:baselineAligned="false"
|
||||
android:clipToPadding="false"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvStar"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="0dp"
|
||||
android:gravity="center"
|
||||
android:paddingTop="1dp"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingBottom="6dp"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingTop="6dp" />
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="0dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingRight="4dp"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llButtons"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="42dp"
|
||||
android:orientation="horizontal" />
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ripple_background"
|
||||
android:elevation="1dp" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvStar"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="0dp"
|
||||
android:gravity="center"
|
||||
android:paddingTop="1dp"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvName"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingBottom="6dp"
|
||||
android:paddingLeft="0dp"
|
||||
android:paddingRight="6dp"
|
||||
android:paddingTop="10dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llButtons"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="42dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,10 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Button xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/tvCheck"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="18dp"
|
||||
android:minHeight="42dp"
|
||||
android:minWidth="42dp"
|
||||
android:focusable="false"
|
||||
android:background="@drawable/habits_item_check" />
|
||||
android:focusable="false"
|
||||
android:minHeight="42dp"
|
||||
android:minWidth="42dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/ripple_background" />
|
||||
|
||||
9
res/menu-v21/show_habits_options.xml
Normal file
9
res/menu-v21/show_habits_options.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context="org.isoron.uhabits.MainActivity" >
|
||||
|
||||
<item
|
||||
android:id="@+id/action_add"
|
||||
android:title="@string/add_habit" android:showAsAction="always" android:icon="@drawable/ic_action_add_dark"/>
|
||||
|
||||
</menu>
|
||||
@@ -1,11 +0,0 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Base application theme for API 11+. This theme completely replaces
|
||||
AppBaseTheme from res/values/styles.xml on API 11+ devices.
|
||||
-->
|
||||
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
|
||||
<!-- API 11 theme customizations can go here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -1,12 +0,0 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Base application theme for API 14+. This theme completely replaces
|
||||
AppBaseTheme from BOTH res/values/styles.xml and
|
||||
res/values-v11/styles.xml on API 14+ devices.
|
||||
-->
|
||||
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
|
||||
<!-- API 14 theme customizations can go here. -->
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
14
res/values-v21/styles.xml
Normal file
14
res/values-v21/styles.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<resources>
|
||||
|
||||
<style name="AppBaseTheme" parent="android:Theme.Material">
|
||||
<item name="android:colorPrimary">@color/primary</item>
|
||||
<item name="android:colorPrimaryDark">@color/primary_darker</item>
|
||||
<item name="android:dialogTheme">@style/MyDialogStyle</item>
|
||||
<item name="android:alertDialogTheme">@style/MyDialogStyle</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="MyDialogStyle" parent="android:Theme.Material.Light.Dialog">
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -15,8 +15,14 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
<resources>
|
||||
|
||||
<color name="primary">#00517b</color>
|
||||
<color name="primary_darker">#003d5d</color>
|
||||
<color name="accent">#9a4000</color>
|
||||
|
||||
<color name="white">#ffffff</color>
|
||||
<color name="grey">#cccccc</color>
|
||||
|
||||
<color name="circle_background">#f2f2f2</color>
|
||||
<color name="line_background">#cccccc</color>
|
||||
<color name="ampm_text_color">#8c8c8c</color>
|
||||
@@ -24,6 +30,7 @@
|
||||
<color name="done_text_color_disabled">#cccccc</color>
|
||||
<color name="numbers_text_color">#8c8c8c</color>
|
||||
|
||||
<color name="transparent">#00000000</color>
|
||||
<color name="transparent_black">#7f000000</color>
|
||||
<color name="blue">#33b5e5</color>
|
||||
<color name="blue_focused">#c1e8f7</color>
|
||||
|
||||
@@ -49,5 +49,4 @@
|
||||
<dimen name="day_number_size">16sp</dimen>
|
||||
<dimen name="year_label_height">64dp</dimen>
|
||||
<dimen name="year_label_text_size">22dp</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -1,21 +1,8 @@
|
||||
<resources>
|
||||
|
||||
<!--
|
||||
Base application theme, dependent on API level. This theme is replaced
|
||||
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
|
||||
-->
|
||||
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
|
||||
<!--
|
||||
Theme customizations available in newer API levels can go in
|
||||
res/values-vXX/styles.xml, while customizations related to
|
||||
backward-compatibility can go here.
|
||||
-->
|
||||
</style>
|
||||
|
||||
<!-- Application theme. -->
|
||||
<style name="AppTheme" parent="AppBaseTheme">
|
||||
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
|
||||
</style>
|
||||
<style name="AppBaseTheme" parent="android:Theme.Holo.Light" />
|
||||
<style name="AppTheme" parent="AppBaseTheme" />
|
||||
|
||||
<!-- Date and time picker -->
|
||||
<style name="time_label">
|
||||
|
||||
Reference in New Issue
Block a user