Implement InputBarButton

This commit is contained in:
Niels Andriesse
2021-06-15 14:05:32 +10:00
parent acc472bbad
commit 5755f4150a
11 changed files with 182 additions and 58 deletions

View File

@@ -1,17 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/accent">
<item
android:id="@android:id/mask">
<shape android:shape="oval">
<solid android:color="@color/white" />
</shape>
</item>
<item>
<shape android:shape="oval">
<solid android:color="@color/input_bar_button_background" />
</shape>
</item>
</ripple>
android:shape="oval" />

View File

@@ -19,6 +19,8 @@
android:text="Elon"
android:textColor="@color/text"
android:textStyle="bold"
android:textSize="@dimen/very_large_font_size" />
android:textSize="@dimen/very_large_font_size"
android:maxLines="1"
android:ellipsize="end" />
</LinearLayout>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -116,13 +117,6 @@
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_gravity="bottom"
android:layout_marginStart="@dimen/medium_spacing"
android:background="?android:dividerHorizontal" />
</FrameLayout>
</LinearLayout>

View File

@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="@dimen/input_bar_height"
android:orientation="vertical">
@@ -16,23 +15,12 @@
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/attachmentsButton"
android:layout_width="40dp"
android:layout_height="40dp"
android:id="@+id/attachmentsButtonContainer"
android:layout_width="@dimen/input_bar_button_expanded_size"
android:layout_height="@dimen/input_bar_button_expanded_size"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_marginStart="@dimen/small_spacing"
android:background="@drawable/input_bar_button_background">
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:scaleType="centerInside"
android:layout_centerInParent="true"
android:src="@drawable/ic_plus_24"
app:tint="@color/text" />
</RelativeLayout>
android:layout_marginStart="@dimen/small_spacing" />
<TextView
android:layout_width="wrap_content"
@@ -43,23 +31,12 @@
android:background="@color/red" />
<RelativeLayout
android:id="@+id/microphoneButton"
android:layout_width="40dp"
android:layout_height="40dp"
android:id="@+id/microphoneButtonContainer"
android:layout_width="@dimen/input_bar_button_expanded_size"
android:layout_height="@dimen/input_bar_button_expanded_size"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/small_spacing"
android:background="@drawable/input_bar_button_background">
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:scaleType="centerInside"
android:layout_centerInParent="true"
android:src="@drawable/ic_microphone"
app:tint="@color/text" />
</RelativeLayout>
android:layout_marginEnd="@dimen/small_spacing" />
</RelativeLayout>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/inputBarButton"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/input_bar_button_background">
<ImageView
android:id="@+id/inputBarButtonImageView"
android:layout_width="16dp"
android:layout_height="16dp"
android:scaleType="centerInside"
android:layout_centerInParent="true"
android:src="@drawable/ic_plus_24"
app:tint="@color/text" />
</RelativeLayout>

View File

@@ -21,7 +21,7 @@
<color name="open_group_chip_color">#0D000000</color>
<color name="message_selected">#FFFFFF</color>
<color name="input_bar_background">#FCFCFC</color>
<color name="input_bar_button_background">#0D000000</color>
<color name="input_bar_button_background">#F2F2F2</color>
<color name="default_background_start">#ffffff</color>
<color name="default_background_end">#fcfcfc</color>

View File

@@ -28,7 +28,7 @@
<color name="open_group_chip_color">#0DFFFFFF</color>
<color name="message_selected">#000000</color>
<color name="input_bar_background">#171717</color>
<color name="input_bar_button_background">#0DFFFFFF</color>
<color name="input_bar_button_background">#0D0D0D</color>
<array name="profile_picture_placeholder_colors">
<item>#5ff8b0</item>

View File

@@ -37,6 +37,8 @@
<dimen name="path_row_dot_size">8dp</dimen>
<dimen name="path_row_expanded_dot_size">16dp</dimen>
<dimen name="input_bar_height">56dp</dimen>
<dimen name="input_bar_button_collapsed_size">40dp</dimen>
<dimen name="input_bar_button_expanded_size">48dp</dimen>
<!-- Distances -->
<dimen name="small_spacing">8dp</dimen>