diff options
author | Christian Schneppe <kriztan@users.noreply.github.com> | 2018-09-27 18:42:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-27 18:42:25 +0200 |
commit | 4f4a52f068f3b3956aca5934531a48d1f90d7974 (patch) | |
tree | da24e0f840730a75f2b3dab69a3b5f12025391be /src/main/res/layout | |
parent | 1816092e68584b5794303578b6af6d621ffc58d4 (diff) | |
parent | f4ac1f68feac3e3b19ab5932ede9d79dd14bff27 (diff) |
Merge branch 'master' into bubble-into-avatar
Diffstat (limited to 'src/main/res/layout')
-rw-r--r-- | src/main/res/layout/activity_choose_contact.xml | 2 | ||||
-rw-r--r-- | src/main/res/layout/activity_contact_details.xml | 54 | ||||
-rw-r--r-- | src/main/res/layout/activity_manage_accounts.xml | 2 | ||||
-rw-r--r-- | src/main/res/layout/activity_media_browser.xml | 24 | ||||
-rw-r--r-- | src/main/res/layout/activity_muc_details.xml | 46 | ||||
-rw-r--r-- | src/main/res/layout/activity_start_conversation.xml | 2 | ||||
-rw-r--r-- | src/main/res/layout/conversation_list_row.xml | 4 | ||||
-rw-r--r-- | src/main/res/layout/fragment_conversation.xml | 37 | ||||
-rw-r--r-- | src/main/res/layout/media.xml | 16 | ||||
-rw-r--r-- | src/main/res/layout/media_preview.xml | 28 |
10 files changed, 199 insertions, 16 deletions
diff --git a/src/main/res/layout/activity_choose_contact.xml b/src/main/res/layout/activity_choose_contact.xml index f720864a3..26f1c7494 100644 --- a/src/main/res/layout/activity_choose_contact.xml +++ b/src/main/res/layout/activity_choose_contact.xml @@ -13,7 +13,7 @@ <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?attr/color_background_primary"> + android:background="?attr/color_background_secondary"> <ListView android:id="@+id/choose_contact_list" diff --git a/src/main/res/layout/activity_contact_details.xml b/src/main/res/layout/activity_contact_details.xml index dd3ff2c31..a6a720995 100644 --- a/src/main/res/layout/activity_contact_details.xml +++ b/src/main/res/layout/activity_contact_details.xml @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<layout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto"> +<layout xmlns:android="http://schemas.android.com/apk/res/android"> <LinearLayout android:layout_width="match_parent" @@ -102,8 +101,7 @@ android:layout_marginBottom="4dp" android:layout_marginLeft="-2dp" android:layout_marginTop="4dp" - android:orientation="horizontal"> - </com.wefika.flowlayout.FlowLayout> + android:orientation="horizontal"></com.wefika.flowlayout.FlowLayout> <TextView android:id="@+id/details_lastseen" @@ -235,6 +233,52 @@ </android.support.v7.widget.CardView> <android.support.v7.widget.CardView + android:id="@+id/media_wrapper" + 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"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <android.support.v7.widget.RecyclerView + android:id="@+id/media" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginEnd="-2dp" + android:layout_marginStart="-2dp" + android:orientation="horizontal" + android:paddingBottom="@dimen/card_padding_list" + android:paddingEnd="@dimen/card_padding_regular" + android:paddingStart="@dimen/card_padding_regular" + android:paddingTop="@dimen/card_padding_regular" /> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_gravity="end" + android:orientation="horizontal"> + + <Button + android:id="@+id/show_media" + style="@style/Widget.Conversations.Button.Borderless" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:minWidth="0dp" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:text="@string/view_media" + android:textColor="?attr/colorAccent" /> + </LinearLayout> + </LinearLayout> + </android.support.v7.widget.CardView> + + <android.support.v7.widget.CardView android:id="@+id/keys_wrapper" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -254,7 +298,7 @@ android:layout_height="wrap_content" android:divider="?android:dividerHorizontal" android:orientation="vertical" - android:padding="@dimen/card_padding_list"></LinearLayout> + android:padding="@dimen/card_padding_list" /> <LinearLayout android:layout_width="wrap_content" diff --git a/src/main/res/layout/activity_manage_accounts.xml b/src/main/res/layout/activity_manage_accounts.xml index e80aa01e0..2dc266bf3 100644 --- a/src/main/res/layout/activity_manage_accounts.xml +++ b/src/main/res/layout/activity_manage_accounts.xml @@ -2,7 +2,7 @@ <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_secondary" android:orientation="vertical"> <include layout="@layout/toolbar" /> diff --git a/src/main/res/layout/activity_media_browser.xml b/src/main/res/layout/activity_media_browser.xml new file mode 100644 index 000000000..149f2c164 --- /dev/null +++ b/src/main/res/layout/activity_media_browser.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<layout xmlns:android="http://schemas.android.com/apk/res/android"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="?attr/color_background_primary" + android:orientation="vertical"> + + <include + android:id="@+id/toolbar" + layout="@layout/toolbar" /> + + <android.support.v7.widget.RecyclerView + android:id="@+id/media" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:clipToPadding="false" + android:orientation="horizontal" + android:padding="2dp" + android:scrollbars="vertical" /> + + </LinearLayout> +</layout>
\ No newline at end of file diff --git a/src/main/res/layout/activity_muc_details.xml b/src/main/res/layout/activity_muc_details.xml index 2958e3efe..b46ad8032 100644 --- a/src/main/res/layout/activity_muc_details.xml +++ b/src/main/res/layout/activity_muc_details.xml @@ -276,6 +276,52 @@ </android.support.v7.widget.CardView> <android.support.v7.widget.CardView + android:id="@+id/media_wrapper" + 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"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical"> + + <android.support.v7.widget.RecyclerView + android:id="@+id/media" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginEnd="-2dp" + android:layout_marginStart="-2dp" + android:orientation="horizontal" + android:paddingBottom="@dimen/card_padding_list" + android:paddingEnd="@dimen/card_padding_regular" + android:paddingStart="@dimen/card_padding_regular" + android:paddingTop="@dimen/card_padding_regular" /> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_gravity="end" + android:orientation="horizontal"> + + <Button + android:id="@+id/show_media" + style="@style/Widget.Conversations.Button.Borderless" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:minWidth="0dp" + android:paddingLeft="16dp" + android:paddingRight="16dp" + android:text="@string/view_media" + android:textColor="?attr/colorAccent" /> + </LinearLayout> + </LinearLayout> + </android.support.v7.widget.CardView> + + <android.support.v7.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/activity_vertical_margin" diff --git a/src/main/res/layout/activity_start_conversation.xml b/src/main/res/layout/activity_start_conversation.xml index 1cb95b456..7adb8714a 100644 --- a/src/main/res/layout/activity_start_conversation.xml +++ b/src/main/res/layout/activity_start_conversation.xml @@ -29,7 +29,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@id/tab_layout" - android:background="?attr/color_background_primary" /> + android:background="?attr/color_background_secondary" /> <android.support.design.widget.FloatingActionButton android:id="@+id/fab" diff --git a/src/main/res/layout/conversation_list_row.xml b/src/main/res/layout/conversation_list_row.xml index 5fce5c1f2..cbd884ae2 100644 --- a/src/main/res/layout/conversation_list_row.xml +++ b/src/main/res/layout/conversation_list_row.xml @@ -8,12 +8,12 @@ android:id="@+id/frame" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:background="?attr/color_background_primary"> + android:background="?attr/color_background_secondary"> <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" - android:background="?attr/color_background_secondary" + android:background="?android:selectableItemBackground" android:orientation="horizontal" android:padding="8dp"> diff --git a/src/main/res/layout/fragment_conversation.xml b/src/main/res/layout/fragment_conversation.xml index d081b6543..16f48bde2 100644 --- a/src/main/res/layout/fragment_conversation.xml +++ b/src/main/res/layout/fragment_conversation.xml @@ -5,7 +5,7 @@ <RelativeLayout xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?attr/color_background_secondary" + android:background="?attr/color_background_tertiary" android:clickable="false"> <ListView @@ -14,8 +14,9 @@ android:layout_height="match_parent" android:layout_above="@+id/snackbar" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:layout_alignParentTop="true" - android:background="?attr/color_background_secondary" + android:background="?attr/color_background_tertiary" android:divider="@null" android:dividerHeight="0dp" android:listSelector="@android:color/transparent" @@ -53,7 +54,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:layout_alignParentLeft="true"> + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true"> <RelativeLayout android:id="@+id/textsend" @@ -61,7 +63,7 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" - android:background="?attr/color_background_secondary" + android:background="?attr/color_background_tertiary" android:clickable="true" android:paddingBottom="2dp" android:paddingLeft="2dp" @@ -73,18 +75,34 @@ android:layout_height="48dp" android:layout_alignParentLeft="true" android:layout_centerVertical="true" - android:background="?attr/color_background_secondary" + android:background="?attr/color_background_tertiary" android:contentDescription="@string/attach_record_voice" android:src="@drawable/ic_send_voice_offline" android:visibility="gone" /> + <android.support.v7.widget.RecyclerView + android:id="@+id/media_preview" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentStart="true" + android:layout_toStartOf="@+id/textSendButton" + android:background="@drawable/message_bubble_sent_blue" + android:orientation="horizontal" + android:paddingTop="8dp" + android:requiresFadingEdge="horizontal" + android:visibility="gone" + app:layoutManager="android.support.v7.widget.LinearLayoutManager" + tools:listitem="@layout/media_preview"></android.support.v7.widget.RecyclerView> + <de.pixart.messenger.ui.widget.EditMessage android:id="@+id/textinput" style="@style/Widget.Conversations.EditText" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_toEndOf="@+id/recordVoiceButton" android:layout_toLeftOf="@+id/textSendButton" android:layout_toRightOf="@+id/recordVoiceButton" + android:layout_toStartOf="@+id/textSendButton" android:background="@drawable/message_bubble_sent_blue" android:ems="10" android:imeOptions="flagNoExtractUi|actionSend" @@ -105,9 +123,10 @@ android:id="@+id/textSendButton" android:layout_width="48dp" android:layout_height="48dp" + android:layout_alignParentEnd="true" android:layout_alignParentRight="true" android:layout_centerVertical="true" - android:background="?attr/color_background_secondary" + android:background="?attr/color_background_tertiary" android:contentDescription="@string/send_message" android:src="@drawable/ic_send_text_offline" /> </RelativeLayout> @@ -130,15 +149,19 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:layout_centerVertical="true" android:layout_toLeftOf="@+id/snackbar_action" + android:layout_toStartOf="@+id/snackbar_action" android:paddingLeft="24dp" + android:paddingStart="24dp" android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark" /> <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_centerVertical="true" android:paddingBottom="16dp" @@ -166,8 +189,10 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:layout_centerVertical="true" android:paddingLeft="24dp" + android:paddingStart="24dp" android:textColor="@color/realblack" android:textSize="?attr/TextSizeBody" /> </RelativeLayout> diff --git a/src/main/res/layout/media.xml b/src/main/res/layout/media.xml new file mode 100644 index 000000000..f95ddeda3 --- /dev/null +++ b/src/main/res/layout/media.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<layout xmlns:android="http://schemas.android.com/apk/res/android"> + + <de.pixart.messenger.ui.widget.SquareFrameLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="2dp"> + + <ImageView + android:id="@+id/media" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/black54" + android:scaleType="centerInside" /> + </de.pixart.messenger.ui.widget.SquareFrameLayout> +</layout>
\ No newline at end of file diff --git a/src/main/res/layout/media_preview.xml b/src/main/res/layout/media_preview.xml new file mode 100644 index 000000000..8849e7b4a --- /dev/null +++ b/src/main/res/layout/media_preview.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<layout xmlns:android="http://schemas.android.com/apk/res/android"> + + <RelativeLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content"> + + <ImageView + android:id="@+id/media_preview" + android:layout_width="@dimen/media_preview_size" + android:layout_height="@dimen/media_preview_size" + android:layout_centerInParent="true" + android:layout_margin="12dp" + android:background="@color/black54" + android:scaleType="center" /> + + <ImageButton + android:id="@+id/delete_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentEnd="true" + android:layout_alignParentRight="true" + android:layout_alignParentTop="true" + android:alpha="?attr/delete_icon_alpha" + android:background="?attr/selectableItemBackgroundBorderless" + android:src="?attr/icon_cancel" /> + </RelativeLayout> +</layout>
\ No newline at end of file |