Improved tabs fragment use, not created each time a view changes
This commit is contained in:
parent
4a28c606bf
commit
715a3c3074
21 changed files with 147 additions and 1255 deletions
|
@ -28,7 +28,6 @@ import android.view.Gravity
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
import androidx.databinding.DataBindingUtil
|
import androidx.databinding.DataBindingUtil
|
||||||
import androidx.fragment.app.FragmentContainerView
|
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.navigation.NavController
|
import androidx.navigation.NavController
|
||||||
|
@ -125,9 +124,8 @@ class MainActivity : GenericActivity(), SnackBarActivity, NavController.OnDestin
|
||||||
|
|
||||||
override fun showSnackBar(resourceId: Int) {
|
override fun showSnackBar(resourceId: Int) {
|
||||||
val snackBar = Snackbar.make(binding.coordinator, resourceId, Snackbar.LENGTH_LONG)
|
val snackBar = Snackbar.make(binding.coordinator, resourceId, Snackbar.LENGTH_LONG)
|
||||||
val anchorView = binding.navHostFragment.findViewById<FragmentContainerView>(R.id.tabs_fragment)
|
if (binding.tabsFragment.visibility == View.VISIBLE) {
|
||||||
if (anchorView != null) {
|
snackBar.anchorView = binding.tabsFragment
|
||||||
snackBar.anchorView = anchorView
|
|
||||||
}
|
}
|
||||||
snackBar.show()
|
snackBar.show()
|
||||||
}
|
}
|
||||||
|
@ -150,6 +148,11 @@ class MainActivity : GenericActivity(), SnackBarActivity, NavController.OnDestin
|
||||||
arguments: Bundle?
|
arguments: Bundle?
|
||||||
) {
|
) {
|
||||||
currentFocus?.hideKeyboard()
|
currentFocus?.hideKeyboard()
|
||||||
|
|
||||||
|
binding.tabsFragment.visibility = when (destination.id) {
|
||||||
|
R.id.masterCallLogsFragment, R.id.masterContactsFragment, R.id.dialerFragment, R.id.masterChatRoomsFragment -> View.VISIBLE
|
||||||
|
else -> View.GONE
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun View.hideKeyboard() {
|
private fun View.hideKeyboard() {
|
||||||
|
|
|
@ -21,13 +21,16 @@ package org.linphone.activities.main.fragments
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
|
import androidx.navigation.NavController
|
||||||
|
import androidx.navigation.NavDestination
|
||||||
|
import androidx.navigation.findNavController
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
import org.linphone.activities.GenericFragment
|
import org.linphone.activities.GenericFragment
|
||||||
import org.linphone.activities.main.viewmodels.TabsViewModel
|
import org.linphone.activities.main.viewmodels.TabsViewModel
|
||||||
import org.linphone.databinding.TabsFragmentBinding
|
import org.linphone.databinding.TabsFragmentBinding
|
||||||
|
|
||||||
class TabsFragment : GenericFragment<TabsFragmentBinding>() {
|
class TabsFragment : GenericFragment<TabsFragmentBinding>(), NavController.OnDestinationChangedListener {
|
||||||
private lateinit var viewModel: TabsViewModel
|
private lateinit var viewModel: TabsViewModel
|
||||||
|
|
||||||
override fun getLayoutId(): Int = R.layout.tabs_fragment
|
override fun getLayoutId(): Int = R.layout.tabs_fragment
|
||||||
|
@ -42,17 +45,6 @@ class TabsFragment : GenericFragment<TabsFragmentBinding>() {
|
||||||
} ?: throw Exception("Invalid Activity")
|
} ?: throw Exception("Invalid Activity")
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
viewModel.historySelected.value = false
|
|
||||||
viewModel.contactsSelected.value = false
|
|
||||||
viewModel.dialerSelected.value = false
|
|
||||||
viewModel.chatSelected.value = false
|
|
||||||
when (findNavController().currentDestination?.id) {
|
|
||||||
R.id.masterCallLogsFragment -> viewModel.historySelected.value = true
|
|
||||||
R.id.masterContactsFragment -> viewModel.contactsSelected.value = true
|
|
||||||
R.id.dialerFragment -> viewModel.dialerSelected.value = true
|
|
||||||
R.id.masterChatRoomsFragment -> viewModel.chatSelected.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.setHistoryClickListener {
|
binding.setHistoryClickListener {
|
||||||
when (findNavController().currentDestination?.id) {
|
when (findNavController().currentDestination?.id) {
|
||||||
R.id.masterContactsFragment -> findNavController().navigate(R.id.action_masterContactsFragment_to_masterCallLogsFragment)
|
R.id.masterContactsFragment -> findNavController().navigate(R.id.action_masterContactsFragment_to_masterCallLogsFragment)
|
||||||
|
@ -85,4 +77,32 @@ class TabsFragment : GenericFragment<TabsFragmentBinding>() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onStart() {
|
||||||
|
super.onStart()
|
||||||
|
findNavController().addOnDestinationChangedListener(this)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStop() {
|
||||||
|
findNavController().removeOnDestinationChangedListener(this)
|
||||||
|
super.onStop()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDestinationChanged(
|
||||||
|
controller: NavController,
|
||||||
|
destination: NavDestination,
|
||||||
|
arguments: Bundle?
|
||||||
|
) {
|
||||||
|
viewModel.historySelected.value = false
|
||||||
|
viewModel.contactsSelected.value = false
|
||||||
|
viewModel.dialerSelected.value = false
|
||||||
|
viewModel.chatSelected.value = false
|
||||||
|
|
||||||
|
when (destination.id) {
|
||||||
|
R.id.masterCallLogsFragment -> viewModel.historySelected.value = true
|
||||||
|
R.id.masterContactsFragment -> viewModel.contactsSelected.value = true
|
||||||
|
R.id.dialerFragment -> viewModel.dialerSelected.value = true
|
||||||
|
R.id.masterChatRoomsFragment -> viewModel.chatSelected.value = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,105 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
|
|
||||||
<data>
|
|
||||||
<import type="android.view.View" />
|
|
||||||
<variable
|
|
||||||
name="newOneToOneChatRoomClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="newGroupChatRoomClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="editClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="viewModel"
|
|
||||||
type="org.linphone.activities.main.chat.viewmodels.ChatRoomsListViewModel" />
|
|
||||||
</data>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/top_bar"
|
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:background="?attr/lightToolbarBackgroundColor"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:visibility="@{viewModel.groupChatAvailable ? View.VISIBLE : View.GONE}"
|
|
||||||
android:onClick="@{newOneToOneChatRoomClickListener}"
|
|
||||||
android:contentDescription="@string/content_description_create_one_to_one_chat_room"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/chat_new" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{newGroupChatRoomClickListener}"
|
|
||||||
android:contentDescription="@string/content_description_create_group_chat_room"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/chat_group_new" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.4" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{editClickListener}"
|
|
||||||
android:enabled="@{!viewModel.chatRooms.empty}"
|
|
||||||
android:contentDescription="@string/content_description_enter_edition_mode"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/delete" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/list_edit_top_bar_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignTop="@id/top_bar"
|
|
||||||
tools:layout="@layout/list_edit_top_bar_fragment" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/chatList"
|
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:layout_below="@id/top_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/empty_list_font"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:text="@string/no_chat_history"
|
|
||||||
android:visibility="@{viewModel.chatRooms.empty ? View.VISIBLE : View.GONE}" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</layout>
|
|
|
@ -1,179 +0,0 @@
|
||||||
<?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"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
|
|
||||||
<data>
|
|
||||||
<import type="android.view.View"/>
|
|
||||||
<variable
|
|
||||||
name="allContactsToggleClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="sipContactsToggleClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="newContactClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="editClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="viewModel"
|
|
||||||
type="org.linphone.activities.main.contact.viewmodels.ContactsListViewModel" />
|
|
||||||
</data>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/top_bar"
|
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:background="?attr/lightToolbarBackgroundColor"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{allContactsToggleClickListener}"
|
|
||||||
android:enabled="@{viewModel.sipContactsSelected}"
|
|
||||||
android:contentDescription="@string/content_description_show_all_contacts"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/contacts_all" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:visibility="@{viewModel.sipContactsSelected ? View.GONE : View.VISIBLE}"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="5dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:background="?attr/accentColor" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{sipContactsToggleClickListener}"
|
|
||||||
android:enabled="@{!viewModel.sipContactsSelected}"
|
|
||||||
android:contentDescription="@string/content_description_show_sip_contacts"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:gravity="center"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/contacts_sip" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:visibility="@{viewModel.sipContactsSelected ? View.VISIBLE : View.GONE}"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="5dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:background="?attr/accentColor" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{newContactClickListener}"
|
|
||||||
android:contentDescription="@string/content_description_add_contact"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/contact_add" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{editClickListener}"
|
|
||||||
android:enabled="@{!viewModel.contactsList.empty}"
|
|
||||||
android:contentDescription="@string/content_description_enter_edition_mode"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/delete" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/list_edit_top_bar_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignTop="@id/top_bar"
|
|
||||||
tools:layout="@layout/list_edit_top_bar_fragment" />
|
|
||||||
|
|
||||||
<SearchView
|
|
||||||
android:id="@+id/searchBar"
|
|
||||||
queryValue="@={viewModel.filter}"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:iconifiedByDefault="false"
|
|
||||||
android:inputType="textPersonName"
|
|
||||||
android:layout_below="@id/top_bar"
|
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:queryBackground="@color/transparent_color"
|
|
||||||
android:queryHint="@string/contact_filter_hint"/>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_below="@id/searchBar"
|
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:background="?attr/dividerColor" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/contactsList"
|
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_below="@id/searchBar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/empty_list_font"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/no_sip_contact"
|
|
||||||
android:visibility="@{viewModel.sipContactsSelected && viewModel.contactsList.empty ? View.VISIBLE : View.GONE}" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/empty_list_font"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/no_contact"
|
|
||||||
android:visibility="@{!viewModel.sipContactsSelected && viewModel.contactsList.empty ? View.VISIBLE : View.GONE}" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</layout>
|
|
|
@ -34,17 +34,8 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/address_bar"
|
android:id="@+id/address_bar"
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
|
@ -83,7 +74,6 @@
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/controls"
|
android:id="@+id/controls"
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp">
|
android:layout_height="60dp">
|
||||||
|
@ -139,7 +129,6 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@id/address_bar"
|
android:layout_below="@id/address_bar"
|
||||||
android:layout_above="@id/controls"
|
android:layout_above="@id/controls"
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:padding="30dp"
|
android:padding="30dp"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
|
|
|
@ -1,141 +0,0 @@
|
||||||
<?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"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
|
|
||||||
<data>
|
|
||||||
<import type="android.view.View"/>
|
|
||||||
<variable
|
|
||||||
name="allCallLogsToggleClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="missedCallLogsToggleClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="editClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="viewModel"
|
|
||||||
type="org.linphone.activities.main.history.viewmodels.CallLogsListViewModel" />
|
|
||||||
</data>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/top_bar"
|
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:background="?attr/lightToolbarBackgroundColor"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{allCallLogsToggleClickListener}"
|
|
||||||
android:enabled="@{viewModel.missedCallLogsSelected}"
|
|
||||||
android:contentDescription="@string/content_description_show_all_calls"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/history_all" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:visibility="@{viewModel.missedCallLogsSelected ? View.GONE : View.VISIBLE}"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="5dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:background="?attr/accentColor" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{missedCallLogsToggleClickListener}"
|
|
||||||
android:enabled="@{!viewModel.missedCallLogsSelected}"
|
|
||||||
android:contentDescription="@string/content_description_show_missed_calls"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:gravity="center"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/history_missed" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:visibility="@{viewModel.missedCallLogsSelected ? View.VISIBLE : View.GONE}"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="5dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:background="?attr/accentColor" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.4" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{editClickListener}"
|
|
||||||
android:enabled="@{viewModel.missedCallLogsSelected ? !viewModel.missedCallLogs.empty : !viewModel.callLogs.empty}"
|
|
||||||
android:contentDescription="@string/content_description_enter_edition_mode"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/delete" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/list_edit_top_bar_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignTop="@id/top_bar"
|
|
||||||
tools:layout="@layout/list_edit_top_bar_fragment" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/callLogsList"
|
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:layout_below="@id/top_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/empty_list_font"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:text="@string/no_call_history"
|
|
||||||
android:visibility="@{viewModel.callLogs.empty && !viewModel.missedCallLogsSelected ? View.VISIBLE : View.GONE}" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/empty_list_font"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:text="@string/no_missed_call_history"
|
|
||||||
android:visibility="@{viewModel.missedCallLogs.empty && viewModel.missedCallLogsSelected ? View.VISIBLE : View.GONE}" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</layout>
|
|
85
app/src/main/res/layout-land/main_activity.xml
Normal file
85
app/src/main/res/layout-land/main_activity.xml
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
<?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"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
<import type="android.view.View" />
|
||||||
|
<variable
|
||||||
|
name="goBackToCallClickListener"
|
||||||
|
type="android.view.View.OnClickListener" />
|
||||||
|
<variable
|
||||||
|
name="viewModel"
|
||||||
|
type="org.linphone.activities.main.viewmodels.SharedMainViewModel" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
android:id="@+id/coordinator"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="?attr/backgroundColor">
|
||||||
|
|
||||||
|
<androidx.fragment.app.FragmentContainerView
|
||||||
|
android:id="@+id/status_fragment"
|
||||||
|
android:name="org.linphone.activities.main.fragments.StatusFragment"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
tools:layout="@layout/status_fragment" />
|
||||||
|
|
||||||
|
<androidx.drawerlayout.widget.DrawerLayout
|
||||||
|
android:id="@+id/side_menu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@id/status_fragment">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<androidx.fragment.app.FragmentContainerView
|
||||||
|
android:id="@+id/tabs_fragment"
|
||||||
|
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:layout="@layout/tabs_fragment" />
|
||||||
|
|
||||||
|
<androidx.fragment.app.FragmentContainerView
|
||||||
|
android:id="@+id/nav_host_fragment"
|
||||||
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@id/status_fragment"
|
||||||
|
app:defaultNavHost="true"
|
||||||
|
app:navGraph="@navigation/main_nav_graph" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- Side Menu -->
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/side_menu_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="left">
|
||||||
|
|
||||||
|
<androidx.fragment.app.FragmentContainerView
|
||||||
|
android:id="@+id/side_menu_fragment"
|
||||||
|
android:name="org.linphone.activities.main.sidemenu.fragments.SideMenuFragment"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:layout="@layout/side_menu_fragment" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</androidx.drawerlayout.widget.DrawerLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
</layout>
|
|
@ -1,139 +0,0 @@
|
||||||
<?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"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
|
|
||||||
<data>
|
|
||||||
<import type="android.view.View" />
|
|
||||||
<variable
|
|
||||||
name="newOneToOneChatRoomClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="newGroupChatRoomClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="editClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="viewModel"
|
|
||||||
type="org.linphone.activities.main.chat.viewmodels.ChatRoomsListViewModel" />
|
|
||||||
</data>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/top_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:background="?attr/lightToolbarBackgroundColor"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{newOneToOneChatRoomClickListener}"
|
|
||||||
android:contentDescription="@string/content_description_create_one_to_one_chat_room"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/chat_new" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:visibility="@{viewModel.groupChatAvailable ? View.VISIBLE : View.GONE}"
|
|
||||||
android:onClick="@{newGroupChatRoomClickListener}"
|
|
||||||
android:contentDescription="@string/content_description_create_group_chat_room"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/chat_group_new" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.4" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{editClickListener}"
|
|
||||||
android:enabled="@{!viewModel.chatRooms.empty}"
|
|
||||||
android:contentDescription="@string/content_description_enter_edition_mode"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/delete" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/list_edit_top_bar_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignTop="@id/top_bar"
|
|
||||||
tools:layout="@layout/list_edit_top_bar_fragment" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/chatList"
|
|
||||||
android:layout_below="@id/top_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/empty_list_font"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:text="@string/no_chat_history"
|
|
||||||
android:visibility="@{viewModel.chatRooms.empty ? View.VISIBLE : View.GONE}" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="1dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/dividerColor" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/chat_nav_container"
|
|
||||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:defaultNavHost="false"
|
|
||||||
app:navGraph="@navigation/chat_nav_graph"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</layout>
|
|
|
@ -1,210 +0,0 @@
|
||||||
<?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"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
|
|
||||||
<data>
|
|
||||||
<import type="android.view.View"/>
|
|
||||||
<variable
|
|
||||||
name="allContactsToggleClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="sipContactsToggleClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="newContactClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="editClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="viewModel"
|
|
||||||
type="org.linphone.activities.main.contact.viewmodels.ContactsListViewModel" />
|
|
||||||
</data>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/top_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:background="?attr/lightToolbarBackgroundColor"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{allContactsToggleClickListener}"
|
|
||||||
android:enabled="@{viewModel.sipContactsSelected}"
|
|
||||||
android:contentDescription="@string/content_description_show_all_contacts"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/contacts_all" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:visibility="@{viewModel.sipContactsSelected ? View.GONE : View.VISIBLE}"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="5dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:background="?attr/accentColor" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{sipContactsToggleClickListener}"
|
|
||||||
android:enabled="@{!viewModel.sipContactsSelected}"
|
|
||||||
android:contentDescription="@string/content_description_show_sip_contacts"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:gravity="center"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/contacts_sip" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:visibility="@{viewModel.sipContactsSelected ? View.VISIBLE : View.GONE}"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="5dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:background="?attr/accentColor" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{newContactClickListener}"
|
|
||||||
android:contentDescription="@string/content_description_add_contact"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/contact_add" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{editClickListener}"
|
|
||||||
android:enabled="@{!viewModel.contactsList.empty}"
|
|
||||||
android:contentDescription="@string/content_description_enter_edition_mode"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/delete" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/list_edit_top_bar_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignTop="@id/top_bar"
|
|
||||||
tools:layout="@layout/list_edit_top_bar_fragment" />
|
|
||||||
|
|
||||||
<SearchView
|
|
||||||
android:id="@+id/searchBar"
|
|
||||||
queryValue="@={viewModel.filter}"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:iconifiedByDefault="false"
|
|
||||||
android:inputType="textPersonName"
|
|
||||||
android:layout_below="@id/top_bar"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:queryBackground="@color/transparent_color"
|
|
||||||
android:queryHint="@string/contact_filter_hint"/>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_below="@id/searchBar"
|
|
||||||
android:background="?attr/dividerColor" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/contactsList"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_below="@id/searchBar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/empty_list_font"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/no_sip_contact"
|
|
||||||
android:visibility="@{viewModel.sipContactsSelected && viewModel.contactsList.empty ? View.VISIBLE : View.GONE}" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/empty_list_font"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/no_contact"
|
|
||||||
android:visibility="@{!viewModel.sipContactsSelected && viewModel.contactsList.empty ? View.VISIBLE : View.GONE}" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="1dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/dividerColor" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/contacts_nav_container"
|
|
||||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:defaultNavHost="false"
|
|
||||||
app:navGraph="@navigation/contacts_nav_graph"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</layout>
|
|
|
@ -35,20 +35,11 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/grey_color">
|
android:background="@color/grey_color">
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:visibility="@{viewModel.showPreview ? View.GONE : View.VISIBLE}"
|
android:visibility="@{viewModel.showPreview ? View.GONE : View.VISIBLE}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="300dp"
|
android:layout_height="300dp"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:layout_toLeftOf="@id/ui_layout"
|
android:layout_toLeftOf="@id/ui_layout"
|
||||||
android:padding="30dp"
|
android:padding="30dp"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
|
@ -57,7 +48,6 @@
|
||||||
<org.linphone.mediastream.video.capture.CaptureTextureView
|
<org.linphone.mediastream.video.capture.CaptureTextureView
|
||||||
android:id="@+id/video_preview_window"
|
android:id="@+id/video_preview_window"
|
||||||
android:visibility="@{viewModel.showPreview ? View.VISIBLE : View.GONE, default=gone}"
|
android:visibility="@{viewModel.showPreview ? View.VISIBLE : View.GONE, default=gone}"
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_centerInParent="true"/>
|
android:layout_centerInParent="true"/>
|
||||||
|
|
|
@ -1,174 +0,0 @@
|
||||||
<?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"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
|
|
||||||
<data>
|
|
||||||
<import type="android.view.View"/>
|
|
||||||
<variable
|
|
||||||
name="allCallLogsToggleClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="missedCallLogsToggleClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="editClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="viewModel"
|
|
||||||
type="org.linphone.activities.main.history.viewmodels.CallLogsListViewModel" />
|
|
||||||
</data>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_toRightOf="@id/tabs_fragment"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/top_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:background="?attr/lightToolbarBackgroundColor"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{allCallLogsToggleClickListener}"
|
|
||||||
android:enabled="@{viewModel.missedCallLogsSelected}"
|
|
||||||
android:contentDescription="@string/content_description_show_all_calls"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/history_all" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:visibility="@{viewModel.missedCallLogsSelected ? View.GONE : View.VISIBLE}"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="5dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:background="?attr/accentColor" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{missedCallLogsToggleClickListener}"
|
|
||||||
android:enabled="@{!viewModel.missedCallLogsSelected}"
|
|
||||||
android:contentDescription="@string/content_description_show_missed_calls"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:gravity="center"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/history_missed" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:visibility="@{viewModel.missedCallLogsSelected ? View.VISIBLE : View.GONE}"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="5dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:background="?attr/accentColor" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.4" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{editClickListener}"
|
|
||||||
android:enabled="@{viewModel.missedCallLogsSelected ? !viewModel.missedCallLogs.empty : !viewModel.callLogs.empty}"
|
|
||||||
android:contentDescription="@string/content_description_enter_edition_mode"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/delete" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/list_edit_top_bar_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignTop="@id/top_bar"
|
|
||||||
tools:layout="@layout/list_edit_top_bar_fragment" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/callLogsList"
|
|
||||||
android:layout_below="@id/top_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/empty_list_font"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:text="@string/no_call_history"
|
|
||||||
android:visibility="@{viewModel.callLogs.empty && !viewModel.missedCallLogsSelected ? View.VISIBLE : View.GONE}" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/empty_list_font"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerInParent="true"
|
|
||||||
android:text="@string/no_missed_call_history"
|
|
||||||
android:visibility="@{viewModel.missedCallLogs.empty && viewModel.missedCallLogsSelected ? View.VISIBLE : View.GONE}" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="1dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/dividerColor" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/history_nav_container"
|
|
||||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:defaultNavHost="false"
|
|
||||||
app:navGraph="@navigation/history_nav_graph"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</layout>
|
|
|
@ -23,18 +23,9 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_above="@id/tabs_fragment"
|
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|
|
@ -26,18 +26,9 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_above="@id/tabs_fragment"
|
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|
|
@ -33,14 +33,6 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/grey_color">
|
android:background="@color/grey_color">
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:visibility="@{viewModel.showPreview ? View.GONE : View.VISIBLE}"
|
android:visibility="@{viewModel.showPreview ? View.GONE : View.VISIBLE}"
|
||||||
android:layout_width="400dp"
|
android:layout_width="400dp"
|
||||||
|
@ -75,7 +67,7 @@
|
||||||
android:layout_height="460dp"
|
android:layout_height="460dp"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginBottom="50dp"
|
android:layout_marginBottom="50dp"
|
||||||
android:layout_above="@id/tabs_fragment"
|
android:layout_alignParentBottom="true"
|
||||||
android:background="?attr/backgroundColor">
|
android:background="?attr/backgroundColor">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|
|
@ -1,191 +0,0 @@
|
||||||
<?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"
|
|
||||||
xmlns:bind="http://schemas.android.com/tools">
|
|
||||||
|
|
||||||
<data>
|
|
||||||
<import type="android.view.View"/>
|
|
||||||
<variable
|
|
||||||
name="backClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="newContactClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="contactClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="viewModel"
|
|
||||||
type="org.linphone.activities.main.history.viewmodels.CallLogViewModel" />
|
|
||||||
</data>
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/top_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:background="?attr/lightToolbarBackgroundColor"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/back"
|
|
||||||
android:onClick="@{backClickListener}"
|
|
||||||
android:contentDescription="@string/content_description_go_back"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="18dp"
|
|
||||||
android:src="@drawable/back" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.6" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{newContactClickListener}"
|
|
||||||
android:visibility="@{viewModel.contact != null ? View.GONE : View.VISIBLE}"
|
|
||||||
android:contentDescription="@string/content_description_add_contact"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/contact_add" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{contactClickListener}"
|
|
||||||
android:visibility="@{viewModel.contact == null ? View.GONE : View.VISIBLE}"
|
|
||||||
android:contentDescription="@string/content_description_go_to_contact"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/contact" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@id/top_bar"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingTop="20dp"
|
|
||||||
android:paddingBottom="5dp">
|
|
||||||
|
|
||||||
<org.linphone.contact.BigContactAvatarView
|
|
||||||
android:id="@+id/avatar"
|
|
||||||
android:layout_width="100dp"
|
|
||||||
android:layout_height="100dp"
|
|
||||||
android:gravity="center"
|
|
||||||
bind:layout="@layout/contact_avatar_big"
|
|
||||||
app:viewModel="@{viewModel}"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:text="@{viewModel.contact.fullName ?? viewModel.displayName}"
|
|
||||||
style="@style/big_contact_name_font"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_horizontal" />
|
|
||||||
|
|
||||||
<org.linphone.views.MarqueeTextView
|
|
||||||
android:text="@{viewModel.peerSipUri}"
|
|
||||||
style="@style/sip_uri_font"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{() -> viewModel.startCall()}"
|
|
||||||
android:contentDescription="@string/content_description_start_call"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:background="@drawable/round_orange_button_background"
|
|
||||||
android:src="@drawable/call_start_default" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{() -> viewModel.startChat(false)}"
|
|
||||||
android:contentDescription="@string/content_description_start_chat"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:background="@drawable/round_orange_button_background"
|
|
||||||
android:src="@drawable/chat_start_default" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:onClick="@{() -> viewModel.startChat(true)}"
|
|
||||||
android:visibility="@{viewModel.secureChatAllowed ? View.VISIBLE : View.GONE}"
|
|
||||||
android:layout_width="65dp"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_margin="10dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:contentDescription="@string/content_description_start_encrypted_chat"
|
|
||||||
android:background="@drawable/round_orange_button_background"
|
|
||||||
android:src="@drawable/chat_start_default" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="20dp"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:contentDescription="@string/content_description_start_encrypted_chat"
|
|
||||||
android:src="@drawable/security_toogle_icon_green" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="?attr/dividerColor" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/assistant_input_field_header_font"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:text="@string/history_calls_list"
|
|
||||||
android:textAllCaps="true" />
|
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:entries="@{viewModel.callsHistory}"
|
|
||||||
app:layout="@{@layout/history_detail_cell}"/>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/wait_layout"
|
|
||||||
bind:visibility="@{viewModel.waitForChatRoomCreation}"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</layout>
|
|
|
@ -23,18 +23,9 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_above="@id/tabs_fragment"
|
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|
|
@ -22,14 +22,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/top_bar"
|
android:id="@+id/top_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -86,7 +78,6 @@
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/chatList"
|
android:id="@+id/chatList"
|
||||||
android:layout_above="@id/tabs_fragment"
|
|
||||||
android:layout_below="@id/top_bar"
|
android:layout_below="@id/top_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
|
@ -26,14 +26,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/top_bar"
|
android:id="@+id/top_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -147,7 +139,6 @@
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/contactsList"
|
android:id="@+id/contactsList"
|
||||||
android:layout_above="@id/tabs_fragment"
|
|
||||||
android:layout_below="@id/searchBar"
|
android:layout_below="@id/searchBar"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -32,14 +32,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/address_bar"
|
android:id="@+id/address_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -82,7 +74,7 @@
|
||||||
android:id="@+id/controls"
|
android:id="@+id/controls"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_above="@id/tabs_fragment">
|
android:layout_alignParentBottom="true">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:onClick="@{newContactClickListener}"
|
android:onClick="@{newContactClickListener}"
|
||||||
|
|
|
@ -23,14 +23,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
|
||||||
android:id="@+id/tabs_fragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
tools:layout="@layout/tabs_fragment" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/top_bar"
|
android:id="@+id/top_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -116,7 +108,6 @@
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/callLogsList"
|
android:id="@+id/callLogsList"
|
||||||
android:layout_below="@id/top_bar"
|
android:layout_below="@id/top_bar"
|
||||||
android:layout_above="@id/tabs_fragment"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
|
|
@ -37,14 +37,28 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@id/status_fragment">
|
android:layout_below="@id/status_fragment">
|
||||||
|
|
||||||
<androidx.fragment.app.FragmentContainerView
|
<RelativeLayout
|
||||||
android:id="@+id/nav_host_fragment"
|
|
||||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:layout_below="@id/status_fragment"
|
|
||||||
app:defaultNavHost="true"
|
<androidx.fragment.app.FragmentContainerView
|
||||||
app:navGraph="@navigation/main_nav_graph" />
|
android:id="@+id/nav_host_fragment"
|
||||||
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_above="@id/tabs_fragment"
|
||||||
|
app:defaultNavHost="true"
|
||||||
|
app:navGraph="@navigation/main_nav_graph" />
|
||||||
|
|
||||||
|
<androidx.fragment.app.FragmentContainerView
|
||||||
|
android:id="@+id/tabs_fragment"
|
||||||
|
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
tools:layout="@layout/tabs_fragment" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<!-- Side Menu -->
|
<!-- Side Menu -->
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
|
Loading…
Reference in a new issue