diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-11 21:43:38 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-11 21:43:38 +0200 |
commit | 1046acb3e192c940dc99ebb564ec2756493ec987 (patch) | |
tree | 5448f272fd7a0ca261785686ac66dfaf39f1c518 /src/main/res/layout/activity_muc_details.xml | |
parent | 551f63b73c170a309108c7d3dc8839e6ada86596 (diff) |
replace deprecated action bar with toolbar
* replace deprecated action bar with toolbar
* add toolbar support in each activity
* remove redundant themes made earlier
* add configure action bar method in xmpp activity
* remove android namespace from actionmodeoverlay
* solve bug of scrolling toolbar
Diffstat (limited to 'src/main/res/layout/activity_muc_details.xml')
-rw-r--r-- | src/main/res/layout/activity_muc_details.xml | 445 |
1 files changed, 228 insertions, 217 deletions
diff --git a/src/main/res/layout/activity_muc_details.xml b/src/main/res/layout/activity_muc_details.xml index 1da4660fe..4a74883ad 100644 --- a/src/main/res/layout/activity_muc_details.xml +++ b/src/main/res/layout/activity_muc_details.xml @@ -2,268 +2,279 @@ <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> - <ScrollView - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:background="@color/grey200"> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?attr/color_background_secondary" + android:orientation="vertical"> - <LinearLayout - android:id="@+id/muc_main_layout" + <include + android:id="@+id/toolbar" + layout="@layout/toolbar" /> + + <ScrollView android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="vertical"> + android:layout_height="fill_parent" + android:background="@color/grey200"> - <android.support.v7.widget.CardView - android:layout_width="match_parent" + <LinearLayout + android:id="@+id/muc_main_layout" + android:layout_width="fill_parent" android:layout_height="wrap_content" - android:layout_marginBottom="@dimen/activity_vertical_margin" - android:layout_marginLeft="@dimen/activity_horizontal_margin" - android:layout_marginRight="@dimen/activity_horizontal_margin" - android:layout_marginTop="@dimen/activity_vertical_margin" android:orientation="vertical"> - <LinearLayout + <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:padding="@dimen/card_padding_regular"> + android:layout_marginBottom="@dimen/activity_vertical_margin" + android:layout_marginLeft="@dimen/activity_horizontal_margin" + android:layout_marginRight="@dimen/activity_horizontal_margin" + android:layout_marginTop="@dimen/activity_vertical_margin" + android:orientation="vertical"> - <android.support.text.emoji.widget.EmojiTextView - android:id="@+id/conference_name" - android:layout_width="wrap_content" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentTop="true" - android:layout_centerHorizontal="true" - android:layout_gravity="center_horizontal" - android:paddingBottom="5dp" - android:text="@string/conference_subject" - android:textAlignment="center" - android:textColor="@color/black87" - android:textIsSelectable="false" - android:textSize="?attr/TextSizeHeadline" - android:textStyle="bold" /> - - <RelativeLayout - android:id="@+id/muc_settings" - android:layout_width="fill_parent" - android:layout_height="wrap_content"> + android:orientation="vertical" + android:padding="@dimen/card_padding_regular"> - <TextView - android:id="@+id/muc_conference_type" + <android.support.text.emoji.widget.EmojiTextView + android:id="@+id/conference_name" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_centerVertical="true" - android:layout_toLeftOf="@+id/change_conference_button" - android:text="@string/private_conference" - android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> - - <ImageButton - android:id="@+id/change_conference_button" - style="?android:attr/buttonStyleSmall" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:layout_centerVertical="true" + android:layout_alignParentTop="true" + android:layout_centerHorizontal="true" android:layout_gravity="center_horizontal" - android:background="?attr/selectableItemBackgroundBorderless" - android:padding="@dimen/image_button_padding" - android:src="?attr/icon_settings" /> - </RelativeLayout> + android:paddingBottom="5dp" + android:text="@string/conference_subject" + android:textAlignment="center" + android:textColor="@color/black87" + android:textIsSelectable="false" + android:textSize="?attr/TextSizeHeadline" + android:textStyle="bold" /> - <RelativeLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content"> + <RelativeLayout + android:id="@+id/muc_settings" + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <TextView + android:id="@+id/muc_conference_type" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/change_conference_button" + android:text="@string/private_conference" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + + <ImageButton + android:id="@+id/change_conference_button" + style="?android:attr/buttonStyleSmall" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:layout_gravity="center_horizontal" + android:background="?attr/selectableItemBackgroundBorderless" + android:padding="@dimen/image_button_padding" + android:src="?attr/icon_settings" /> + </RelativeLayout> + + <RelativeLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content"> + + <TextView + android:id="@+id/notification_status_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/notification_status_button" + android:text="@string/notify_on_all_messages" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + + <ImageButton + android:id="@+id/notification_status_button" + style="?android:attr/buttonStyleSmall" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + 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> <TextView - android:id="@+id/notification_status_text" + android:id="@+id/muc_jabberid" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_centerVertical="true" - android:layout_toLeftOf="@+id/notification_status_button" - android:text="@string/notify_on_all_messages" - android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> - - <ImageButton - android:id="@+id/notification_status_button" - style="?android:attr/buttonStyleSmall" + android:layout_marginBottom="16dp" + android:text="@string/account_settings_example_jabber_id" + android:textAppearance="@style/TextAppearance.AppCompat.Title" + android:textIsSelectable="true" + android:visibility="gone" /> + + <TextView + android:id="@+id/details_account" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:layout_centerVertical="true" - android:layout_gravity="center_horizontal" - android:background="?attr/selectableItemBackgroundBorderless" - android:padding="@dimen/image_button_padding" - android:alpha="?attr/icon_alpha" - android:src="@drawable/ic_notifications_black_24dp" /> - </RelativeLayout> - - <TextView - android:id="@+id/muc_jabberid" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginBottom="16dp" - android:text="@string/account_settings_example_jabber_id" - android:textAppearance="@style/TextAppearance.AppCompat.Title" - android:textIsSelectable="true" - android:visibility="gone" /> - - <TextView - android:id="@+id/details_account" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="right" - android:layout_marginTop="32dp" - android:text="@string/using_account" - android:textAppearance="@style/TextAppearance.AppCompat.Caption" - android:visibility="gone" /> - </LinearLayout> - </android.support.v7.widget.CardView> - - <android.support.v7.widget.CardView - android:id="@+id/muc_more_details" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="@dimen/activity_vertical_margin" - android:layout_marginLeft="@dimen/activity_horizontal_margin" - android:layout_marginRight="@dimen/activity_horizontal_margin" - android:layout_marginTop="@dimen/activity_vertical_margin" - android:orientation="vertical"> + android:layout_gravity="right" + android:layout_marginTop="32dp" + android:text="@string/using_account" + android:textAppearance="@style/TextAppearance.AppCompat.Caption" + android:visibility="gone" /> + </LinearLayout> + </android.support.v7.widget.CardView> - <LinearLayout - android:layout_width="match_parent" + <android.support.v7.widget.CardView + android:id="@+id/muc_more_details" + android:layout_width="fill_parent" android:layout_height="wrap_content" - android:orientation="vertical" - android:padding="@dimen/card_padding_list"> + android:layout_marginBottom="@dimen/activity_vertical_margin" + android:layout_marginLeft="@dimen/activity_horizontal_margin" + android:layout_marginRight="@dimen/activity_horizontal_margin" + android:layout_marginTop="@dimen/activity_vertical_margin" + android:orientation="vertical"> - <RelativeLayout - android:layout_width="fill_parent" + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="32dp"> - - <com.makeramen.roundedimageview.RoundedImageView - android:id="@+id/your_photo" - android:layout_width="72dp" - android:layout_height="72dp" - android:layout_alignParentEnd="false" - android:layout_alignParentLeft="true" - android:layout_alignParentRight="false" - android:padding="1dp" - app:riv_border_color="@color/grey500" - app:riv_border_width="1dp" - app:riv_corner_radius="36dp" /> + android:orientation="vertical" + android:padding="@dimen/card_padding_list"> - <LinearLayout + <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_toRightOf="@+id/your_photo" - android:orientation="vertical" - android:paddingLeft="@dimen/avatar_item_distance"> + android:layout_marginBottom="32dp"> - <android.support.text.emoji.widget.EmojiTextView - android:id="@+id/muc_your_nick" - android:layout_width="wrap_content" + <com.makeramen.roundedimageview.RoundedImageView + android:id="@+id/your_photo" + android:layout_width="72dp" + android:layout_height="72dp" + android:layout_alignParentEnd="false" + android:layout_alignParentLeft="true" + android:layout_alignParentRight="false" + android:padding="1dp" + app:riv_border_color="@color/grey500" + app:riv_border_width="1dp" + app:riv_corner_radius="36dp" /> + + <LinearLayout + android:layout_width="fill_parent" android:layout_height="wrap_content" - android:singleLine="true" - android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> + android:layout_centerVertical="true" + android:layout_toRightOf="@+id/your_photo" + android:orientation="vertical" + android:paddingLeft="@dimen/avatar_item_distance"> - <TextView - android:id="@+id/muc_role" + <android.support.text.emoji.widget.EmojiTextView + android:id="@+id/muc_your_nick" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:singleLine="true" + android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> + + <TextView + android:id="@+id/muc_role" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:singleLine="true" + android:textAppearance="@style/TextAppearance.Conversations.Body1.Secondary" /> + </LinearLayout> + + <ImageButton + android:id="@+id/edit_nick_button" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:singleLine="true" - android:textAppearance="@style/TextAppearance.Conversations.Body1.Secondary" /> - </LinearLayout> + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:alpha="?attr/icon_alpha" + android:background="?attr/selectableItemBackgroundBorderless" + android:padding="@dimen/image_button_padding" + android:src="?attr/icon_edit_body" /> + </RelativeLayout> + + <LinearLayout + android:id="@+id/muc_members" + android:layout_width="fill_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:divider="?android:dividerHorizontal" + android:orientation="vertical" + android:showDividers="middle"></LinearLayout> - <ImageButton - android:id="@+id/edit_nick_button" + <Button + android:id="@+id/invite" + style="?android:attr/buttonStyleSmall" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:layout_centerVertical="true" - android:alpha="?attr/icon_alpha" - android:background="?attr/selectableItemBackgroundBorderless" - android:padding="@dimen/image_button_padding" - android:src="?attr/icon_edit_body" /> - </RelativeLayout> - - <LinearLayout - android:id="@+id/muc_members" - android:layout_width="fill_parent" - android:layout_height="0dp" - android:layout_weight="1" - android:divider="?android:dividerHorizontal" - android:orientation="vertical" - android:showDividers="middle"></LinearLayout> - - <Button - android:id="@+id/invite" - style="?android:attr/buttonStyleSmall" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:layout_marginTop="24dp" - android:text="@string/invite_contact" /> - - <Button - android:id="@+id/destroy" - style="?android:attr/buttonStyleSmall" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:layout_marginTop="24dp" - android:text="@string/destroy_muc" /> - </LinearLayout> - </android.support.v7.widget.CardView> - - <android.support.v7.widget.CardView - android:id="@+id/muc_info_more" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="@dimen/activity_vertical_margin" - android:layout_marginLeft="@dimen/activity_horizontal_margin" - android:layout_marginRight="@dimen/activity_horizontal_margin" - android:layout_marginTop="@dimen/activity_vertical_margin" - android:orientation="vertical" - android:visibility="gone"> + android:layout_gravity="center_horizontal" + android:layout_marginTop="24dp" + android:text="@string/invite_contact" /> + <Button + android:id="@+id/destroy" + style="?android:attr/buttonStyleSmall" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginTop="24dp" + android:text="@string/destroy_muc" /> + </LinearLayout> + </android.support.v7.widget.CardView> - <LinearLayout + <android.support.v7.widget.CardView + android:id="@+id/muc_info_more" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/activity_vertical_margin" + android:layout_marginLeft="@dimen/activity_horizontal_margin" + android:layout_marginRight="@dimen/activity_horizontal_margin" + android:layout_marginTop="@dimen/activity_vertical_margin" android:orientation="vertical" - android:padding="@dimen/card_padding_list"> + android:visibility="gone"> + - <TableLayout + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:stretchColumns="1"> + android:orientation="vertical" + android:padding="@dimen/card_padding_list"> - <TableRow - android:layout_width="fill_parent" - android:layout_height="match_parent"> + <TableLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:stretchColumns="1"> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:ellipsize="end" - android:singleLine="true" - android:text="@string/server_info_mam" - android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + <TableRow + android:layout_width="fill_parent" + android:layout_height="match_parent"> - <TextView - android:id="@+id/muc_info_mam" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="right" - android:paddingLeft="4dp" - android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> - </TableRow> - </TableLayout> - </LinearLayout> - </android.support.v7.widget.CardView> - </LinearLayout> - </ScrollView> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ellipsize="end" + android:singleLine="true" + android:text="@string/server_info_mam" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + + <TextView + android:id="@+id/muc_info_mam" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="right" + android:paddingLeft="4dp" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + </TableRow> + </TableLayout> + </LinearLayout> + </android.support.v7.widget.CardView> + </LinearLayout> + </ScrollView> + </LinearLayout> </layout>
\ No newline at end of file |