diff options
Diffstat (limited to 'src/main/res')
-rw-r--r-- | src/main/res/drawable/ic_scroll_to_end_black.xml | 9 | ||||
-rw-r--r-- | src/main/res/drawable/ic_scroll_to_end_white.xml | 38 | ||||
-rw-r--r-- | src/main/res/layout/fragment_conversation.xml | 31 | ||||
-rw-r--r-- | src/main/res/values/attrs.xml | 5 | ||||
-rw-r--r-- | src/main/res/values/themes.xml | 4 |
5 files changed, 82 insertions, 5 deletions
diff --git a/src/main/res/drawable/ic_scroll_to_end_black.xml b/src/main/res/drawable/ic_scroll_to_end_black.xml new file mode 100644 index 000000000..6771786c1 --- /dev/null +++ b/src/main/res/drawable/ic_scroll_to_end_black.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24"> + <path + android:fillColor="#8a000000" + android:pathData="M16.59,5.59L18,7L12,13L6,7L7.41,5.59L12,10.17L16.59,5.59M16.59,11.59L18,13L12,19L6,13L7.41,11.59L12,16.17L16.59,11.59Z" /> +</vector>
\ No newline at end of file diff --git a/src/main/res/drawable/ic_scroll_to_end_white.xml b/src/main/res/drawable/ic_scroll_to_end_white.xml new file mode 100644 index 000000000..82ed9911f --- /dev/null +++ b/src/main/res/drawable/ic_scroll_to_end_white.xml @@ -0,0 +1,38 @@ +<!-- + ~ Copyright (c) 2018, Daniel Gultsch All rights reserved. + ~ + ~ Redistribution and use in source and binary forms, with or without modification, + ~ are permitted provided that the following conditions are met: + ~ + ~ 1. Redistributions of source code must retain the above copyright notice, this + ~ list of conditions and the following disclaimer. + ~ + ~ 2. Redistributions in binary form must reproduce the above copyright notice, + ~ this list of conditions and the following disclaimer in the documentation and/or + ~ other materials provided with the distribution. + ~ + ~ 3. Neither the name of the copyright holder nor the names of its contributors + ~ may be used to endorse or promote products derived from this software without + ~ specific prior written permission. + ~ + ~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ~ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + ~ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + ~ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + ~ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + ~ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + ~ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ~ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + ~ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + ~ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + --> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportHeight="24" + android:viewportWidth="24"> + <path + android:fillColor="#b2ffffff" + android:pathData="M16.59,5.59L18,7L12,13L6,7L7.41,5.59L12,10.17L16.59,5.59M16.59,11.59L18,13L12,19L6,13L7.41,11.59L12,16.17L16.59,11.59Z" /> +</vector>
\ No newline at end of file diff --git a/src/main/res/layout/fragment_conversation.xml b/src/main/res/layout/fragment_conversation.xml index 54c608f13..dcf825dc5 100644 --- a/src/main/res/layout/fragment_conversation.xml +++ b/src/main/res/layout/fragment_conversation.xml @@ -5,8 +5,8 @@ <RelativeLayout xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:clickable="false" - android:background="?attr/color_background_secondary"> + android:background="?attr/color_background_secondary" + android:clickable="false"> <ListView android:id="@+id/messages_view" @@ -23,6 +23,29 @@ android:transcriptMode="normal" tools:listitem="@layout/message_sent"></ListView> + <android.support.design.widget.FloatingActionButton + android:id="@+id/scroll_to_bottom_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBottom="@+id/messages_view" + android:layout_alignParentEnd="true" + android:layout_margin="12dp" + android:alpha="0.85" + android:src="?attr/icon_scroll_down" + android:visibility="gone" + app:backgroundTint="?attr/color_background_primary" + app:fabSize="mini" /> + + <de.pixart.messenger.ui.widget.UnreadCountCustomView + android:id="@+id/unread_count_custom_view" + android:layout_width="?attr/IconSize" + android:layout_height="?attr/IconSize" + android:layout_alignTop="@+id/scroll_to_bottom_button" + android:layout_alignEnd="@+id/scroll_to_bottom_button" + android:elevation="8dp" + android:visibility="gone" + app:backgroundColor="?attr/unread_count" /> + <RelativeLayout android:id="@+id/input" android:layout_width="match_parent" @@ -100,7 +123,6 @@ android:layout_alignParentLeft="true" android:layout_toLeftOf="@+id/textSendButton" android:background="?attr/color_background_secondary" - android:textColor="?attr/text_Color_Main" android:ems="10" android:imeOptions="flagNoExtractUi|actionSend" android:inputType="textShortMessage|textMultiLine|textCapSentences" @@ -111,7 +133,8 @@ android:paddingLeft="8dp" android:paddingRight="8dp" android:paddingTop="12dp" - android:singleLine="false"> + android:singleLine="false" + android:textColor="?attr/text_Color_Main"> </de.pixart.messenger.ui.widget.EditMessage> diff --git a/src/main/res/values/attrs.xml b/src/main/res/values/attrs.xml index f9fb003f6..02461ec1a 100644 --- a/src/main/res/values/attrs.xml +++ b/src/main/res/values/attrs.xml @@ -52,6 +52,7 @@ <attr name="icon_import_export" format="reference" /> <attr name="icon_scan_qr_code" format="reference" /> <attr name="icon_enable_undecided_device" format="reference" /> + <attr name="icon_scroll_down" format="reference"/> <attr name="icon_notifications" format="reference" /> <attr name="icon_notifications_off" format="reference" /> @@ -92,4 +93,8 @@ <attr name="ic_settings_security" format="reference"/> <attr name="ic_settings_expert" format="reference"/> <attr name="ic_settings_about" format="reference"/> + + <declare-styleable name="UnreadCountCustomView"> + <attr name="backgroundColor" format="reference|color" /> + </declare-styleable> </resources>
\ No newline at end of file diff --git a/src/main/res/values/themes.xml b/src/main/res/values/themes.xml index e757b7817..85c18e84e 100644 --- a/src/main/res/values/themes.xml +++ b/src/main/res/values/themes.xml @@ -61,6 +61,7 @@ <item type="reference" name="icon_import_export">@drawable/ic_import_export_white_24dp</item> <item type="reference" name="icon_share">@drawable/ic_share_white_24dp</item> <item type="reference" name="icon_scan_qr_code">@drawable/ic_barcode_scan_white_24dp</item> + <item type="reference" name="icon_scroll_down">@drawable/ic_scroll_to_end_black</item> <!-- settings--> <item type="reference" name="ic_settings_ui">@drawable/ic_image_black_24dp</item> @@ -173,7 +174,8 @@ <item type="reference" name="icon_settings">@drawable/ic_settings_white_24dp</item> <item type="reference" name="icon_import_export">@drawable/ic_import_export_white_24dp</item> <item type="reference" name="icon_share">@drawable/ic_share_white_24dp</item> - <item name="icon_scan_qr_code">@drawable/ic_barcode_scan_white_24dp</item> + <item type="reference" name="icon_scan_qr_code">@drawable/ic_barcode_scan_white_24dp</item> + <item type="reference" name="icon_scroll_down">@drawable/ic_scroll_to_end_white</item> <item type="reference" name="icon_notifications">@drawable/ic_notifications_white_24dp</item> <item type="reference" name="icon_notifications_off">@drawable/ic_notifications_off_white_24dp</item> |