Added code to send messages with extended encoding
This commit is contained in:
24
app/src/main/res/drawable/ic_action_encoding.xml
Normal file
24
app/src/main/res/drawable/ic_action_encoding.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<?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.
|
||||
-->
|
||||
|
||||
<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="#000" android:pathData="M8,3A2,2 0 0,0 6,5V9A2,2 0 0,1 4,11H3V13H4A2,2 0 0,1 6,15V19A2,2 0 0,0 8,21H10V19H8V14A2,2 0 0,0 6,12A2,2 0 0,0 8,10V5H10V3M16,3A2,2 0 0,1 18,5V9A2,2 0 0,0 20,11H21V13H20A2,2 0 0,0 18,15V19A2,2 0 0,1 16,21H14V19H16V14A2,2 0 0,1 18,12A2,2 0 0,1 16,10V5H14V3H16Z" />
|
||||
</vector>
|
90
app/src/main/res/layout/dialog_select_message_encoding.xml
Normal file
90
app/src/main/res/layout/dialog_select_message_encoding.xml
Normal file
@ -0,0 +1,90 @@
|
||||
<?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="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="18dp"
|
||||
android:paddingEnd="24dp"
|
||||
android:paddingStart="24dp"
|
||||
android:paddingTop="18dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/select_encoding_warning"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:layout_constraintLeft_creator="1"
|
||||
tools:layout_constraintTop_creator="1"/>
|
||||
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/radioGroup"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="24dp"
|
||||
android:paddingTop="24dp"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/description"
|
||||
app:layout_constraintRight_toRightOf="@+id/description"
|
||||
app:layout_constraintTop_toBottomOf="@+id/description">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/simple"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:text="SIMPLE"/>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/extended"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:text="EXTENDED"/>
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/ok"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/ok"
|
||||
android:textColor="@color/colorAccent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintRight_toRightOf="@+id/radioGroup"
|
||||
app:layout_constraintTop_toBottomOf="@+id/radioGroup"
|
||||
tools:layout_constraintRight_creator="1"
|
||||
tools:layout_constraintTop_creator="1"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/dismiss"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/cancel"
|
||||
android:textColor="@color/colorAccent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/ok"
|
||||
app:layout_constraintTop_toBottomOf="@+id/radioGroup"/>
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
@ -6,4 +6,10 @@
|
||||
app:showAsAction="always"
|
||||
android:icon="@drawable/ic_action_send"
|
||||
android:title="@string/send"/>
|
||||
</menu>
|
||||
<item
|
||||
android:id="@+id/select_encoding"
|
||||
app:showAsAction="never"
|
||||
android:icon="@drawable/ic_action_encoding"
|
||||
android:title="Select encoding"
|
||||
/>
|
||||
</menu>
|
||||
|
@ -110,4 +110,5 @@ Als Alternative kann in den Einstellungen ein vertrauenswürdiger Knoten konfigu
|
||||
<string name="status_received">empfangen</string>
|
||||
<string name="status_sent">gesendet</string>
|
||||
<string name="status_sent_acknowledged">Empfang bestätigt</string>
|
||||
<string name="error_unsupported_encoding">Codierung ‘%s’ wird nicht unterstützt, es wird ‘SIMPLE’ verwendet.</string>
|
||||
</resources>
|
||||
|
@ -109,4 +109,7 @@ As an alternative you could configure a trusted node in the settings, but as of
|
||||
<string name="status_sent">sent</string>
|
||||
<string name="status_received">received</string>
|
||||
<string name="outbox">Outbox</string>
|
||||
<string name="error_unsupported_encoding">Unsupported encoding ‘%s’, using ‘SIMPLE’ instead.</string>
|
||||
<string name="select_encoding_warning">‘EXTENDED’ is a new encoding that\‘s not widely supported yet but has some interesting features. To stay on the save side, select ‘SIMPLE’.</string>
|
||||
<string name="select_encoding_title">Select Message Encoding</string>
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user