Add inputs for the pushed message to share activity
This commit is contained in:
committed by
Jannis Mattheis
parent
f85b5312e6
commit
dea1e42820
9
app/src/main/res/drawable/ic_send.xml
Normal file
9
app/src/main/res/drawable/ic_send.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/icons"
|
||||
android:pathData="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" />
|
||||
</vector>
|
||||
@@ -1,5 +1,7 @@
|
||||
<vector android:height="24dp" android:viewportHeight="20"
|
||||
android:viewportWidth="20" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
android:viewportWidth="20"
|
||||
android:width="24dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path
|
||||
android:fillColor="@color/icons"
|
||||
android:pathData="M15.95,10.78c0.03,-0.25 0.05,-0.51 0.05,-0.78s-0.02,-0.53 -0.06,-0.78l1.69,-1.32c0.15,-0.12 0.19,-0.34 0.1,-0.51l-1.6,-2.77c-0.1,-0.18 -0.31,-0.24 -0.49,-0.18l-1.99,0.8c-0.42,-0.32 -0.86,-0.58 -1.35,-0.78L12,2.34c-0.03,-0.2 -0.2,-0.34 -0.4,-0.34H8.4c-0.2,0 -0.36,0.14 -0.39,0.34l-0.3,2.12c-0.49,0.2 -0.94,0.47 -1.35,0.78l-1.99,-0.8c-0.18,-0.07 -0.39,0 -0.49,0.18l-1.6,2.77c-0.1,0.18 -0.06,0.39 0.1,0.51l1.69,1.32c-0.04,0.25 -0.07,0.52 -0.07,0.78s0.02,0.53 0.06,0.78L2.37,12.1c-0.15,0.12 -0.19,0.34 -0.1,0.51l1.6,2.77c0.1,0.18 0.31,0.24 0.49,0.18l1.99,-0.8c0.42,0.32 0.86,0.58 1.35,0.78l0.3,2.12c0.04,0.2 0.2,0.34 0.4,0.34h3.2c0.2,0 0.37,-0.14 0.39,-0.34l0.3,-2.12c0.49,-0.2 0.94,-0.47 1.35,-0.78l1.99,0.8c0.18,0.07 0.39,0 0.49,-0.18l1.6,-2.77c0.1,-0.18 0.06,-0.39 -0.1,-0.51l-1.67,-1.32zM10,13c-1.65,0 -3,-1.35 -3,-3s1.35,-3 3,-3 3,1.35 3,3 -1.35,3 -3,3z"/>
|
||||
|
||||
92
app/src/main/res/layout/activity_share.xml
Normal file
92
app/src/main/res/layout/activity_share.xml
Normal file
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
layout="@layout/app_bar_drawer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="20dp">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ems="10"
|
||||
android:hint="@string/push_title_hint"
|
||||
android:inputType="text"
|
||||
android:singleLine="true" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginBottom="20dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/push_content_hint"
|
||||
android:inputType="textCapSentences|textMultiLine"
|
||||
android:maxLength="2000"
|
||||
android:maxLines="10" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginBottom="20dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/edtTxtPriority"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:digits="0123456789"
|
||||
android:hint="@string/push_priority_hint"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="numberSigned"
|
||||
android:maxLength="3"
|
||||
android:text="0" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_marginBottom="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtAppListDesc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/appListDescription" />
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/appSpinner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:spinnerMode="dropdown"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/push_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|center_horizontal"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:text="@string/push_button" />
|
||||
</LinearLayout>
|
||||
@@ -15,6 +15,12 @@
|
||||
|
||||
</group>
|
||||
<group android:checkableBehavior="single">
|
||||
<item
|
||||
android:orderInCategory="2"
|
||||
android:icon="@drawable/ic_send"
|
||||
android:id="@+id/push_message"
|
||||
android:title="@string/push_message"
|
||||
/>
|
||||
<item
|
||||
android:icon="@drawable/ic_settings"
|
||||
android:orderInCategory="2"
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
<string name="gotify_url">https://push.example.com</string>
|
||||
<string name="username">Username</string>
|
||||
<string name="password">Password</string>
|
||||
<string name="show_advanced">Show Advanced Options</string>
|
||||
<string name="disabled_validate_ssl">Disable SSL Validation</string>
|
||||
<string name="select_ca_certificate">Select CA Certificate</string>
|
||||
<string name="select_ca_file">Select a Certificate File</string>
|
||||
@@ -68,4 +67,11 @@
|
||||
<string name="settings_appearance">Appearance</string>
|
||||
<string name="setting_theme">Theme</string>
|
||||
<string name="setting_key_theme">theme</string>
|
||||
<string name="push_message">Push message</string>
|
||||
<string name="appListDescription">App:</string>
|
||||
<string name="priorityDescription">Priority:</string>
|
||||
<string name="push_button">Push Message</string>
|
||||
<string name="push_title_hint">Title</string>
|
||||
<string name="push_content_hint">Content</string>
|
||||
<string name="push_priority_hint">Priority</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user