Fix up UI

This commit is contained in:
Niels Andriesse
2019-12-02 15:03:12 +11:00
parent b4a81bf937
commit f8464a1462
10 changed files with 85 additions and 87 deletions

View File

@@ -1,58 +1,49 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
xmlns:fab="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
xmlns:fab="http://schemas.android.com/apk/res-auto">
<LinearLayout android:id="@+id/progress_container"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone" >
<ProgressBar
android:id="@+id/activityIndicator"
android:indeterminate="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="gone" />
<ProgressBar android:id="@+id/progress"
android:indeterminate="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</ProgressBar>
</LinearLayout>
<TextView
android:id="@+id/emptyStateTextView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="20sp"
android:visibility="gone"
android:text="@string/device_list_fragment__no_devices_linked"
android:paddingStart="16dip"
android:paddingEnd="16dip"
tools:visibility="visible"/>
<TextView android:id="@+id/empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center|center_vertical"
android:gravity="center|center_vertical"
android:textSize="20sp"
android:visibility="gone"
android:text="@string/device_list_fragment__no_devices_linked"
android:paddingStart="16dip"
android:paddingEnd="16dip"
android:layout_weight="1"
tools:visibility="visible"/>
<ListView android:id="@id/android:list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:drawSelectorOnTop="false"
android:paddingStart="16dip"
android:paddingEnd="16dip"
tools:visibility="gone"/>
<ListView
android:id="@id/android:list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawSelectorOnTop="false" />
<com.melnykov.fab.FloatingActionButton
android:id="@+id/add_device"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_margin="16dp"
android:src="@drawable/ic_add_white_original_24dp"
android:focusable="true"
android:contentDescription="@string/device_list_fragment__link_new_device"
fab:fab_colorNormal="?fab_color"
fab:fab_colorPressed="@color/textsecure_primary_dark"
fab:fab_colorRipple="@color/textsecure_primary_dark" />
android:id="@+id/addDeviceButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_margin="16dp"
android:src="@drawable/ic_add_white_original_24dp"
android:focusable="true"
android:contentDescription="@string/device_list_fragment__link_new_device"
fab:fab_colorNormal="?fab_color"
fab:fab_colorPressed="@color/textsecure_primary_dark"
fab:fab_colorRipple="@color/textsecure_primary_dark" />
</LinearLayout>
</RelativeLayout>

View File

@@ -1,14 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.DeviceListItem xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="8dp">
<org.thoughtcrime.securesms.DeviceListItem
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="64dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:gravity="center_vertical">
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:ellipsize="marquee"
android:singleLine="true"
android:text="Name"

View File

@@ -293,7 +293,7 @@
<!-- DeviceListActivity -->
<string name="DeviceListActivity_unlink_s">Unlink \'%s\'?</string>
<string name="DeviceListActivity_by_unlinking_this_device_it_will_no_longer_be_able_to_send_or_receive">By unlinking this device, it will no longer be able to send or receive messages.</string>
<string name="DeviceListActivity_by_unlinking_this_device_it_will_no_longer_be_able_to_send_or_receive">This device will no longer be able to send or receive messages.</string>
<string name="DeviceListActivity_network_connection_failed">Network connection failed</string>
<string name="DeviceListActivity_try_again">Try again</string>
<string name="DeviceListActivity_unlinking_device">Unlinking device...</string>
@@ -948,7 +948,7 @@
<string name="device_link_fragment__link_device">Link device</string>
<!-- device_list_fragment -->
<string name="device_list_fragment__no_devices_linked">No devices linked</string>
<string name="device_list_fragment__no_devices_linked">You don\'t have any linked devices yet</string>
<string name="device_list_fragment__link_new_device">Link new device</string>
<!-- experience_upgrade_activity -->
@@ -1159,7 +1159,7 @@
<string name="AndroidManifest__log_submit">Submit debug log</string>
<string name="AndroidManifest__media_preview">Media preview</string>
<string name="AndroidManifest__message_details">Message details</string>
<string name="AndroidManifest__linked_devices">Linked devices</string>
<string name="AndroidManifest__linked_devices">Linked Devices</string>
<string name="AndroidManifest__invite_friends">Invite friends</string>
<string name="AndroidManifest_archived_conversations">Archived conversations</string>
<string name="AndroidManifest_remove_photo">Remove photo</string>
@@ -1578,7 +1578,7 @@
<string name="activity_settings_public_key_copied_message">Copied to clipboard</string>
<string name="activity_settings_share_public_key_button_title">Share Public Key</string>
<string name="activity_settings_show_qr_code_button_title">Show QR Code</string>
<string name="activity_settings_linked_devices_button_title">Linked Device</string>
<string name="activity_settings_linked_devices_button_title">Linked Devices</string>
<string name="activity_settings_show_seed_button_title">Show Seed</string>
<string name="activity_settings_seed_dialog_title">Your Seed</string>
<string name="activity_settings_seed_dialog_copy_button_title">Copy</string>
@@ -1639,7 +1639,7 @@
<!-- Scan QR code fragment -->
<string name="fragment_scan_qr_code_title">Scan QR Code</string>
<string name="fragment_scan_qr_code_explanation_new_conversation">Scan the QR code of the person you\'d like to securely message. They can find their QR code by going into Loki Messenger\'s in-app settings and clicking \"Show QR Code\".</string>
<string name="fragment_scan_qr_code_explanation_link_device">Scan the QR code of the device you would like to link.</string>
<string name="fragment_scan_qr_code_explanation_link_device">Link to an existing device by going into its in-app settings and clicking \"Link Device\".</string>
<string name="fragment_scan_qr_code_camera_permission_dialog_message">Loki Messenger needs camera access to scan QR codes.</string>
<!-- Conversation activity -->
<string name="activity_conversation_copy_public_key_button_title">Copy public key</string>
@@ -1650,6 +1650,6 @@
<string name="fragment_device_list_unlink_device_title">Unlink device</string>
<!-- Device unlink dialog -->
<string name="dialog_device_unlink_title">Device unlinked</string>
<string name="dialog_device_unlink_message">This device has been successfully unlinked.</string>
<string name="dialog_device_unlink_message">This device has been successfully unlinked</string>
</resources>

View File

@@ -33,6 +33,10 @@
android:title="@string/preferences__advanced"
android:icon="@drawable/ic_advanced_24dp"/> -->
<Preference android:key="preference_category_linked_devices"
android:title="@string/activity_settings_linked_devices_button_title"
android:icon="@drawable/icon_link"/>
<Preference android:key="preference_category_public_key"
android:title="@string/activity_settings_share_public_key_button_title"
android:icon="@drawable/icon_share"/>
@@ -41,10 +45,6 @@
android:title="@string/activity_settings_show_qr_code_button_title"
android:icon="@drawable/icon_qr_code"/>
<Preference android:key="preference_category_linked_devices"
android:title="@string/activity_settings_linked_devices_button_title"
android:icon="@drawable/icon_link"/>
<Preference android:key="preference_category_seed"
android:title="@string/activity_settings_show_seed_button_title"
android:icon="@drawable/icon_seedling"/>