Alternative design for header bar

This commit is contained in:
2016-04-29 06:39:24 -04:00
parent 44ed74a693
commit 30ef75bb45
26 changed files with 161 additions and 35 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

View File

@@ -17,18 +17,91 @@
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:habit="http://isoron.org/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="?windowBackgroundColor"
android:fillViewport="true">
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:habit="http://isoron.org/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="?windowBackgroundColor"
android:clipToPadding="false"
android:fillViewport="true">
<LinearLayout
style="@style/CardList"
android:clipToPadding="false"
tools:context="org.isoron.uhabits.ShowHabitActivity">
<LinearLayout
android:id="@+id/subtitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?headerBackgroundColor"
android:elevation="2dp"
android:paddingTop="15dp"
android:paddingBottom="10dp"
android:paddingLeft="60dp"
android:orientation="vertical">
<TextView
android:id="@+id/questionLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="?mediumContrastTextColor"
android:textSize="@dimen/regularTextSize"
android:layout_marginBottom="8dp"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:layout_marginBottom="5dp">
<ImageView
android:id="@+id/frequencyIcon"
android:layout_width="18dp"
android:layout_height="18dp"
android:src="@drawable/ic_repeat_black"
android:alpha="0.3"
android:layout_marginRight="5dp"
/>
<TextView
android:id="@+id/frequencyLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Every day"
android:textColor="?mediumContrastTextColor"
android:textSize="@dimen/smallTextSize"
/>
<ImageView
android:id="@+id/reminderIcon"
android:layout_width="18dp"
android:layout_height="18dp"
android:src="@drawable/ic_alarm_black"
android:alpha="0.3"
android:layout_marginRight="5dp"
android:layout_marginLeft="10dp"
/>
<TextView
android:id="@+id/reminderLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="1dp"
android:text="7:30"
android:textColor="?mediumContrastTextColor"
android:textSize="@dimen/smallTextSize"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
style="@style/Card"
android:gravity="start">
@@ -49,17 +122,17 @@
android:id="@+id/scoreRing"
android:layout_width="75dp"
android:layout_height="75dp"
android:layout_margin="10dp"
habit:percentage="0"
habit:thickness="10"
habit:textSize="12"
android:layout_margin="10dp"/>
habit:thickness="10"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/habit_strength"
android:textSize="@dimen/smallTextSize"
android:textColor="?mediumContrastTextColor"/>
android:textColor="?mediumContrastTextColor"
android:textSize="@dimen/smallTextSize"/>
</LinearLayout>
@@ -73,20 +146,20 @@
android:id="@+id/sStrengthInterval"
android:layout_width="wrap_content"
android:layout_height="22dp"
android:entries="@array/strengthIntervalNames"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:entries="@array/strengthIntervalNames"
android:theme="@style/SmallSpinner"
/>
<TextView
android:id="@+id/tvStrength"
style="@style/CardHeader"
android:text="@string/habit_strength"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"/>
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:text="@string/habit_strength"/>
<org.isoron.uhabits.views.HabitScoreView
android:id="@+id/scoreView"
@@ -156,4 +229,4 @@
</LinearLayout>
</LinearLayout>
</ScrollView>
</ScrollView>

View File

@@ -17,30 +17,30 @@
~ with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.isoron.uhabits.ShowHabitActivity"
tools:ignore="MergeRootFrame"
tools:menu="show_habit_activity_menu,show_habit_fragment_menu">
<RelativeLayout
android:id="@+id/container"
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="match_parent"
tools:context="org.isoron.uhabits.ShowHabitActivity"
tools:ignore="MergeRootFrame"
tools:menu="show_habit_activity_menu,show_habit_fragment_menu">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
app:popupTheme="?toolbarPopupTheme"
style="@style/Toolbar"/>
style="@style/Toolbar"
app:popupTheme="?toolbarPopupTheme"/>
<fragment
android:id="@+id/fragment2"
android:name="org.isoron.uhabits.fragments.ShowHabitFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/show_habit"
android:layout_below="@id/toolbar"
android:layout_gravity="center"
android:layout_below="@id/toolbar"/>
tools:layout="@layout/show_habit"/>
<View
android:id="@+id/toolbarShadow"

View File

@@ -156,6 +156,7 @@
<string name="bug_report_failed">Failed to generate bug report.</string>
<string name="generate_bug_report">Generate bug report</string>
<string name="troubleshooting">Troubleshooting</string>
<string name="help_translate">Help translate this app</string>
<string name="night_mode">Night mode</string>
<string name="use_pure_black">Pure black for night mode</string>
@@ -167,4 +168,12 @@
<string name="month">Month</string>
<string name="quarter">Quarter</string>
<string name="year">Year</string>
<!-- Middle part of the sentence '1 time in xx days' -->
<string name="time_every">time in</string>
<string name="every_x_days">Every %d days</string>
<string name="every_x_weeks">Every %d weeks</string>
<string name="every_x_months">Every %d months</string>
<string name="score">Score</string>
</resources>