All strings put in string.xml

Long press does not drag task lists anymore
Create task list button is themed
Arrows are shown in the scrollable tabs
Task form is now inside a scrollview (needs testing)
Total cycles is now correctly reset when there are no more tasks
This commit is contained in:
2016-01-25 17:42:14 -05:00
parent dd67ff4421
commit c810f3775a
13 changed files with 215 additions and 91 deletions

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.wismna.geoffroy.donext.activities.AboutActivity">
<TextView
android:id="@+id/version"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>

View File

@@ -23,12 +23,33 @@
app:layout_scrollFlags="enterAlways"
app:popupTheme="@style/AppTheme.PopupOverlay" />
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="scrollable" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/left_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:contentDescription="@string/tab_left_arrow"
android:src="@drawable/ic_keyboard_arrow_left_white_24dp" />
<ImageView
android:id="@+id/right_arrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:contentDescription="@string/tab_right_arrow"
android:src="@drawable/ic_keyboard_arrow_right_white_24dp" />
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabMode="scrollable" />
</RelativeLayout>
</android.support.design.widget.AppBarLayout>
<com.wismna.geoffroy.donext.widgets.NonSwipeableViewPager

View File

@@ -1,70 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="@dimen/text_margin"
android:orientation="vertical"
tools:context=".activities.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/new_task_list"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Spinner
android:id="@+id/new_task_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</Spinner>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/new_task_name"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="@+id/new_task_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/new_task_name_hint" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/new_task_description"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="@+id/new_task_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/new_task_description_hint"
android:gravity="top|start"
android:lines="3"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/new_task_priority"
android:textAppearance="?android:attr/textAppearanceLarge" />
<RadioGroup
android:id="@+id/new_task_priority"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RadioButton
android:id="@+id/new_task_priority_low"
android:text="@string/new_task_priority_low"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</RadioButton>
<RadioButton
android:id="@+id/new_task_priority_normal"
android:text="@string/new_task_priority_normal"
android:padding="@dimen/text_margin"
android:orientation="vertical"
tools:context=".activities.MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/new_task_list"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Spinner
android:id="@+id/new_task_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</Spinner>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/new_task_name"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="@+id/new_task_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true">
</RadioButton>
<RadioButton
android:id="@+id/new_task_priority_high"
android:text="@string/new_task_priority_high"
android:hint="@string/new_task_name_hint" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/new_task_description"
android:textAppearance="?android:attr/textAppearanceLarge" />
<EditText
android:id="@+id/new_task_description"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</RadioButton>
</RadioGroup>
</LinearLayout>
android:layout_height="wrap_content"
android:hint="@string/new_task_description_hint"
android:gravity="top|start"
android:lines="3"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/new_task_priority"
android:textAppearance="?android:attr/textAppearanceLarge" />
<RadioGroup
android:id="@+id/new_task_priority"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RadioButton
android:id="@+id/new_task_priority_low"
android:text="@string/new_task_priority_low"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</RadioButton>
<RadioButton
android:id="@+id/new_task_priority_normal"
android:text="@string/new_task_priority_normal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true">
</RadioButton>
<RadioButton
android:id="@+id/new_task_priority_high"
android:text="@string/new_task_priority_high"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</RadioButton>
</RadioGroup>
</LinearLayout>
</ScrollView>

View File

@@ -27,6 +27,7 @@
android:id="@+id/new_task_list_button"
android:layout_width="80dp"
android:layout_height="wrap_content"
style="@style/Widget.AppCompat.Button.Colored"
android:text="@string/task_list_new_list_create"/>
</LinearLayout>
<android.support.v7.widget.RecyclerView

View File

@@ -32,5 +32,6 @@
android:id="@+id/action_about"
android:orderInCategory="40"
android:title="@string/action_about"
android:onClick="openAbout"
app:showAsAction="never" />
</menu>

View File

@@ -6,8 +6,12 @@
<string name="action_editTabs">Edit lists</string>
<string name="action_about">About</string>
<string name="action_new_task">New task</string>
<string name="action_edit_task">Edit task</string>
<string name="action_changeLayout">Change layout</string>
<string name="settings_activity_title">Settings</string>
<!-- Strings related to tabs -->
<string name="tab_left_arrow">Left scroll arrow</string>
<string name="tab_right_arrow">Right scroll arrow</string>
<!-- Strings related to Task List edition -->
<string name="task_list_new_list_hint">New list name</string>
@@ -35,6 +39,16 @@
<!-- Strings related to task details activity -->
<string name="task_details_activity_title">Details</string>
<string name="task_no_tasks">Yeah! No more tasks!</string>
<string name="task_total_cycles">%1$d cycle%2$s</string>
<string name="task_total">%1$d task%2$s</string>
<string name="task_remaining">%1$d more task%2$s</string>
<!-- String related to the SnackBar -->
<string name="snackabar_label">Task %s</string>
<string name="snackabar_action_done">done</string>
<string name="snackabar_action_next">nexted</string>
<string name="snackabar_action_deleted">deleted</string>
<string name="snackabar_button">Undo</string>
<!-- Strings related to the confirmation dialog -->
<string name="task_confirmation_done_text">Mark task as Done?</string>
@@ -74,4 +88,7 @@
<item>7</item>
</string-array>
<string name="title_activity_task_list">TaskListActivity</string>
<!-- Strings related to About -->
<string name="about_version">Version %s</string>
</resources>

View File

@@ -17,4 +17,8 @@
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<style name="ButtonTheme" parent="android:Widget.Button">
<item name="android:textColor">@color/colorAccent</item>
<item name="android:background">@color/colorPrimary</item>
</style>
</resources>