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

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

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>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer-array name="create_icons_icons">
</integer-array>
</resources>

View File

@@ -16,4 +16,45 @@
<string name="fab_cd_create_notification">FAB: Create notification</string>
<string name="title_create_notification">Create notification</string>
<string name="title_blacklist">Blacklist</string>
<string name="create_etTitleHint">Title</string>
<string name="create_etMessageHint">Message</string>
<string name="create_etNotificationIdHint">Notification ID</string>
<string name="create_IntentHeader">Intent:</string>
<string name="create_IconHeader">Icon:</string>
<string name="create_CategoryHeader">Category:</string>
<string name="create_cbSound">Sound</string>
<string name="create_cbVibrate">Vibrate</string>
<string name="create_cbBlink">Blink</string>
<string name="create_cbAutoCancel">Auto cancel</string>
<string name="create_btSchedule">schedule</string>
<string name="create_btDispatch">dispatch</string>
<string-array name="create_categories">
<item>Alarm</item>
<item>Call</item>
<item>Email</item>
<item>Error</item>
<item>Event</item>
<item>Message</item>
<item>Progress</item>
<item>Promo</item>
<item>Recommendation</item>
<item>Reminder</item>
<item>Service</item>
<item>Social</item>
<item>Status</item>
<item>System</item>
<item>Transport</item>
</string-array>
<string-array name="create_icons">
<item>ADB</item>
<item>Bluetooth</item>
<item>Car</item>
<item>Event</item>
<item>Video</item>
<item>Power</item>
<item>SD card</item>
<item>SMS</item>
</string-array>
</resources>