Implement placeholder input bar layout

This commit is contained in:
Niels Andriesse 2021-06-15 09:42:18 +10:00
parent 7c659c9a68
commit f8ea8cbd03
6 changed files with 74 additions and 10 deletions

View File

@ -0,0 +1,28 @@
package org.thoughtcrime.securesms.conversation.v2.input_bar
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.LinearLayout
import network.loki.messenger.R
class InputBar : LinearLayout {
// region Lifecycle
constructor(context: Context) : super(context) {
setUpViewHierarchy()
}
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
setUpViewHierarchy()
}
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
setUpViewHierarchy()
}
private fun setUpViewHierarchy() {
LayoutInflater.from(context).inflate(R.layout.view_input_bar, this)
}
// endregion
}

View File

@ -10,12 +10,11 @@
android:id="@+id/conversationRecyclerView" android:id="@+id/conversationRecyclerView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginBottom="40dp" /> android:layout_marginBottom="@dimen/input_bar_height" />
<View <org.thoughtcrime.securesms.conversation.v2.input_bar.InputBar
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="40dp" android:layout_height="wrap_content"
android:background="@color/red"
android:layout_alignParentBottom="true" /> android:layout_alignParentBottom="true" />
</RelativeLayout> </RelativeLayout>

View File

@ -0,0 +1,38 @@
<?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="@dimen/input_bar_height"
android:orientation="vertical">
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/separator" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentStart="true"
android:background="@color/red" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp" />
<View
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentEnd="true"
android:background="@color/blue" />
</RelativeLayout>
</LinearLayout>

View File

@ -20,10 +20,11 @@
<color name="pn_option_background">#FCFCFC</color> <color name="pn_option_background">#FCFCFC</color>
<color name="open_group_chip_color">#0D000000</color> <color name="open_group_chip_color">#0D000000</color>
<color name="message_selected">#FFFFFF</color> <color name="message_selected">#FFFFFF</color>
<color name="input_bar_background">#FCFCFC</color>
<color name="default_background_start">#ffffff</color> <color name="default_background_start">#ffffff</color>
<color name="default_background_end">#fcfcfd</color> <color name="default_background_end">#fcfcfc</color>
<color name="action_bar_background">#fcfcfd</color> <color name="action_bar_background">#fcfcfc</color>
<color name="app_icon_background">#333132</color> <color name="app_icon_background">#333132</color>
<color name="progress_bar_background">#0A000000</color> <color name="progress_bar_background">#0A000000</color>

View File

@ -27,6 +27,7 @@
<color name="paths_building">#FFCE3A</color> <color name="paths_building">#FFCE3A</color>
<color name="open_group_chip_color">#0DFFFFFF</color> <color name="open_group_chip_color">#0DFFFFFF</color>
<color name="message_selected">#000000</color> <color name="message_selected">#000000</color>
<color name="input_bar_background">#171717</color>
<array name="profile_picture_placeholder_colors"> <array name="profile_picture_placeholder_colors">
<item>#5ff8b0</item> <item>#5ff8b0</item>

View File

@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- Session -->
<!-- Font Sizes --> <!-- Font Sizes -->
<dimen name="very_small_font_size">12sp</dimen> <dimen name="very_small_font_size">12sp</dimen>
<dimen name="small_font_size">15sp</dimen> <dimen name="small_font_size">15sp</dimen>
@ -38,6 +36,7 @@
<dimen name="path_row_height">56dp</dimen> <dimen name="path_row_height">56dp</dimen>
<dimen name="path_row_dot_size">8dp</dimen> <dimen name="path_row_dot_size">8dp</dimen>
<dimen name="path_row_expanded_dot_size">16dp</dimen> <dimen name="path_row_expanded_dot_size">16dp</dimen>
<dimen name="input_bar_height">64dp</dimen>
<!-- Distances --> <!-- Distances -->
<dimen name="small_spacing">8dp</dimen> <dimen name="small_spacing">8dp</dimen>
@ -48,8 +47,6 @@
<dimen name="new_conversation_button_bottom_offset">56dp</dimen> <dimen name="new_conversation_button_bottom_offset">56dp</dimen>
<dimen name="onboarding_button_bottom_offset">40dp</dimen> <dimen name="onboarding_button_bottom_offset">40dp</dimen>
<!-- Session -->
<dimen name="emoji_drawer_size">32sp</dimen> <dimen name="emoji_drawer_size">32sp</dimen>
<dimen name="min_keyboard_size">50dp</dimen> <dimen name="min_keyboard_size">50dp</dimen>
<dimen name="default_custom_keyboard_size">220dp</dimen> <dimen name="default_custom_keyboard_size">220dp</dimen>