diff options
author | Andreas Straub <andy@strb.org> | 2015-07-20 15:13:14 +0200 |
---|---|---|
committer | Andreas Straub <andy@strb.org> | 2015-07-20 15:13:14 +0200 |
commit | aaa8fe8978ac0513a013a9c77efef663f32eda47 (patch) | |
tree | 16cc60f67a4fbded2eeeb7ba1001ebb1b1a004a5 /src/main/res/layout | |
parent | 9c91b9036aa57c610c26b4cdf52ee295eaa0dc95 (diff) | |
parent | 19a0ae42d667644ee3400c92c53ad0ad093c52fe (diff) |
Merge branch 'CryptoNextBeta' into development
* CryptoNextBeta: (60 commits)
Lock TrustKeys if no trusted keys are available
Optimize imports
Use MD style for key trust toggle switch
Fix set/remove OnUpdateBlocklistListener
Fix axolotl database migration
Remove device list from EditAccount
Add clear devices to overflow menu in EditAccount
Ask for key trust when sending messages
Encrypt files for HTTP upload in encrypted chats
Refactor trust key ui and show in account details
Send correct body for HTTP files
Handle file transmission properly in axolotl
Remove unneccessary code
Fix trust status for outgoing messages
Don't merge messages with different trust statuses
Fix copying of axolotl keys to clipboard
Add refresh icon to v21 theme
Disable Axolotl option if not usable
Show trust status of messages' originating session
Add key trust toggle to ContactDetailsActivity
...
Diffstat (limited to 'src/main/res/layout')
-rw-r--r-- | src/main/res/layout/activity_edit_account.xml | 89 | ||||
-rw-r--r-- | src/main/res/layout/activity_trust_keys.xml | 120 | ||||
-rw-r--r-- | src/main/res/layout/contact_key.xml | 34 |
3 files changed, 238 insertions, 5 deletions
diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml index 98de84f5..5034f734 100644 --- a/src/main/res/layout/activity_edit_account.xml +++ b/src/main/res/layout/activity_edit_account.xml @@ -342,6 +342,95 @@ android:visibility="visible" android:contentDescription="@string/copy_otr_clipboard_description"/> </RelativeLayout> + <RelativeLayout + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:id="@+id/axolotl_fingerprint_box" + android:layout_marginTop="32dp"> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_toLeftOf="@+id/axolotl_actions" + android:orientation="vertical"> + + <TextView + android:id="@+id/axolotl_fingerprint" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/black87" + android:textSize="?attr/TextSizeBody" + android:typeface="monospace" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/black54" + android:textSize="?attr/TextSizeInfo" + android:text="@string/this_device_axolotl_fingerprint"/> + </LinearLayout> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/axolotl_actions" + android:layout_centerVertical="true" + android:layout_alignParentRight="true" + android:orientation="vertical"> + + <ImageButton + android:id="@+id/action_copy_axolotl_to_clipboard" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="?android:selectableItemBackground" + android:padding="@dimen/image_button_padding" + android:src="?attr/icon_copy" + android:visibility="visible" + android:contentDescription="@string/copy_axolotl_clipboard_description"/> + <ImageButton + android:id="@+id/action_regenerate_axolotl_key" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="?android:selectableItemBackground" + android:padding="@dimen/image_button_padding" + android:src="?attr/icon_refresh" + android:visibility="visible" + android:contentDescription="@string/regenerate_axolotl_key"/> + + </LinearLayout> + </RelativeLayout> + </LinearLayout> + <LinearLayout + android:id="@+id/other_device_keys_card" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/activity_horizontal_margin" + android:layout_marginRight="@dimen/activity_horizontal_margin" + android:layout_marginTop="@dimen/activity_vertical_margin" + android:layout_marginBottom="@dimen/activity_vertical_margin" + android:background="@drawable/infocard_border" + android:orientation="vertical" + android:padding="@dimen/infocard_padding" + android:visibility="gone"> + + <TextView + android:id="@+id/other_device_keys_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/black87" + android:textSize="?attr/TextSizeHeadline" + android:textStyle="bold" + android:text="@string/other_devices"/> + + <LinearLayout + android:id="@+id/other_device_keys" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:divider="?android:dividerHorizontal" + android:orientation="vertical" + android:showDividers="middle" > + </LinearLayout> </LinearLayout> </LinearLayout> </ScrollView> diff --git a/src/main/res/layout/activity_trust_keys.xml b/src/main/res/layout/activity_trust_keys.xml new file mode 100644 index 00000000..c535d51d --- /dev/null +++ b/src/main/res/layout/activity_trust_keys.xml @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout 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:background="@color/grey200" > + <ScrollView + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_above="@+id/button_bar" + android:layout_alignParentTop="true" > + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <LinearLayout + android:id="@+id/own_keys_card" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/activity_horizontal_margin" + android:layout_marginRight="@dimen/activity_horizontal_margin" + android:layout_marginTop="@dimen/activity_vertical_margin" + android:layout_marginBottom="@dimen/activity_vertical_margin" + android:background="@drawable/infocard_border" + android:orientation="vertical" + android:padding="@dimen/infocard_padding" + android:visibility="gone"> + + <TextView + android:id="@+id/own_keys_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/black87" + android:textSize="?attr/TextSizeHeadline" + android:textStyle="bold"/> + + <LinearLayout + android:id="@+id/own_keys_details" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:divider="?android:dividerHorizontal" + android:showDividers="middle" + android:orientation="vertical"> + </LinearLayout> + + </LinearLayout> + + <LinearLayout + android:id="@+id/foreign_keys_card" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="@dimen/activity_horizontal_margin" + android:layout_marginRight="@dimen/activity_horizontal_margin" + android:layout_marginTop="@dimen/activity_vertical_margin" + android:layout_marginBottom="@dimen/activity_vertical_margin" + android:background="@drawable/infocard_border" + android:orientation="vertical" + android:padding="@dimen/infocard_padding" + android:visibility="gone"> + + <TextView + android:id="@+id/foreign_keys_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/black87" + android:textSize="?attr/TextSizeHeadline" + android:textStyle="bold"/> + + <LinearLayout + android:id="@+id/foreign_keys_details" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:divider="?android:dividerHorizontal" + android:showDividers="middle" + android:orientation="vertical"> + </LinearLayout> + + </LinearLayout> + + </LinearLayout> + </ScrollView> + <LinearLayout + android:id="@+id/button_bar" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_alignParentStart="true" + android:layout_alignParentEnd="true" + android:layout_alignParentLeft="true" + android:layout_alignParentRight="true" > + + <Button + android:id="@+id/cancel_button" + style="?android:attr/borderlessButtonStyle" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="@string/cancel" + android:textColor="@color/black87" /> + + <View + android:layout_width="1dp" + android:layout_height="fill_parent" + android:layout_marginBottom="7dp" + android:layout_marginTop="7dp" + android:background="@color/black12" /> + + <Button + android:id="@+id/save_button" + style="?android:attr/borderlessButtonStyle" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:enabled="true" + android:textColor="@color/black54" + android:text="@string/done"/> + </LinearLayout> +</RelativeLayout> diff --git a/src/main/res/layout/contact_key.xml b/src/main/res/layout/contact_key.xml index 933b72b4..7cb0bae7 100644 --- a/src/main/res/layout/contact_key.xml +++ b/src/main/res/layout/contact_key.xml @@ -3,12 +3,11 @@ android:layout_width="wrap_content" android:layout_height="match_parent" > - <LinearLayout + <RelativeLayout + android:id="@+id/key_data" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" - android:layout_toLeftOf="@+id/button_remove" - android:orientation="vertical" android:padding="8dp" > <TextView @@ -16,6 +15,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/black87" + android:layout_alignParentLeft="true" + android:layout_toLeftOf="@+id/tgl_trust" android:textSize="?attr/TextSizeBody" android:typeface="monospace" /> @@ -24,18 +25,41 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="@color/black54" + android:layout_alignParentLeft="true" + android:layout_below="@+id/key" + android:textSize="?attr/TextSizeInfo"/> + + <TextView + android:id="@+id/key_trust" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_below="@+id/key" + android:visibility="gone" + android:textColor="@color/black54" android:textSize="?attr/TextSizeInfo"/> - </LinearLayout> <ImageButton android:id="@+id/button_remove" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" + android:layout_toRightOf="@+id/key" android:layout_centerVertical="true" android:background="?android:selectableItemBackground" android:padding="@dimen/image_button_padding" android:src="?attr/icon_remove" - android:visibility="invisible" /> + android:visibility="gone" /> + + + <eu.siacs.conversations.ui.widget.Switch + android:id="@+id/tgl_trust" + android:visibility="invisible" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + style="@style/MD"/> + </RelativeLayout> </RelativeLayout>
\ No newline at end of file |