create notification layout

This commit is contained in:
danijoo
2016-01-01 13:37:46 +01:00
parent 8618a5defb
commit b493755550
49 changed files with 372 additions and 22 deletions

View File

@@ -7,27 +7,25 @@
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/toolbar" />
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/main_menu_fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.FloatingActionButton
android:contentDescription="@string/fab_cd_create_notification"
android:layout_gravity="bottom|end|right"
android:id="@+id/main_menu_fab_add_notification"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:fabSize="normal"
android:src="@drawable/ic_action_add"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"/>
</FrameLayout>
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/main_menu_fab_add_notification"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:contentDescription="@string/fab_cd_create_notification"
android:src="@drawable/ic_action_add"
app:fabSize="normal" />
</android.support.design.widget.CoordinatorLayout>

View File

@@ -0,0 +1,148 @@
<?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"
android:padding="16dp">
<EditText
android:id="@+id/create_etTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="16dp"
android:hint="@string/create_etTitleHint"
android:lines="1" />
<EditText
android:id="@+id/create_etMessage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="16dp"
android:hint="@string/create_etMessageHint" />
<EditText
android:id="@+id/create_etId"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="32dp"
android:hint="@string/create_etNotificationIdHint"
android:inputType="number" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/create_IntentHeader" />
<Spinner
android:id="@+id/create_spIntent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
tools:listitem="@android:layout/simple_spinner_item" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/create_IconHeader" />
<Spinner
android:id="@+id/create_spIcon"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
tools:listitem="@android:layout/simple_spinner_item" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/create_CategoryHeader" />
<Spinner
android:id="@+id/create_spCategory"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
tools:listitem="@android:layout/simple_spinner_item" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_weight="1"
android:orientation="vertical">
<CheckBox
android:id="@+id/create_cbSound"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="@string/create_cbSound" />
<CheckBox
android:id="@+id/create_cbVibrate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:checked="true"
android:text="@string/create_cbVibrate" />
<CheckBox
android:id="@+id/create_cbBlink"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:checked="true"
android:text="@string/create_cbBlink" />
<CheckBox
android:id="@+id/create_cbAutoCancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:checked="true"
android:text="@string/create_cbAutoCancel" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp">
<Button
android:id="@+id/create_btShedule"
style="@style/Widget.AppCompat.Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:text="@string/create_btSchedule" />
<Button
android:id="@+id/create_btDispatch"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/create_btDispatch" />
</LinearLayout>
</LinearLayout>

View File

@@ -0,0 +1,17 @@
<?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:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="?android:attr/spinnerDropDownItemStyle">
<ImageView
android:layout_gravity="center_vertical"
android:id="@+id/spinner_icon"
tools:src="@drawable/ic_adb"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<include layout="@android:layout/simple_spinner_dropdown_item" />
</LinearLayout>

View File

@@ -0,0 +1,17 @@
<?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:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="?android:attr/spinnerDropDownItemStyle">
<ImageView
android:layout_gravity="center_vertical"
android:id="@+id/spinner_icon"
tools:src="@drawable/ic_adb"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<include layout="@android:layout/simple_spinner_item" />
</LinearLayout>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<include layout="@android:layout/simple_spinner_item" />
</LinearLayout>