Added actions to notifications (this required a slight detour)

This commit is contained in:
2016-10-20 12:53:35 +02:00
parent b3dd53a5df
commit 6a8648ca28
15 changed files with 405 additions and 165 deletions

View File

@ -0,0 +1,25 @@
<!--
~ Copyright 2016 Christian Basler
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M8,5v14l11,-7z"/>
</vector>

View File

@ -0,0 +1,25 @@
<!--
~ Copyright 2016 Christian Basler
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M6,19h4L10,5L6,5v14zM14,5v14h4L18,5h-4z"/>
</vector>

View File

@ -28,7 +28,7 @@
<TextView
android:id="@+id/description"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/add_identity_warning"
app:layout_constraintLeft_toLeftOf="parent"
@ -39,7 +39,7 @@
<RadioGroup
android:id="@+id/radioGroup"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingBottom="24dp"
android:paddingTop="24dp"
@ -86,7 +86,6 @@
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintRight_toRightOf="@+id/radioGroup"
app:layout_constraintTop_toBottomOf="@+id/radioGroup"
tools:layout_constraintLeft_creator="1"
tools:layout_constraintRight_creator="1"
tools:layout_constraintTop_creator="1"/>

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2016 Christian Basler
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<android.support.constraint.ConstraintLayout
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"
android:layout_width="336dp"
android:layout_height="wrap_content">
<TextView
android:id="@+id/description"
android:layout_width="320dp"
android:layout_height="wrap_content"
android:padding="24dp"
android:text="@string/full_node_warning"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:layout_editor_absoluteX="0dp"/>
<Button
android:id="@+id/ok"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="@string/startup_node"
android:textColor="@color/colorAccent"
app:layout_constraintEnd_toEndOf="@+id/description"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintTop_toBottomOf="@+id/description"
tools:layout_editor_absoluteX="184dp"/>
<Button
android:id="@+id/dismiss"
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="@string/cancel"
android:textColor="@color/colorAccent"
app:layout_constraintEnd_toStartOf="@+id/ok"
app:layout_constraintTop_toBottomOf="@+id/description"
tools:ignore="RtlSymmetry"
tools:layout_editor_absoluteX="87dp"/>
</android.support.constraint.ConstraintLayout>

View File

@ -96,4 +96,7 @@ Als Alternative kann in den Einstellungen ein vertrauenswürdiger Knoten konfigu
<string name="select_file_title">Datei auswählen</string>
<string name="select_identities_to_import">Bitte wähle die zu importierenden Identitäten:</string>
<string name="import_input_description">Du kannst einfach den Inhalt eines Exports oder einer keys.dat-Datei einfügen</string>
<string name="full_node_restart">Knoten starten</string>
<string name="full_node_stop">Knoten beenden</string>
<string name="startup_node">Knoten starten</string>
</resources>

View File

@ -95,4 +95,7 @@ As an alternative you could configure a trusted node in the settings, but as of
<string name="select_file_title">Select a File</string>
<string name="select_identities_to_import">Please select the identities you want to import:</string>
<string name="import_input_description">You can just paste the contents of an export or a keys.dat file</string>
<string name="full_node_stop">shutdown node</string>
<string name="full_node_restart">restart node</string>
<string name="startup_node">Startup node</string>
</resources>