diff options
Diffstat (limited to 'src/main/res/layout')
-rw-r--r-- | src/main/res/layout/activity_contact_details.xml | 245 | ||||
-rw-r--r-- | src/main/res/layout/activity_muc_details.xml | 94 |
2 files changed, 177 insertions, 162 deletions
diff --git a/src/main/res/layout/activity_contact_details.xml b/src/main/res/layout/activity_contact_details.xml index 9f6930ca5..5bd67d0b0 100644 --- a/src/main/res/layout/activity_contact_details.xml +++ b/src/main/res/layout/activity_contact_details.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/tools" xmlns:card_view="http://schemas.android.com/apk/res-auto"> <LinearLayout @@ -38,63 +39,69 @@ android:layout_height="wrap_content" android:orientation="vertical"> - <RelativeLayout + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:orientation="vertical" android:padding="@dimen/card_padding_regular"> - <TextView - android:id="@+id/contact_display_name" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textAppearance="@style/TextAppearance.Conversations.Title" /> - </RelativeLayout> - - <RelativeLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content"> - - <LinearLayout + <RelativeLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center_horizontal" - android:orientation="vertical" - android:padding="@dimen/card_padding_regular"> - - <QuickContactBadge - android:id="@+id/details_contact_badge" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:adjustViewBounds="true" - android:background="?attr/color_border" - android:maxWidth="384dp" - android:maxHeight="384dp" - android:padding="1dp" - android:scaleType="centerCrop" /> + android:layout_height="wrap_content"> <LinearLayout - android:id="@+id/details_jidbox" - android:layout_width="match_parent" + android:id="@+id/details_display" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="16dp" + android:layout_alignParentStart="true" + android:layout_alignParentLeft="true" + android:layout_toStartOf="@+id/edit_contact_name_button" + android:layout_toLeftOf="@+id/edit_contact_name_button" android:orientation="vertical"> - <TextView - android:id="@+id/details_contactjid" + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/account_settings_example_jabber_id" - android:textAppearance="@style/TextAppearance.Conversations.Title" - android:textIsSelectable="true" - android:visibility="gone" /> + android:orientation="horizontal"> + + <QuickContactBadge + android:id="@+id/details_contact_badge" + android:layout_width="@dimen/avatar_on_details_screen_size" + android:layout_height="@dimen/avatar_on_details_screen_size" + android:layout_marginEnd="@dimen/avatar_item_distance" + android:layout_marginRight="@dimen/avatar_item_distance" + android:adjustViewBounds="true" + android:background="?attr/color_border" + android:padding="1dp" + android:scaleType="centerCrop" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:id="@+id/contact_display_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Conversations.Title" /> + + <TextView + android:id="@+id/jid" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/account_settings_example_jabber_id" + android:textAppearance="@style/TextAppearance.Conversations.Body1" + android:textIsSelectable="true" + android:visibility="gone" /> + </LinearLayout> + </LinearLayout> <com.wefika.flowlayout.FlowLayout android:id="@+id/tags" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" android:layout_marginStart="-2dp" android:layout_marginLeft="-2dp" android:layout_marginTop="4dp" @@ -105,7 +112,6 @@ android:id="@+id/details_lastseen" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" android:layout_marginTop="4dp" android:layout_marginBottom="4dp" android:textAppearance="@style/TextAppearance.Conversations.Subhead" /> @@ -114,38 +120,51 @@ android:id="@+id/status_message" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" android:layout_marginTop="4dp" android:layout_marginBottom="4dp" - android:gravity="center_horizontal" - android:textAppearance="@style/TextAppearance.Conversations.Body1" /> + android:textAppearance="@style/TextAppearance.Conversations.Subhead" /> <TextView android:id="@+id/resource" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" android:layout_marginTop="4dp" android:layout_marginBottom="4dp" - android:gravity="center_horizontal" - android:textSize="?attr/TextSizeBody" - android:textStyle="italic" /> + android:textAppearance="@style/TextAppearance.Conversations.Status" /> + </LinearLayout> - <Button - android:id="@+id/add_contact_button" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:layout_marginTop="4dp" - android:layout_marginBottom="4dp" - android:text="@string/add_contact" /> + <ImageButton + android:id="@+id/edit_contact_name_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:alpha="?attr/icon_alpha" + android:background="?attr/selectableItemBackgroundBorderless" + android:padding="@dimen/image_button_padding" + android:src="?attr/icon_edit_body" /> + </RelativeLayout> + + <RelativeLayout + android:id="@+id/contact_settings" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <LinearLayout + android:id="@+id/details_jidbox" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="4dp" + android:orientation="vertical"> <CheckBox android:id="@+id/details_send_presence" style="@style/Widget.Conversations.CheckBox" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="4dp" + android:layout_marginStart="-6dp" + android:layout_marginLeft="-6dp" android:text="@string/send_presence_updates" android:textAppearance="@style/TextAppearance.Conversations.Body1" /> @@ -154,78 +173,72 @@ style="@style/Widget.Conversations.CheckBox" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginStart="-6dp" + android:layout_marginLeft="-6dp" android:text="@string/receive_presence_updates" android:textAppearance="@style/TextAppearance.Conversations.Body1" /> - </LinearLayout> - <LinearLayout - android:layout_width="match_parent" + <RelativeLayout + android:layout_width="fill_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:padding="@dimen/card_padding_list"> + android:layout_below="@+id/details_jidbox"> <TextView - android:id="@+id/details_account" + android:id="@+id/notification_status_text" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="end" - android:layout_marginTop="24dp" - android:text="@string/using_account" - android:textAppearance="@style/TextAppearance.Conversations.Caption" - android:visibility="visible" /> - </LinearLayout> - </LinearLayout> - </RelativeLayout> - </LinearLayout> - </androidx.cardview.widget.CardView> - - <androidx.cardview.widget.CardView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginStart="@dimen/activity_horizontal_margin" - android:layout_marginLeft="@dimen/activity_horizontal_margin" - android:layout_marginTop="@dimen/activity_vertical_margin" - android:layout_marginEnd="@dimen/activity_horizontal_margin" - android:layout_marginRight="@dimen/activity_horizontal_margin" - android:layout_marginBottom="@dimen/activity_vertical_margin" - card_view:cardBackgroundColor="?attr/color_background_secondary"> - - <RelativeLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_alignParentLeft="true" - android:padding="@dimen/card_padding_regular" - android:touchscreenBlocksFocus="true"> + android:layout_alignParentStart="true" + android:layout_alignParentLeft="true" + android:layout_centerVertical="true" + android:layout_toStartOf="@+id/notification_status_button" + android:layout_toLeftOf="@+id/notification_status_button" + android:text="@string/notify_on_all_messages" + android:textSize="?attr/TextSizeBody" /> + + <ImageButton + android:id="@+id/notification_status_button" + style="?android:attr/buttonStyleSmall" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:layout_gravity="center_horizontal" + android:alpha="?attr/icon_alpha" + android:background="?attr/selectableItemBackgroundBorderless" + android:padding="@dimen/image_button_padding" + android:src="@drawable/ic_notifications_black_24dp" /> + </RelativeLayout> + </RelativeLayout> + </LinearLayout> - <TextView - android:id="@+id/notification_status_text" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentStart="true" - android:layout_alignParentLeft="true" - android:layout_centerVertical="true" - android:layout_toStartOf="@+id/notification_status_button" - android:layout_toLeftOf="@+id/notification_status_button" - android:text="@string/notify_on_all_messages" - android:textSize="?attr/TextSizeBody" /> - - <ImageButton - android:id="@+id/notification_status_button" - style="?android:attr/buttonStyleSmall" - android:layout_width="wrap_content" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_alignParentRight="true" - android:layout_centerVertical="true" - android:layout_gravity="center_horizontal" - android:alpha="?attr/icon_alpha" - android:background="?attr/selectableItemBackgroundBorderless" - android:padding="@dimen/image_button_padding" - android:src="@drawable/ic_notifications_black_24dp" /> - </RelativeLayout> + android:orientation="vertical" + android:padding="@dimen/card_padding_list"> + + <Button + android:id="@+id/add_contact_button" + style="?android:attr/buttonStyleSmall" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginTop="24dp" + android:text="@string/add_to_contact_list" /> + <TextView + android:id="@+id/details_account" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="end" + android:layout_marginTop="24dp" + android:text="@string/using_account" + android:textAppearance="@style/TextAppearance.Conversations.Caption" + android:visibility="visible" /> + </LinearLayout> + </LinearLayout> </androidx.cardview.widget.CardView> <androidx.cardview.widget.CardView @@ -307,8 +320,8 @@ <LinearLayout android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_marginTop="8dp" android:layout_gravity="end" + android:layout_marginTop="8dp" android:orientation="horizontal"> <Button diff --git a/src/main/res/layout/activity_muc_details.xml b/src/main/res/layout/activity_muc_details.xml index 3dc518796..523b6829e 100644 --- a/src/main/res/layout/activity_muc_details.xml +++ b/src/main/res/layout/activity_muc_details.xml @@ -60,28 +60,51 @@ android:layout_toLeftOf="@+id/edit_muc_name_button" android:orientation="vertical"> - <TextView - android:id="@+id/muc_title" - android:layout_width="wrap_content" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:textAppearance="@style/TextAppearance.Conversations.Title" /> + android:orientation="horizontal"> + + <com.makeramen.roundedimageview.RoundedImageView + android:id="@+id/details_muc_avatar" + android:layout_width="@dimen/avatar_on_details_screen_size" + android:layout_height="@dimen/avatar_on_details_screen_size" + android:layout_marginEnd="@dimen/avatar_item_distance" + android:layout_marginRight="@dimen/avatar_item_distance" + android:padding="1dp" + android:scaleType="centerCrop" + app:riv_corner_radius="@dimen/rounded_image_border" /> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <TextView + android:id="@+id/muc_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="@style/TextAppearance.Conversations.Title" /> + + <TextView + android:id="@+id/jid" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/account_settings_example_jabber_id" + android:textAppearance="@style/TextAppearance.Conversations.Body1" + android:textIsSelectable="true" + android:visibility="gone" /> + </LinearLayout> + </LinearLayout> <TextView android:id="@+id/muc_subject" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginTop="@dimen/list_padding" android:autoLink="web" android:textAppearance="@style/TextAppearance.Conversations.Subhead" /> - <TextView - android:id="@+id/jid" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/account_settings_example_jabber_id" - android:textAppearance="@style/TextAppearance.Conversations.Body1" - android:textIsSelectable="true" - android:visibility="gone" /> - </LinearLayout> <LinearLayout @@ -139,27 +162,6 @@ </RelativeLayout> <RelativeLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center_horizontal" - android:orientation="vertical" - android:paddingTop="@dimen/card_padding_regular"> - - <com.makeramen.roundedimageview.RoundedImageView - android:id="@+id/details_muc_avatar" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginEnd="@dimen/avatar_item_distance" - android:layout_marginRight="@dimen/avatar_item_distance" - android:adjustViewBounds="true" - android:maxWidth="384dp" - android:maxHeight="384dp" - android:padding="1dp" - android:scaleType="centerCrop" - app:riv_corner_radius="@dimen/rounded_image_border" /> - </RelativeLayout> - - <RelativeLayout android:id="@+id/muc_settings" android:layout_width="fill_parent" android:layout_height="wrap_content"> @@ -279,7 +281,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" - android:padding="@dimen/card_padding_list"> + android:padding="@dimen/card_padding_regular"> <Button android:id="@+id/destroy" @@ -289,6 +291,15 @@ android:layout_gravity="center_horizontal" android:layout_marginTop="24dp" /> + <Button + android:id="@+id/add_contact_button" + style="?android:attr/buttonStyleSmall" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginTop="24dp" + android:text="@string/add_to_contact_list" /> + <TextView android:id="@+id/details_account" android:layout_width="wrap_content" @@ -332,8 +343,8 @@ <com.makeramen.roundedimageview.RoundedImageView android:id="@+id/your_photo" - android:layout_width="72dp" - android:layout_height="72dp" + android:layout_width="@dimen/avatar_on_details_screen_size" + android:layout_height="@dimen/avatar_on_details_screen_size" android:layout_alignParentStart="true" android:layout_alignParentLeft="true" android:layout_alignParentEnd="false" @@ -394,15 +405,6 @@ android:layout_gravity="center_horizontal" android:layout_marginTop="24dp" /> - <Button - android:id="@+id/add_contact_button" - style="?android:attr/buttonStyleSmall" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:layout_marginTop="24dp" - android:text="@string/add_to_contact_list" /> - </LinearLayout> </LinearLayout> </androidx.cardview.widget.CardView> |