mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-26 06:58:37 +00:00
129 lines
No EOL
6.2 KiB
XML
129 lines
No EOL
6.2 KiB
XML
<?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">
|
|
|
|
<data>
|
|
<import type="android.view.View" />
|
|
<import type="android.graphics.Typeface" />
|
|
<variable
|
|
name="onContactsClicked"
|
|
type="View.OnClickListener" />
|
|
<variable
|
|
name="onCallsClicked"
|
|
type="View.OnClickListener" />
|
|
<variable
|
|
name="onConversationsClicked"
|
|
type="View.OnClickListener" />
|
|
<variable
|
|
name="onMeetingsClicked"
|
|
type="View.OnClickListener" />
|
|
<variable
|
|
name="viewModel"
|
|
type="org.linphone.ui.main.viewmodel.BottomNavBarViewModel" />
|
|
</data>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/bottom_nav_bar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:background="@color/white">
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
style="@style/bottom_nav_bar_label_style"
|
|
android:onClick="@{onContactsClicked}"
|
|
android:id="@+id/contacts"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="16dp"
|
|
android:drawableTop="@drawable/address_book"
|
|
android:drawablePadding="10dp"
|
|
android:drawableTint="@{viewModel.contactsSelected ? @color/orange_main_500 : @color/gray_main2_600, default=@color/gray_main2_600}"
|
|
android:text="@string/bottom_navigation_contacts_label"
|
|
android:textStyle="@{viewModel.contactsSelected ? Typeface.BOLD : Typeface.NORMAL}"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toStartOf="@id/calls"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
style="@style/bottom_nav_bar_label_style"
|
|
android:onClick="@{onCallsClicked}"
|
|
android:id="@+id/calls"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="18dp"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="16dp"
|
|
android:drawableTop="@drawable/phone"
|
|
android:drawablePadding="10dp"
|
|
android:drawableTint="@{viewModel.callsSelected ? @color/orange_main_500 : @color/gray_main2_600, default=@color/gray_main2_600}"
|
|
android:text="@string/bottom_navigation_calls_label"
|
|
android:textStyle="@{viewModel.callsSelected ? Typeface.BOLD : Typeface.NORMAL}"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toStartOf="@id/conversations"
|
|
app:layout_constraintStart_toEndOf="@id/contacts"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
style="@style/default_text_style"
|
|
android:id="@+id/missed_calls"
|
|
android:layout_width="24dp"
|
|
android:layout_height="24dp"
|
|
android:layout_marginStart="50dp"
|
|
android:layout_marginTop="5dp"
|
|
android:gravity="center"
|
|
android:background="@drawable/shape_red_round"
|
|
android:text="@{String.valueOf(viewModel.missedCallsCount), default=`1`}"
|
|
android:textColor="@color/white"
|
|
android:textSize="13sp"
|
|
android:visibility="@{viewModel.missedCallsCount > 0 ? View.VISIBLE : View.GONE}"
|
|
app:layout_constraintTop_toTopOf="@id/calls"
|
|
app:layout_constraintStart_toStartOf="@id/calls"
|
|
app:layout_constraintEnd_toEndOf="@id/calls"/>
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
style="@style/bottom_nav_bar_label_style"
|
|
android:onClick="@{onConversationsClicked}"
|
|
android:visibility="@{viewModel.hideConversations ? View.GONE : View.VISIBLE}"
|
|
android:enabled="false"
|
|
android:id="@+id/conversations"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="18dp"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="16dp"
|
|
android:drawableTop="@drawable/chat_text"
|
|
android:drawablePadding="10dp"
|
|
android:drawableTint="@{viewModel.conversationsSelected ? @color/orange_main_500 : @color/gray_main2_600, default=@color/gray_main2_600}"
|
|
android:text="@string/bottom_navigation_conversations_label"
|
|
android:textStyle="@{viewModel.conversationsSelected ? Typeface.BOLD : Typeface.NORMAL}"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toStartOf="@id/meetings"
|
|
app:layout_constraintStart_toEndOf="@id/calls"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
style="@style/bottom_nav_bar_label_style"
|
|
android:onClick="@{onMeetingsClicked}"
|
|
android:id="@+id/meetings"
|
|
android:visibility="@{viewModel.hideMeetings ? View.GONE : View.VISIBLE}"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="18dp"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="16dp"
|
|
android:drawableTop="@drawable/users_three"
|
|
android:drawablePadding="10dp"
|
|
android:drawableTint="@{viewModel.meetingsSelected ? @color/orange_main_500 : @color/gray_main2_600, default=@color/gray_main2_600}"
|
|
android:text="@string/bottom_navigation_meetings_label"
|
|
android:textStyle="@{viewModel.meetingsSelected ? Typeface.BOLD : Typeface.NORMAL}"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toEndOf="@id/conversations"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</layout> |