linphone-android/app/src/main/res/layout/tabs_fragment.xml
2020-04-02 09:52:14 +02:00

148 lines
No EOL
5.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="android.view.View"/>
<variable
name="historyClickListener"
type="android.view.View.OnClickListener"/>
<variable
name="contactsClickListener"
type="android.view.View.OnClickListener"/>
<variable
name="dialerClickListener"
type="android.view.View.OnClickListener"/>
<variable
name="chatClickListener"
type="android.view.View.OnClickListener"/>
<variable
name="viewModel"
type="org.linphone.activities.main.viewmodels.TabsViewModel" />
</data>
<LinearLayout
android:baselineAligned="false"
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:onClick="@{historyClickListener}"
android:background="@drawable/footer_button">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:padding="15dp"
android:contentDescription="@string/content_description_menu_history"
android:src="@drawable/footer_history" />
<View
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"
android:background="?attr/accentColor"
android:visibility="@{viewModel.historySelected ? View.VISIBLE : View.GONE, default=gone}" />
<TextView
style="@style/unread_count_font"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:background="@drawable/unread_message_count_bg"
android:gravity="center"
android:text="@{String.valueOf(viewModel.missedCallsCount)}"
android:visibility="@{viewModel.missedCallsCount == 0 ? View.GONE : View.VISIBLE}" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:onClick="@{contactsClickListener}"
android:background="@drawable/footer_button">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:padding="15dp"
android:contentDescription="@string/content_description_menu_contacts"
android:src="@drawable/footer_contacts" />
<View
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"
android:background="?attr/accentColor"
android:visibility="@{viewModel.contactsSelected ? View.VISIBLE : View.GONE, default=gone}" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:onClick="@{dialerClickListener}"
android:background="@drawable/footer_button">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:padding="15dp"
android:contentDescription="@string/content_description_menu_dialer"
android:src="@drawable/footer_dialer" />
<View
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"
android:background="?attr/accentColor"
android:visibility="@{viewModel.dialerSelected ? View.VISIBLE : View.GONE, default=visible}" />
</RelativeLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:onClick="@{chatClickListener}"
android:background="@drawable/footer_button">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:padding="15dp"
android:contentDescription="@string/content_description_menu_chat"
android:src="@drawable/footer_chat" />
<View
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"
android:background="?attr/accentColor"
android:visibility="@{viewModel.chatSelected ? View.VISIBLE : View.GONE, default=gone}" />
<TextView
style="@style/unread_count_font"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:background="@drawable/unread_message_count_bg"
android:gravity="center"
android:text="@{String.valueOf(viewModel.unreadMessagesCount)}"
android:visibility="@{viewModel.unreadMessagesCount == 0 ? View.GONE : View.VISIBLE}" />
</RelativeLayout>
</LinearLayout>
</layout>