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 | |
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')
18 files changed, 895 insertions, 745 deletions
diff --git a/src/main/res/layout/activity_about.xml b/src/main/res/layout/activity_about.xml index b4f022726..2ff11dc00 100644 --- a/src/main/res/layout/activity_about.xml +++ b/src/main/res/layout/activity_about.xml @@ -1,61 +1,67 @@ -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" +<LinearLayout 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="?attr/color_background_secondary" + android:orientation="vertical" tools:context="${applicationId}.ui.AboutActivity"> + <include layout="@layout/toolbar" /> - <RelativeLayout + <ScrollView android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:layout_height="match_parent"> - <android.support.v7.widget.CardView - android:id="@+id/LogoLayout" + <RelativeLayout 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"> - - <ImageView - android:id="@+id/logo" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentTop="true" - android:layout_gravity="center_horizontal" - android:padding="8dp" - android:src="@drawable/main_logo" /> - </android.support.v7.widget.CardView> - - <android.support.v7.widget.CardView - android:id="@+id/aboutLayout" - android:layout_below="@+id/LogoLayout" - 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"> - - <TextView - android:id="@+id/aboutmessage" - android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <android.support.v7.widget.CardView + android:id="@+id/LogoLayout" + 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:autoLink="web" - android:fontFamily="monospace" - android:linksClickable="true" - android:paddingBottom="@dimen/activity_vertical_margin" - android:text="@string/pref_about_message" - android:textColor="@color/black87" - android:textSize="?attr/TextSizeBody" - android:typeface="monospace" /> - - </android.support.v7.widget.CardView> - </RelativeLayout> - -</ScrollView> + android:layout_marginTop="@dimen/activity_vertical_margin"> + + <ImageView + android:id="@+id/logo" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_gravity="center_horizontal" + android:padding="8dp" + android:src="@drawable/main_logo" /> + </android.support.v7.widget.CardView> + + <android.support.v7.widget.CardView + android:id="@+id/aboutLayout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@+id/LogoLayout" + 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"> + + <TextView + android:id="@+id/aboutmessage" + android:layout_width="wrap_content" + 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:autoLink="web" + android:fontFamily="monospace" + android:linksClickable="true" + android:paddingBottom="@dimen/activity_vertical_margin" + android:text="@string/pref_about_message" + android:textColor="@color/black87" + android:textSize="?attr/TextSizeBody" + android:typeface="monospace" /> + + </android.support.v7.widget.CardView> + </RelativeLayout> + </ScrollView> +</LinearLayout> diff --git a/src/main/res/layout/activity_change_password.xml b/src/main/res/layout/activity_change_password.xml index af1dcd271..26fa2cef4 100644 --- a/src/main/res/layout/activity_change_password.xml +++ b/src/main/res/layout/activity_change_password.xml @@ -5,10 +5,13 @@ android:layout_height="match_parent" android:background="?attr/color_background_secondary"> + <include layout="@layout/toolbar" /> + <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" - android:layout_above="@+id/button_bar"> + android:layout_above="@+id/button_bar" + android:layout_below="@id/toolbar"> <android.support.v7.widget.CardView android:layout_width="match_parent" diff --git a/src/main/res/layout/activity_choose_contact.xml b/src/main/res/layout/activity_choose_contact.xml index 5767def46..f720864a3 100644 --- a/src/main/res/layout/activity_choose_contact.xml +++ b/src/main/res/layout/activity_choose_contact.xml @@ -1,24 +1,34 @@ <?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android"> - <FrameLayout + <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?attr/color_background_primary"> + android:orientation="vertical"> - <ListView - android:id="@+id/choose_contact_list" + <include + android:id="@+id/toolbar" + layout="@layout/toolbar" /> + + <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" - android:divider="@android:color/transparent" - android:dividerHeight="0dp"/> + android:background="?attr/color_background_primary"> + + <ListView + android:id="@+id/choose_contact_list" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:divider="@android:color/transparent" + android:dividerHeight="0dp" /> - <android.support.design.widget.FloatingActionButton - android:id="@+id/fab" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="end|bottom" - android:layout_margin="16dp" - android:src="@drawable/ic_person_add_white_24dp"/> - </FrameLayout> + <android.support.design.widget.FloatingActionButton + android:id="@+id/fab" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="end|bottom" + android:layout_margin="16dp" + android:src="@drawable/ic_person_add_white_24dp" /> + </FrameLayout> + </LinearLayout> </layout>
\ No newline at end of file diff --git a/src/main/res/layout/activity_contact_details.xml b/src/main/res/layout/activity_contact_details.xml index 88797b14a..191694b7e 100644 --- a/src/main/res/layout/activity_contact_details.xml +++ b/src/main/res/layout/activity_contact_details.xml @@ -1,261 +1,272 @@ <?xml version="1.0" encoding="utf-8"?> -<layout xmlns:android="http://schemas.android.com/apk/res/android"> +<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="?attr/color_background_secondary"> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?attr/color_background_secondary" + android:orientation="vertical"> - <LinearLayout - android:id="@+id/details_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.support.v7.widget.CardView - android:layout_width="match_parent" + <LinearLayout + android:id="@+id/details_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"> - <RelativeLayout + <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="@dimen/card_padding_regular"> - - <android.support.text.emoji.widget.EmojiTextView - android:id="@+id/contact_display_name" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentTop="true" - android:layout_centerHorizontal="true" - android:layout_gravity="center_horizontal" - android:paddingBottom="5dp" - android:text="@string/contact" - android:textAlignment="center" - android:textColor="@color/black87" - android:textIsSelectable="false" - android:textSize="?attr/TextSizeHeadline" - android:textStyle="bold" /> - - <QuickContactBadge - android:id="@+id/details_contact_badge" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_below="@+id/contact_display_name" - android:layout_centerHorizontal="true" - android:adjustViewBounds="true" - android:background="@drawable/message_border" - android:maxHeight="384dp" - android:maxWidth="384dp" - android:padding="1dp" - android:scaleType="centerCrop" /> + 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"> - <LinearLayout - android:id="@+id/details_jidbox" - android:layout_width="wrap_content" + <RelativeLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_alignParentLeft="true" - android:layout_alignParentRight="true" - android:layout_alignParentStart="true" - android:layout_below="@+id/details_contact_badge" - android:layout_marginTop="16dp" - android:orientation="vertical"> - - <TextView - android:id="@+id/details_contactjid" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:text="@string/account_settings_example_jabber_id" - android:textAppearance="@style/TextAppearance.AppCompat.Title" - android:textIsSelectable="true" - android:visibility="gone" /> - - <com.wefika.flowlayout.FlowLayout - android:id="@+id/tags" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:layout_marginBottom="4dp" - android:layout_marginLeft="-2dp" - android:layout_marginTop="4dp" - android:orientation="horizontal"></com.wefika.flowlayout.FlowLayout> - - <TextView - android:id="@+id/details_lastseen" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:layout_marginBottom="4dp" - android:layout_marginTop="4dp" - android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> + android:padding="@dimen/card_padding_regular"> <android.support.text.emoji.widget.EmojiTextView - android:id="@+id/status_message" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:layout_marginBottom="4dp" - android:layout_marginTop="4dp" - android:gravity="center_horizontal" - android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> - - <android.support.text.emoji.widget.EmojiTextView - android:id="@+id/resource" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:layout_marginBottom="4dp" - android:layout_marginTop="4dp" - android:gravity="center_horizontal" - android:textSize="?attr/TextSizeBody" - android:textStyle="italic" /> - - <Button - android:id="@+id/add_contact_button" + android:id="@+id/contact_display_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_gravity="center_horizontal" - android:layout_marginBottom="4dp" - android:layout_marginTop="4dp" - android:text="@string/add_contact" /> + android:paddingBottom="5dp" + android:text="@string/contact" + android:textAlignment="center" + android:textColor="@color/black87" + android:textIsSelectable="false" + android:textSize="?attr/TextSizeHeadline" + android:textStyle="bold" /> - <CheckBox - android:id="@+id/details_send_presence" + <QuickContactBadge + android:id="@+id/details_contact_badge" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" - android:layout_below="@+id/add_contact_button" - android:layout_marginTop="4dp" - android:text="@string/send_presence_updates" - android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + android:layout_below="@+id/contact_display_name" + android:layout_centerHorizontal="true" + android:adjustViewBounds="true" + android:background="@drawable/message_border" + android:maxHeight="384dp" + android:maxWidth="384dp" + android:padding="1dp" + android:scaleType="centerCrop" /> - <CheckBox - android:id="@+id/details_receive_presence" + <LinearLayout + android:id="@+id/details_jidbox" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_alignParentEnd="true" android:layout_alignParentLeft="true" + android:layout_alignParentRight="true" android:layout_alignParentStart="true" - android:layout_below="@+id/details_send_presence" - android:text="@string/receive_presence_updates" - android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + android:layout_below="@+id/details_contact_badge" + android:layout_marginTop="16dp" + android:orientation="vertical"> - </LinearLayout> + <TextView + android:id="@+id/details_contactjid" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + 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_below="@+id/details_jidbox" - android:layout_marginTop="32dp" - android:text="@string/using_account" - android:textAppearance="@style/TextAppearance.AppCompat.Caption" - android:visibility="gone" /> - </RelativeLayout> - </android.support.v7.widget.CardView> + <com.wefika.flowlayout.FlowLayout + android:id="@+id/tags" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginBottom="4dp" + android:layout_marginLeft="-2dp" + android:layout_marginTop="4dp" + android:orientation="horizontal"></com.wefika.flowlayout.FlowLayout> - <android.support.v7.widget.CardView - 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"> + <TextView + android:id="@+id/details_lastseen" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginBottom="4dp" + android:layout_marginTop="4dp" + android:textAppearance="@style/TextAppearance.AppCompat.Subhead" /> + + <android.support.text.emoji.widget.EmojiTextView + android:id="@+id/status_message" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginBottom="4dp" + android:layout_marginTop="4dp" + android:gravity="center_horizontal" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + + <android.support.text.emoji.widget.EmojiTextView + android:id="@+id/resource" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginBottom="4dp" + android:layout_marginTop="4dp" + android:gravity="center_horizontal" + android:textSize="?attr/TextSizeBody" + android:textStyle="italic" /> + + <Button + android:id="@+id/add_contact_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_centerHorizontal="true" + android:layout_gravity="center_horizontal" + android:layout_marginBottom="4dp" + android:layout_marginTop="4dp" + android:text="@string/add_contact" /> + + <CheckBox + android:id="@+id/details_send_presence" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:layout_below="@+id/add_contact_button" + android:layout_marginTop="4dp" + android:text="@string/send_presence_updates" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> - <RelativeLayout - android:layout_width="fill_parent" + <CheckBox + android:id="@+id/details_receive_presence" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:layout_below="@+id/details_send_presence" + android:text="@string/receive_presence_updates" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + + </LinearLayout> + + <TextView + android:id="@+id/details_account" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_below="@+id/details_jidbox" + android:layout_marginTop="32dp" + android:text="@string/using_account" + android:textAppearance="@style/TextAppearance.AppCompat.Caption" + android:visibility="gone" /> + </RelativeLayout> + </android.support.v7.widget.CardView> + + <android.support.v7.widget.CardView + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" - android:padding="@dimen/card_padding_regular" - android:touchscreenBlocksFocus="true"> + 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"> - <TextView - android:id="@+id/notification_status_text" - android:layout_width="wrap_content" + <RelativeLayout + android:layout_width="fill_parent" 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:textColor="@color/black87" - android:textSize="?attr/TextSizeBody" /> + android:layout_alignParentStart="true" + android:padding="@dimen/card_padding_regular" + android:touchscreenBlocksFocus="true"> - <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:background="?attr/selectableItemBackgroundBorderless" - android:padding="@dimen/image_button_padding" - android:src="@drawable/ic_notifications_grey600_24dp" /> - </RelativeLayout> + <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:textColor="@color/black87" + android:textSize="?attr/TextSizeBody" /> - </android.support.v7.widget.CardView> + <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:background="?attr/selectableItemBackgroundBorderless" + android:padding="@dimen/image_button_padding" + android:src="@drawable/ic_notifications_grey600_24dp" /> + </RelativeLayout> - <android.support.v7.widget.CardView - android:id="@+id/keys_wrapper" - 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.support.v7.widget.CardView> - <LinearLayout + <android.support.v7.widget.CardView + android:id="@+id/keys_wrapper" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="vertical"> + 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"> <LinearLayout - android:id="@+id/details_contact_keys" android:layout_width="match_parent" android:layout_height="wrap_content" - android:divider="?android:dividerHorizontal" - android:orientation="vertical" - android:padding="@dimen/card_padding_list"></LinearLayout> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="match_parent" - android:layout_marginTop="8dp" - android:orientation="horizontal"> + android:orientation="vertical"> - <Button - android:id="@+id/scan_button" - style="?android:attr/borderlessButtonStyle" - android:layout_width="wrap_content" + <LinearLayout + android:id="@+id/details_contact_keys" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:minWidth="0dp" - android:paddingLeft="16dp" - android:paddingRight="16dp" - android:text="@string/scan_qr_code" - android:textColor="?attr/colorAccent" /> + android:divider="?android:dividerHorizontal" + android:orientation="vertical" + android:padding="@dimen/card_padding_list"></LinearLayout> - <Button - android:id="@+id/show_inactive_devices" - style="?android:attr/borderlessButtonStyle" + <LinearLayout android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:minWidth="0dp" - android:paddingLeft="16dp" - android:paddingRight="16dp" - android:text="@string/show_inactive_devices" - android:textColor="?attr/colorAccent" /> + android:layout_height="match_parent" + android:layout_marginTop="8dp" + android:orientation="horizontal"> + + <Button + android:id="@+id/scan_button" + style="?android:attr/borderlessButtonStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:minWidth="0dp" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:text="@string/scan_qr_code" + android:textColor="?attr/colorAccent" /> + + <Button + android:id="@+id/show_inactive_devices" + style="?android:attr/borderlessButtonStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:minWidth="0dp" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:text="@string/show_inactive_devices" + android:textColor="?attr/colorAccent" /> + </LinearLayout> </LinearLayout> - </LinearLayout> - </android.support.v7.widget.CardView> - </LinearLayout> - </ScrollView> + </android.support.v7.widget.CardView> + </LinearLayout> + </ScrollView> + </LinearLayout> </layout>
\ No newline at end of file diff --git a/src/main/res/layout/activity_conversations.xml b/src/main/res/layout/activity_conversations.xml index 567b17ac9..62352683a 100644 --- a/src/main/res/layout/activity_conversations.xml +++ b/src/main/res/layout/activity_conversations.xml @@ -28,8 +28,18 @@ --> <layout xmlns:android="http://schemas.android.com/apk/res/android"> - <FrameLayout - android:id="@+id/main_fragment" + <LinearLayout android:layout_width="match_parent" - android:layout_height="match_parent" /> + android:layout_height="match_parent" + android:orientation="vertical"> + + <include + android:id="@+id/toolbar" + layout="@layout/toolbar" /> + + <FrameLayout + android:id="@+id/main_fragment" + android:layout_width="match_parent" + android:layout_height="match_parent" /> + </LinearLayout> </layout>
\ No newline at end of file diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml index 0c64832f5..6050a72ab 100644 --- a/src/main/res/layout/activity_edit_account.xml +++ b/src/main/res/layout/activity_edit_account.xml @@ -8,11 +8,15 @@ android:layout_height="wrap_content" android:background="?attr/color_background_secondary"> + <include + android:id="@+id/toolbar" + layout="@layout/toolbar" /> + <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_above="@+id/button_bar" - android:layout_alignParentTop="true"> + android:layout_below="@id/toolbar"> <LinearLayout android:id="@+id/account_main_layout" @@ -612,19 +616,19 @@ android:orientation="vertical" android:padding="@dimen/card_padding_list"> - <TextView - android:id="@+id/other_device_keys_title" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_margin="@dimen/list_padding" - android:text="@string/other_devices" - android:textAppearance="@style/TextAppearance.AppCompat.Title" /> + <TextView + android:id="@+id/other_device_keys_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_margin="@dimen/list_padding" + android:text="@string/other_devices" + android:textAppearance="@style/TextAppearance.AppCompat.Title" /> - <LinearLayout - android:id="@+id/other_device_keys" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:orientation="vertical"/> + <LinearLayout + android:id="@+id/other_device_keys" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="vertical" /> <Button android:id="@+id/clear_devices" diff --git a/src/main/res/layout/activity_manage_accounts.xml b/src/main/res/layout/activity_manage_accounts.xml index 99b6ad920..e80aa01e0 100644 --- a/src/main/res/layout/activity_manage_accounts.xml +++ b/src/main/res/layout/activity_manage_accounts.xml @@ -2,7 +2,10 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" - android:background="?attr/color_background_primary"> + android:background="?attr/color_background_primary" + android:orientation="vertical"> + + <include layout="@layout/toolbar" /> <ListView android:id="@+id/account_list" 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 diff --git a/src/main/res/layout/activity_publish_profile_picture.xml b/src/main/res/layout/activity_publish_profile_picture.xml index e0b33929d..0fce24346 100644 --- a/src/main/res/layout/activity_publish_profile_picture.xml +++ b/src/main/res/layout/activity_publish_profile_picture.xml @@ -5,11 +5,14 @@ android:layout_height="match_parent" android:background="?attr/color_background_secondary"> + <include layout="@layout/toolbar" /> + <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_above="@+id/button_bar" - android:layout_alignParentTop="true"> + android:layout_alignParentTop="true" + android:layout_below="@id/toolbar"> <android.support.v7.widget.CardView android:layout_width="match_parent" diff --git a/src/main/res/layout/activity_settings.xml b/src/main/res/layout/activity_settings.xml new file mode 100644 index 000000000..1793bab82 --- /dev/null +++ b/src/main/res/layout/activity_settings.xml @@ -0,0 +1,13 @@ +<?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" + android:orientation="vertical"> + + <include layout="@layout/toolbar" /> + + <FrameLayout + android:id="@+id/settings_content" + android:layout_width="match_parent" + android:layout_height="match_parent" /> +</LinearLayout>
\ No newline at end of file diff --git a/src/main/res/layout/activity_share_locaction.xml b/src/main/res/layout/activity_share_locaction.xml index 2185ddc29..c6f811997 100644 --- a/src/main/res/layout/activity_share_locaction.xml +++ b/src/main/res/layout/activity_share_locaction.xml @@ -1,88 +1,98 @@ <?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" - tools:context="ui.ShareLocationActivity"> + android:layout_height="wrap_content" + android:background="?attr/color_background_secondary"> - <WebView - android:id="@+id/webView" + <include + android:id="@+id/toolbar" + layout="@layout/toolbar" /> + + <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:layout_above="@+id/snackbar"></WebView> + tools:context="ui.ShareLocationActivity"> - <RelativeLayout - android:id="@+id/snackbar" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_above="@+id/button_bar" - android:layout_marginBottom="4dp" - android:layout_marginLeft="8dp" - android:layout_marginRight="8dp" - android:layout_marginTop="4dp" - android:background="@drawable/snackbar" - android:minHeight="48dp" - android:visibility="visible"> + <WebView + android:id="@+id/webView" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_above="@+id/snackbar"></WebView> - <TextView - android:layout_width="wrap_content" + <RelativeLayout + android:id="@+id/snackbar" + android:layout_width="fill_parent" android:layout_height="wrap_content" - android:layout_alignParentLeft="true" - android:layout_centerVertical="true" - android:layout_toLeftOf="@+id/snackbar_action" - android:paddingLeft="24dp" - android:text="@string/location_sharing_disabled" - android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark" /> + android:layout_above="@+id/button_bar" + android:layout_marginBottom="4dp" + android:layout_marginLeft="8dp" + android:layout_marginRight="8dp" + android:layout_marginTop="4dp" + android:background="@drawable/snackbar" + android:minHeight="48dp" + android:visibility="visible"> - <TextView - android:id="@+id/snackbar_action" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentEnd="true" - android:layout_alignParentRight="true" - android:layout_alignParentTop="true" - android:paddingBottom="16dp" - android:paddingLeft="24dp" - android:paddingRight="24dp" - android:paddingTop="16dp" - android:text="@string/enable" - android:textAllCaps="true" - android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark" - android:textStyle="bold" /> - </RelativeLayout> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/snackbar_action" + android:paddingLeft="24dp" + android:text="@string/location_sharing_disabled" + android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark" /> - <LinearLayout - android:id="@+id/button_bar" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentBottom="true" - android:layout_alignParentLeft="true" - android:layout_alignParentRight="true"> + <TextView + android:id="@+id/snackbar_action" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:layout_alignParentTop="true" + android:paddingBottom="16dp" + android:paddingLeft="24dp" + android:paddingRight="24dp" + android:paddingTop="16dp" + android:text="@string/enable" + android:textAllCaps="true" + android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark" + android:textStyle="bold" /> + </RelativeLayout> - <Button - android:id="@+id/cancel_button" - style="?android:attr/borderlessButtonStyle" - android:layout_width="0dp" + <LinearLayout + android:id="@+id/button_bar" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_weight="1" - android:text="@string/cancel" - android:textColor="@color/primary" /> + android:layout_alignParentBottom="true" + android:layout_alignParentLeft="true" + android:layout_alignParentRight="true"> - <View - android:layout_width="1dp" - android:layout_height="fill_parent" - android:layout_marginBottom="7dp" - android:layout_marginTop="7dp" - android:background="@color/primary" /> + <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/primary" /> - <Button - android:id="@+id/share_button" - style="?android:attr/borderlessButtonStyle" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:enabled="false" - android:text="@string/share" - android:textColor="@color/primary" /> - </LinearLayout> + <View + android:layout_width="1dp" + android:layout_height="fill_parent" + android:layout_marginBottom="7dp" + android:layout_marginTop="7dp" + android:background="@color/primary" /> + + <Button + android:id="@+id/share_button" + style="?android:attr/borderlessButtonStyle" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:enabled="false" + android:text="@string/share" + android:textColor="@color/primary" /> + </LinearLayout> + </RelativeLayout> </RelativeLayout>
\ No newline at end of file diff --git a/src/main/res/layout/activity_share_with.xml b/src/main/res/layout/activity_share_with.xml index 0b0e11f54..c4908cbfe 100644 --- a/src/main/res/layout/activity_share_with.xml +++ b/src/main/res/layout/activity_share_with.xml @@ -4,6 +4,8 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + <include layout="@layout/toolbar" /> + <ListView android:id="@+id/choose_conversation_list" android:layout_width="match_parent" diff --git a/src/main/res/layout/activity_show_locaction.xml b/src/main/res/layout/activity_show_locaction.xml index 5e164b407..d6b26e6f4 100644 --- a/src/main/res/layout/activity_show_locaction.xml +++ b/src/main/res/layout/activity_show_locaction.xml @@ -1,13 +1,22 @@ <?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" - tools:context="ui.ShowLocationActivity"> + android:layout_height="wrap_content" + android:background="?attr/color_background_secondary"> - <WebView - android:id="@+id/webView" + <include + android:id="@+id/toolbar" + layout="@layout/toolbar" /> + + <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"> - </WebView> + android:layout_height="match_parent" + tools:context="ui.ShowLocationActivity"> + + <WebView + android:id="@+id/webView" + android:layout_width="match_parent" + android:layout_height="match_parent"></WebView> + </RelativeLayout> </RelativeLayout>
\ No newline at end of file diff --git a/src/main/res/layout/activity_start_conversation.xml b/src/main/res/layout/activity_start_conversation.xml index c95dc3678..963f3d547 100644 --- a/src/main/res/layout/activity_start_conversation.xml +++ b/src/main/res/layout/activity_start_conversation.xml @@ -1,19 +1,44 @@ <?xml version="1.0" encoding="utf-8"?> -<layout xmlns:android="http://schemas.android.com/apk/res/android" > - <FrameLayout +<layout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> + + <include + android:id="@+id/toolbar" + layout="@layout/toolbar" /> + + <android.support.design.widget.TabLayout + android:id="@+id/tab_layout" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@id/toolbar" + android:background="?attr/colorPrimary" + android:elevation="6dp" + android:minHeight="?attr/actionBarSize" + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" + app:tabGravity="fill" + app:tabMode="fixed" + app:tabSelectedTextColor="@color/white" + app:tabTextColor="@color/white70" /> + <android.support.v4.view.ViewPager android:id="@+id/start_conversation_view_pager" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?attr/color_background_primary"/> + android:layout_below="@id/tab_layout" + android:background="?attr/color_background_primary" /> + <android.support.design.widget.FloatingActionButton android:id="@+id/fab" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="end|bottom" - android:src="?attr/icon_add_person" - android:layout_margin="16dp" /> - </FrameLayout> + android:layout_alignParentBottom="true" + android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:layout_margin="16dp" + android:src="?attr/icon_add_person" /> + </RelativeLayout> </layout>
\ No newline at end of file diff --git a/src/main/res/layout/activity_trust_keys.xml b/src/main/res/layout/activity_trust_keys.xml index 431348f19..b2c03ed8e 100644 --- a/src/main/res/layout/activity_trust_keys.xml +++ b/src/main/res/layout/activity_trust_keys.xml @@ -6,11 +6,15 @@ android:layout_height="match_parent" android:background="?attr/color_background_secondary"> + <include + android:id="@+id/toolbar" + layout="@layout/toolbar" /> + <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_above="@+id/button_bar" - android:layout_alignParentTop="true"> + android:layout_below="@id/toolbar"> <LinearLayout android:layout_width="match_parent" diff --git a/src/main/res/layout/magic_create.xml b/src/main/res/layout/magic_create.xml index 9d3dd9322..5fb080368 100644 --- a/src/main/res/layout/magic_create.xml +++ b/src/main/res/layout/magic_create.xml @@ -1,87 +1,94 @@ <?xml version="1.0" encoding="utf-8"?> -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:fillViewport="true"> + android:orientation="vertical"> - <RelativeLayout + <include layout="@layout/toolbar" /> + + <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/grey50"> + android:fillViewport="true"> - <LinearLayout - android:id="@+id/linearLayout" + <RelativeLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentBottom="true" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" - android:minHeight="256dp" - android:orientation="vertical" - android:paddingBottom="8dp" - android:paddingLeft="16dp" - android:paddingRight="16dp"> + android:layout_height="match_parent" + android:background="?attr/color_background_primary"> - <Space + <LinearLayout + android:id="@+id/linearLayout" android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" /> - - <TextView - android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/pick_your_username" - android:textAppearance="@style/TextAppearance.AppCompat.Title" /> + android:layout_alignParentBottom="true" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:minHeight="256dp" + android:orientation="vertical" + android:paddingBottom="8dp" + android:paddingLeft="16dp" + android:paddingRight="16dp"> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:text="@string/magic_create_text" - android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + <Space + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" /> - <EditText - android:id="@+id/username" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:hint="@string/username_hint" - android:inputType="textNoSuggestions" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/pick_your_username" + android:textAppearance="@style/TextAppearance.AppCompat.Title" /> - <TextView - android:id="@+id/full_jid" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:text="@string/your_full_jid_will_be" - android:textAppearance="@style/TextAppearance.AppCompat.Caption" - android:visibility="invisible" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:text="@string/magic_create_text" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> - <Button - android:id="@+id/create_account" - style="?android:attr/borderlessButtonStyle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="right" - android:text="@string/next" - android:textColor="@color/accent" /> - </LinearLayout> + <EditText + android:id="@+id/username" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:hint="@string/username_hint" + android:inputType="textNoSuggestions" /> - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_above="@+id/linearLayout" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" - android:layout_alignParentTop="true"> + <TextView + android:id="@+id/full_jid" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:text="@string/your_full_jid_will_be" + android:textAppearance="@style/TextAppearance.AppCompat.Caption" + android:visibility="invisible" /> - <ImageView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerHorizontal="true" - android:layout_centerVertical="true" - android:padding="8dp" - android:src="@drawable/main_logo" /> + <Button + android:id="@+id/create_account" + style="?android:attr/borderlessButtonStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="right" + android:text="@string/next" + android:textColor="@color/accent" /> + </LinearLayout> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_above="@+id/linearLayout" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true"> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" + android:padding="8dp" + android:src="@drawable/main_logo" /> + </RelativeLayout> </RelativeLayout> - </RelativeLayout> -</ScrollView>
\ No newline at end of file + </ScrollView> +</LinearLayout>
\ No newline at end of file diff --git a/src/main/res/layout/toolbar.xml b/src/main/res/layout/toolbar.xml new file mode 100644 index 000000000..932252873 --- /dev/null +++ b/src/main/res/layout/toolbar.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="?attr/colorPrimary" + android:elevation="6dp" + android:minHeight="?attr/actionBarSize" + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" + app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
\ No newline at end of file diff --git a/src/main/res/layout/welcome.xml b/src/main/res/layout/welcome.xml index e81e1f95d..bbe98e90b 100644 --- a/src/main/res/layout/welcome.xml +++ b/src/main/res/layout/welcome.xml @@ -1,99 +1,107 @@ <?xml version="1.0" encoding="utf-8"?> -<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:fillViewport="true"> + android:orientation="vertical"> - <RelativeLayout + <include layout="@layout/toolbar" /> + + <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/grey50"> + android:fillViewport="true"> - <LinearLayout - android:id="@+id/linearLayout" + <RelativeLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_alignParentBottom="true" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" - android:minHeight="256dp" - android:orientation="vertical" - android:paddingBottom="8dp" - android:paddingLeft="16dp" - android:paddingRight="16dp"> + android:layout_height="match_parent" + android:background="@color/grey50"> - <Space + <LinearLayout + android:id="@+id/linearLayout" android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" /> - - <TextView - android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/welcome_header" - android:textAppearance="@style/TextAppearance.AppCompat.Title" /> + android:layout_alignParentBottom="true" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:minHeight="256dp" + android:orientation="vertical" + android:paddingBottom="8dp" + android:paddingLeft="16dp" + android:paddingRight="16dp"> - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:text="@string/welcome_text" - android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> + <Space + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" /> - <TextView - android:id="@id/import_text" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:text="@string/import_text" - android:textColor="@color/black87" - android:textSize="?attr/TextSizeBody" - android:visibility="gone" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/welcome_header" + android:textAppearance="@style/TextAppearance.AppCompat.Title" /> - <Button - android:id="@+id/import_database" - style="?android:attr/borderlessButtonStyle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="right" - android:text="@string/import_database" - android:textColor="@color/accent" - android:visibility="gone" /> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:text="@string/welcome_text" + android:textAppearance="@style/TextAppearance.AppCompat.Body1" /> - <Button - android:id="@+id/create_account" - style="?android:attr/borderlessButtonStyle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="right" - android:text="@string/create_account" - android:textColor="@color/accent" /> + <TextView + android:id="@id/import_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="8dp" + android:text="@string/import_text" + android:textColor="@color/black87" + android:textSize="?attr/TextSizeBody" + android:visibility="gone" /> - <Button - android:id="@+id/use_existing_account" - style="?android:attr/borderlessButtonStyle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="right" - android:text="@string/use_existing_accout" - android:textColor="@color/black54" /> - </LinearLayout> + <Button + android:id="@+id/import_database" + style="?android:attr/borderlessButtonStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="right" + android:text="@string/import_database" + android:textColor="@color/accent" + android:visibility="gone" /> - <RelativeLayout - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_above="@+id/linearLayout" - android:layout_alignParentLeft="true" - android:layout_alignParentStart="true" - android:layout_alignParentTop="true"> + <Button + android:id="@+id/create_account" + style="?android:attr/borderlessButtonStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="right" + android:text="@string/create_account" + android:textColor="@color/accent" /> - <ImageView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerHorizontal="true" - android:layout_centerVertical="true" - android:padding="8dp" - android:src="@drawable/main_logo" /> + <Button + android:id="@+id/use_existing_account" + style="?android:attr/borderlessButtonStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="right" + android:text="@string/use_existing_accout" + android:textColor="@color/black54" /> + </LinearLayout> + + <RelativeLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_above="@+id/linearLayout" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true"> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" + android:padding="8dp" + android:src="@drawable/main_logo" /> + </RelativeLayout> </RelativeLayout> - </RelativeLayout> -</ScrollView>
\ No newline at end of file + </ScrollView> +</LinearLayout>
\ No newline at end of file |