mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Added menu icon in top bar next to current profile avatar + fixed layout icon while in conference
This commit is contained in:
parent
719b28f0ab
commit
5f17dd8534
8 changed files with 69 additions and 28 deletions
9
app/src/main/res/drawable/layout.xml
Normal file
9
app/src/main/res/drawable/layout.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="256"
|
||||
android:viewportHeight="256">
|
||||
<path
|
||||
android:pathData="M216,40L40,40A16,16 0,0 0,24 56L24,200a16,16 0,0 0,16 16L216,216a16,16 0,0 0,16 -16L232,56A16,16 0,0 0,216 40ZM216,56L216,96L40,96L40,56ZM40,112L96,112v88L40,200ZM216,200L112,200L112,112L216,112v88Z"
|
||||
android:fillColor="#4e6074"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/list.xml
Normal file
9
app/src/main/res/drawable/list.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="256"
|
||||
android:viewportHeight="256">
|
||||
<path
|
||||
android:pathData="M224,128a8,8 0,0 1,-8 8H40a8,8 0,0 1,0 -16H216A8,8 0,0 1,224 128ZM40,72H216a8,8 0,0 0,0 -16H40a8,8 0,0 0,0 16ZM216,184H40a8,8 0,0 0,0 16H216a8,8 0,0 0,0 -16Z"
|
||||
android:fillColor="#4e6074"/>
|
||||
</vector>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="256"
|
||||
android:viewportHeight="256">
|
||||
<path
|
||||
android:pathData="M184,112a8,8 0,0 1,-8 8L112,120a8,8 0,0 1,0 -16h64A8,8 0,0 1,184 112ZM176,136L112,136a8,8 0,0 0,0 16h64a8,8 0,0 0,0 -16ZM224,48L224,208a16,16 0,0 1,-16 16L48,224a16,16 0,0 1,-16 -16L32,48A16,16 0,0 1,48 32L208,32A16,16 0,0 1,224 48ZM48,208L72,208L72,48L48,48ZM208,208L208,48L88,48L88,208L208,208Z"
|
||||
android:fillColor="#4e6074"/>
|
||||
</vector>
|
||||
|
|
@ -107,7 +107,7 @@
|
|||
android:layout_marginTop="@dimen/call_extra_button_top_margin"
|
||||
android:padding="@dimen/call_button_icon_padding"
|
||||
android:background="@drawable/in_call_button_background_red"
|
||||
android:src="@drawable/notebook"
|
||||
android:src="@drawable/layout"
|
||||
android:contentDescription="@string/call_action_change_layout"
|
||||
app:tint="@color/in_call_button_tint_color"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
<androidx.constraintlayout.widget.Group
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="avatar, title, search_toggle"
|
||||
app:constraint_referenced_ids="drawer_menu, avatar, title, search_toggle"
|
||||
android:visibility="@{viewModel.searchBarVisible ? View.GONE : View.VISIBLE}" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
|
|
@ -46,15 +46,28 @@
|
|||
app:constraint_referenced_ids="title, search"
|
||||
app:barrierDirection="bottom" />
|
||||
|
||||
<ImageView
|
||||
style="@style/icon_top_bar_button_style"
|
||||
android:id="@+id/drawer_menu"
|
||||
android:onClick="@{() -> viewModel.openDrawerMenu()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:src="@drawable/list"
|
||||
android:contentDescription="@string/content_description_open_filter"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/avatar"
|
||||
app:layout_constraintBottom_toBottomOf="@id/avatar"
|
||||
app:tint="?attr/color_on_main" />
|
||||
|
||||
<include
|
||||
android:id="@+id/avatar"
|
||||
android:onClick="@{() -> viewModel.openDrawerMenu()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
layout="@layout/contact_avatar"
|
||||
bind:model="@{viewModel.account}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/drawer_menu"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
|
|
@ -80,7 +93,6 @@
|
|||
android:onClick="@{() -> viewModel.openSearchBar()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@drawable/magnifying_glass"
|
||||
android:contentDescription="@string/content_description_open_filter"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
|
|
@ -95,7 +107,6 @@
|
|||
android:onClick="@{extraActionClickListener}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@{extraActionIcon, default=@drawable/dots_three_vertical}"
|
||||
android:contentDescription="@{extraActionContentDescription}"
|
||||
android:visibility="@{!viewModel.searchBarVisible && enableExtraAction ? View.VISIBLE : View.GONE, default=gone}"
|
||||
|
|
@ -111,7 +122,6 @@
|
|||
android:onClick="@{() -> viewModel.closeSearchBar()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@drawable/caret_left"
|
||||
android:contentDescription="@string/content_description_cancel_filter"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
|
|
@ -158,7 +168,6 @@
|
|||
android:onClick="@{() -> viewModel.clearFilter()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@drawable/x"
|
||||
android:contentDescription="@string/content_description_clear_filter"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
<androidx.constraintlayout.widget.Group
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="title, search_toggle"
|
||||
app:constraint_referenced_ids="drawer_menu, title, search_toggle"
|
||||
android:visibility="@{viewModel.searchBarVisible ? View.GONE : View.VISIBLE}" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
|
|
@ -45,19 +45,33 @@
|
|||
app:constraint_referenced_ids="title, search"
|
||||
app:barrierDirection="bottom" />
|
||||
|
||||
<ImageView
|
||||
style="@style/icon_top_bar_button_style"
|
||||
android:id="@+id/drawer_menu"
|
||||
android:onClick="@{() -> viewModel.openDrawerMenu()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:src="@drawable/list"
|
||||
android:contentDescription="@string/content_description_open_filter"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/title"
|
||||
app:layout_constraintBottom_toBottomOf="@id/title"
|
||||
app:tint="?attr/color_main2_600" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/default_text_style_800"
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@{viewModel.title, default=`Title`}"
|
||||
android:textColor="?attr/color_text"
|
||||
android:textSize="28sp"
|
||||
app:layout_constraintEnd_toStartOf="@id/search_toggle"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/drawer_menu"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@
|
|||
android:layout_marginTop="@dimen/call_extra_button_top_margin"
|
||||
android:padding="@dimen/call_button_icon_padding"
|
||||
android:background="@drawable/in_call_button_background_red"
|
||||
android:src="@drawable/notebook"
|
||||
android:src="@drawable/layout"
|
||||
android:contentDescription="@string/call_action_change_layout"
|
||||
app:tint="@color/in_call_button_tint_color"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
<androidx.constraintlayout.widget.Group
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="avatar, title, search_toggle"
|
||||
app:constraint_referenced_ids="drawer_menu, avatar, title, search_toggle"
|
||||
android:visibility="@{viewModel.searchBarVisible ? View.GONE : View.VISIBLE}" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
|
|
@ -46,15 +46,28 @@
|
|||
app:constraint_referenced_ids="title, search"
|
||||
app:barrierDirection="bottom" />
|
||||
|
||||
<ImageView
|
||||
style="@style/icon_top_bar_button_style"
|
||||
android:id="@+id/drawer_menu"
|
||||
android:onClick="@{() -> viewModel.openDrawerMenu()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:src="@drawable/list"
|
||||
android:contentDescription="@string/content_description_open_filter"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/avatar"
|
||||
app:layout_constraintBottom_toBottomOf="@id/avatar"
|
||||
app:tint="?attr/color_on_main" />
|
||||
|
||||
<include
|
||||
android:id="@+id/avatar"
|
||||
android:onClick="@{() -> viewModel.openDrawerMenu()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
layout="@layout/contact_avatar"
|
||||
bind:model="@{viewModel.account}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/drawer_menu"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
|
|
@ -80,7 +93,6 @@
|
|||
android:onClick="@{() -> viewModel.openSearchBar()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@drawable/magnifying_glass"
|
||||
android:contentDescription="@string/content_description_open_filter"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
|
|
@ -95,7 +107,6 @@
|
|||
android:onClick="@{extraActionClickListener}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@{extraActionIcon, default=@drawable/dots_three_vertical}"
|
||||
android:contentDescription="@{extraActionContentDescription}"
|
||||
android:visibility="@{!viewModel.searchBarVisible && enableExtraAction ? View.VISIBLE : View.GONE, default=gone}"
|
||||
|
|
@ -111,7 +122,6 @@
|
|||
android:onClick="@{() -> viewModel.closeSearchBar()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@drawable/caret_left"
|
||||
android:contentDescription="@string/content_description_cancel_filter"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
|
|
@ -158,7 +168,6 @@
|
|||
android:onClick="@{() -> viewModel.clearFilter()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@drawable/x"
|
||||
android:contentDescription="@string/content_description_clear_filter"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue