mirror of
https://github.com/wismna/DoNext.git
synced 2025-10-04 08:00:14 -04:00
Task list edition working (creation, delete...)
Add New Task dialog (not working) Tabs synchronized with DB
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="com.wismna.geoffroy.donext.MainActivity">
|
||||
tools:context=".activities.MainActivity">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
@@ -21,9 +21,7 @@
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay">
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||
|
||||
<android.support.design.widget.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
|
@@ -8,8 +8,9 @@
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
android:orientation="vertical"
|
||||
tools:context="com.wismna.geoffroy.donext.TaskListActivity">
|
||||
<LinearLayout
|
||||
tools:context=".activities.TaskListActivity">
|
||||
<RelativeLayout
|
||||
android:id="@+id/new_task_list_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<EditText
|
||||
@@ -18,11 +19,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/task_list_new_list_hint"/>
|
||||
<Button
|
||||
android:id="@+id/new_task_list_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:onClick="onCreateTaskList"
|
||||
android:text="@string/task_list_new_list_create"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
<ListView
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="match_parent"
|
||||
|
@@ -6,11 +6,16 @@
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
tools:context="com.wismna.geoffroy.donext.MainActivity$PlaceholderFragment">
|
||||
tools:context=".activities.MainActivity$PlaceholderFragment">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/section_label"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ListView
|
||||
android:id="@android:id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
</ListView>
|
||||
</RelativeLayout>
|
||||
|
@@ -1,12 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="?android:attr/listPreferredItemHeight"
|
||||
android:padding="6dip">
|
||||
<TextView
|
||||
android:id="@+id/task_list_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="test"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"/>
|
||||
<TextView
|
||||
@@ -14,11 +15,15 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_toRightOf="@id/task_list_count"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="Name"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"/>
|
||||
<Button
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:text="@string/task_list_delete"
|
||||
android:onClick="onDeleteTaskList" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
65
DoNExt/app/src/main/res/layout/new_task.xml
Normal file
65
DoNExt/app/src/main/res/layout/new_task.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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: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" />
|
||||
<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: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: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>
|
@@ -1,22 +1,28 @@
|
||||
<menu 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"
|
||||
tools:context="com.wismna.geoffroy.donext.MainActivity">
|
||||
tools:context=".activities.MainActivity">
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/action_settings"
|
||||
android:onClick="openSettings"
|
||||
android:id="@+id/action_newTask"
|
||||
android:orderInCategory="10"
|
||||
android:title="@string/action_new_task"
|
||||
android:onClick="openNewTaskDialog"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_editTabs"
|
||||
android:orderInCategory="60"
|
||||
android:orderInCategory="20"
|
||||
android:title="@string/action_editTabs"
|
||||
android:onClick="openTaskLists"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="30"
|
||||
android:title="@string/action_settings"
|
||||
android:onClick="openSettings"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_about"
|
||||
android:orderInCategory="50"
|
||||
android:orderInCategory="40"
|
||||
android:title="@string/action_about"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
||||
|
@@ -5,6 +5,7 @@
|
||||
<string name="action_newTab">New list</string>
|
||||
<string name="action_editTabs">Edit lists</string>
|
||||
<string name="action_about">About</string>
|
||||
<string name="action_new_task">New task</string>
|
||||
<string name="section_format">Hello World from section: %1$d</string>
|
||||
<string name="settings_activity_title">Settings</string>
|
||||
<string name="task_list_activity_title">List edition</string>
|
||||
@@ -14,6 +15,18 @@
|
||||
<string name="task_list_new_list_create">Create</string>
|
||||
<string name="task_list_delete">Delete</string>
|
||||
|
||||
<!-- Strings related to new task dialog -->
|
||||
<string name="new_task_list">List</string>
|
||||
<string name="new_task_name">Name</string>
|
||||
<string name="new_task_description">Description</string>
|
||||
<string name="new_task_priority">Priority</string>
|
||||
<string name="new_task_priority_low">Low</string>
|
||||
<string name="new_task_priority_normal">Normal</string>
|
||||
<string name="new_task_priority_high">High</string>
|
||||
<string name="new_task_save">Save</string>
|
||||
<string name="new_task_cancel">Cancel</string>
|
||||
|
||||
|
||||
<!-- Strings related to Settings -->
|
||||
<string name="settings_confirm_donext">Confirm on DoNext?</string>
|
||||
<string name="settings_confirm_markdone">Confirm on mark Done?</string>
|
||||
|
Reference in New Issue
Block a user