Reworked app to use SlidingPane and simplify navigation
This commit is contained in:
parent
bac8d8e4e8
commit
41a15cf6ee
68 changed files with 1096 additions and 2413 deletions
|
@ -235,13 +235,16 @@ dependencies {
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.3.0'
|
implementation 'androidx.appcompat:appcompat:1.3.0'
|
||||||
implementation 'androidx.media:media:1.2.0'
|
implementation 'androidx.media:media:1.2.0'
|
||||||
implementation 'androidx.fragment:fragment-ktx:1.3.4'
|
implementation 'androidx.fragment:fragment-ktx:1.4.0-alpha03'
|
||||||
implementation 'androidx.core:core-ktx:1.6.0-beta02'
|
implementation 'androidx.core:core-ktx:1.6.0-rc01'
|
||||||
|
|
||||||
def nav_version = "2.3.5"
|
def nav_version = "2.3.5"
|
||||||
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
|
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
|
||||||
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
|
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
|
||||||
|
|
||||||
|
implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0-alpha02"
|
||||||
|
implementation "androidx.window:window:1.0.0-alpha08"
|
||||||
|
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
|
||||||
|
|
|
@ -23,13 +23,20 @@ import android.annotation.SuppressLint
|
||||||
import android.content.pm.ActivityInfo
|
import android.content.pm.ActivityInfo
|
||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.os.Handler
|
||||||
|
import android.os.Looper
|
||||||
import android.util.DisplayMetrics
|
import android.util.DisplayMetrics
|
||||||
import android.view.Display
|
import android.view.Display
|
||||||
import android.view.Surface
|
import android.view.Surface
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
|
import androidx.core.util.Consumer
|
||||||
import androidx.navigation.ActivityNavigator
|
import androidx.navigation.ActivityNavigator
|
||||||
|
import androidx.window.FoldingFeature
|
||||||
|
import androidx.window.WindowLayoutInfo
|
||||||
|
import androidx.window.WindowManager
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
import java.util.concurrent.Executor
|
||||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||||
import org.linphone.LinphoneApplication.Companion.corePreferences
|
import org.linphone.LinphoneApplication.Companion.corePreferences
|
||||||
import org.linphone.LinphoneApplication.Companion.ensureCoreExists
|
import org.linphone.LinphoneApplication.Companion.ensureCoreExists
|
||||||
|
@ -42,10 +49,57 @@ abstract class GenericActivity : AppCompatActivity() {
|
||||||
val isDestructionPending: Boolean
|
val isDestructionPending: Boolean
|
||||||
get() = _isDestructionPending
|
get() = _isDestructionPending
|
||||||
|
|
||||||
|
private lateinit var windowManagerX: WindowManager
|
||||||
|
|
||||||
|
inner class LayoutStateChangeCallback : Consumer<WindowLayoutInfo> {
|
||||||
|
override fun accept(newLayoutInfo: WindowLayoutInfo) {
|
||||||
|
Log.i("[Layout State Change] $newLayoutInfo")
|
||||||
|
|
||||||
|
if (newLayoutInfo.displayFeatures.isEmpty()) {
|
||||||
|
onLayoutChanges(null)
|
||||||
|
} else {
|
||||||
|
for (feature in newLayoutInfo.displayFeatures) {
|
||||||
|
val foldingFeature = feature as? FoldingFeature
|
||||||
|
if (foldingFeature != null) {
|
||||||
|
onLayoutChanges(foldingFeature)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private val layoutStateChangeCallback = LayoutStateChangeCallback()
|
||||||
|
|
||||||
|
private fun runOnUiThreadExecutor(): Executor {
|
||||||
|
val handler = Handler(Looper.getMainLooper())
|
||||||
|
return Executor() {
|
||||||
|
handler.post(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onAttachedToWindow() {
|
||||||
|
super.onAttachedToWindow()
|
||||||
|
|
||||||
|
windowManagerX.registerLayoutChangeCallback(
|
||||||
|
runOnUiThreadExecutor(),
|
||||||
|
layoutStateChangeCallback
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDetachedFromWindow() {
|
||||||
|
super.onDetachedFromWindow()
|
||||||
|
|
||||||
|
windowManagerX.unregisterLayoutChangeCallback(layoutStateChangeCallback)
|
||||||
|
}
|
||||||
|
|
||||||
|
open fun onLayoutChanges(foldingFeature: FoldingFeature?) {
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressLint("SourceLockedOrientationActivity")
|
@SuppressLint("SourceLockedOrientationActivity")
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
windowManagerX = WindowManager(this)
|
||||||
|
|
||||||
ensureCoreExists(applicationContext)
|
ensureCoreExists(applicationContext)
|
||||||
|
|
||||||
requestedOrientation = if (corePreferences.forcePortrait) {
|
requestedOrientation = if (corePreferences.forcePortrait) {
|
||||||
|
|
|
@ -23,14 +23,23 @@ import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import androidx.activity.OnBackPressedCallback
|
||||||
|
import androidx.activity.addCallback
|
||||||
import androidx.databinding.DataBindingUtil
|
import androidx.databinding.DataBindingUtil
|
||||||
import androidx.databinding.ViewDataBinding
|
import androidx.databinding.ViewDataBinding
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
|
import androidx.navigation.fragment.findNavController
|
||||||
|
|
||||||
abstract class GenericFragment<T : ViewDataBinding> : Fragment() {
|
abstract class GenericFragment<T : ViewDataBinding> : Fragment() {
|
||||||
private var _binding: T? = null
|
private var _binding: T? = null
|
||||||
protected val binding get() = _binding!!
|
protected val binding get() = _binding!!
|
||||||
|
|
||||||
|
private val onBackPressedCallback = object : OnBackPressedCallback(true) {
|
||||||
|
override fun handleOnBackPressed() {
|
||||||
|
goBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
abstract fun getLayoutId(): Int
|
abstract fun getLayoutId(): Int
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
|
@ -42,8 +51,23 @@ abstract class GenericFragment<T : ViewDataBinding> : Fragment() {
|
||||||
return _binding!!.root
|
return _binding!!.root
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
requireActivity().onBackPressedDispatcher.addCallback(this, onBackPressedCallback)
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
_binding = null
|
_binding = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected open fun goBack() {
|
||||||
|
if (!findNavController().popBackStack()) {
|
||||||
|
if (!findNavController().navigateUp()) {
|
||||||
|
onBackPressedCallback.isEnabled = false
|
||||||
|
requireActivity().onBackPressed()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,11 +50,7 @@ import org.linphone.contact.NativeContact
|
||||||
import org.linphone.core.Address
|
import org.linphone.core.Address
|
||||||
|
|
||||||
internal fun Fragment.findMasterNavController(): NavController {
|
internal fun Fragment.findMasterNavController(): NavController {
|
||||||
return if (!resources.getBoolean(R.bool.isTablet)) {
|
return parentFragment?.parentFragment?.findNavController() ?: findNavController()
|
||||||
findNavController()
|
|
||||||
} else {
|
|
||||||
parentFragment?.parentFragment?.findNavController() ?: findNavController()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getRightToLeftAnimationNavOptions(
|
fun getRightToLeftAnimationNavOptions(
|
||||||
|
@ -149,6 +145,16 @@ fun getLeftTopToRightBottomNoPopAnimationNavOptions(
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun popupTo(
|
||||||
|
popUpTo: Int = -1,
|
||||||
|
popUpInclusive: Boolean = false,
|
||||||
|
singleTop: Boolean = true
|
||||||
|
): NavOptions {
|
||||||
|
val builder = NavOptions.Builder()
|
||||||
|
builder.setPopUpTo(popUpTo, popUpInclusive).setLaunchSingleTop(singleTop)
|
||||||
|
return builder.build()
|
||||||
|
}
|
||||||
|
|
||||||
/* Main activity related */
|
/* Main activity related */
|
||||||
|
|
||||||
internal fun MainActivity.navigateToDialer(args: Bundle?) {
|
internal fun MainActivity.navigateToDialer(args: Bundle?) {
|
||||||
|
@ -263,21 +269,20 @@ internal fun DialerFragment.navigateToConfigFileViewer() {
|
||||||
/* Chat related */
|
/* Chat related */
|
||||||
|
|
||||||
internal fun MasterChatRoomsFragment.navigateToChatRoom(args: Bundle) {
|
internal fun MasterChatRoomsFragment.navigateToChatRoom(args: Bundle) {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
val navHostFragment =
|
||||||
if (findNavController().currentDestination?.id == R.id.masterChatRoomsFragment) {
|
childFragmentManager.findFragmentById(R.id.chat_nav_container) as NavHostFragment
|
||||||
findNavController().navigate(
|
val previousBackStackEntry = navHostFragment.navController.currentBackStackEntry
|
||||||
R.id.action_masterChatRoomsFragment_to_detailChatRoomFragment,
|
if (previousBackStackEntry == null || previousBackStackEntry.destination.id == R.id.emptyChatFragment) {
|
||||||
args,
|
|
||||||
getRightToLeftAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val navHostFragment =
|
|
||||||
childFragmentManager.findFragmentById(R.id.chat_nav_container) as NavHostFragment
|
|
||||||
navHostFragment.navController.navigate(
|
navHostFragment.navController.navigate(
|
||||||
R.id.action_global_detailChatRoomFragment,
|
R.id.action_global_detailChatRoomFragment,
|
||||||
args,
|
args,
|
||||||
getRightToLeftAnimationNavOptions(R.id.emptyChatFragment, true)
|
popupTo(R.id.emptyChatFragment, true)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
navHostFragment.navController.navigate(
|
||||||
|
R.id.action_global_detailChatRoomFragment,
|
||||||
|
args,
|
||||||
|
popupTo(R.id.chatRoomCreationFragment, true)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -286,21 +291,20 @@ internal fun MasterChatRoomsFragment.navigateToChatRoomCreation(
|
||||||
createGroupChatRoom: Boolean = false
|
createGroupChatRoom: Boolean = false
|
||||||
) {
|
) {
|
||||||
val bundle = bundleOf("createGroup" to createGroupChatRoom)
|
val bundle = bundleOf("createGroup" to createGroupChatRoom)
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
val navHostFragment =
|
||||||
if (findNavController().currentDestination?.id == R.id.masterChatRoomsFragment) {
|
childFragmentManager.findFragmentById(R.id.chat_nav_container) as NavHostFragment
|
||||||
findNavController().navigate(
|
val previousBackStackEntry = navHostFragment.navController.currentBackStackEntry
|
||||||
R.id.action_masterChatRoomsFragment_to_chatRoomCreationFragment,
|
if (previousBackStackEntry == null || previousBackStackEntry.destination.id == R.id.emptyChatFragment) {
|
||||||
bundle,
|
|
||||||
getRightToLeftAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val navHostFragment =
|
|
||||||
childFragmentManager.findFragmentById(R.id.chat_nav_container) as NavHostFragment
|
|
||||||
navHostFragment.navController.navigate(
|
navHostFragment.navController.navigate(
|
||||||
R.id.action_global_chatRoomCreationFragment,
|
R.id.action_global_chatRoomCreationFragment,
|
||||||
bundle,
|
bundle,
|
||||||
getRightToLeftAnimationNavOptions(R.id.emptyChatFragment, true)
|
popupTo(R.id.emptyChatFragment, true)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
navHostFragment.navController.navigate(
|
||||||
|
R.id.action_global_chatRoomCreationFragment,
|
||||||
|
bundle,
|
||||||
|
popupTo(R.id.detailChatRoomFragment, true)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -310,14 +314,6 @@ internal fun DetailChatRoomFragment.navigateToContacts(sipUriToAdd: String) {
|
||||||
findMasterNavController().navigate(Uri.parse(deepLink), getLeftToRightAnimationNavOptions())
|
findMasterNavController().navigate(Uri.parse(deepLink), getLeftToRightAnimationNavOptions())
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun DetailChatRoomFragment.navigateToChatRooms() {
|
|
||||||
findMasterNavController().navigate(
|
|
||||||
R.id.action_global_masterChatRoomsFragment,
|
|
||||||
null,
|
|
||||||
getLeftToRightAnimationNavOptions(R.id.masterChatRoomsFragment)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
internal fun DetailChatRoomFragment.navigateToImdn(args: Bundle?) {
|
internal fun DetailChatRoomFragment.navigateToImdn(args: Bundle?) {
|
||||||
if (findNavController().currentDestination?.id == R.id.detailChatRoomFragment) {
|
if (findNavController().currentDestination?.id == R.id.detailChatRoomFragment) {
|
||||||
findNavController().navigate(
|
findNavController().navigate(
|
||||||
|
@ -415,19 +411,11 @@ internal fun ChatRoomCreationFragment.navigateToGroupInfo() {
|
||||||
|
|
||||||
internal fun ChatRoomCreationFragment.navigateToChatRoom(args: Bundle) {
|
internal fun ChatRoomCreationFragment.navigateToChatRoom(args: Bundle) {
|
||||||
if (findNavController().currentDestination?.id == R.id.chatRoomCreationFragment) {
|
if (findNavController().currentDestination?.id == R.id.chatRoomCreationFragment) {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
findNavController().navigate(
|
||||||
findNavController().navigate(
|
R.id.action_chatRoomCreationFragment_to_detailChatRoomFragment,
|
||||||
R.id.action_chatRoomCreationFragment_to_detailChatRoomFragment,
|
args,
|
||||||
args,
|
getRightToLeftAnimationNavOptions(R.id.emptyFragment, true)
|
||||||
getRightToLeftAnimationNavOptions()
|
)
|
||||||
)
|
|
||||||
} else {
|
|
||||||
findNavController().navigate(
|
|
||||||
R.id.action_chatRoomCreationFragment_to_detailChatRoomFragment,
|
|
||||||
args,
|
|
||||||
getRightToLeftAnimationNavOptions(R.id.emptyFragment, true)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,59 +430,37 @@ internal fun GroupInfoFragment.navigateToChatRoomCreation(args: Bundle?) {
|
||||||
|
|
||||||
internal fun GroupInfoFragment.navigateToChatRoom(args: Bundle?) {
|
internal fun GroupInfoFragment.navigateToChatRoom(args: Bundle?) {
|
||||||
if (findNavController().currentDestination?.id == R.id.groupInfoFragment) {
|
if (findNavController().currentDestination?.id == R.id.groupInfoFragment) {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
findNavController().navigate(
|
||||||
findNavController().navigate(
|
R.id.action_groupInfoFragment_to_detailChatRoomFragment,
|
||||||
R.id.action_groupInfoFragment_to_detailChatRoomFragment,
|
args,
|
||||||
args,
|
getRightToLeftAnimationNavOptions(R.id.emptyFragment, true)
|
||||||
getRightToLeftAnimationNavOptions()
|
)
|
||||||
)
|
|
||||||
} else {
|
|
||||||
findNavController().navigate(
|
|
||||||
R.id.action_groupInfoFragment_to_detailChatRoomFragment,
|
|
||||||
args,
|
|
||||||
getRightToLeftAnimationNavOptions(R.id.emptyFragment, true)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Contacts related */
|
/* Contacts related */
|
||||||
|
|
||||||
internal fun MasterContactsFragment.navigateToContact() {
|
internal fun MasterContactsFragment.navigateToContact() {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
if (findNavController().currentDestination?.id == R.id.masterContactsFragment) {
|
||||||
if (findNavController().currentDestination?.id == R.id.masterContactsFragment) {
|
|
||||||
findNavController().navigate(R.id.action_masterContactsFragment_to_detailContactFragment,
|
|
||||||
null,
|
|
||||||
getRightToLeftAnimationNavOptions())
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val navHostFragment =
|
val navHostFragment =
|
||||||
childFragmentManager.findFragmentById(R.id.contacts_nav_container) as NavHostFragment
|
childFragmentManager.findFragmentById(R.id.contacts_nav_container) as NavHostFragment
|
||||||
navHostFragment.navController.navigate(
|
navHostFragment.navController.navigate(
|
||||||
R.id.action_global_detailContactFragment,
|
R.id.action_global_detailContactFragment,
|
||||||
null,
|
null,
|
||||||
getRightToLeftAnimationNavOptions(R.id.emptyContactFragment, true)
|
popupTo(R.id.emptyContactFragment, true)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun MasterContactsFragment.navigateToContactEditor(sipUriToAdd: String? = null) {
|
internal fun MasterContactsFragment.navigateToContactEditor(sipUriToAdd: String? = null) {
|
||||||
val bundle = if (sipUriToAdd != null) bundleOf("SipUri" to sipUriToAdd) else Bundle()
|
if (findNavController().currentDestination?.id == R.id.masterContactsFragment) {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
val bundle = if (sipUriToAdd != null) bundleOf("SipUri" to sipUriToAdd) else Bundle()
|
||||||
if (findNavController().currentDestination?.id == R.id.masterContactsFragment) {
|
|
||||||
findNavController().navigate(
|
|
||||||
R.id.action_masterContactsFragment_to_contactEditorFragment,
|
|
||||||
bundle,
|
|
||||||
getRightToLeftAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val navHostFragment =
|
val navHostFragment =
|
||||||
childFragmentManager.findFragmentById(R.id.contacts_nav_container) as NavHostFragment
|
childFragmentManager.findFragmentById(R.id.contacts_nav_container) as NavHostFragment
|
||||||
navHostFragment.navController.navigate(
|
navHostFragment.navController.navigate(
|
||||||
R.id.action_global_contactEditorFragment,
|
R.id.action_global_contactEditorFragment,
|
||||||
bundle,
|
bundle,
|
||||||
getRightToLeftAnimationNavOptions()
|
popupTo()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -505,24 +471,16 @@ internal fun ContactEditorFragment.navigateToContact(contact: NativeContact) {
|
||||||
findNavController().navigate(
|
findNavController().navigate(
|
||||||
R.id.action_contactEditorFragment_to_detailContactFragment,
|
R.id.action_contactEditorFragment_to_detailContactFragment,
|
||||||
bundle,
|
bundle,
|
||||||
getRightToLeftAnimationNavOptions(R.id.masterContactsFragment, false)
|
popupTo(R.id.masterContactsFragment, false)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun DetailContactFragment.navigateToChatRoom(args: Bundle?) {
|
internal fun DetailContactFragment.navigateToChatRoom(args: Bundle?) {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
findMasterNavController().navigate(
|
||||||
findNavController().navigate(
|
R.id.action_global_masterChatRoomsFragment,
|
||||||
R.id.action_detailContactFragment_to_detailChatRoomFragment,
|
args,
|
||||||
args,
|
getRightBottomToLeftTopAnimationNavOptions()
|
||||||
getRightBottomToLeftTopAnimationNavOptions()
|
)
|
||||||
)
|
|
||||||
} else {
|
|
||||||
findMasterNavController().navigate(
|
|
||||||
R.id.action_global_masterChatRoomsFragment,
|
|
||||||
args,
|
|
||||||
getRightBottomToLeftTopAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun DetailContactFragment.navigateToDialer(args: Bundle?) {
|
internal fun DetailContactFragment.navigateToDialer(args: Bundle?) {
|
||||||
|
@ -538,7 +496,7 @@ internal fun DetailContactFragment.navigateToContactEditor() {
|
||||||
findNavController().navigate(
|
findNavController().navigate(
|
||||||
R.id.action_detailContactFragment_to_contactEditorFragment,
|
R.id.action_detailContactFragment_to_contactEditorFragment,
|
||||||
null,
|
null,
|
||||||
getRightToLeftAnimationNavOptions()
|
popupTo()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -546,21 +504,13 @@ internal fun DetailContactFragment.navigateToContactEditor() {
|
||||||
/* History related */
|
/* History related */
|
||||||
|
|
||||||
internal fun MasterCallLogsFragment.navigateToCallHistory() {
|
internal fun MasterCallLogsFragment.navigateToCallHistory() {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
if (findNavController().currentDestination?.id == R.id.masterCallLogsFragment) {
|
||||||
if (findNavController().currentDestination?.id == R.id.masterCallLogsFragment) {
|
|
||||||
findNavController().navigate(
|
|
||||||
R.id.action_masterCallLogsFragment_to_detailCallLogFragment,
|
|
||||||
null,
|
|
||||||
getRightToLeftAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val navHostFragment =
|
val navHostFragment =
|
||||||
childFragmentManager.findFragmentById(R.id.history_nav_container) as NavHostFragment
|
childFragmentManager.findFragmentById(R.id.history_nav_container) as NavHostFragment
|
||||||
navHostFragment.navController.navigate(
|
navHostFragment.navController.navigate(
|
||||||
R.id.action_global_detailCallLogFragment,
|
R.id.action_global_detailCallLogFragment,
|
||||||
null,
|
null,
|
||||||
getRightToLeftAnimationNavOptions(R.id.emptyFragment, true)
|
popupTo(R.id.emptyFragment, true)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -579,18 +529,8 @@ internal fun DetailCallLogFragment.navigateToContacts(sipUriToAdd: String) {
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun DetailCallLogFragment.navigateToContact(contact: NativeContact) {
|
internal fun DetailCallLogFragment.navigateToContact(contact: NativeContact) {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
val deepLink = "linphone-android://contact/view/${contact.nativeId}"
|
||||||
val args = Bundle()
|
findMasterNavController().navigate(Uri.parse(deepLink), getRightBottomToLeftTopAnimationNavOptions())
|
||||||
args.putString("id", contact.nativeId)
|
|
||||||
findMasterNavController().navigate(
|
|
||||||
R.id.action_detailCallLogFragment_to_detailContactFragment,
|
|
||||||
args,
|
|
||||||
getRightBottomToLeftTopAnimationNavOptions()
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
val deepLink = "linphone-android://contact/view/${contact.nativeId}"
|
|
||||||
findMasterNavController().navigate(Uri.parse(deepLink), getRightBottomToLeftTopAnimationNavOptions())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun DetailCallLogFragment.navigateToFriend(friendAddress: Address) {
|
internal fun DetailCallLogFragment.navigateToFriend(friendAddress: Address) {
|
||||||
|
@ -599,19 +539,11 @@ internal fun DetailCallLogFragment.navigateToFriend(friendAddress: Address) {
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun DetailCallLogFragment.navigateToChatRoom(args: Bundle?) {
|
internal fun DetailCallLogFragment.navigateToChatRoom(args: Bundle?) {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
findMasterNavController().navigate(
|
||||||
findNavController().navigate(
|
R.id.action_global_masterChatRoomsFragment,
|
||||||
R.id.action_detailCallLogFragment_to_detailChatRoomFragment,
|
args,
|
||||||
args,
|
getRightBottomToLeftTopAnimationNavOptions()
|
||||||
getRightBottomToLeftTopAnimationNavOptions()
|
)
|
||||||
)
|
|
||||||
} else {
|
|
||||||
findMasterNavController().navigate(
|
|
||||||
R.id.action_global_masterChatRoomsFragment,
|
|
||||||
args,
|
|
||||||
getRightBottomToLeftTopAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun DetailCallLogFragment.navigateToDialer(args: Bundle?) {
|
internal fun DetailCallLogFragment.navigateToDialer(args: Bundle?) {
|
||||||
|
@ -625,182 +557,110 @@ internal fun DetailCallLogFragment.navigateToDialer(args: Bundle?) {
|
||||||
/* Settings related */
|
/* Settings related */
|
||||||
|
|
||||||
internal fun SettingsFragment.navigateToAccountSettings(identity: String) {
|
internal fun SettingsFragment.navigateToAccountSettings(identity: String) {
|
||||||
val bundle = bundleOf("Identity" to identity)
|
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
val bundle = bundleOf("Identity" to identity)
|
||||||
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
|
||||||
findNavController().navigate(
|
|
||||||
R.id.action_settingsFragment_to_accountSettingsFragment,
|
|
||||||
bundle,
|
|
||||||
getRightToLeftAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val navHostFragment =
|
val navHostFragment =
|
||||||
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
||||||
navHostFragment.navController.navigate(
|
navHostFragment.navController.navigate(
|
||||||
R.id.action_global_accountSettingsFragment,
|
R.id.action_global_accountSettingsFragment,
|
||||||
bundle,
|
bundle,
|
||||||
getRightToLeftAnimationNavOptions()
|
popupTo()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun SettingsFragment.navigateToTunnelSettings() {
|
internal fun SettingsFragment.navigateToTunnelSettings() {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
||||||
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
|
||||||
findNavController().navigate(
|
|
||||||
R.id.action_settingsFragment_to_tunnelSettingsFragment,
|
|
||||||
null,
|
|
||||||
getRightToLeftAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val navHostFragment =
|
val navHostFragment =
|
||||||
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
||||||
navHostFragment.navController.navigate(
|
navHostFragment.navController.navigate(
|
||||||
R.id.action_global_tunnelSettingsFragment,
|
R.id.action_global_tunnelSettingsFragment,
|
||||||
null,
|
null,
|
||||||
getRightToLeftAnimationNavOptions()
|
popupTo()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun SettingsFragment.navigateToAudioSettings() {
|
internal fun SettingsFragment.navigateToAudioSettings() {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
||||||
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
|
||||||
findNavController().navigate(
|
|
||||||
R.id.action_settingsFragment_to_audioSettingsFragment,
|
|
||||||
null,
|
|
||||||
getRightToLeftAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val navHostFragment =
|
val navHostFragment =
|
||||||
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
||||||
navHostFragment.navController.navigate(
|
navHostFragment.navController.navigate(
|
||||||
R.id.action_global_audioSettingsFragment,
|
R.id.action_global_audioSettingsFragment,
|
||||||
null,
|
null,
|
||||||
getRightToLeftAnimationNavOptions()
|
popupTo()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun SettingsFragment.navigateToVideoSettings() {
|
internal fun SettingsFragment.navigateToVideoSettings() {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
||||||
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
|
||||||
findNavController().navigate(
|
|
||||||
R.id.action_settingsFragment_to_videoSettingsFragment,
|
|
||||||
null,
|
|
||||||
getRightToLeftAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val navHostFragment =
|
val navHostFragment =
|
||||||
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
||||||
navHostFragment.navController.navigate(
|
navHostFragment.navController.navigate(
|
||||||
R.id.action_global_videoSettingsFragment,
|
R.id.action_global_videoSettingsFragment,
|
||||||
null,
|
null,
|
||||||
getRightToLeftAnimationNavOptions()
|
popupTo()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun SettingsFragment.navigateToCallSettings() {
|
internal fun SettingsFragment.navigateToCallSettings() {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
||||||
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
|
||||||
findNavController().navigate(
|
|
||||||
R.id.action_settingsFragment_to_callSettingsFragment,
|
|
||||||
null,
|
|
||||||
getRightToLeftAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val navHostFragment =
|
val navHostFragment =
|
||||||
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
||||||
navHostFragment.navController.navigate(
|
navHostFragment.navController.navigate(
|
||||||
R.id.action_global_callSettingsFragment,
|
R.id.action_global_callSettingsFragment,
|
||||||
null,
|
null,
|
||||||
getRightToLeftAnimationNavOptions()
|
popupTo()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun SettingsFragment.navigateToChatSettings() {
|
internal fun SettingsFragment.navigateToChatSettings() {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
||||||
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
|
||||||
findNavController().navigate(
|
|
||||||
R.id.action_settingsFragment_to_chatSettingsFragment,
|
|
||||||
null,
|
|
||||||
getRightToLeftAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val navHostFragment =
|
val navHostFragment =
|
||||||
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
||||||
navHostFragment.navController.navigate(
|
navHostFragment.navController.navigate(
|
||||||
R.id.action_global_chatSettingsFragment,
|
R.id.action_global_chatSettingsFragment,
|
||||||
null,
|
null,
|
||||||
getRightToLeftAnimationNavOptions()
|
popupTo()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun SettingsFragment.navigateToNetworkSettings() {
|
internal fun SettingsFragment.navigateToNetworkSettings() {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
||||||
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
|
||||||
findNavController().navigate(
|
|
||||||
R.id.action_settingsFragment_to_networkSettingsFragment,
|
|
||||||
null,
|
|
||||||
getRightToLeftAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val navHostFragment =
|
val navHostFragment =
|
||||||
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
||||||
navHostFragment.navController.navigate(
|
navHostFragment.navController.navigate(
|
||||||
R.id.action_global_networkSettingsFragment,
|
R.id.action_global_networkSettingsFragment,
|
||||||
null,
|
null,
|
||||||
getRightToLeftAnimationNavOptions()
|
popupTo()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun SettingsFragment.navigateToContactsSettings() {
|
internal fun SettingsFragment.navigateToContactsSettings() {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
||||||
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
|
||||||
findNavController().navigate(
|
|
||||||
R.id.action_settingsFragment_to_contactsSettingsFragment,
|
|
||||||
null,
|
|
||||||
getRightToLeftAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val navHostFragment =
|
val navHostFragment =
|
||||||
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
||||||
navHostFragment.navController.navigate(
|
navHostFragment.navController.navigate(
|
||||||
R.id.action_global_contactsSettingsFragment,
|
R.id.action_global_contactsSettingsFragment,
|
||||||
null,
|
null,
|
||||||
getRightToLeftAnimationNavOptions()
|
popupTo()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun SettingsFragment.navigateToAdvancedSettings() {
|
internal fun SettingsFragment.navigateToAdvancedSettings() {
|
||||||
if (!resources.getBoolean(R.bool.isTablet)) {
|
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
||||||
if (findNavController().currentDestination?.id == R.id.settingsFragment) {
|
|
||||||
findNavController().navigate(
|
|
||||||
R.id.action_settingsFragment_to_advancedSettingsFragment,
|
|
||||||
null,
|
|
||||||
getRightToLeftAnimationNavOptions()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
val navHostFragment =
|
val navHostFragment =
|
||||||
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
childFragmentManager.findFragmentById(R.id.settings_nav_container) as NavHostFragment
|
||||||
navHostFragment.navController.navigate(
|
navHostFragment.navController.navigate(
|
||||||
R.id.action_global_advancedSettingsFragment,
|
R.id.action_global_advancedSettingsFragment,
|
||||||
null,
|
null,
|
||||||
getRightToLeftAnimationNavOptions()
|
popupTo()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -810,7 +670,7 @@ internal fun AccountSettingsFragment.navigateToPhoneLinking(args: Bundle?) {
|
||||||
findNavController().navigate(
|
findNavController().navigate(
|
||||||
R.id.action_accountSettingsFragment_to_phoneAccountLinkingFragment,
|
R.id.action_accountSettingsFragment_to_phoneAccountLinkingFragment,
|
||||||
args,
|
args,
|
||||||
getRightToLeftAnimationNavOptions()
|
popupTo()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -820,7 +680,7 @@ internal fun PhoneAccountLinkingFragment.navigateToPhoneAccountValidation(args:
|
||||||
findNavController().navigate(
|
findNavController().navigate(
|
||||||
R.id.action_phoneAccountLinkingFragment_to_phoneAccountValidationFragment,
|
R.id.action_phoneAccountLinkingFragment_to_phoneAccountValidationFragment,
|
||||||
args,
|
args,
|
||||||
getRightToLeftAnimationNavOptions()
|
popupTo()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@ package org.linphone.activities.assistant.fragments
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.activity.addCallback
|
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import org.linphone.LinphoneApplication.Companion.corePreferences
|
import org.linphone.LinphoneApplication.Companion.corePreferences
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
|
@ -31,14 +30,6 @@ import org.linphone.databinding.AssistantTopBarFragmentBinding
|
||||||
class TopBarFragment : GenericFragment<AssistantTopBarFragmentBinding>() {
|
class TopBarFragment : GenericFragment<AssistantTopBarFragmentBinding>() {
|
||||||
override fun getLayoutId(): Int = R.layout.assistant_top_bar_fragment
|
override fun getLayoutId(): Int = R.layout.assistant_top_bar_fragment
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
|
|
||||||
requireActivity().onBackPressedDispatcher.addCallback(this) {
|
|
||||||
goBack()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
@ -49,7 +40,7 @@ class TopBarFragment : GenericFragment<AssistantTopBarFragmentBinding>() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun goBack() {
|
override fun goBack() {
|
||||||
if (!findNavController().popBackStack()) {
|
if (!findNavController().popBackStack()) {
|
||||||
requireActivity().finish()
|
requireActivity().finish()
|
||||||
if (corePreferences.enableAnimations) {
|
if (corePreferences.enableAnimations) {
|
||||||
|
|
|
@ -35,6 +35,7 @@ import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.navigation.NavController
|
import androidx.navigation.NavController
|
||||||
import androidx.navigation.NavDestination
|
import androidx.navigation.NavDestination
|
||||||
import androidx.navigation.findNavController
|
import androidx.navigation.findNavController
|
||||||
|
import androidx.window.FoldingFeature
|
||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import java.io.UnsupportedEncodingException
|
import java.io.UnsupportedEncodingException
|
||||||
import java.net.URLDecoder
|
import java.net.URLDecoder
|
||||||
|
@ -54,6 +55,7 @@ import org.linphone.contact.ContactsUpdatedListenerStub
|
||||||
import org.linphone.core.tools.Log
|
import org.linphone.core.tools.Log
|
||||||
import org.linphone.databinding.MainActivityBinding
|
import org.linphone.databinding.MainActivityBinding
|
||||||
import org.linphone.utils.AppUtils
|
import org.linphone.utils.AppUtils
|
||||||
|
import org.linphone.utils.Event
|
||||||
import org.linphone.utils.FileUtils
|
import org.linphone.utils.FileUtils
|
||||||
|
|
||||||
class MainActivity : GenericActivity(), SnackBarActivity, NavController.OnDestinationChangedListener {
|
class MainActivity : GenericActivity(), SnackBarActivity, NavController.OnDestinationChangedListener {
|
||||||
|
@ -81,6 +83,10 @@ class MainActivity : GenericActivity(), SnackBarActivity, NavController.OnDestin
|
||||||
private var initPosY = 0f
|
private var initPosY = 0f
|
||||||
private var overlay: View? = null
|
private var overlay: View? = null
|
||||||
|
|
||||||
|
override fun onLayoutChanges(foldingFeature: FoldingFeature?) {
|
||||||
|
sharedViewModel.layoutChangedEvent.value = Event(true)
|
||||||
|
}
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
@ -170,11 +176,19 @@ class MainActivity : GenericActivity(), SnackBarActivity, NavController.OnDestin
|
||||||
|
|
||||||
when (destination.id) {
|
when (destination.id) {
|
||||||
R.id.masterCallLogsFragment, R.id.masterContactsFragment, R.id.dialerFragment, R.id.masterChatRoomsFragment ->
|
R.id.masterCallLogsFragment, R.id.masterContactsFragment, R.id.dialerFragment, R.id.masterChatRoomsFragment ->
|
||||||
tabsFragment.visibility = View.VISIBLE
|
showTabsFragment()
|
||||||
else -> tabsFragment.visibility = View.GONE
|
else -> hideTabsFragment()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun showTabsFragment() {
|
||||||
|
tabsFragment.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
|
|
||||||
|
fun hideTabsFragment() {
|
||||||
|
tabsFragment.visibility = View.GONE
|
||||||
|
}
|
||||||
|
|
||||||
fun hideStatusFragment() {
|
fun hideStatusFragment() {
|
||||||
statusFragment.visibility = View.GONE
|
statusFragment.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@ import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.navigation.fragment.findNavController
|
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
import org.linphone.activities.main.fragments.SecureFragment
|
import org.linphone.activities.main.fragments.SecureFragment
|
||||||
import org.linphone.databinding.AboutFragmentBinding
|
import org.linphone.databinding.AboutFragmentBinding
|
||||||
|
@ -42,7 +41,7 @@ class AboutFragment : SecureFragment<AboutFragmentBinding>() {
|
||||||
viewModel = ViewModelProvider(this).get(AboutViewModel::class.java)
|
viewModel = ViewModelProvider(this).get(AboutViewModel::class.java)
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
binding.setBackClickListener { findNavController().popBackStack() }
|
binding.setBackClickListener { goBack() }
|
||||||
|
|
||||||
binding.setPrivacyPolicyClickListener {
|
binding.setPrivacyPolicyClickListener {
|
||||||
val browserIntent = Intent(
|
val browserIntent = Intent(
|
||||||
|
|
|
@ -37,6 +37,7 @@ import org.linphone.activities.navigateToGroupInfo
|
||||||
import org.linphone.core.tools.Log
|
import org.linphone.core.tools.Log
|
||||||
import org.linphone.databinding.ChatRoomCreationFragmentBinding
|
import org.linphone.databinding.ChatRoomCreationFragmentBinding
|
||||||
import org.linphone.utils.AppUtils
|
import org.linphone.utils.AppUtils
|
||||||
|
import org.linphone.utils.Event
|
||||||
import org.linphone.utils.PermissionHelper
|
import org.linphone.utils.PermissionHelper
|
||||||
|
|
||||||
class ChatRoomCreationFragment : SecureFragment<ChatRoomCreationFragmentBinding>() {
|
class ChatRoomCreationFragment : SecureFragment<ChatRoomCreationFragmentBinding>() {
|
||||||
|
@ -76,7 +77,7 @@ class ChatRoomCreationFragment : SecureFragment<ChatRoomCreationFragmentBinding>
|
||||||
binding.contactsList.addItemDecoration(AppUtils.getDividerDecoration(requireContext(), layoutManager))
|
binding.contactsList.addItemDecoration(AppUtils.getDividerDecoration(requireContext(), layoutManager))
|
||||||
|
|
||||||
binding.setBackClickListener {
|
binding.setBackClickListener {
|
||||||
findNavController().popBackStack()
|
goBack()
|
||||||
}
|
}
|
||||||
binding.back.visibility = if (resources.getBoolean(R.bool.isTablet)) View.INVISIBLE else View.VISIBLE
|
binding.back.visibility = if (resources.getBoolean(R.bool.isTablet)) View.INVISIBLE else View.VISIBLE
|
||||||
|
|
||||||
|
@ -146,6 +147,12 @@ class ChatRoomCreationFragment : SecureFragment<ChatRoomCreationFragmentBinding>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun goBack() {
|
||||||
|
if (!findNavController().popBackStack()) {
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.value = Event(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onRequestPermissionsResult(
|
override fun onRequestPermissionsResult(
|
||||||
requestCode: Int,
|
requestCode: Int,
|
||||||
permissions: Array<out String>,
|
permissions: Array<out String>,
|
||||||
|
|
|
@ -30,7 +30,6 @@ import android.view.MenuInflater
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.activity.addCallback
|
|
||||||
import androidx.appcompat.view.menu.MenuBuilder
|
import androidx.appcompat.view.menu.MenuBuilder
|
||||||
import androidx.appcompat.view.menu.MenuPopupHelper
|
import androidx.appcompat.view.menu.MenuPopupHelper
|
||||||
import androidx.core.content.FileProvider
|
import androidx.core.content.FileProvider
|
||||||
|
@ -55,7 +54,6 @@ import org.linphone.activities.main.chat.viewmodels.*
|
||||||
import org.linphone.activities.main.fragments.MasterFragment
|
import org.linphone.activities.main.fragments.MasterFragment
|
||||||
import org.linphone.activities.main.viewmodels.DialogViewModel
|
import org.linphone.activities.main.viewmodels.DialogViewModel
|
||||||
import org.linphone.activities.main.viewmodels.SharedMainViewModel
|
import org.linphone.activities.main.viewmodels.SharedMainViewModel
|
||||||
import org.linphone.activities.navigateToChatRooms
|
|
||||||
import org.linphone.activities.navigateToContacts
|
import org.linphone.activities.navigateToContacts
|
||||||
import org.linphone.activities.navigateToImageFileViewer
|
import org.linphone.activities.navigateToImageFileViewer
|
||||||
import org.linphone.activities.navigateToImdn
|
import org.linphone.activities.navigateToImdn
|
||||||
|
@ -94,14 +92,6 @@ class DetailChatRoomFragment : MasterFragment<ChatRoomDetailFragmentBinding, Cha
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
|
|
||||||
requireActivity().onBackPressedDispatcher.addCallback(this) {
|
|
||||||
goBack()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
@ -110,6 +100,7 @@ class DetailChatRoomFragment : MasterFragment<ChatRoomDetailFragmentBinding, Cha
|
||||||
sharedViewModel = requireActivity().run {
|
sharedViewModel = requireActivity().run {
|
||||||
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
}
|
}
|
||||||
|
binding.sharedMainViewModel = sharedViewModel
|
||||||
|
|
||||||
val localSipUri = arguments?.getString("LocalSipUri")
|
val localSipUri = arguments?.getString("LocalSipUri")
|
||||||
val remoteSipUri = arguments?.getString("RemoteSipUri")
|
val remoteSipUri = arguments?.getString("RemoteSipUri")
|
||||||
|
@ -244,7 +235,7 @@ class DetailChatRoomFragment : MasterFragment<ChatRoomDetailFragmentBinding, Cha
|
||||||
sharedViewModel.messageToForwardEvent.removeObservers(viewLifecycleOwner)
|
sharedViewModel.messageToForwardEvent.removeObservers(viewLifecycleOwner)
|
||||||
sharedViewModel.messageToForwardEvent.value = Event(chatMessage)
|
sharedViewModel.messageToForwardEvent.value = Event(chatMessage)
|
||||||
Log.i("[Chat Room] Forwarding message, going to chat rooms list")
|
Log.i("[Chat Room] Forwarding message, going to chat rooms list")
|
||||||
navigateToChatRooms()
|
goBack()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -338,7 +329,6 @@ class DetailChatRoomFragment : MasterFragment<ChatRoomDetailFragmentBinding, Cha
|
||||||
binding.setBackClickListener {
|
binding.setBackClickListener {
|
||||||
goBack()
|
goBack()
|
||||||
}
|
}
|
||||||
binding.back.visibility = if (resources.getBoolean(R.bool.isTablet)) View.INVISIBLE else View.VISIBLE
|
|
||||||
|
|
||||||
binding.setTitleClickListener {
|
binding.setTitleClickListener {
|
||||||
binding.sipUri.visibility = if (!viewModel.oneToOneChatRoom ||
|
binding.sipUri.visibility = if (!viewModel.oneToOneChatRoom ||
|
||||||
|
@ -479,10 +469,9 @@ class DetailChatRoomFragment : MasterFragment<ChatRoomDetailFragmentBinding, Cha
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun goBack() {
|
override fun goBack() {
|
||||||
if (!findNavController().popBackStack(R.id.masterChatRoomsFragment, false)) {
|
if (!findNavController().popBackStack()) {
|
||||||
Log.w("[Chat Room] No MasterChatRoomsFragment found in back stack")
|
sharedViewModel.closeSlidingPaneEvent.value = Event(true)
|
||||||
navigateToChatRooms()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ class DevicesFragment : SecureFragment<ChatRoomDevicesFragmentBinding>() {
|
||||||
binding.viewModel = listViewModel
|
binding.viewModel = listViewModel
|
||||||
|
|
||||||
binding.setBackClickListener {
|
binding.setBackClickListener {
|
||||||
findNavController().popBackStack()
|
goBack()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,12 +64,12 @@ class EphemeralFragment : SecureFragment<ChatRoomEphemeralFragmentBinding>() {
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
binding.setBackClickListener {
|
binding.setBackClickListener {
|
||||||
findNavController().popBackStack()
|
goBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.setValidClickListener {
|
binding.setValidClickListener {
|
||||||
viewModel.updateChatRoomEphemeralDuration()
|
viewModel.updateChatRoomEphemeralDuration()
|
||||||
findNavController().popBackStack()
|
goBack()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,6 @@ import android.app.Dialog
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.navigation.fragment.findNavController
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
import org.linphone.activities.main.MainActivity
|
import org.linphone.activities.main.MainActivity
|
||||||
|
@ -107,7 +106,7 @@ class GroupInfoFragment : SecureFragment<ChatRoomGroupInfoFragmentBinding>() {
|
||||||
addParticipantsFromSharedViewModel()
|
addParticipantsFromSharedViewModel()
|
||||||
|
|
||||||
binding.setBackClickListener {
|
binding.setBackClickListener {
|
||||||
findNavController().popBackStack()
|
goBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.createdChatRoomEvent.observe(viewLifecycleOwner, {
|
viewModel.createdChatRoomEvent.observe(viewLifecycleOwner, {
|
||||||
|
|
|
@ -94,7 +94,7 @@ class ImdnFragment : SecureFragment<ChatRoomImdnFragmentBinding>() {
|
||||||
binding.participantsList.addItemDecoration(AppUtils.getDividerDecoration(requireContext(), layoutManager))
|
binding.participantsList.addItemDecoration(AppUtils.getDividerDecoration(requireContext(), layoutManager))
|
||||||
|
|
||||||
// Displays state header
|
// Displays state header
|
||||||
val headerItemDecoration = RecyclerViewHeaderDecoration(adapter)
|
val headerItemDecoration = RecyclerViewHeaderDecoration(requireContext(), adapter)
|
||||||
binding.participantsList.addItemDecoration(headerItemDecoration)
|
binding.participantsList.addItemDecoration(headerItemDecoration)
|
||||||
|
|
||||||
viewModel.participants.observe(viewLifecycleOwner, {
|
viewModel.participants.observe(viewLifecycleOwner, {
|
||||||
|
@ -102,7 +102,7 @@ class ImdnFragment : SecureFragment<ChatRoomImdnFragmentBinding>() {
|
||||||
})
|
})
|
||||||
|
|
||||||
binding.setBackClickListener {
|
binding.setBackClickListener {
|
||||||
findNavController().popBackStack()
|
goBack()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,10 +23,12 @@ import android.app.Dialog
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.core.view.doOnPreDraw
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper
|
import androidx.recyclerview.widget.ItemTouchHelper
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import androidx.slidingpanelayout.widget.SlidingPaneLayout
|
||||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
import org.linphone.activities.GenericActivity
|
import org.linphone.activities.GenericActivity
|
||||||
|
@ -80,10 +82,45 @@ class MasterChatRoomsFragment : MasterFragment<ChatRoomMasterFragmentBinding, Ch
|
||||||
listViewModel = ViewModelProvider(this).get(ChatRoomsListViewModel::class.java)
|
listViewModel = ViewModelProvider(this).get(ChatRoomsListViewModel::class.java)
|
||||||
binding.viewModel = listViewModel
|
binding.viewModel = listViewModel
|
||||||
|
|
||||||
|
/* Shared view model & sliding pane related */
|
||||||
|
|
||||||
sharedViewModel = requireActivity().run {
|
sharedViewModel = requireActivity().run {
|
||||||
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
view.doOnPreDraw { sharedViewModel.canSlidingPaneBeClosed.value = binding.slidingPane.isSlideable }
|
||||||
|
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.observe(viewLifecycleOwner, {
|
||||||
|
it.consume {
|
||||||
|
if (!binding.slidingPane.closePane()) {
|
||||||
|
goBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
sharedViewModel.layoutChangedEvent.observe(viewLifecycleOwner, {
|
||||||
|
it.consume {
|
||||||
|
sharedViewModel.canSlidingPaneBeClosed.value = binding.slidingPane.isSlideable
|
||||||
|
}
|
||||||
|
})
|
||||||
|
binding.slidingPane.lockMode = SlidingPaneLayout.LOCK_MODE_LOCKED
|
||||||
|
/*binding.slidingPane.addPanelSlideListener(object : SlidingPaneLayout.PanelSlideListener {
|
||||||
|
override fun onPanelSlide(panel: View, slideOffset: Float) { }
|
||||||
|
|
||||||
|
override fun onPanelOpened(panel: View) {
|
||||||
|
if (binding.slidingPane.isSlideable) {
|
||||||
|
(requireActivity() as MainActivity).hideTabsFragment()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPanelClosed(panel: View) {
|
||||||
|
if (binding.slidingPane.isSlideable) {
|
||||||
|
(requireActivity() as MainActivity).showTabsFragment()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})*/
|
||||||
|
|
||||||
|
/* End of hared view model & sliding pane related */
|
||||||
|
|
||||||
_adapter = ChatRoomsListAdapter(listSelectionViewModel, viewLifecycleOwner)
|
_adapter = ChatRoomsListAdapter(listSelectionViewModel, viewLifecycleOwner)
|
||||||
// SubmitList is done on a background thread
|
// SubmitList is done on a background thread
|
||||||
// We need this adapter data observer to know when to scroll
|
// We need this adapter data observer to know when to scroll
|
||||||
|
@ -155,6 +192,7 @@ class MasterChatRoomsFragment : MasterFragment<ChatRoomMasterFragmentBinding, Ch
|
||||||
Log.w("[Chat] Activity is pending destruction, don't start navigating now!")
|
Log.w("[Chat] Activity is pending destruction, don't start navigating now!")
|
||||||
sharedViewModel.destructionPendingChatRoom = chatRoom
|
sharedViewModel.destructionPendingChatRoom = chatRoom
|
||||||
} else {
|
} else {
|
||||||
|
binding.slidingPane.openPane()
|
||||||
sharedViewModel.selectedChatRoom.value = chatRoom
|
sharedViewModel.selectedChatRoom.value = chatRoom
|
||||||
navigateToChatRoom(AppUtils.createBundleWithSharedTextAndFiles(sharedViewModel))
|
navigateToChatRoom(AppUtils.createBundleWithSharedTextAndFiles(sharedViewModel))
|
||||||
}
|
}
|
||||||
|
@ -182,11 +220,13 @@ class MasterChatRoomsFragment : MasterFragment<ChatRoomMasterFragmentBinding, Ch
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.setNewOneToOneChatRoomClickListener {
|
binding.setNewOneToOneChatRoomClickListener {
|
||||||
|
binding.slidingPane.openPane()
|
||||||
sharedViewModel.chatRoomParticipants.value = arrayListOf()
|
sharedViewModel.chatRoomParticipants.value = arrayListOf()
|
||||||
navigateToChatRoomCreation(false)
|
navigateToChatRoomCreation(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.setNewGroupChatRoomClickListener {
|
binding.setNewGroupChatRoomClickListener {
|
||||||
|
binding.slidingPane.openPane()
|
||||||
sharedViewModel.selectedGroupChatRoom.value = null
|
sharedViewModel.selectedGroupChatRoom.value = null
|
||||||
sharedViewModel.chatRoomParticipants.value = arrayListOf()
|
sharedViewModel.chatRoomParticipants.value = arrayListOf()
|
||||||
navigateToChatRoomCreation(true)
|
navigateToChatRoomCreation(true)
|
||||||
|
@ -194,6 +234,7 @@ class MasterChatRoomsFragment : MasterFragment<ChatRoomMasterFragmentBinding, Ch
|
||||||
|
|
||||||
val pendingDestructionChatRoom = sharedViewModel.destructionPendingChatRoom
|
val pendingDestructionChatRoom = sharedViewModel.destructionPendingChatRoom
|
||||||
if (pendingDestructionChatRoom != null) {
|
if (pendingDestructionChatRoom != null) {
|
||||||
|
binding.slidingPane.openPane()
|
||||||
Log.w("[Chat] Found pending chat room from before activity was recreated")
|
Log.w("[Chat] Found pending chat room from before activity was recreated")
|
||||||
sharedViewModel.destructionPendingChatRoom = null
|
sharedViewModel.destructionPendingChatRoom = null
|
||||||
sharedViewModel.selectedChatRoom.value = pendingDestructionChatRoom
|
sharedViewModel.selectedChatRoom.value = pendingDestructionChatRoom
|
||||||
|
|
|
@ -70,7 +70,7 @@ class ContactEditorFragment : GenericFragment<ContactEditorFragmentBinding>(), S
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
binding.setBackClickListener {
|
binding.setBackClickListener {
|
||||||
findNavController().popBackStack()
|
goBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.setAvatarClickListener {
|
binding.setAvatarClickListener {
|
||||||
|
|
|
@ -40,6 +40,7 @@ import org.linphone.activities.navigateToDialer
|
||||||
import org.linphone.core.tools.Log
|
import org.linphone.core.tools.Log
|
||||||
import org.linphone.databinding.ContactDetailFragmentBinding
|
import org.linphone.databinding.ContactDetailFragmentBinding
|
||||||
import org.linphone.utils.DialogUtils
|
import org.linphone.utils.DialogUtils
|
||||||
|
import org.linphone.utils.Event
|
||||||
|
|
||||||
class DetailContactFragment : GenericFragment<ContactDetailFragmentBinding>() {
|
class DetailContactFragment : GenericFragment<ContactDetailFragmentBinding>() {
|
||||||
private lateinit var viewModel: ContactViewModel
|
private lateinit var viewModel: ContactViewModel
|
||||||
|
@ -55,6 +56,7 @@ class DetailContactFragment : GenericFragment<ContactDetailFragmentBinding>() {
|
||||||
sharedViewModel = requireActivity().run {
|
sharedViewModel = requireActivity().run {
|
||||||
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
}
|
}
|
||||||
|
binding.sharedMainViewModel = sharedViewModel
|
||||||
|
|
||||||
val id = arguments?.getString("id")
|
val id = arguments?.getString("id")
|
||||||
arguments?.clear()
|
arguments?.clear()
|
||||||
|
@ -108,9 +110,8 @@ class DetailContactFragment : GenericFragment<ContactDetailFragmentBinding>() {
|
||||||
})
|
})
|
||||||
|
|
||||||
binding.setBackClickListener {
|
binding.setBackClickListener {
|
||||||
findNavController().popBackStack()
|
goBack()
|
||||||
}
|
}
|
||||||
binding.back.visibility = if (resources.getBoolean(R.bool.isTablet)) View.INVISIBLE else View.VISIBLE
|
|
||||||
|
|
||||||
binding.setEditClickListener {
|
binding.setEditClickListener {
|
||||||
navigateToContactEditor()
|
navigateToContactEditor()
|
||||||
|
@ -127,6 +128,10 @@ class DetailContactFragment : GenericFragment<ContactDetailFragmentBinding>() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun goBack() {
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.value = Event(true)
|
||||||
|
}
|
||||||
|
|
||||||
private fun confirmContactRemoval() {
|
private fun confirmContactRemoval() {
|
||||||
val dialogViewModel = DialogViewModel(getString(R.string.contact_delete_one_dialog))
|
val dialogViewModel = DialogViewModel(getString(R.string.contact_delete_one_dialog))
|
||||||
val dialog: Dialog = DialogUtils.getDialog(requireContext(), dialogViewModel)
|
val dialog: Dialog = DialogUtils.getDialog(requireContext(), dialogViewModel)
|
||||||
|
|
|
@ -24,10 +24,12 @@ import android.content.pm.PackageManager
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.core.view.doOnPreDraw
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper
|
import androidx.recyclerview.widget.ItemTouchHelper
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import androidx.slidingpanelayout.widget.SlidingPaneLayout
|
||||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
import org.linphone.activities.main.MainActivity
|
import org.linphone.activities.main.MainActivity
|
||||||
|
@ -68,10 +70,45 @@ class MasterContactsFragment : MasterFragment<ContactMasterFragmentBinding, Cont
|
||||||
listViewModel = ViewModelProvider(this).get(ContactsListViewModel::class.java)
|
listViewModel = ViewModelProvider(this).get(ContactsListViewModel::class.java)
|
||||||
binding.viewModel = listViewModel
|
binding.viewModel = listViewModel
|
||||||
|
|
||||||
|
/* Shared view model & sliding pane related */
|
||||||
|
|
||||||
sharedViewModel = requireActivity().run {
|
sharedViewModel = requireActivity().run {
|
||||||
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
view.doOnPreDraw { sharedViewModel.canSlidingPaneBeClosed.value = binding.slidingPane.isSlideable }
|
||||||
|
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.observe(viewLifecycleOwner, {
|
||||||
|
it.consume {
|
||||||
|
if (!binding.slidingPane.closePane()) {
|
||||||
|
goBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
sharedViewModel.layoutChangedEvent.observe(viewLifecycleOwner, {
|
||||||
|
it.consume {
|
||||||
|
sharedViewModel.canSlidingPaneBeClosed.value = binding.slidingPane.isSlideable
|
||||||
|
}
|
||||||
|
})
|
||||||
|
binding.slidingPane.lockMode = SlidingPaneLayout.LOCK_MODE_LOCKED
|
||||||
|
/*binding.slidingPane.addPanelSlideListener(object : SlidingPaneLayout.PanelSlideListener {
|
||||||
|
override fun onPanelSlide(panel: View, slideOffset: Float) { }
|
||||||
|
|
||||||
|
override fun onPanelOpened(panel: View) {
|
||||||
|
if (binding.slidingPane.isSlideable) {
|
||||||
|
(requireActivity() as MainActivity).hideTabsFragment()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPanelClosed(panel: View) {
|
||||||
|
if (binding.slidingPane.isSlideable) {
|
||||||
|
(requireActivity() as MainActivity).showTabsFragment()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})*/
|
||||||
|
|
||||||
|
/* End of hared view model & sliding pane related */
|
||||||
|
|
||||||
_adapter = ContactsListAdapter(listSelectionViewModel, viewLifecycleOwner)
|
_adapter = ContactsListAdapter(listSelectionViewModel, viewLifecycleOwner)
|
||||||
binding.contactsList.setHasFixedSize(true)
|
binding.contactsList.setHasFixedSize(true)
|
||||||
binding.contactsList.adapter = adapter
|
binding.contactsList.adapter = adapter
|
||||||
|
@ -124,7 +161,7 @@ class MasterContactsFragment : MasterFragment<ContactMasterFragmentBinding, Cont
|
||||||
binding.contactsList.addItemDecoration(AppUtils.getDividerDecoration(requireContext(), layoutManager))
|
binding.contactsList.addItemDecoration(AppUtils.getDividerDecoration(requireContext(), layoutManager))
|
||||||
|
|
||||||
// Displays the first letter header
|
// Displays the first letter header
|
||||||
val headerItemDecoration = RecyclerViewHeaderDecoration(adapter)
|
val headerItemDecoration = RecyclerViewHeaderDecoration(requireContext(), adapter)
|
||||||
binding.contactsList.addItemDecoration(headerItemDecoration)
|
binding.contactsList.addItemDecoration(headerItemDecoration)
|
||||||
|
|
||||||
adapter.selectedContactEvent.observe(viewLifecycleOwner, {
|
adapter.selectedContactEvent.observe(viewLifecycleOwner, {
|
||||||
|
@ -133,6 +170,7 @@ class MasterContactsFragment : MasterFragment<ContactMasterFragmentBinding, Cont
|
||||||
sharedViewModel.selectedContact.value = contact
|
sharedViewModel.selectedContact.value = contact
|
||||||
listViewModel.filter.value = ""
|
listViewModel.filter.value = ""
|
||||||
|
|
||||||
|
binding.slidingPane.openPane()
|
||||||
if (editOnClick) {
|
if (editOnClick) {
|
||||||
navigateToContactEditor(sipUriToAdd)
|
navigateToContactEditor(sipUriToAdd)
|
||||||
editOnClick = false
|
editOnClick = false
|
||||||
|
@ -174,6 +212,8 @@ class MasterContactsFragment : MasterFragment<ContactMasterFragmentBinding, Cont
|
||||||
binding.setNewContactClickListener {
|
binding.setNewContactClickListener {
|
||||||
// Remove any previously selected contact
|
// Remove any previously selected contact
|
||||||
sharedViewModel.selectedContact.value = null
|
sharedViewModel.selectedContact.value = null
|
||||||
|
|
||||||
|
binding.slidingPane.openPane()
|
||||||
navigateToContactEditor(sipUriToAdd)
|
navigateToContactEditor(sipUriToAdd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.navigation.fragment.findNavController
|
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
import org.linphone.activities.main.dialer.viewmodels.ConfigFileViewModel
|
import org.linphone.activities.main.dialer.viewmodels.ConfigFileViewModel
|
||||||
import org.linphone.activities.main.fragments.SecureFragment
|
import org.linphone.activities.main.fragments.SecureFragment
|
||||||
|
@ -47,7 +46,7 @@ class ConfigViewerFragment : SecureFragment<FileConfigViewerFragmentBinding>() {
|
||||||
isSecure = arguments?.getBoolean("Secure") ?: false
|
isSecure = arguments?.getBoolean("Secure") ?: false
|
||||||
|
|
||||||
binding.setBackClickListener {
|
binding.setBackClickListener {
|
||||||
findNavController().popBackStack()
|
goBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.setExportClickListener {
|
binding.setExportClickListener {
|
||||||
|
|
|
@ -69,7 +69,7 @@ class AudioViewerFragment : GenericViewerFragment<FileAudioViewerFragmentBinding
|
||||||
// This is to prevent the first back key press to only hide to media controls
|
// This is to prevent the first back key press to only hide to media controls
|
||||||
override fun dispatchKeyEvent(event: KeyEvent?): Boolean {
|
override fun dispatchKeyEvent(event: KeyEvent?): Boolean {
|
||||||
if (event?.keyCode == KeyEvent.KEYCODE_BACK) {
|
if (event?.keyCode == KeyEvent.KEYCODE_BACK) {
|
||||||
findNavController().popBackStack()
|
goBack()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return super.dispatchKeyEvent(event)
|
return super.dispatchKeyEvent(event)
|
||||||
|
|
|
@ -21,7 +21,6 @@ package org.linphone.activities.main.files.fragments
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
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.SnackBarActivity
|
import org.linphone.activities.SnackBarActivity
|
||||||
|
@ -42,7 +41,7 @@ class TopBarFragment : GenericFragment<FileViewerTopBarFragmentBinding>() {
|
||||||
binding.lifecycleOwner = this
|
binding.lifecycleOwner = this
|
||||||
|
|
||||||
binding.setBackClickListener {
|
binding.setBackClickListener {
|
||||||
findNavController().popBackStack()
|
goBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.setExportClickListener {
|
binding.setExportClickListener {
|
||||||
|
|
|
@ -61,7 +61,7 @@ class VideoViewerFragment : GenericViewerFragment<FileVideoViewerFragmentBinding
|
||||||
// This is to prevent the first back key press to only hide to media controls
|
// This is to prevent the first back key press to only hide to media controls
|
||||||
override fun dispatchKeyEvent(event: KeyEvent?): Boolean {
|
override fun dispatchKeyEvent(event: KeyEvent?): Boolean {
|
||||||
if (event?.keyCode == KeyEvent.KEYCODE_BACK) {
|
if (event?.keyCode == KeyEvent.KEYCODE_BACK) {
|
||||||
findNavController().popBackStack()
|
goBack()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return super.dispatchKeyEvent(event)
|
return super.dispatchKeyEvent(event)
|
||||||
|
|
|
@ -36,6 +36,7 @@ import org.linphone.activities.navigateToFriend
|
||||||
import org.linphone.contact.NativeContact
|
import org.linphone.contact.NativeContact
|
||||||
import org.linphone.core.tools.Log
|
import org.linphone.core.tools.Log
|
||||||
import org.linphone.databinding.HistoryDetailFragmentBinding
|
import org.linphone.databinding.HistoryDetailFragmentBinding
|
||||||
|
import org.linphone.utils.Event
|
||||||
|
|
||||||
class DetailCallLogFragment : GenericFragment<HistoryDetailFragmentBinding>() {
|
class DetailCallLogFragment : GenericFragment<HistoryDetailFragmentBinding>() {
|
||||||
private lateinit var viewModel: CallLogViewModel
|
private lateinit var viewModel: CallLogViewModel
|
||||||
|
@ -51,6 +52,7 @@ class DetailCallLogFragment : GenericFragment<HistoryDetailFragmentBinding>() {
|
||||||
sharedViewModel = requireActivity().run {
|
sharedViewModel = requireActivity().run {
|
||||||
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
}
|
}
|
||||||
|
binding.sharedMainViewModel = sharedViewModel
|
||||||
|
|
||||||
val callLogGroup = sharedViewModel.selectedCallLogGroup.value
|
val callLogGroup = sharedViewModel.selectedCallLogGroup.value
|
||||||
if (callLogGroup == null) {
|
if (callLogGroup == null) {
|
||||||
|
@ -69,9 +71,8 @@ class DetailCallLogFragment : GenericFragment<HistoryDetailFragmentBinding>() {
|
||||||
viewModel.relatedCallLogs.value = callLogGroup.callLogs
|
viewModel.relatedCallLogs.value = callLogGroup.callLogs
|
||||||
|
|
||||||
binding.setBackClickListener {
|
binding.setBackClickListener {
|
||||||
findNavController().popBackStack()
|
goBack()
|
||||||
}
|
}
|
||||||
binding.back.visibility = if (resources.getBoolean(R.bool.isTablet)) View.INVISIBLE else View.VISIBLE
|
|
||||||
|
|
||||||
binding.setNewContactClickListener {
|
binding.setNewContactClickListener {
|
||||||
val copy = viewModel.callLog.remoteAddress.clone()
|
val copy = viewModel.callLog.remoteAddress.clone()
|
||||||
|
@ -101,7 +102,10 @@ class DetailCallLogFragment : GenericFragment<HistoryDetailFragmentBinding>() {
|
||||||
val args = Bundle()
|
val args = Bundle()
|
||||||
args.putString("URI", address.asStringUriOnly())
|
args.putString("URI", address.asStringUriOnly())
|
||||||
args.putBoolean("Transfer", sharedViewModel.pendingCallTransfer)
|
args.putBoolean("Transfer", sharedViewModel.pendingCallTransfer)
|
||||||
args.putBoolean("SkipAutoCallStart", true) // If auto start call setting is enabled, ignore it
|
args.putBoolean(
|
||||||
|
"SkipAutoCallStart",
|
||||||
|
true
|
||||||
|
) // If auto start call setting is enabled, ignore it
|
||||||
navigateToDialer(args)
|
navigateToDialer(args)
|
||||||
} else {
|
} else {
|
||||||
val localAddress = callLog.localAddress
|
val localAddress = callLog.localAddress
|
||||||
|
@ -125,4 +129,8 @@ class DetailCallLogFragment : GenericFragment<HistoryDetailFragmentBinding>() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun goBack() {
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.value = Event(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,10 +23,12 @@ import android.app.Dialog
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.core.view.doOnPreDraw
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.recyclerview.widget.ItemTouchHelper
|
import androidx.recyclerview.widget.ItemTouchHelper
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import androidx.slidingpanelayout.widget.SlidingPaneLayout
|
||||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
import org.linphone.activities.main.fragments.MasterFragment
|
import org.linphone.activities.main.fragments.MasterFragment
|
||||||
|
@ -71,10 +73,45 @@ class MasterCallLogsFragment : MasterFragment<HistoryMasterFragmentBinding, Call
|
||||||
listViewModel = ViewModelProvider(this).get(CallLogsListViewModel::class.java)
|
listViewModel = ViewModelProvider(this).get(CallLogsListViewModel::class.java)
|
||||||
binding.viewModel = listViewModel
|
binding.viewModel = listViewModel
|
||||||
|
|
||||||
|
/* Shared view model & sliding pane related */
|
||||||
|
|
||||||
sharedViewModel = requireActivity().run {
|
sharedViewModel = requireActivity().run {
|
||||||
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
view.doOnPreDraw { sharedViewModel.canSlidingPaneBeClosed.value = binding.slidingPane.isSlideable }
|
||||||
|
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.observe(viewLifecycleOwner, {
|
||||||
|
it.consume {
|
||||||
|
if (!binding.slidingPane.closePane()) {
|
||||||
|
goBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
sharedViewModel.layoutChangedEvent.observe(viewLifecycleOwner, {
|
||||||
|
it.consume {
|
||||||
|
sharedViewModel.canSlidingPaneBeClosed.value = binding.slidingPane.isSlideable
|
||||||
|
}
|
||||||
|
})
|
||||||
|
binding.slidingPane.lockMode = SlidingPaneLayout.LOCK_MODE_LOCKED
|
||||||
|
/*binding.slidingPane.addPanelSlideListener(object : SlidingPaneLayout.PanelSlideListener {
|
||||||
|
override fun onPanelSlide(panel: View, slideOffset: Float) { }
|
||||||
|
|
||||||
|
override fun onPanelOpened(panel: View) {
|
||||||
|
if (binding.slidingPane.isSlideable) {
|
||||||
|
(requireActivity() as MainActivity).hideTabsFragment()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPanelClosed(panel: View) {
|
||||||
|
if (binding.slidingPane.isSlideable) {
|
||||||
|
(requireActivity() as MainActivity).showTabsFragment()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})*/
|
||||||
|
|
||||||
|
/* End of hared view model & sliding pane related */
|
||||||
|
|
||||||
_adapter = CallLogsListAdapter(listSelectionViewModel, viewLifecycleOwner)
|
_adapter = CallLogsListAdapter(listSelectionViewModel, viewLifecycleOwner)
|
||||||
// SubmitList is done on a background thread
|
// SubmitList is done on a background thread
|
||||||
// We need this adapter data observer to know when to scroll
|
// We need this adapter data observer to know when to scroll
|
||||||
|
@ -125,7 +162,7 @@ class MasterCallLogsFragment : MasterFragment<HistoryMasterFragmentBinding, Call
|
||||||
binding.callLogsList.addItemDecoration(AppUtils.getDividerDecoration(requireContext(), layoutManager))
|
binding.callLogsList.addItemDecoration(AppUtils.getDividerDecoration(requireContext(), layoutManager))
|
||||||
|
|
||||||
// Displays formatted date header
|
// Displays formatted date header
|
||||||
val headerItemDecoration = RecyclerViewHeaderDecoration(adapter)
|
val headerItemDecoration = RecyclerViewHeaderDecoration(requireContext(), adapter)
|
||||||
binding.callLogsList.addItemDecoration(headerItemDecoration)
|
binding.callLogsList.addItemDecoration(headerItemDecoration)
|
||||||
|
|
||||||
listViewModel.callLogs.observe(viewLifecycleOwner, { callLogs ->
|
listViewModel.callLogs.observe(viewLifecycleOwner, { callLogs ->
|
||||||
|
@ -157,6 +194,7 @@ class MasterCallLogsFragment : MasterFragment<HistoryMasterFragmentBinding, Call
|
||||||
adapter.selectedCallLogEvent.observe(viewLifecycleOwner, {
|
adapter.selectedCallLogEvent.observe(viewLifecycleOwner, {
|
||||||
it.consume { callLog ->
|
it.consume { callLog ->
|
||||||
sharedViewModel.selectedCallLogGroup.value = callLog
|
sharedViewModel.selectedCallLogGroup.value = callLog
|
||||||
|
binding.slidingPane.openPane()
|
||||||
navigateToCallHistory()
|
navigateToCallHistory()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,7 +23,6 @@ import android.os.Bundle
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.navigation.fragment.findNavController
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
import org.linphone.activities.main.fragments.MasterFragment
|
import org.linphone.activities.main.fragments.MasterFragment
|
||||||
|
@ -66,14 +65,14 @@ class RecordingsFragment : MasterFragment<RecordingsFragmentBinding, RecordingsL
|
||||||
binding.recordingsList.addItemDecoration(AppUtils.getDividerDecoration(requireContext(), layoutManager))
|
binding.recordingsList.addItemDecoration(AppUtils.getDividerDecoration(requireContext(), layoutManager))
|
||||||
|
|
||||||
// Displays the first letter header
|
// Displays the first letter header
|
||||||
val headerItemDecoration = RecyclerViewHeaderDecoration(adapter)
|
val headerItemDecoration = RecyclerViewHeaderDecoration(requireContext(), adapter)
|
||||||
binding.recordingsList.addItemDecoration(headerItemDecoration)
|
binding.recordingsList.addItemDecoration(headerItemDecoration)
|
||||||
|
|
||||||
viewModel.recordingsList.observe(viewLifecycleOwner, { recordings ->
|
viewModel.recordingsList.observe(viewLifecycleOwner, { recordings ->
|
||||||
adapter.submitList(recordings)
|
adapter.submitList(recordings)
|
||||||
})
|
})
|
||||||
|
|
||||||
binding.setBackClickListener { findNavController().popBackStack() }
|
binding.setBackClickListener { goBack() }
|
||||||
|
|
||||||
binding.setEditClickListener { listSelectionViewModel.isEditionEnabled.value = true }
|
binding.setEditClickListener { listSelectionViewModel.isEditionEnabled.value = true }
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ import org.linphone.activities.main.viewmodels.SharedMainViewModel
|
||||||
import org.linphone.activities.navigateToPhoneLinking
|
import org.linphone.activities.navigateToPhoneLinking
|
||||||
import org.linphone.core.tools.Log
|
import org.linphone.core.tools.Log
|
||||||
import org.linphone.databinding.SettingsAccountFragmentBinding
|
import org.linphone.databinding.SettingsAccountFragmentBinding
|
||||||
|
import org.linphone.utils.Event
|
||||||
|
|
||||||
class AccountSettingsFragment : GenericFragment<SettingsAccountFragmentBinding>() {
|
class AccountSettingsFragment : GenericFragment<SettingsAccountFragmentBinding>() {
|
||||||
private lateinit var sharedViewModel: SharedMainViewModel
|
private lateinit var sharedViewModel: SharedMainViewModel
|
||||||
|
@ -46,6 +47,7 @@ class AccountSettingsFragment : GenericFragment<SettingsAccountFragmentBinding>(
|
||||||
sharedViewModel = requireActivity().run {
|
sharedViewModel = requireActivity().run {
|
||||||
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
}
|
}
|
||||||
|
binding.sharedMainViewModel = sharedViewModel
|
||||||
|
|
||||||
val identity = arguments?.getString("Identity")
|
val identity = arguments?.getString("Identity")
|
||||||
if (identity == null) {
|
if (identity == null) {
|
||||||
|
@ -58,8 +60,7 @@ class AccountSettingsFragment : GenericFragment<SettingsAccountFragmentBinding>(
|
||||||
viewModel = ViewModelProvider(this, AccountSettingsViewModelFactory(identity)).get(AccountSettingsViewModel::class.java)
|
viewModel = ViewModelProvider(this, AccountSettingsViewModelFactory(identity)).get(AccountSettingsViewModel::class.java)
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
binding.setBackClickListener { findNavController().popBackStack() }
|
binding.setBackClickListener { goBack() }
|
||||||
binding.back.visibility = if (resources.getBoolean(R.bool.isTablet)) View.INVISIBLE else View.VISIBLE
|
|
||||||
|
|
||||||
viewModel.linkPhoneNumberEvent.observe(viewLifecycleOwner, {
|
viewModel.linkPhoneNumberEvent.observe(viewLifecycleOwner, {
|
||||||
it.consume {
|
it.consume {
|
||||||
|
@ -83,4 +84,8 @@ class AccountSettingsFragment : GenericFragment<SettingsAccountFragmentBinding>(
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun goBack() {
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.value = Event(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,18 +27,20 @@ import android.view.View
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
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.MainActivity
|
import org.linphone.activities.main.MainActivity
|
||||||
import org.linphone.activities.main.settings.viewmodels.AdvancedSettingsViewModel
|
import org.linphone.activities.main.settings.viewmodels.AdvancedSettingsViewModel
|
||||||
|
import org.linphone.activities.main.viewmodels.SharedMainViewModel
|
||||||
import org.linphone.core.tools.Log
|
import org.linphone.core.tools.Log
|
||||||
import org.linphone.core.tools.compatibility.DeviceUtils
|
import org.linphone.core.tools.compatibility.DeviceUtils
|
||||||
import org.linphone.databinding.SettingsAdvancedFragmentBinding
|
import org.linphone.databinding.SettingsAdvancedFragmentBinding
|
||||||
import org.linphone.utils.AppUtils
|
import org.linphone.utils.AppUtils
|
||||||
|
import org.linphone.utils.Event
|
||||||
import org.linphone.utils.PowerManagerUtils
|
import org.linphone.utils.PowerManagerUtils
|
||||||
|
|
||||||
class AdvancedSettingsFragment : GenericFragment<SettingsAdvancedFragmentBinding>() {
|
class AdvancedSettingsFragment : GenericFragment<SettingsAdvancedFragmentBinding>() {
|
||||||
|
private lateinit var sharedViewModel: SharedMainViewModel
|
||||||
private lateinit var viewModel: AdvancedSettingsViewModel
|
private lateinit var viewModel: AdvancedSettingsViewModel
|
||||||
|
|
||||||
override fun getLayoutId(): Int = R.layout.settings_advanced_fragment
|
override fun getLayoutId(): Int = R.layout.settings_advanced_fragment
|
||||||
|
@ -48,11 +50,15 @@ class AdvancedSettingsFragment : GenericFragment<SettingsAdvancedFragmentBinding
|
||||||
|
|
||||||
binding.lifecycleOwner = this
|
binding.lifecycleOwner = this
|
||||||
|
|
||||||
|
sharedViewModel = requireActivity().run {
|
||||||
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
|
}
|
||||||
|
binding.sharedMainViewModel = sharedViewModel
|
||||||
|
|
||||||
viewModel = ViewModelProvider(this).get(AdvancedSettingsViewModel::class.java)
|
viewModel = ViewModelProvider(this).get(AdvancedSettingsViewModel::class.java)
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
binding.setBackClickListener { findNavController().popBackStack() }
|
binding.setBackClickListener { goBack() }
|
||||||
binding.back.visibility = if (resources.getBoolean(R.bool.isTablet)) View.INVISIBLE else View.VISIBLE
|
|
||||||
|
|
||||||
viewModel.uploadFinishedEvent.observe(viewLifecycleOwner, {
|
viewModel.uploadFinishedEvent.observe(viewLifecycleOwner, {
|
||||||
it.consume { url ->
|
it.consume { url ->
|
||||||
|
@ -126,4 +132,8 @@ class AdvancedSettingsFragment : GenericFragment<SettingsAdvancedFragmentBinding
|
||||||
ContextCompat.startActivity(requireContext(), intent, null)
|
ContextCompat.startActivity(requireContext(), intent, null)
|
||||||
} })
|
} })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun goBack() {
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.value = Event(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,18 +26,20 @@ import android.view.View
|
||||||
import androidx.databinding.DataBindingUtil
|
import androidx.databinding.DataBindingUtil
|
||||||
import androidx.databinding.ViewDataBinding
|
import androidx.databinding.ViewDataBinding
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.navigation.fragment.findNavController
|
|
||||||
import org.linphone.BR
|
import org.linphone.BR
|
||||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
import org.linphone.activities.GenericFragment
|
import org.linphone.activities.GenericFragment
|
||||||
import org.linphone.activities.main.settings.SettingListenerStub
|
import org.linphone.activities.main.settings.SettingListenerStub
|
||||||
import org.linphone.activities.main.settings.viewmodels.AudioSettingsViewModel
|
import org.linphone.activities.main.settings.viewmodels.AudioSettingsViewModel
|
||||||
|
import org.linphone.activities.main.viewmodels.SharedMainViewModel
|
||||||
import org.linphone.core.tools.Log
|
import org.linphone.core.tools.Log
|
||||||
import org.linphone.databinding.SettingsAudioFragmentBinding
|
import org.linphone.databinding.SettingsAudioFragmentBinding
|
||||||
|
import org.linphone.utils.Event
|
||||||
import org.linphone.utils.PermissionHelper
|
import org.linphone.utils.PermissionHelper
|
||||||
|
|
||||||
class AudioSettingsFragment : GenericFragment<SettingsAudioFragmentBinding>() {
|
class AudioSettingsFragment : GenericFragment<SettingsAudioFragmentBinding>() {
|
||||||
|
private lateinit var sharedViewModel: SharedMainViewModel
|
||||||
private lateinit var viewModel: AudioSettingsViewModel
|
private lateinit var viewModel: AudioSettingsViewModel
|
||||||
|
|
||||||
override fun getLayoutId(): Int = R.layout.settings_audio_fragment
|
override fun getLayoutId(): Int = R.layout.settings_audio_fragment
|
||||||
|
@ -47,11 +49,15 @@ class AudioSettingsFragment : GenericFragment<SettingsAudioFragmentBinding>() {
|
||||||
|
|
||||||
binding.lifecycleOwner = this
|
binding.lifecycleOwner = this
|
||||||
|
|
||||||
|
sharedViewModel = requireActivity().run {
|
||||||
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
|
}
|
||||||
|
binding.sharedMainViewModel = sharedViewModel
|
||||||
|
|
||||||
viewModel = ViewModelProvider(this).get(AudioSettingsViewModel::class.java)
|
viewModel = ViewModelProvider(this).get(AudioSettingsViewModel::class.java)
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
binding.setBackClickListener { findNavController().popBackStack() }
|
binding.setBackClickListener { goBack() }
|
||||||
binding.back.visibility = if (resources.getBoolean(R.bool.isTablet)) View.INVISIBLE else View.VISIBLE
|
|
||||||
|
|
||||||
viewModel.askAudioRecordPermissionForEchoCancellerCalibrationEvent.observe(viewLifecycleOwner, {
|
viewModel.askAudioRecordPermissionForEchoCancellerCalibrationEvent.observe(viewLifecycleOwner, {
|
||||||
it.consume {
|
it.consume {
|
||||||
|
@ -110,4 +116,8 @@ class AudioSettingsFragment : GenericFragment<SettingsAudioFragmentBinding>() {
|
||||||
}
|
}
|
||||||
viewModel.audioCodecs.value = list
|
viewModel.audioCodecs.value = list
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun goBack() {
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.value = Event(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,15 +26,17 @@ import android.os.Bundle
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
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.settings.viewmodels.CallSettingsViewModel
|
import org.linphone.activities.main.settings.viewmodels.CallSettingsViewModel
|
||||||
|
import org.linphone.activities.main.viewmodels.SharedMainViewModel
|
||||||
import org.linphone.compatibility.Compatibility
|
import org.linphone.compatibility.Compatibility
|
||||||
import org.linphone.databinding.SettingsCallFragmentBinding
|
import org.linphone.databinding.SettingsCallFragmentBinding
|
||||||
import org.linphone.mediastream.Version
|
import org.linphone.mediastream.Version
|
||||||
|
import org.linphone.utils.Event
|
||||||
|
|
||||||
class CallSettingsFragment : GenericFragment<SettingsCallFragmentBinding>() {
|
class CallSettingsFragment : GenericFragment<SettingsCallFragmentBinding>() {
|
||||||
|
private lateinit var sharedViewModel: SharedMainViewModel
|
||||||
private lateinit var viewModel: CallSettingsViewModel
|
private lateinit var viewModel: CallSettingsViewModel
|
||||||
|
|
||||||
override fun getLayoutId(): Int = R.layout.settings_call_fragment
|
override fun getLayoutId(): Int = R.layout.settings_call_fragment
|
||||||
|
@ -44,11 +46,15 @@ class CallSettingsFragment : GenericFragment<SettingsCallFragmentBinding>() {
|
||||||
|
|
||||||
binding.lifecycleOwner = this
|
binding.lifecycleOwner = this
|
||||||
|
|
||||||
|
sharedViewModel = requireActivity().run {
|
||||||
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
|
}
|
||||||
|
binding.sharedMainViewModel = sharedViewModel
|
||||||
|
|
||||||
viewModel = ViewModelProvider(this).get(CallSettingsViewModel::class.java)
|
viewModel = ViewModelProvider(this).get(CallSettingsViewModel::class.java)
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
binding.setBackClickListener { findNavController().popBackStack() }
|
binding.setBackClickListener { goBack() }
|
||||||
binding.back.visibility = if (resources.getBoolean(R.bool.isTablet)) View.INVISIBLE else View.VISIBLE
|
|
||||||
|
|
||||||
viewModel.systemWideOverlayEnabledEvent.observe(viewLifecycleOwner, {
|
viewModel.systemWideOverlayEnabledEvent.observe(viewLifecycleOwner, {
|
||||||
it.consume {
|
it.consume {
|
||||||
|
@ -84,4 +90,8 @@ class CallSettingsFragment : GenericFragment<SettingsCallFragmentBinding>() {
|
||||||
viewModel.systemWideOverlayListener.onBoolValueChanged(false)
|
viewModel.systemWideOverlayListener.onBoolValueChanged(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun goBack() {
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.value = Event(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,15 +25,17 @@ import android.os.Bundle
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
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.settings.viewmodels.ChatSettingsViewModel
|
import org.linphone.activities.main.settings.viewmodels.ChatSettingsViewModel
|
||||||
|
import org.linphone.activities.main.viewmodels.SharedMainViewModel
|
||||||
import org.linphone.compatibility.Compatibility
|
import org.linphone.compatibility.Compatibility
|
||||||
import org.linphone.databinding.SettingsChatFragmentBinding
|
import org.linphone.databinding.SettingsChatFragmentBinding
|
||||||
import org.linphone.mediastream.Version
|
import org.linphone.mediastream.Version
|
||||||
|
import org.linphone.utils.Event
|
||||||
|
|
||||||
class ChatSettingsFragment : GenericFragment<SettingsChatFragmentBinding>() {
|
class ChatSettingsFragment : GenericFragment<SettingsChatFragmentBinding>() {
|
||||||
|
private lateinit var sharedViewModel: SharedMainViewModel
|
||||||
private lateinit var viewModel: ChatSettingsViewModel
|
private lateinit var viewModel: ChatSettingsViewModel
|
||||||
|
|
||||||
override fun getLayoutId(): Int = R.layout.settings_chat_fragment
|
override fun getLayoutId(): Int = R.layout.settings_chat_fragment
|
||||||
|
@ -43,11 +45,15 @@ class ChatSettingsFragment : GenericFragment<SettingsChatFragmentBinding>() {
|
||||||
|
|
||||||
binding.lifecycleOwner = this
|
binding.lifecycleOwner = this
|
||||||
|
|
||||||
|
sharedViewModel = requireActivity().run {
|
||||||
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
|
}
|
||||||
|
binding.sharedMainViewModel = sharedViewModel
|
||||||
|
|
||||||
viewModel = ViewModelProvider(this).get(ChatSettingsViewModel::class.java)
|
viewModel = ViewModelProvider(this).get(ChatSettingsViewModel::class.java)
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
binding.setBackClickListener { findNavController().popBackStack() }
|
binding.setBackClickListener { goBack() }
|
||||||
binding.back.visibility = if (resources.getBoolean(R.bool.isTablet)) View.INVISIBLE else View.VISIBLE
|
|
||||||
|
|
||||||
viewModel.launcherShortcutsEvent.observe(viewLifecycleOwner, {
|
viewModel.launcherShortcutsEvent.observe(viewLifecycleOwner, {
|
||||||
it.consume { newValue ->
|
it.consume { newValue ->
|
||||||
|
@ -76,4 +82,8 @@ class ChatSettingsFragment : GenericFragment<SettingsChatFragmentBinding>() {
|
||||||
}
|
}
|
||||||
} })
|
} })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun goBack() {
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.value = Event(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,18 +23,20 @@ import android.content.pm.PackageManager
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.navigation.fragment.findNavController
|
|
||||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||||
import org.linphone.LinphoneApplication.Companion.corePreferences
|
import org.linphone.LinphoneApplication.Companion.corePreferences
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
import org.linphone.activities.GenericFragment
|
import org.linphone.activities.GenericFragment
|
||||||
import org.linphone.activities.main.settings.viewmodels.ContactsSettingsViewModel
|
import org.linphone.activities.main.settings.viewmodels.ContactsSettingsViewModel
|
||||||
|
import org.linphone.activities.main.viewmodels.SharedMainViewModel
|
||||||
import org.linphone.compatibility.Compatibility
|
import org.linphone.compatibility.Compatibility
|
||||||
import org.linphone.core.tools.Log
|
import org.linphone.core.tools.Log
|
||||||
import org.linphone.databinding.SettingsContactsFragmentBinding
|
import org.linphone.databinding.SettingsContactsFragmentBinding
|
||||||
|
import org.linphone.utils.Event
|
||||||
import org.linphone.utils.PermissionHelper
|
import org.linphone.utils.PermissionHelper
|
||||||
|
|
||||||
class ContactsSettingsFragment : GenericFragment<SettingsContactsFragmentBinding>() {
|
class ContactsSettingsFragment : GenericFragment<SettingsContactsFragmentBinding>() {
|
||||||
|
private lateinit var sharedViewModel: SharedMainViewModel
|
||||||
private lateinit var viewModel: ContactsSettingsViewModel
|
private lateinit var viewModel: ContactsSettingsViewModel
|
||||||
|
|
||||||
override fun getLayoutId(): Int = R.layout.settings_contacts_fragment
|
override fun getLayoutId(): Int = R.layout.settings_contacts_fragment
|
||||||
|
@ -44,11 +46,15 @@ class ContactsSettingsFragment : GenericFragment<SettingsContactsFragmentBinding
|
||||||
|
|
||||||
binding.lifecycleOwner = this
|
binding.lifecycleOwner = this
|
||||||
|
|
||||||
|
sharedViewModel = requireActivity().run {
|
||||||
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
|
}
|
||||||
|
binding.sharedMainViewModel = sharedViewModel
|
||||||
|
|
||||||
viewModel = ViewModelProvider(this).get(ContactsSettingsViewModel::class.java)
|
viewModel = ViewModelProvider(this).get(ContactsSettingsViewModel::class.java)
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
binding.setBackClickListener { findNavController().popBackStack() }
|
binding.setBackClickListener { goBack() }
|
||||||
binding.back.visibility = if (resources.getBoolean(R.bool.isTablet)) View.INVISIBLE else View.VISIBLE
|
|
||||||
|
|
||||||
viewModel.launcherShortcutsEvent.observe(viewLifecycleOwner, {
|
viewModel.launcherShortcutsEvent.observe(viewLifecycleOwner, {
|
||||||
it.consume { newValue ->
|
it.consume { newValue ->
|
||||||
|
@ -105,4 +111,8 @@ class ContactsSettingsFragment : GenericFragment<SettingsContactsFragmentBinding
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun goBack() {
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.value = Event(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,13 +22,15 @@ package org.linphone.activities.main.settings.fragments
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
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.settings.viewmodels.NetworkSettingsViewModel
|
import org.linphone.activities.main.settings.viewmodels.NetworkSettingsViewModel
|
||||||
|
import org.linphone.activities.main.viewmodels.SharedMainViewModel
|
||||||
import org.linphone.databinding.SettingsNetworkFragmentBinding
|
import org.linphone.databinding.SettingsNetworkFragmentBinding
|
||||||
|
import org.linphone.utils.Event
|
||||||
|
|
||||||
class NetworkSettingsFragment : GenericFragment<SettingsNetworkFragmentBinding>() {
|
class NetworkSettingsFragment : GenericFragment<SettingsNetworkFragmentBinding>() {
|
||||||
|
private lateinit var sharedViewModel: SharedMainViewModel
|
||||||
private lateinit var viewModel: NetworkSettingsViewModel
|
private lateinit var viewModel: NetworkSettingsViewModel
|
||||||
|
|
||||||
override fun getLayoutId(): Int = R.layout.settings_network_fragment
|
override fun getLayoutId(): Int = R.layout.settings_network_fragment
|
||||||
|
@ -38,10 +40,18 @@ class NetworkSettingsFragment : GenericFragment<SettingsNetworkFragmentBinding>(
|
||||||
|
|
||||||
binding.lifecycleOwner = this
|
binding.lifecycleOwner = this
|
||||||
|
|
||||||
|
sharedViewModel = requireActivity().run {
|
||||||
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
|
}
|
||||||
|
binding.sharedMainViewModel = sharedViewModel
|
||||||
|
|
||||||
viewModel = ViewModelProvider(this).get(NetworkSettingsViewModel::class.java)
|
viewModel = ViewModelProvider(this).get(NetworkSettingsViewModel::class.java)
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
binding.setBackClickListener { findNavController().popBackStack() }
|
binding.setBackClickListener { goBack() }
|
||||||
binding.back.visibility = if (resources.getBoolean(R.bool.isTablet)) View.INVISIBLE else View.VISIBLE
|
}
|
||||||
|
|
||||||
|
override fun goBack() {
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.value = Event(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,8 +21,9 @@ package org.linphone.activities.main.settings.fragments
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import androidx.core.view.doOnPreDraw
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.slidingpanelayout.widget.SlidingPaneLayout
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
import org.linphone.activities.*
|
import org.linphone.activities.*
|
||||||
import org.linphone.activities.main.fragments.SecureFragment
|
import org.linphone.activities.main.fragments.SecureFragment
|
||||||
|
@ -47,14 +48,34 @@ class SettingsFragment : SecureFragment<SettingsFragmentBinding>() {
|
||||||
|
|
||||||
binding.lifecycleOwner = this
|
binding.lifecycleOwner = this
|
||||||
|
|
||||||
|
/* Shared view model & sliding pane related */
|
||||||
|
|
||||||
sharedViewModel = requireActivity().run {
|
sharedViewModel = requireActivity().run {
|
||||||
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
view.doOnPreDraw { sharedViewModel.canSlidingPaneBeClosed.value = binding.slidingPane.isSlideable }
|
||||||
|
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.observe(viewLifecycleOwner, {
|
||||||
|
it.consume {
|
||||||
|
if (!binding.slidingPane.closePane()) {
|
||||||
|
goBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
sharedViewModel.layoutChangedEvent.observe(viewLifecycleOwner, {
|
||||||
|
it.consume {
|
||||||
|
sharedViewModel.canSlidingPaneBeClosed.value = binding.slidingPane.isSlideable
|
||||||
|
}
|
||||||
|
})
|
||||||
|
binding.slidingPane.lockMode = SlidingPaneLayout.LOCK_MODE_LOCKED
|
||||||
|
|
||||||
|
/* End of hared view model & sliding pane related */
|
||||||
|
|
||||||
viewModel = ViewModelProvider(this).get(SettingsViewModel::class.java)
|
viewModel = ViewModelProvider(this).get(SettingsViewModel::class.java)
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
binding.setBackClickListener { findNavController().popBackStack() }
|
binding.setBackClickListener { goBack() }
|
||||||
|
|
||||||
sharedViewModel.accountRemoved.observe(viewLifecycleOwner, {
|
sharedViewModel.accountRemoved.observe(viewLifecycleOwner, {
|
||||||
Log.i("[Settings] Account removed, update accounts list")
|
Log.i("[Settings] Account removed, update accounts list")
|
||||||
|
@ -65,60 +86,70 @@ class SettingsFragment : SecureFragment<SettingsFragmentBinding>() {
|
||||||
if (identity != null) {
|
if (identity != null) {
|
||||||
Log.i("[Settings] Found identity parameter in arguments: $identity")
|
Log.i("[Settings] Found identity parameter in arguments: $identity")
|
||||||
arguments?.clear()
|
arguments?.clear()
|
||||||
|
binding.slidingPane.openPane()
|
||||||
navigateToAccountSettings(identity)
|
navigateToAccountSettings(identity)
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.accountsSettingsListener = object : SettingListenerStub() {
|
viewModel.accountsSettingsListener = object : SettingListenerStub() {
|
||||||
override fun onAccountClicked(identity: String) {
|
override fun onAccountClicked(identity: String) {
|
||||||
Log.i("[Settings] Navigation to settings for account with identity: $identity")
|
Log.i("[Settings] Navigation to settings for account with identity: $identity")
|
||||||
|
binding.slidingPane.openPane()
|
||||||
navigateToAccountSettings(identity)
|
navigateToAccountSettings(identity)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.tunnelSettingsListener = object : SettingListenerStub() {
|
viewModel.tunnelSettingsListener = object : SettingListenerStub() {
|
||||||
override fun onClicked() {
|
override fun onClicked() {
|
||||||
|
binding.slidingPane.openPane()
|
||||||
navigateToTunnelSettings()
|
navigateToTunnelSettings()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.audioSettingsListener = object : SettingListenerStub() {
|
viewModel.audioSettingsListener = object : SettingListenerStub() {
|
||||||
override fun onClicked() {
|
override fun onClicked() {
|
||||||
|
binding.slidingPane.openPane()
|
||||||
navigateToAudioSettings()
|
navigateToAudioSettings()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.videoSettingsListener = object : SettingListenerStub() {
|
viewModel.videoSettingsListener = object : SettingListenerStub() {
|
||||||
override fun onClicked() {
|
override fun onClicked() {
|
||||||
|
binding.slidingPane.openPane()
|
||||||
navigateToVideoSettings()
|
navigateToVideoSettings()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.callSettingsListener = object : SettingListenerStub() {
|
viewModel.callSettingsListener = object : SettingListenerStub() {
|
||||||
override fun onClicked() {
|
override fun onClicked() {
|
||||||
|
binding.slidingPane.openPane()
|
||||||
navigateToCallSettings()
|
navigateToCallSettings()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.chatSettingsListener = object : SettingListenerStub() {
|
viewModel.chatSettingsListener = object : SettingListenerStub() {
|
||||||
override fun onClicked() {
|
override fun onClicked() {
|
||||||
|
binding.slidingPane.openPane()
|
||||||
navigateToChatSettings()
|
navigateToChatSettings()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.networkSettingsListener = object : SettingListenerStub() {
|
viewModel.networkSettingsListener = object : SettingListenerStub() {
|
||||||
override fun onClicked() {
|
override fun onClicked() {
|
||||||
|
binding.slidingPane.openPane()
|
||||||
navigateToNetworkSettings()
|
navigateToNetworkSettings()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.contactsSettingsListener = object : SettingListenerStub() {
|
viewModel.contactsSettingsListener = object : SettingListenerStub() {
|
||||||
override fun onClicked() {
|
override fun onClicked() {
|
||||||
|
binding.slidingPane.openPane()
|
||||||
navigateToContactsSettings()
|
navigateToContactsSettings()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.advancedSettingsListener = object : SettingListenerStub() {
|
viewModel.advancedSettingsListener = object : SettingListenerStub() {
|
||||||
override fun onClicked() {
|
override fun onClicked() {
|
||||||
|
binding.slidingPane.openPane()
|
||||||
navigateToAdvancedSettings()
|
navigateToAdvancedSettings()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,13 +22,15 @@ package org.linphone.activities.main.settings.fragments
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
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.settings.viewmodels.TunnelSettingsViewModel
|
import org.linphone.activities.main.settings.viewmodels.TunnelSettingsViewModel
|
||||||
|
import org.linphone.activities.main.viewmodels.SharedMainViewModel
|
||||||
import org.linphone.databinding.SettingsTunnelFragmentBinding
|
import org.linphone.databinding.SettingsTunnelFragmentBinding
|
||||||
|
import org.linphone.utils.Event
|
||||||
|
|
||||||
class TunnelSettingsFragment : GenericFragment<SettingsTunnelFragmentBinding>() {
|
class TunnelSettingsFragment : GenericFragment<SettingsTunnelFragmentBinding>() {
|
||||||
|
private lateinit var sharedViewModel: SharedMainViewModel
|
||||||
private lateinit var viewModel: TunnelSettingsViewModel
|
private lateinit var viewModel: TunnelSettingsViewModel
|
||||||
|
|
||||||
override fun getLayoutId(): Int = R.layout.settings_tunnel_fragment
|
override fun getLayoutId(): Int = R.layout.settings_tunnel_fragment
|
||||||
|
@ -38,10 +40,18 @@ class TunnelSettingsFragment : GenericFragment<SettingsTunnelFragmentBinding>()
|
||||||
|
|
||||||
binding.lifecycleOwner = this
|
binding.lifecycleOwner = this
|
||||||
|
|
||||||
|
sharedViewModel = requireActivity().run {
|
||||||
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
|
}
|
||||||
|
binding.sharedMainViewModel = sharedViewModel
|
||||||
|
|
||||||
viewModel = ViewModelProvider(this).get(TunnelSettingsViewModel::class.java)
|
viewModel = ViewModelProvider(this).get(TunnelSettingsViewModel::class.java)
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
binding.setBackClickListener { findNavController().popBackStack() }
|
binding.setBackClickListener { goBack() }
|
||||||
binding.back.visibility = if (resources.getBoolean(R.bool.isTablet)) View.INVISIBLE else View.VISIBLE
|
}
|
||||||
|
|
||||||
|
override fun goBack() {
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.value = Event(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,18 +26,20 @@ import android.view.View
|
||||||
import androidx.databinding.DataBindingUtil
|
import androidx.databinding.DataBindingUtil
|
||||||
import androidx.databinding.ViewDataBinding
|
import androidx.databinding.ViewDataBinding
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.navigation.fragment.findNavController
|
|
||||||
import org.linphone.BR
|
import org.linphone.BR
|
||||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||||
import org.linphone.R
|
import org.linphone.R
|
||||||
import org.linphone.activities.GenericFragment
|
import org.linphone.activities.GenericFragment
|
||||||
import org.linphone.activities.main.settings.SettingListenerStub
|
import org.linphone.activities.main.settings.SettingListenerStub
|
||||||
import org.linphone.activities.main.settings.viewmodels.VideoSettingsViewModel
|
import org.linphone.activities.main.settings.viewmodels.VideoSettingsViewModel
|
||||||
|
import org.linphone.activities.main.viewmodels.SharedMainViewModel
|
||||||
import org.linphone.core.tools.Log
|
import org.linphone.core.tools.Log
|
||||||
import org.linphone.databinding.SettingsVideoFragmentBinding
|
import org.linphone.databinding.SettingsVideoFragmentBinding
|
||||||
|
import org.linphone.utils.Event
|
||||||
import org.linphone.utils.PermissionHelper
|
import org.linphone.utils.PermissionHelper
|
||||||
|
|
||||||
class VideoSettingsFragment : GenericFragment<SettingsVideoFragmentBinding>() {
|
class VideoSettingsFragment : GenericFragment<SettingsVideoFragmentBinding>() {
|
||||||
|
private lateinit var sharedViewModel: SharedMainViewModel
|
||||||
private lateinit var viewModel: VideoSettingsViewModel
|
private lateinit var viewModel: VideoSettingsViewModel
|
||||||
|
|
||||||
override fun getLayoutId(): Int = R.layout.settings_video_fragment
|
override fun getLayoutId(): Int = R.layout.settings_video_fragment
|
||||||
|
@ -47,11 +49,15 @@ class VideoSettingsFragment : GenericFragment<SettingsVideoFragmentBinding>() {
|
||||||
|
|
||||||
binding.lifecycleOwner = this
|
binding.lifecycleOwner = this
|
||||||
|
|
||||||
|
sharedViewModel = requireActivity().run {
|
||||||
|
ViewModelProvider(this).get(SharedMainViewModel::class.java)
|
||||||
|
}
|
||||||
|
binding.sharedMainViewModel = sharedViewModel
|
||||||
|
|
||||||
viewModel = ViewModelProvider(this).get(VideoSettingsViewModel::class.java)
|
viewModel = ViewModelProvider(this).get(VideoSettingsViewModel::class.java)
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
binding.setBackClickListener { findNavController().popBackStack() }
|
binding.setBackClickListener { goBack() }
|
||||||
binding.back.visibility = if (resources.getBoolean(R.bool.isTablet)) View.INVISIBLE else View.VISIBLE
|
|
||||||
|
|
||||||
initVideoCodecsList()
|
initVideoCodecsList()
|
||||||
|
|
||||||
|
@ -100,4 +106,8 @@ class VideoSettingsFragment : GenericFragment<SettingsVideoFragmentBinding>() {
|
||||||
}
|
}
|
||||||
viewModel.videoCodecs.value = list
|
viewModel.videoCodecs.value = list
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun goBack() {
|
||||||
|
sharedViewModel.closeSlidingPaneEvent.value = Event(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,10 @@ import org.linphone.utils.Event
|
||||||
class SharedMainViewModel : ViewModel() {
|
class SharedMainViewModel : ViewModel() {
|
||||||
val toggleDrawerEvent = MutableLiveData<Event<Boolean>>()
|
val toggleDrawerEvent = MutableLiveData<Event<Boolean>>()
|
||||||
|
|
||||||
|
val layoutChangedEvent = MutableLiveData<Event<Boolean>>()
|
||||||
|
var canSlidingPaneBeClosed = MutableLiveData<Boolean>()
|
||||||
|
val closeSlidingPaneEvent = MutableLiveData<Event<Boolean>>()
|
||||||
|
|
||||||
/* Call history */
|
/* Call history */
|
||||||
|
|
||||||
val selectedCallLogGroup = MutableLiveData<GroupedCallLogData>()
|
val selectedCallLogGroup = MutableLiveData<GroupedCallLogData>()
|
||||||
|
|
|
@ -26,9 +26,8 @@ import android.util.SparseArray
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import org.linphone.R
|
|
||||||
|
|
||||||
class RecyclerViewHeaderDecoration(private val adapter: HeaderAdapter) : RecyclerView.ItemDecoration() {
|
class RecyclerViewHeaderDecoration(private val context: Context, private val adapter: HeaderAdapter) : RecyclerView.ItemDecoration() {
|
||||||
private val headers: SparseArray<View> = SparseArray()
|
private val headers: SparseArray<View> = SparseArray()
|
||||||
|
|
||||||
override fun getItemOffsets(
|
override fun getItemOffsets(
|
||||||
|
@ -54,10 +53,8 @@ class RecyclerViewHeaderDecoration(private val adapter: HeaderAdapter) : Recycle
|
||||||
view.layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
view.layoutParams = ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)
|
||||||
}
|
}
|
||||||
|
|
||||||
val displayMetrics = parent.context.resources.displayMetrics
|
val widthSpec = View.MeasureSpec.makeMeasureSpec(parent.width, View.MeasureSpec.EXACTLY)
|
||||||
val width = if (view.resources.getBoolean(R.bool.isTablet)) displayMetrics.widthPixels / 2 else displayMetrics.widthPixels
|
val heightSpec = View.MeasureSpec.makeMeasureSpec(parent.height, View.MeasureSpec.EXACTLY)
|
||||||
val widthSpec = View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY)
|
|
||||||
val heightSpec = View.MeasureSpec.makeMeasureSpec(displayMetrics.heightPixels, View.MeasureSpec.EXACTLY)
|
|
||||||
val childWidth = ViewGroup.getChildMeasureSpec(widthSpec, parent.paddingLeft + parent.paddingRight, view.layoutParams.width)
|
val childWidth = ViewGroup.getChildMeasureSpec(widthSpec, parent.paddingLeft + parent.paddingRight, view.layoutParams.width)
|
||||||
val childHeight = ViewGroup.getChildMeasureSpec(heightSpec, parent.paddingTop + parent.paddingBottom, view.layoutParams.height)
|
val childHeight = ViewGroup.getChildMeasureSpec(heightSpec, parent.paddingTop + parent.paddingBottom, view.layoutParams.height)
|
||||||
|
|
||||||
|
@ -71,7 +68,7 @@ class RecyclerViewHeaderDecoration(private val adapter: HeaderAdapter) : Recycle
|
||||||
val position = parent.getChildAdapterPosition(child)
|
val position = parent.getChildAdapterPosition(child)
|
||||||
if (position != RecyclerView.NO_POSITION && adapter.displayHeaderForPosition(position)) {
|
if (position != RecyclerView.NO_POSITION && adapter.displayHeaderForPosition(position)) {
|
||||||
canvas.save()
|
canvas.save()
|
||||||
val headerView: View = headers.get(position) ?: adapter.getHeaderViewForPosition(parent.context, position)
|
val headerView: View = headers.get(position) ?: adapter.getHeaderViewForPosition(context, position)
|
||||||
canvas.translate(0f, child.y - headerView.height)
|
canvas.translate(0f, child.y - headerView.height)
|
||||||
headerView.draw(canvas)
|
headerView.draw(canvas)
|
||||||
canvas.restore()
|
canvas.restore()
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 16 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 14 KiB |
|
@ -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: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="@dimen/main_activity_top_bar_size"
|
|
||||||
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="match_parent"
|
|
||||||
android:layout_below="@id/top_bar"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:baselineAligned="false">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="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:visibility="@{viewModel.chatAllowed ? View.VISIBLE : View.GONE}"
|
|
||||||
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.chatAllowed && 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_toggle_icon_green" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="1dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/dividerColor" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="5dp">
|
|
||||||
|
|
||||||
<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" />
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
|
||||||
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}"/>
|
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/wait_layout"
|
|
||||||
bind:visibility="@{viewModel.waitForChatRoomCreation}"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</layout>
|
|
|
@ -1,192 +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="@dimen/main_activity_top_bar_size"
|
|
||||||
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:visibility="@{viewModel.chatAllowed ? View.VISIBLE : View.GONE}"
|
|
||||||
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.chatAllowed && 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_toggle_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" />
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
|
||||||
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}"/>
|
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/wait_layout"
|
|
||||||
bind:visibility="@{viewModel.waitForChatRoomCreation}"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</layout>
|
|
|
@ -1,209 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:linphone="http://schemas.android.com/apk/res-auto">
|
|
||||||
|
|
||||||
<data>
|
|
||||||
<import type="android.view.View"/>
|
|
||||||
<variable
|
|
||||||
name="backClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="viewModel"
|
|
||||||
type="org.linphone.activities.main.settings.viewmodels.SettingsViewModel" />
|
|
||||||
</data>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
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="@dimen/main_activity_top_bar_size"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
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" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/accent_colored_title_font"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.6"
|
|
||||||
android:gravity="center"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:text="@string/settings"/>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:visibility="invisible" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
|
||||||
android:layout_below="@id/top_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingTop="5dp"
|
|
||||||
android:paddingBottom="5dp"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/settings_category_font"
|
|
||||||
android:text="@string/settings_primary_account_title"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:layout_marginRight="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_text"
|
|
||||||
linphone:title="@{@string/settings_primary_account_display_name_title}"
|
|
||||||
linphone:listener="@{viewModel.primaryAccountDisplayNameListener}"
|
|
||||||
linphone:defaultValue="@{viewModel.primaryAccountDisplayName}"
|
|
||||||
linphone:inputType="@{InputType.TYPE_CLASS_TEXT}"
|
|
||||||
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_text"
|
|
||||||
linphone:title="@{@string/settings_primary_account_username_title}"
|
|
||||||
linphone:listener="@{viewModel.primaryAccountUsernameListener}"
|
|
||||||
linphone:defaultValue="@{viewModel.primaryAccountUsername}"
|
|
||||||
linphone:inputType="@{InputType.TYPE_CLASS_TEXT}"
|
|
||||||
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/settings_category_font"
|
|
||||||
android:text="@string/settings_accounts_title"
|
|
||||||
android:visibility="@{viewModel.showAccountSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:layout_marginRight="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:visibility="@{viewModel.showAccountSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:entries="@{viewModel.accounts}"
|
|
||||||
linphone:layout="@{@layout/settings_account_cell}"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/settings_category_font"
|
|
||||||
android:text="@string/settings_list_title"
|
|
||||||
android:paddingTop="15dp"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:layout_marginRight="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.tunnelSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showTunnelSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_tunnel_title}" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.audioSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showAudioSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_audio_title}"
|
|
||||||
linphone:icon="@{@drawable/settings_audio}" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.videoSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showVideoSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_video_title}"
|
|
||||||
linphone:icon="@{@drawable/settings_video}" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.callSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showCallSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_call_title}"
|
|
||||||
linphone:icon="@{@drawable/settings_call}" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.chatSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showChatSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_chat_title}"
|
|
||||||
linphone:icon="@{@drawable/settings_chat}" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.networkSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showNetworkSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_network_title}"
|
|
||||||
linphone:icon="@{@drawable/settings_network}" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.contactsSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showContactsSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_contacts_title}"
|
|
||||||
linphone:icon="@{@drawable/settings_contacts}" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.advancedSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showAdvancedSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_advanced_title}"
|
|
||||||
linphone:icon="@{@drawable/settings_advanced}" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
|
|
||||||
</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/settings_nav_container"
|
|
||||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
linphone:defaultNavHost="false"
|
|
||||||
linphone:navGraph="@navigation/settings_nav_graph"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</layout>
|
|
|
@ -1,175 +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="cancelForwardClickListener"
|
|
||||||
type="android.view.View.OnClickListener" />
|
|
||||||
<variable
|
|
||||||
name="cancelSharingClickListener"
|
|
||||||
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">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
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="wrap_content"
|
|
||||||
android:background="?attr/lightToolbarBackgroundColor"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="@dimen/main_activity_top_bar_size"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{cancelForwardClickListener}"
|
|
||||||
android:visibility="@{viewModel.forwardPending ? View.VISIBLE : View.GONE}"
|
|
||||||
android:contentDescription="@string/content_description_cancel_forward"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:src="@drawable/cancel" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:onClick="@{cancelSharingClickListener}"
|
|
||||||
android:visibility="@{viewModel.fileSharingPending || viewModel.textSharingPending ? View.VISIBLE : View.GONE}"
|
|
||||||
android:contentDescription="@string/content_description_cancel_sharing"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:background="?attr/button_background_drawable"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:src="@drawable/cancel" />
|
|
||||||
|
|
||||||
<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:visibility="@{viewModel.forwardPending || viewModel.fileSharingPending || viewModel.textSharingPending ? View.GONE : View.VISIBLE}"
|
|
||||||
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>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:visibility="@{viewModel.fileSharingPending || viewModel.textSharingPending || viewModel.forwardPending ? View.VISIBLE : View.GONE, default=gone}"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?attr/backgroundContrastColor"
|
|
||||||
android:textColor="?attr/secondaryTextColor"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:text="@{viewModel.fileSharingPending ? @string/chat_room_choose_conversation_for_file_sharing : (viewModel.textSharingPending ? @string/chat_room_choose_conversation_for_text_sharing : @string/chat_room_choose_conversation_for_message_forward)}" />
|
|
||||||
|
|
||||||
</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="@dimen/main_activity_top_bar_size"
|
|
||||||
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,202 +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">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
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="@dimen/main_activity_top_bar_size"
|
|
||||||
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="@dimen/main_activity_top_bar_size"
|
|
||||||
android:layout_alignTop="@id/top_bar"
|
|
||||||
tools:layout="@layout/list_edit_top_bar_fragment" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/searchBar"
|
|
||||||
android:text="@={viewModel.filter}"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:inputType="textPersonName"
|
|
||||||
android:layout_below="@id/top_bar"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:drawableLeft="@drawable/search"
|
|
||||||
android:drawablePadding="10dp"
|
|
||||||
android:background="@color/transparent_color"
|
|
||||||
android:backgroundTint="@color/transparent_color"
|
|
||||||
android:hint="@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>
|
|
|
@ -1,165 +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">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
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="@dimen/main_activity_top_bar_size"
|
|
||||||
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="@dimen/main_activity_top_bar_size"
|
|
||||||
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>
|
|
|
@ -1,209 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:linphone="http://schemas.android.com/apk/res-auto">
|
|
||||||
|
|
||||||
<data>
|
|
||||||
<import type="android.view.View"/>
|
|
||||||
<variable
|
|
||||||
name="backClickListener"
|
|
||||||
type="android.view.View.OnClickListener"/>
|
|
||||||
<variable
|
|
||||||
name="viewModel"
|
|
||||||
type="org.linphone.activities.main.settings.viewmodels.SettingsViewModel" />
|
|
||||||
</data>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
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="@dimen/main_activity_top_bar_size"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
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" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/accent_colored_title_font"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.6"
|
|
||||||
android:gravity="center"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:text="@string/settings"/>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:visibility="invisible" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
|
||||||
android:layout_below="@id/top_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingTop="5dp"
|
|
||||||
android:paddingBottom="5dp"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/settings_category_font"
|
|
||||||
android:text="@string/settings_primary_account_title"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:layout_marginRight="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_text"
|
|
||||||
linphone:title="@{@string/settings_primary_account_display_name_title}"
|
|
||||||
linphone:listener="@{viewModel.primaryAccountDisplayNameListener}"
|
|
||||||
linphone:defaultValue="@{viewModel.primaryAccountDisplayName}"
|
|
||||||
linphone:inputType="@{InputType.TYPE_CLASS_TEXT}"
|
|
||||||
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_text"
|
|
||||||
linphone:title="@{@string/settings_primary_account_username_title}"
|
|
||||||
linphone:listener="@{viewModel.primaryAccountUsernameListener}"
|
|
||||||
linphone:defaultValue="@{viewModel.primaryAccountUsername}"
|
|
||||||
linphone:inputType="@{InputType.TYPE_CLASS_TEXT}"
|
|
||||||
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/settings_category_font"
|
|
||||||
android:text="@string/settings_accounts_title"
|
|
||||||
android:visibility="@{viewModel.showAccountSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:layout_marginRight="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:visibility="@{viewModel.showAccountSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:entries="@{viewModel.accounts}"
|
|
||||||
linphone:layout="@{@layout/settings_account_cell}"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/settings_category_font"
|
|
||||||
android:text="@string/settings_list_title"
|
|
||||||
android:paddingTop="15dp"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:layout_marginRight="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.tunnelSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showTunnelSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_tunnel_title}" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.audioSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showAudioSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_audio_title}"
|
|
||||||
linphone:icon="@{@drawable/settings_audio}" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.videoSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showVideoSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_video_title}"
|
|
||||||
linphone:icon="@{@drawable/settings_video}" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.callSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showCallSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_call_title}"
|
|
||||||
linphone:icon="@{@drawable/settings_call}" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.chatSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showChatSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_chat_title}"
|
|
||||||
linphone:icon="@{@drawable/settings_chat}" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.networkSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showNetworkSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_network_title}"
|
|
||||||
linphone:icon="@{@drawable/settings_network}" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.contactsSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showContactsSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_contacts_title}"
|
|
||||||
linphone:icon="@{@drawable/settings_contacts}" />
|
|
||||||
|
|
||||||
<include
|
|
||||||
layout="@layout/settings_widget_basic"
|
|
||||||
linphone:listener="@{viewModel.advancedSettingsListener}"
|
|
||||||
android:visibility="@{viewModel.showAdvancedSettings ? View.VISIBLE : View.GONE}"
|
|
||||||
linphone:title="@{@string/settings_advanced_title}"
|
|
||||||
linphone:icon="@{@drawable/settings_advanced}" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
|
|
||||||
</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/settings_nav_container"
|
|
||||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
linphone:defaultNavHost="false"
|
|
||||||
linphone:navGraph="@navigation/settings_nav_graph"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</layout>
|
|
|
@ -32,6 +32,9 @@
|
||||||
<variable
|
<variable
|
||||||
name="chatSendingViewModel"
|
name="chatSendingViewModel"
|
||||||
type="org.linphone.activities.main.chat.viewmodels.ChatMessageSendingViewModel" />
|
type="org.linphone.activities.main.chat.viewmodels.ChatMessageSendingViewModel" />
|
||||||
|
<variable
|
||||||
|
name="sharedMainViewModel"
|
||||||
|
type="org.linphone.activities.main.viewmodels.SharedMainViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -49,6 +52,7 @@
|
||||||
android:id="@+id/back"
|
android:id="@+id/back"
|
||||||
android:contentDescription="@string/content_description_go_back"
|
android:contentDescription="@string/content_description_go_back"
|
||||||
android:onClick="@{backClickListener}"
|
android:onClick="@{backClickListener}"
|
||||||
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.VISIBLE : View.GONE}"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.2"
|
android:layout_weight="0.2"
|
||||||
|
@ -63,7 +67,7 @@
|
||||||
android:layout_weight="@{viewModel.oneToOneChatRoom ? 0.4f : 0.6f}"
|
android:layout_weight="@{viewModel.oneToOneChatRoom ? 0.4f : 0.6f}"
|
||||||
android:gravity="center_vertical|left"
|
android:gravity="center_vertical|left"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingLeft="5dp">
|
android:paddingLeft="15dp">
|
||||||
|
|
||||||
<org.linphone.views.MarqueeTextView
|
<org.linphone.views.MarqueeTextView
|
||||||
android:onClick="@{titleClickListener}"
|
android:onClick="@{titleClickListener}"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
<import type="android.view.View" />
|
<import type="android.view.View" />
|
||||||
|
@ -24,9 +25,16 @@
|
||||||
type="org.linphone.activities.main.chat.viewmodels.ChatRoomsListViewModel" />
|
type="org.linphone.activities.main.chat.viewmodels.ChatRoomsListViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<androidx.slidingpanelayout.widget.SlidingPaneLayout
|
||||||
|
android:id="@+id/sliding_pane"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="280dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="start">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/top_bar"
|
android:id="@+id/top_bar"
|
||||||
|
@ -80,7 +88,7 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.2"
|
android:layout_weight="0.2"
|
||||||
android:background="?attr/button_background_drawable"
|
android:background="?attr/button_background_drawable"
|
||||||
android:padding="15dp"
|
android:padding="10dp"
|
||||||
android:src="@drawable/chat_group_new" />
|
android:src="@drawable/chat_group_new" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
@ -135,6 +143,23 @@
|
||||||
android:text="@string/no_chat_history"
|
android:text="@string/no_chat_history"
|
||||||
android:visibility="@{viewModel.chatRooms.empty ? View.VISIBLE : View.GONE}" />
|
android:visibility="@{viewModel.chatRooms.empty ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:background="?attr/dividerColor" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<androidx.fragment.app.FragmentContainerView
|
||||||
|
android:id="@+id/chat_nav_container"
|
||||||
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
app:defaultNavHost="false"
|
||||||
|
app:navGraph="@navigation/chat_nav_graph"/>
|
||||||
|
|
||||||
|
</androidx.slidingpanelayout.widget.SlidingPaneLayout>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="org.linphone.activities.main.contact.viewmodels.ContactViewModel" />
|
type="org.linphone.activities.main.contact.viewmodels.ContactViewModel" />
|
||||||
|
<variable
|
||||||
|
name="sharedMainViewModel"
|
||||||
|
type="org.linphone.activities.main.viewmodels.SharedMainViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -33,6 +36,7 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/back"
|
||||||
android:onClick="@{backClickListener}"
|
android:onClick="@{backClickListener}"
|
||||||
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.VISIBLE : View.GONE}"
|
||||||
android:contentDescription="@string/content_description_go_back"
|
android:contentDescription="@string/content_description_go_back"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
<import type="android.view.View"/>
|
<import type="android.view.View"/>
|
||||||
|
@ -21,147 +22,178 @@
|
||||||
type="org.linphone.activities.main.contact.viewmodels.ContactsListViewModel" />
|
type="org.linphone.activities.main.contact.viewmodels.ContactsListViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<androidx.slidingpanelayout.widget.SlidingPaneLayout
|
||||||
|
android:id="@+id/sliding_pane"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:id="@+id/top_bar"
|
android:layout_width="280dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="@dimen/main_activity_top_bar_size"
|
android:layout_gravity="start">
|
||||||
android:background="?attr/lightToolbarBackgroundColor"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:id="@+id/top_bar"
|
||||||
android:layout_height="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_weight="0.2">
|
android:layout_height="@dimen/main_activity_top_bar_size"
|
||||||
|
android:background="?attr/lightToolbarBackgroundColor"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<RelativeLayout
|
||||||
android:onClick="@{allContactsToggleClickListener}"
|
android:layout_width="0dp"
|
||||||
android:enabled="@{viewModel.sipContactsSelected}"
|
|
||||||
android:contentDescription="@string/content_description_show_all_contacts"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/button_background_drawable"
|
android:layout_weight="0.2">
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/contacts_all" />
|
<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
|
<View
|
||||||
android:visibility="@{viewModel.sipContactsSelected ? View.GONE : View.VISIBLE}"
|
android:layout_width="0dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="5dp"
|
android:layout_weight="0.2" />
|
||||||
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
|
<ImageView
|
||||||
android:onClick="@{sipContactsToggleClickListener}"
|
android:onClick="@{newContactClickListener}"
|
||||||
android:enabled="@{!viewModel.sipContactsSelected}"
|
android:contentDescription="@string/content_description_add_contact"
|
||||||
android:contentDescription="@string/content_description_show_sip_contacts"
|
android:layout_width="0dp"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="0.2"
|
||||||
android:background="?attr/button_background_drawable"
|
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="@dimen/main_activity_top_bar_size"
|
||||||
|
android:layout_alignTop="@id/top_bar"
|
||||||
|
tools:layout="@layout/list_edit_top_bar_fragment" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/searchBar"
|
||||||
|
android:text="@={viewModel.filter}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_below="@id/top_bar"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:inputType="textPersonName"
|
||||||
|
android:drawableLeft="@drawable/search"
|
||||||
|
android:drawablePadding="10dp"
|
||||||
|
android:background="@color/transparent_color"
|
||||||
|
android:backgroundTint="@color/transparent_color"
|
||||||
|
android:hint="@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_below="@id/searchBar"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@id/searchBar">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/empty_list_font"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:padding="15dp"
|
android:text="@string/no_sip_contact"
|
||||||
android:src="@drawable/contacts_sip" />
|
android:visibility="@{viewModel.sipContactsSelected && viewModel.contactsList.empty ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
<View
|
<TextView
|
||||||
android:visibility="@{viewModel.sipContactsSelected ? View.VISIBLE : View.GONE}"
|
style="@style/empty_list_font"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="5dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_centerVertical="true"
|
||||||
android:background="?attr/accentColor" />
|
android:gravity="center"
|
||||||
|
android:text="@string/no_contact"
|
||||||
|
android:visibility="@{!viewModel.sipContactsSelected && viewModel.contactsList.empty ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="0dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.2" />
|
android:layout_alignParentRight="true"
|
||||||
|
android:background="?attr/dividerColor" />
|
||||||
|
|
||||||
<ImageView
|
</RelativeLayout>
|
||||||
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
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/list_edit_top_bar_fragment"
|
android:id="@+id/contacts_nav_container"
|
||||||
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="300dp"
|
||||||
android:layout_height="@dimen/main_activity_top_bar_size"
|
android:layout_height="match_parent"
|
||||||
android:layout_alignTop="@id/top_bar"
|
android:layout_weight="1"
|
||||||
tools:layout="@layout/list_edit_top_bar_fragment" />
|
app:defaultNavHost="false"
|
||||||
|
app:navGraph="@navigation/contacts_nav_graph"/>
|
||||||
|
|
||||||
<EditText
|
</androidx.slidingpanelayout.widget.SlidingPaneLayout>
|
||||||
android:id="@+id/searchBar"
|
|
||||||
android:text="@={viewModel.filter}"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_below="@id/top_bar"
|
|
||||||
android:layout_margin="10dp"
|
|
||||||
android:inputType="textPersonName"
|
|
||||||
android:drawableLeft="@drawable/search"
|
|
||||||
android:drawablePadding="10dp"
|
|
||||||
android:background="@color/transparent_color"
|
|
||||||
android:backgroundTint="@color/transparent_color"
|
|
||||||
android:hint="@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_below="@id/searchBar"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
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>
|
</layout>
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="org.linphone.activities.main.history.viewmodels.CallLogViewModel" />
|
type="org.linphone.activities.main.history.viewmodels.CallLogViewModel" />
|
||||||
|
<variable
|
||||||
|
name="sharedMainViewModel"
|
||||||
|
type="org.linphone.activities.main.viewmodels.SharedMainViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -33,6 +36,7 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/back"
|
||||||
android:onClick="@{backClickListener}"
|
android:onClick="@{backClickListener}"
|
||||||
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.VISIBLE : View.GONE}"
|
||||||
android:contentDescription="@string/content_description_go_back"
|
android:contentDescription="@string/content_description_go_back"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
<import type="android.view.View"/>
|
<import type="android.view.View"/>
|
||||||
|
@ -18,114 +19,138 @@
|
||||||
type="org.linphone.activities.main.history.viewmodels.CallLogsListViewModel" />
|
type="org.linphone.activities.main.history.viewmodels.CallLogsListViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<androidx.slidingpanelayout.widget.SlidingPaneLayout
|
||||||
|
android:id="@+id/sliding_pane"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:id="@+id/top_bar"
|
android:layout_width="280dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="@dimen/main_activity_top_bar_size"
|
android:layout_gravity="start">
|
||||||
android:background="?attr/lightToolbarBackgroundColor"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:id="@+id/top_bar"
|
||||||
android:layout_height="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_weight="0.2">
|
android:layout_height="@dimen/main_activity_top_bar_size"
|
||||||
|
android:background="?attr/lightToolbarBackgroundColor"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<RelativeLayout
|
||||||
android:onClick="@{allCallLogsToggleClickListener}"
|
android:layout_width="0dp"
|
||||||
android:enabled="@{viewModel.missedCallLogsSelected}"
|
|
||||||
android:contentDescription="@string/content_description_show_all_calls"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/button_background_drawable"
|
android:layout_weight="0.2">
|
||||||
android:padding="15dp"
|
|
||||||
android:src="@drawable/history_all" />
|
<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
|
<View
|
||||||
android:visibility="@{viewModel.missedCallLogsSelected ? View.GONE : View.VISIBLE}"
|
android:layout_width="0dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="5dp"
|
android:layout_weight="0.4" />
|
||||||
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
|
<ImageView
|
||||||
android:onClick="@{missedCallLogsToggleClickListener}"
|
android:onClick="@{editClickListener}"
|
||||||
android:enabled="@{!viewModel.missedCallLogsSelected}"
|
android:enabled="@{viewModel.missedCallLogsSelected ? !viewModel.missedCallLogs.empty : !viewModel.callLogs.empty}"
|
||||||
android:contentDescription="@string/content_description_show_missed_calls"
|
android:contentDescription="@string/content_description_enter_edition_mode"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="0.2"
|
||||||
android:background="?attr/button_background_drawable"
|
android:background="?attr/button_background_drawable"
|
||||||
android:gravity="center"
|
|
||||||
android:padding="15dp"
|
android:padding="15dp"
|
||||||
android:src="@drawable/history_missed" />
|
android:src="@drawable/delete" />
|
||||||
|
|
||||||
<View
|
</LinearLayout>
|
||||||
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>
|
<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="@dimen/main_activity_top_bar_size"
|
||||||
|
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}" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="0dp"
|
android:layout_width="1dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.4" />
|
android:layout_alignParentRight="true"
|
||||||
|
android:background="?attr/dividerColor" />
|
||||||
|
|
||||||
<ImageView
|
</RelativeLayout>
|
||||||
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
|
<androidx.fragment.app.FragmentContainerView
|
||||||
android:id="@+id/list_edit_top_bar_fragment"
|
android:id="@+id/history_nav_container"
|
||||||
android:name="org.linphone.activities.main.fragments.ListTopBarFragment"
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="300dp"
|
||||||
android:layout_height="@dimen/main_activity_top_bar_size"
|
android:layout_height="match_parent"
|
||||||
android:layout_alignTop="@id/top_bar"
|
android:layout_weight="1"
|
||||||
tools:layout="@layout/list_edit_top_bar_fragment" />
|
app:defaultNavHost="false"
|
||||||
|
app:navGraph="@navigation/history_nav_graph"/>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
</androidx.slidingpanelayout.widget.SlidingPaneLayout>
|
||||||
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>
|
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="org.linphone.activities.main.settings.viewmodels.AccountSettingsViewModel"/>
|
type="org.linphone.activities.main.settings.viewmodels.AccountSettingsViewModel"/>
|
||||||
|
<variable
|
||||||
|
name="sharedMainViewModel"
|
||||||
|
type="org.linphone.activities.main.viewmodels.SharedMainViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -29,6 +32,7 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/back"
|
||||||
android:onClick="@{backClickListener}"
|
android:onClick="@{backClickListener}"
|
||||||
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.VISIBLE : View.GONE}"
|
||||||
android:contentDescription="@string/content_description_go_back"
|
android:contentDescription="@string/content_description_go_back"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -52,7 +56,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.2"
|
android:layout_weight="0.2"
|
||||||
android:visibility="invisible" />
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.INVISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="org.linphone.activities.main.settings.viewmodels.AdvancedSettingsViewModel"/>
|
type="org.linphone.activities.main.settings.viewmodels.AdvancedSettingsViewModel"/>
|
||||||
|
<variable
|
||||||
|
name="sharedMainViewModel"
|
||||||
|
type="org.linphone.activities.main.viewmodels.SharedMainViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -28,6 +31,7 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/back"
|
||||||
android:onClick="@{backClickListener}"
|
android:onClick="@{backClickListener}"
|
||||||
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.VISIBLE : View.GONE}"
|
||||||
android:contentDescription="@string/content_description_go_back"
|
android:contentDescription="@string/content_description_go_back"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -51,7 +55,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.2"
|
android:layout_weight="0.2"
|
||||||
android:visibility="invisible" />
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.INVISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="org.linphone.activities.main.settings.viewmodels.AudioSettingsViewModel"/>
|
type="org.linphone.activities.main.settings.viewmodels.AudioSettingsViewModel"/>
|
||||||
|
<variable
|
||||||
|
name="sharedMainViewModel"
|
||||||
|
type="org.linphone.activities.main.viewmodels.SharedMainViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -28,6 +31,7 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/back"
|
||||||
android:onClick="@{backClickListener}"
|
android:onClick="@{backClickListener}"
|
||||||
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.VISIBLE : View.GONE}"
|
||||||
android:contentDescription="@string/content_description_go_back"
|
android:contentDescription="@string/content_description_go_back"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -51,7 +55,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.2"
|
android:layout_weight="0.2"
|
||||||
android:visibility="invisible" />
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.INVISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="org.linphone.activities.main.settings.viewmodels.CallSettingsViewModel"/>
|
type="org.linphone.activities.main.settings.viewmodels.CallSettingsViewModel"/>
|
||||||
|
<variable
|
||||||
|
name="sharedMainViewModel"
|
||||||
|
type="org.linphone.activities.main.viewmodels.SharedMainViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -28,6 +31,7 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/back"
|
||||||
android:onClick="@{backClickListener}"
|
android:onClick="@{backClickListener}"
|
||||||
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.VISIBLE : View.GONE}"
|
||||||
android:contentDescription="@string/content_description_go_back"
|
android:contentDescription="@string/content_description_go_back"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -51,7 +55,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.2"
|
android:layout_weight="0.2"
|
||||||
android:visibility="invisible" />
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.INVISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="org.linphone.activities.main.settings.viewmodels.ChatSettingsViewModel"/>
|
type="org.linphone.activities.main.settings.viewmodels.ChatSettingsViewModel"/>
|
||||||
|
<variable
|
||||||
|
name="sharedMainViewModel"
|
||||||
|
type="org.linphone.activities.main.viewmodels.SharedMainViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -28,6 +31,7 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/back"
|
||||||
android:onClick="@{backClickListener}"
|
android:onClick="@{backClickListener}"
|
||||||
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.VISIBLE : View.GONE}"
|
||||||
android:contentDescription="@string/content_description_go_back"
|
android:contentDescription="@string/content_description_go_back"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -51,7 +55,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.2"
|
android:layout_weight="0.2"
|
||||||
android:visibility="invisible" />
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.INVISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="org.linphone.activities.main.settings.viewmodels.ContactsSettingsViewModel"/>
|
type="org.linphone.activities.main.settings.viewmodels.ContactsSettingsViewModel"/>
|
||||||
|
<variable
|
||||||
|
name="sharedMainViewModel"
|
||||||
|
type="org.linphone.activities.main.viewmodels.SharedMainViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -27,6 +30,7 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/back"
|
||||||
android:onClick="@{backClickListener}"
|
android:onClick="@{backClickListener}"
|
||||||
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.VISIBLE : View.GONE}"
|
||||||
android:contentDescription="@string/content_description_go_back"
|
android:contentDescription="@string/content_description_go_back"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -50,7 +54,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.2"
|
android:layout_weight="0.2"
|
||||||
android:visibility="invisible" />
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.INVISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:linphone="http://schemas.android.com/apk/res-auto">
|
xmlns:linphone="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
<import type="android.view.View"/>
|
<import type="android.view.View"/>
|
||||||
|
@ -13,170 +14,194 @@
|
||||||
type="org.linphone.activities.main.settings.viewmodels.SettingsViewModel" />
|
type="org.linphone.activities.main.settings.viewmodels.SettingsViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<androidx.slidingpanelayout.widget.SlidingPaneLayout
|
||||||
|
android:id="@+id/sliding_pane"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:id="@+id/top_bar"
|
android:layout_width="280dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="@dimen/main_activity_top_bar_size"
|
android:layout_gravity="start">
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
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" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
style="@style/accent_colored_title_font"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.6"
|
|
||||||
android:gravity="center"
|
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="end"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:text="@string/settings"/>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="0.2"
|
|
||||||
android:visibility="invisible" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
|
||||||
android:layout_below="@id/top_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/top_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/main_activity_top_bar_size"
|
||||||
android:paddingTop="5dp"
|
android:layout_gravity="center_horizontal"
|
||||||
android:paddingBottom="5dp"
|
android:background="?attr/lightToolbarBackgroundColor"
|
||||||
android:orientation="vertical">
|
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" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/settings_category_font"
|
style="@style/accent_colored_title_font"
|
||||||
android:text="@string/settings_primary_account_title"
|
android:layout_width="0dp"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_weight="0.6"
|
||||||
android:layout_width="wrap_content"
|
android:gravity="center"
|
||||||
android:layout_height="wrap_content"
|
android:singleLine="true"
|
||||||
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
android:ellipsize="end"
|
||||||
|
android:padding="15dp"
|
||||||
|
android:text="@string/settings"/>
|
||||||
|
|
||||||
<include
|
<View
|
||||||
layout="@layout/settings_widget_text"
|
android:layout_width="0dp"
|
||||||
linphone:title="@{@string/settings_primary_account_display_name_title}"
|
android:layout_height="match_parent"
|
||||||
linphone:listener="@{viewModel.primaryAccountDisplayNameListener}"
|
android:layout_weight="0.2"
|
||||||
linphone:defaultValue="@{viewModel.primaryAccountDisplayName}"
|
android:visibility="invisible" />
|
||||||
linphone:inputType="@{InputType.TYPE_CLASS_TEXT}"
|
|
||||||
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
|
||||||
|
|
||||||
<include
|
</LinearLayout>
|
||||||
layout="@layout/settings_widget_text"
|
|
||||||
linphone:title="@{@string/settings_primary_account_username_title}"
|
|
||||||
linphone:listener="@{viewModel.primaryAccountUsernameListener}"
|
|
||||||
linphone:defaultValue="@{viewModel.primaryAccountUsername}"
|
|
||||||
linphone:inputType="@{InputType.TYPE_CLASS_TEXT}"
|
|
||||||
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
|
||||||
|
|
||||||
<TextView
|
<androidx.core.widget.NestedScrollView
|
||||||
style="@style/settings_category_font"
|
android:layout_below="@id/top_bar"
|
||||||
android:text="@string/settings_accounts_title"
|
android:layout_width="match_parent"
|
||||||
android:visibility="@{viewModel.showAccountSettings && !viewModel.accounts.empty ? View.VISIBLE : View.GONE}"
|
android:layout_height="match_parent">
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:layout_marginRight="10dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:paddingTop="5dp"
|
||||||
android:visibility="@{viewModel.showAccountSettings ? View.VISIBLE : View.GONE}"
|
android:paddingBottom="5dp"
|
||||||
linphone:entries="@{viewModel.accounts}"
|
android:orientation="vertical">
|
||||||
linphone:layout="@{@layout/settings_account_cell}"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/settings_category_font"
|
style="@style/settings_category_font"
|
||||||
android:text="@string/settings_list_title"
|
android:text="@string/settings_primary_account_title"
|
||||||
android:paddingTop="15dp"
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginRight="10dp"
|
||||||
android:layout_marginRight="10dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"/>
|
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
||||||
|
|
||||||
<include
|
<include
|
||||||
layout="@layout/settings_widget_basic"
|
layout="@layout/settings_widget_text"
|
||||||
linphone:listener="@{viewModel.tunnelSettingsListener}"
|
linphone:title="@{@string/settings_primary_account_display_name_title}"
|
||||||
android:visibility="@{viewModel.showTunnelSettings ? View.VISIBLE : View.GONE}"
|
linphone:listener="@{viewModel.primaryAccountDisplayNameListener}"
|
||||||
linphone:title="@{@string/settings_tunnel_title}" />
|
linphone:defaultValue="@{viewModel.primaryAccountDisplayName}"
|
||||||
|
linphone:inputType="@{InputType.TYPE_CLASS_TEXT}"
|
||||||
|
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
||||||
|
|
||||||
<include
|
<include
|
||||||
layout="@layout/settings_widget_basic"
|
layout="@layout/settings_widget_text"
|
||||||
android:visibility="@{viewModel.showAudioSettings ? View.VISIBLE : View.GONE}"
|
linphone:title="@{@string/settings_primary_account_username_title}"
|
||||||
linphone:listener="@{viewModel.audioSettingsListener}"
|
linphone:listener="@{viewModel.primaryAccountUsernameListener}"
|
||||||
linphone:title="@{@string/settings_audio_title}"
|
linphone:defaultValue="@{viewModel.primaryAccountUsername}"
|
||||||
linphone:icon="@{@drawable/settings_audio}" />
|
linphone:inputType="@{InputType.TYPE_CLASS_TEXT}"
|
||||||
|
android:visibility="@{viewModel.accounts.empty ? View.VISIBLE : View.GONE}"/>
|
||||||
|
|
||||||
<include
|
<TextView
|
||||||
layout="@layout/settings_widget_basic"
|
style="@style/settings_category_font"
|
||||||
android:visibility="@{viewModel.showVideoSettings ? View.VISIBLE : View.GONE}"
|
android:text="@string/settings_accounts_title"
|
||||||
linphone:listener="@{viewModel.videoSettingsListener}"
|
android:visibility="@{viewModel.showAccountSettings && !viewModel.accounts.empty ? View.VISIBLE : View.GONE}"
|
||||||
linphone:title="@{@string/settings_video_title}"
|
android:layout_marginLeft="10dp"
|
||||||
linphone:icon="@{@drawable/settings_video}" />
|
android:layout_marginRight="10dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<include
|
<LinearLayout
|
||||||
layout="@layout/settings_widget_basic"
|
android:layout_width="match_parent"
|
||||||
android:visibility="@{viewModel.showCallSettings ? View.VISIBLE : View.GONE}"
|
android:layout_height="wrap_content"
|
||||||
linphone:listener="@{viewModel.callSettingsListener}"
|
android:orientation="vertical"
|
||||||
linphone:title="@{@string/settings_call_title}"
|
android:visibility="@{viewModel.showAccountSettings ? View.VISIBLE : View.GONE}"
|
||||||
linphone:icon="@{@drawable/settings_call}" />
|
linphone:entries="@{viewModel.accounts}"
|
||||||
|
linphone:layout="@{@layout/settings_account_cell}"/>
|
||||||
|
|
||||||
<include
|
<TextView
|
||||||
layout="@layout/settings_widget_basic"
|
style="@style/settings_category_font"
|
||||||
android:visibility="@{viewModel.showChatSettings ? View.VISIBLE : View.GONE}"
|
android:text="@string/settings_list_title"
|
||||||
linphone:listener="@{viewModel.chatSettingsListener}"
|
android:paddingTop="15dp"
|
||||||
linphone:title="@{@string/settings_chat_title}"
|
android:layout_marginLeft="10dp"
|
||||||
linphone:icon="@{@drawable/settings_chat}" />
|
android:layout_marginRight="10dp"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
<include
|
<include
|
||||||
layout="@layout/settings_widget_basic"
|
layout="@layout/settings_widget_basic"
|
||||||
android:visibility="@{viewModel.showNetworkSettings ? View.VISIBLE : View.GONE}"
|
linphone:listener="@{viewModel.tunnelSettingsListener}"
|
||||||
linphone:listener="@{viewModel.networkSettingsListener}"
|
android:visibility="@{viewModel.showTunnelSettings ? View.VISIBLE : View.GONE}"
|
||||||
linphone:title="@{@string/settings_network_title}"
|
linphone:title="@{@string/settings_tunnel_title}" />
|
||||||
linphone:icon="@{@drawable/settings_network}" />
|
|
||||||
|
|
||||||
<include
|
<include
|
||||||
layout="@layout/settings_widget_basic"
|
layout="@layout/settings_widget_basic"
|
||||||
android:visibility="@{viewModel.showContactsSettings ? View.VISIBLE : View.GONE}"
|
android:visibility="@{viewModel.showAudioSettings ? View.VISIBLE : View.GONE}"
|
||||||
linphone:listener="@{viewModel.contactsSettingsListener}"
|
linphone:listener="@{viewModel.audioSettingsListener}"
|
||||||
linphone:title="@{@string/settings_contacts_title}"
|
linphone:title="@{@string/settings_audio_title}"
|
||||||
linphone:icon="@{@drawable/settings_contacts}" />
|
linphone:icon="@{@drawable/settings_audio}" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
layout="@layout/settings_widget_basic"
|
layout="@layout/settings_widget_basic"
|
||||||
android:visibility="@{viewModel.showAdvancedSettings ? View.VISIBLE : View.GONE}"
|
android:visibility="@{viewModel.showVideoSettings ? View.VISIBLE : View.GONE}"
|
||||||
linphone:listener="@{viewModel.advancedSettingsListener}"
|
linphone:listener="@{viewModel.videoSettingsListener}"
|
||||||
linphone:title="@{@string/settings_advanced_title}"
|
linphone:title="@{@string/settings_video_title}"
|
||||||
linphone:icon="@{@drawable/settings_advanced}" />
|
linphone:icon="@{@drawable/settings_video}" />
|
||||||
|
|
||||||
</LinearLayout>
|
<include
|
||||||
|
layout="@layout/settings_widget_basic"
|
||||||
|
android:visibility="@{viewModel.showCallSettings ? View.VISIBLE : View.GONE}"
|
||||||
|
linphone:listener="@{viewModel.callSettingsListener}"
|
||||||
|
linphone:title="@{@string/settings_call_title}"
|
||||||
|
linphone:icon="@{@drawable/settings_call}" />
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
<include
|
||||||
|
layout="@layout/settings_widget_basic"
|
||||||
|
android:visibility="@{viewModel.showChatSettings ? View.VISIBLE : View.GONE}"
|
||||||
|
linphone:listener="@{viewModel.chatSettingsListener}"
|
||||||
|
linphone:title="@{@string/settings_chat_title}"
|
||||||
|
linphone:icon="@{@drawable/settings_chat}" />
|
||||||
|
|
||||||
</RelativeLayout>
|
<include
|
||||||
|
layout="@layout/settings_widget_basic"
|
||||||
|
android:visibility="@{viewModel.showNetworkSettings ? View.VISIBLE : View.GONE}"
|
||||||
|
linphone:listener="@{viewModel.networkSettingsListener}"
|
||||||
|
linphone:title="@{@string/settings_network_title}"
|
||||||
|
linphone:icon="@{@drawable/settings_network}" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
layout="@layout/settings_widget_basic"
|
||||||
|
android:visibility="@{viewModel.showContactsSettings ? View.VISIBLE : View.GONE}"
|
||||||
|
linphone:listener="@{viewModel.contactsSettingsListener}"
|
||||||
|
linphone:title="@{@string/settings_contacts_title}"
|
||||||
|
linphone:icon="@{@drawable/settings_contacts}" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
layout="@layout/settings_widget_basic"
|
||||||
|
android:visibility="@{viewModel.showAdvancedSettings ? View.VISIBLE : View.GONE}"
|
||||||
|
linphone:listener="@{viewModel.advancedSettingsListener}"
|
||||||
|
linphone:title="@{@string/settings_advanced_title}"
|
||||||
|
linphone:icon="@{@drawable/settings_advanced}" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="1dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:background="?attr/dividerColor" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<androidx.fragment.app.FragmentContainerView
|
||||||
|
android:id="@+id/settings_nav_container"
|
||||||
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
linphone:defaultNavHost="false"
|
||||||
|
linphone:navGraph="@navigation/settings_nav_graph"/>
|
||||||
|
|
||||||
|
</androidx.slidingpanelayout.widget.SlidingPaneLayout>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
|
@ -11,6 +11,9 @@
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="org.linphone.activities.main.settings.viewmodels.NetworkSettingsViewModel"/>
|
type="org.linphone.activities.main.settings.viewmodels.NetworkSettingsViewModel"/>
|
||||||
|
<variable
|
||||||
|
name="sharedMainViewModel"
|
||||||
|
type="org.linphone.activities.main.viewmodels.SharedMainViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -28,6 +31,7 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/back"
|
||||||
android:onClick="@{backClickListener}"
|
android:onClick="@{backClickListener}"
|
||||||
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.VISIBLE : View.GONE}"
|
||||||
android:contentDescription="@string/content_description_go_back"
|
android:contentDescription="@string/content_description_go_back"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -51,7 +55,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.2"
|
android:layout_weight="0.2"
|
||||||
android:visibility="invisible" />
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.INVISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="org.linphone.activities.main.settings.viewmodels.TunnelSettingsViewModel"/>
|
type="org.linphone.activities.main.settings.viewmodels.TunnelSettingsViewModel"/>
|
||||||
|
<variable
|
||||||
|
name="sharedMainViewModel"
|
||||||
|
type="org.linphone.activities.main.viewmodels.SharedMainViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -28,6 +31,7 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/back"
|
||||||
android:onClick="@{backClickListener}"
|
android:onClick="@{backClickListener}"
|
||||||
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.VISIBLE : View.GONE}"
|
||||||
android:contentDescription="@string/content_description_go_back"
|
android:contentDescription="@string/content_description_go_back"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -51,7 +55,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.2"
|
android:layout_weight="0.2"
|
||||||
android:visibility="invisible" />
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.INVISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="org.linphone.activities.main.settings.viewmodels.VideoSettingsViewModel"/>
|
type="org.linphone.activities.main.settings.viewmodels.VideoSettingsViewModel"/>
|
||||||
|
<variable
|
||||||
|
name="sharedMainViewModel"
|
||||||
|
type="org.linphone.activities.main.viewmodels.SharedMainViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -28,6 +31,7 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/back"
|
android:id="@+id/back"
|
||||||
android:onClick="@{backClickListener}"
|
android:onClick="@{backClickListener}"
|
||||||
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.VISIBLE : View.GONE}"
|
||||||
android:contentDescription="@string/content_description_go_back"
|
android:contentDescription="@string/content_description_go_back"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -51,7 +55,7 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.2"
|
android:layout_weight="0.2"
|
||||||
android:visibility="invisible" />
|
android:visibility="@{sharedMainViewModel.canSlidingPaneBeClosed ? View.INVISIBLE : View.GONE}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -1,87 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/chat_nav_graph.xml"
|
|
||||||
app:startDestination="@id/emptyChatFragment">
|
|
||||||
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/detailChatRoomFragment"
|
|
||||||
android:name="org.linphone.activities.main.chat.fragments.DetailChatRoomFragment"
|
|
||||||
tools:layout="@layout/chat_room_detail_fragment"
|
|
||||||
android:label="DetailChatRoomFragment" >
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_detailChatRoomFragment_to_imdnFragment"
|
|
||||||
app:destination="@id/imdnFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_detailChatRoomFragment_to_devicesFragment"
|
|
||||||
app:destination="@id/devicesFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_detailChatRoomFragment_to_groupInfoFragment"
|
|
||||||
app:destination="@id/groupInfoFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_detailChatRoomFragment_to_ephemeralFragment"
|
|
||||||
app:destination="@id/ephemeralFragment" />
|
|
||||||
</fragment>
|
|
||||||
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/chatRoomCreationFragment"
|
|
||||||
android:name="org.linphone.activities.main.chat.fragments.ChatRoomCreationFragment"
|
|
||||||
tools:layout="@layout/chat_room_creation_fragment"
|
|
||||||
android:label="ChatRoomCreationFragment" >
|
|
||||||
<argument
|
|
||||||
android:name="createGroup"
|
|
||||||
app:argType="boolean"
|
|
||||||
android:defaultValue="false" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_chatRoomCreationFragment_to_groupInfoFragment"
|
|
||||||
app:destination="@id/groupInfoFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_chatRoomCreationFragment_to_detailChatRoomFragment"
|
|
||||||
app:destination="@id/detailChatRoomFragment" />
|
|
||||||
</fragment>
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/devicesFragment"
|
|
||||||
android:name="org.linphone.activities.main.chat.fragments.DevicesFragment"
|
|
||||||
tools:layout="@layout/chat_room_devices_fragment"
|
|
||||||
android:label="DevicesFragment" />
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/groupInfoFragment"
|
|
||||||
android:name="org.linphone.activities.main.chat.fragments.GroupInfoFragment"
|
|
||||||
tools:layout="@layout/chat_room_group_info_fragment"
|
|
||||||
android:label="GroupInfoFragment" >
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_groupInfoFragment_to_chatRoomCreationFragment"
|
|
||||||
app:destination="@id/chatRoomCreationFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_groupInfoFragment_to_detailChatRoomFragment"
|
|
||||||
app:destination="@id/detailChatRoomFragment" />
|
|
||||||
</fragment>
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/imdnFragment"
|
|
||||||
android:name="org.linphone.activities.main.chat.fragments.ImdnFragment"
|
|
||||||
tools:layout="@layout/chat_room_imdn_fragment"
|
|
||||||
android:label="ImdnFragment" >
|
|
||||||
<argument
|
|
||||||
android:name="MessageId"
|
|
||||||
app:argType="string" />
|
|
||||||
</fragment>
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/emptyChatFragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.EmptyFragment"
|
|
||||||
tools:layout="@layout/empty_fragment"
|
|
||||||
android:label="EmptyFragment" >
|
|
||||||
</fragment>
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_global_detailChatRoomFragment"
|
|
||||||
app:destination="@id/detailChatRoomFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_global_chatRoomCreationFragment"
|
|
||||||
app:destination="@id/chatRoomCreationFragment" />
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/ephemeralFragment"
|
|
||||||
android:name="org.linphone.activities.main.chat.fragments.EphemeralFragment"
|
|
||||||
tools:layout="@layout/chat_room_ephemeral_fragment"
|
|
||||||
android:label="EphemeralFragment" />
|
|
||||||
|
|
||||||
</navigation>
|
|
|
@ -1,47 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/contacts_nav_graph.xml"
|
|
||||||
app:startDestination="@id/emptyContactFragment">
|
|
||||||
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/detailContactFragment"
|
|
||||||
android:name="org.linphone.activities.main.contact.fragments.DetailContactFragment"
|
|
||||||
tools:layout="@layout/contact_detail_fragment"
|
|
||||||
android:label="DetailContactFragment" >
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_detailContactFragment_to_contactEditorFragment"
|
|
||||||
app:destination="@id/contactEditorFragment" />
|
|
||||||
</fragment>
|
|
||||||
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/contactEditorFragment"
|
|
||||||
android:name="org.linphone.activities.main.contact.fragments.ContactEditorFragment"
|
|
||||||
tools:layout="@layout/contact_editor_fragment"
|
|
||||||
android:label="ContactEditorFragment" >
|
|
||||||
<argument
|
|
||||||
android:name="SipUri"
|
|
||||||
app:argType="string"
|
|
||||||
app:nullable="true" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_contactEditorFragment_to_detailContactFragment"
|
|
||||||
app:destination="@id/detailContactFragment" />
|
|
||||||
</fragment>
|
|
||||||
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/emptyContactFragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.EmptyFragment"
|
|
||||||
tools:layout="@layout/empty_fragment"
|
|
||||||
android:label="EmptyFragment" >
|
|
||||||
</fragment>
|
|
||||||
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_global_detailContactFragment"
|
|
||||||
app:destination="@id/detailContactFragment" />
|
|
||||||
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_global_contactEditorFragment"
|
|
||||||
app:destination="@id/contactEditorFragment" />
|
|
||||||
|
|
||||||
</navigation>
|
|
|
@ -1,24 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/history_nav_graph.xml"
|
|
||||||
app:startDestination="@id/emptyFragment">
|
|
||||||
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/emptyFragment"
|
|
||||||
android:name="org.linphone.activities.main.fragments.EmptyFragment"
|
|
||||||
tools:layout="@layout/empty_fragment"
|
|
||||||
android:label="EmptyFragment"/>
|
|
||||||
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/detailCallLogFragment"
|
|
||||||
android:name="org.linphone.activities.main.history.fragments.DetailCallLogFragment"
|
|
||||||
tools:layout="@layout/history_detail_fragment"
|
|
||||||
android:label="DetailCallLogFragment" />
|
|
||||||
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_global_detailCallLogFragment"
|
|
||||||
app:destination="@id/detailCallLogFragment" />
|
|
||||||
|
|
||||||
</navigation>
|
|
|
@ -3,7 +3,13 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/chat_nav_graph.xml"
|
android:id="@+id/chat_nav_graph.xml"
|
||||||
app:startDestination="@id/detailChatRoomFragment">
|
app:startDestination="@id/emptyChatFragment">
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/emptyChatFragment"
|
||||||
|
android:name="org.linphone.activities.main.fragments.EmptyFragment"
|
||||||
|
tools:layout="@layout/empty_fragment"
|
||||||
|
android:label="EmptyFragment" />
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/detailChatRoomFragment"
|
android:id="@+id/detailChatRoomFragment"
|
||||||
|
@ -28,7 +34,7 @@
|
||||||
android:id="@+id/chatRoomCreationFragment"
|
android:id="@+id/chatRoomCreationFragment"
|
||||||
android:name="org.linphone.activities.main.chat.fragments.ChatRoomCreationFragment"
|
android:name="org.linphone.activities.main.chat.fragments.ChatRoomCreationFragment"
|
||||||
tools:layout="@layout/chat_room_creation_fragment"
|
tools:layout="@layout/chat_room_creation_fragment"
|
||||||
android:label="ChatRoomCreationFragment">
|
android:label="ChatRoomCreationFragment" >
|
||||||
<argument
|
<argument
|
||||||
android:name="createGroup"
|
android:name="createGroup"
|
||||||
app:argType="boolean"
|
app:argType="boolean"
|
||||||
|
@ -40,11 +46,13 @@
|
||||||
android:id="@+id/action_chatRoomCreationFragment_to_detailChatRoomFragment"
|
android:id="@+id/action_chatRoomCreationFragment_to_detailChatRoomFragment"
|
||||||
app:destination="@id/detailChatRoomFragment" />
|
app:destination="@id/detailChatRoomFragment" />
|
||||||
</fragment>
|
</fragment>
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/devicesFragment"
|
android:id="@+id/devicesFragment"
|
||||||
android:name="org.linphone.activities.main.chat.fragments.DevicesFragment"
|
android:name="org.linphone.activities.main.chat.fragments.DevicesFragment"
|
||||||
tools:layout="@layout/chat_room_devices_fragment"
|
tools:layout="@layout/chat_room_devices_fragment"
|
||||||
android:label="DevicesFragment" />
|
android:label="DevicesFragment" />
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/groupInfoFragment"
|
android:id="@+id/groupInfoFragment"
|
||||||
android:name="org.linphone.activities.main.chat.fragments.GroupInfoFragment"
|
android:name="org.linphone.activities.main.chat.fragments.GroupInfoFragment"
|
||||||
|
@ -57,6 +65,7 @@
|
||||||
android:id="@+id/action_groupInfoFragment_to_detailChatRoomFragment"
|
android:id="@+id/action_groupInfoFragment_to_detailChatRoomFragment"
|
||||||
app:destination="@id/detailChatRoomFragment" />
|
app:destination="@id/detailChatRoomFragment" />
|
||||||
</fragment>
|
</fragment>
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/imdnFragment"
|
android:id="@+id/imdnFragment"
|
||||||
android:name="org.linphone.activities.main.chat.fragments.ImdnFragment"
|
android:name="org.linphone.activities.main.chat.fragments.ImdnFragment"
|
||||||
|
@ -66,6 +75,15 @@
|
||||||
android:name="MessageId"
|
android:name="MessageId"
|
||||||
app:argType="string" />
|
app:argType="string" />
|
||||||
</fragment>
|
</fragment>
|
||||||
|
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_global_detailChatRoomFragment"
|
||||||
|
app:destination="@id/detailChatRoomFragment" />
|
||||||
|
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_global_chatRoomCreationFragment"
|
||||||
|
app:destination="@id/chatRoomCreationFragment" />
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/ephemeralFragment"
|
android:id="@+id/ephemeralFragment"
|
||||||
android:name="org.linphone.activities.main.chat.fragments.EphemeralFragment"
|
android:name="org.linphone.activities.main.chat.fragments.EphemeralFragment"
|
||||||
|
|
|
@ -3,7 +3,13 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/contacts_nav_graph.xml"
|
android:id="@+id/contacts_nav_graph.xml"
|
||||||
app:startDestination="@id/detailContactFragment">
|
app:startDestination="@id/emptyContactFragment">
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/emptyContactFragment"
|
||||||
|
android:name="org.linphone.activities.main.fragments.EmptyFragment"
|
||||||
|
tools:layout="@layout/empty_fragment"
|
||||||
|
android:label="EmptyFragment"/>
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/detailContactFragment"
|
android:id="@+id/detailContactFragment"
|
||||||
|
@ -18,7 +24,6 @@
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_detailContactFragment_to_detailChatRoomFragment"
|
android:id="@+id/action_detailContactFragment_to_detailChatRoomFragment"
|
||||||
app:destination="@id/chat_nav_graph.xml" />
|
app:destination="@id/chat_nav_graph.xml" />
|
||||||
|
|
||||||
</fragment>
|
</fragment>
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
|
@ -26,9 +31,21 @@
|
||||||
android:name="org.linphone.activities.main.contact.fragments.ContactEditorFragment"
|
android:name="org.linphone.activities.main.contact.fragments.ContactEditorFragment"
|
||||||
tools:layout="@layout/contact_editor_fragment"
|
tools:layout="@layout/contact_editor_fragment"
|
||||||
android:label="ContactEditorFragment" >
|
android:label="ContactEditorFragment" >
|
||||||
|
<argument
|
||||||
|
android:name="SipUri"
|
||||||
|
app:argType="string"
|
||||||
|
app:nullable="true" />
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_contactEditorFragment_to_detailContactFragment"
|
android:id="@+id/action_contactEditorFragment_to_detailContactFragment"
|
||||||
app:destination="@id/detailContactFragment" />
|
app:destination="@id/detailContactFragment" />
|
||||||
</fragment>
|
</fragment>
|
||||||
|
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_global_detailContactFragment"
|
||||||
|
app:destination="@id/detailContactFragment" />
|
||||||
|
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_global_contactEditorFragment"
|
||||||
|
app:destination="@id/contactEditorFragment" />
|
||||||
|
|
||||||
</navigation>
|
</navigation>
|
|
@ -3,22 +3,22 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/history_nav_graph.xml"
|
android:id="@+id/history_nav_graph.xml"
|
||||||
app:startDestination="@id/detailCallLogFragment">
|
app:startDestination="@id/emptyFragment">
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/emptyFragment"
|
||||||
|
android:name="org.linphone.activities.main.fragments.EmptyFragment"
|
||||||
|
tools:layout="@layout/empty_fragment"
|
||||||
|
android:label="EmptyFragment"/>
|
||||||
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/detailCallLogFragment"
|
android:id="@+id/detailCallLogFragment"
|
||||||
android:name="org.linphone.activities.main.history.fragments.DetailCallLogFragment"
|
android:name="org.linphone.activities.main.history.fragments.DetailCallLogFragment"
|
||||||
tools:layout="@layout/history_detail_fragment"
|
tools:layout="@layout/history_detail_fragment"
|
||||||
android:label="DetailCallLogFragment">
|
android:label="DetailCallLogFragment" />
|
||||||
|
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_detailCallLogFragment_to_detailContactFragment"
|
android:id="@+id/action_global_detailCallLogFragment"
|
||||||
app:destination="@id/contacts_nav_graph.xml" />
|
app:destination="@id/detailCallLogFragment" />
|
||||||
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_detailCallLogFragment_to_detailChatRoomFragment"
|
|
||||||
app:destination="@id/chat_nav_graph.xml" />
|
|
||||||
|
|
||||||
</fragment>
|
|
||||||
|
|
||||||
</navigation>
|
</navigation>
|
|
@ -19,12 +19,6 @@
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_masterChatRoomsFragment_to_masterContactsFragment"
|
android:id="@+id/action_masterChatRoomsFragment_to_masterContactsFragment"
|
||||||
app:destination="@id/masterContactsFragment" />
|
app:destination="@id/masterContactsFragment" />
|
||||||
<action
|
|
||||||
android:id="@+id/action_masterChatRoomsFragment_to_detailChatRoomFragment"
|
|
||||||
app:destination="@id/chat_nav_graph.xml" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_masterChatRoomsFragment_to_chatRoomCreationFragment"
|
|
||||||
app:destination="@id/chatRoomCreationFragment" />
|
|
||||||
<argument
|
<argument
|
||||||
android:name="LocalSipUri"
|
android:name="LocalSipUri"
|
||||||
app:argType="string"
|
app:argType="string"
|
||||||
|
@ -42,6 +36,9 @@
|
||||||
app:uri="linphone-android://chat-room/{LocalSipUri}/{RemoteSipUri}"
|
app:uri="linphone-android://chat-room/{LocalSipUri}/{RemoteSipUri}"
|
||||||
android:autoVerify="true" />
|
android:autoVerify="true" />
|
||||||
</fragment>
|
</fragment>
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_global_masterChatRoomsFragment"
|
||||||
|
app:destination="@id/masterChatRoomsFragment" />
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/masterContactsFragment"
|
android:id="@+id/masterContactsFragment"
|
||||||
android:name="org.linphone.activities.main.contact.fragments.MasterContactsFragment"
|
android:name="org.linphone.activities.main.contact.fragments.MasterContactsFragment"
|
||||||
|
@ -56,12 +53,6 @@
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_masterContactsFragment_to_masterChatRoomsFragment"
|
android:id="@+id/action_masterContactsFragment_to_masterChatRoomsFragment"
|
||||||
app:destination="@id/masterChatRoomsFragment" />
|
app:destination="@id/masterChatRoomsFragment" />
|
||||||
<action
|
|
||||||
android:id="@+id/action_masterContactsFragment_to_detailContactFragment"
|
|
||||||
app:destination="@id/contacts_nav_graph.xml" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_masterContactsFragment_to_contactEditorFragment"
|
|
||||||
app:destination="@id/contactEditorFragment" />
|
|
||||||
<argument
|
<argument
|
||||||
android:name="id"
|
android:name="id"
|
||||||
app:argType="string"
|
app:argType="string"
|
||||||
|
@ -79,7 +70,6 @@
|
||||||
app:uri="linphone-android://contact/new/{sipUri}"
|
app:uri="linphone-android://contact/new/{sipUri}"
|
||||||
android:autoVerify="true" />
|
android:autoVerify="true" />
|
||||||
</fragment>
|
</fragment>
|
||||||
<include app:graph="@navigation/history_nav_graph" />
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/masterCallLogsFragment"
|
android:id="@+id/masterCallLogsFragment"
|
||||||
android:name="org.linphone.activities.main.history.fragments.MasterCallLogsFragment"
|
android:name="org.linphone.activities.main.history.fragments.MasterCallLogsFragment"
|
||||||
|
@ -94,9 +84,6 @@
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_masterCallLogsFragment_to_masterChatRoomsFragment"
|
android:id="@+id/action_masterCallLogsFragment_to_masterChatRoomsFragment"
|
||||||
app:destination="@id/masterChatRoomsFragment" />
|
app:destination="@id/masterChatRoomsFragment" />
|
||||||
<action
|
|
||||||
android:id="@+id/action_masterCallLogsFragment_to_detailCallLogFragment"
|
|
||||||
app:destination="@id/history_nav_graph.xml" />
|
|
||||||
</fragment>
|
</fragment>
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/dialerFragment"
|
android:id="@+id/dialerFragment"
|
||||||
|
@ -117,49 +104,9 @@
|
||||||
app:argType="boolean"
|
app:argType="boolean"
|
||||||
android:defaultValue="false" />
|
android:defaultValue="false" />
|
||||||
</fragment>
|
</fragment>
|
||||||
<fragment
|
<action
|
||||||
android:id="@+id/contactEditorFragment"
|
android:id="@+id/action_global_dialerFragment"
|
||||||
android:name="org.linphone.activities.main.contact.fragments.ContactEditorFragment"
|
app:destination="@id/dialerFragment" />
|
||||||
tools:layout="@layout/contact_editor_fragment"
|
|
||||||
android:label="ContactEditorFragment" >
|
|
||||||
<argument
|
|
||||||
android:name="SipUri"
|
|
||||||
app:argType="string"
|
|
||||||
app:nullable="true" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_contactEditorFragment_to_detailContactFragment"
|
|
||||||
app:destination="@id/contacts_nav_graph.xml" />
|
|
||||||
</fragment>
|
|
||||||
<include app:graph="@navigation/chat_nav_graph" />
|
|
||||||
<include app:graph="@navigation/contacts_nav_graph" />
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/chatRoomCreationFragment"
|
|
||||||
android:name="org.linphone.activities.main.chat.fragments.ChatRoomCreationFragment"
|
|
||||||
tools:layout="@layout/chat_room_creation_fragment"
|
|
||||||
android:label="ChatRoomCreationFragment">
|
|
||||||
<argument
|
|
||||||
android:name="createGroup"
|
|
||||||
app:argType="boolean"
|
|
||||||
android:defaultValue="false" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_chatRoomCreationFragment_to_groupInfoFragment"
|
|
||||||
app:destination="@id/groupInfoFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_chatRoomCreationFragment_to_detailChatRoomFragment"
|
|
||||||
app:destination="@id/chat_nav_graph.xml" />
|
|
||||||
</fragment>
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/groupInfoFragment"
|
|
||||||
android:name="org.linphone.activities.main.chat.fragments.GroupInfoFragment"
|
|
||||||
tools:layout="@layout/chat_room_group_info_fragment"
|
|
||||||
android:label="GroupInfoFragment" >
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_groupInfoFragment_to_detailChatRoomFragment"
|
|
||||||
app:destination="@id/chat_nav_graph.xml" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_groupInfoFragment_to_chatRoomCreationFragment"
|
|
||||||
app:destination="@id/chatRoomCreationFragment" />
|
|
||||||
</fragment>
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/aboutFragment"
|
android:id="@+id/aboutFragment"
|
||||||
android:name="org.linphone.activities.main.about.AboutFragment"
|
android:name="org.linphone.activities.main.about.AboutFragment"
|
||||||
|
@ -181,33 +128,6 @@
|
||||||
android:name="org.linphone.activities.main.settings.fragments.SettingsFragment"
|
android:name="org.linphone.activities.main.settings.fragments.SettingsFragment"
|
||||||
tools:layout="@layout/settings_fragment"
|
tools:layout="@layout/settings_fragment"
|
||||||
android:label="SettingsFragment" >
|
android:label="SettingsFragment" >
|
||||||
<action
|
|
||||||
android:id="@+id/action_settingsFragment_to_chatSettingsFragment"
|
|
||||||
app:destination="@id/chatSettingsFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_settingsFragment_to_callSettingsFragment"
|
|
||||||
app:destination="@id/callSettingsFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_settingsFragment_to_advancedSettingsFragment"
|
|
||||||
app:destination="@id/advancedSettingsFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_settingsFragment_to_accountSettingsFragment"
|
|
||||||
app:destination="@id/accountSettingsFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_settingsFragment_to_audioSettingsFragment"
|
|
||||||
app:destination="@id/audioSettingsFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_settingsFragment_to_contactsSettingsFragment"
|
|
||||||
app:destination="@id/contactsSettingsFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_settingsFragment_to_videoSettingsFragment"
|
|
||||||
app:destination="@id/videoSettingsFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_settingsFragment_to_networkSettingsFragment"
|
|
||||||
app:destination="@id/networkSettingsFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_settingsFragment_to_tunnelSettingsFragment"
|
|
||||||
app:destination="@id/tunnelSettingsFragment" />
|
|
||||||
<deepLink
|
<deepLink
|
||||||
android:id="@+id/settingsDeepLink"
|
android:id="@+id/settingsDeepLink"
|
||||||
app:uri="linphone-android://settings/{Identity}"
|
app:uri="linphone-android://settings/{Identity}"
|
||||||
|
@ -216,139 +136,46 @@
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_global_settingsFragment"
|
android:id="@+id/action_global_settingsFragment"
|
||||||
app:destination="@id/settingsFragment" />
|
app:destination="@id/settingsFragment" />
|
||||||
<include app:graph="@navigation/settings_nav_graph" />
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/accountSettingsFragment"
|
|
||||||
android:name="org.linphone.activities.main.settings.fragments.AccountSettingsFragment"
|
|
||||||
tools:layout="@layout/settings_account_fragment"
|
|
||||||
android:label="AccountSettingsFragment" >
|
|
||||||
<argument
|
|
||||||
android:name="Identity"
|
|
||||||
app:argType="string" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_accountSettingsFragment_to_phoneAccountLinkingFragment"
|
|
||||||
app:destination="@id/phoneAccountLinkingFragment" />
|
|
||||||
<deepLink
|
|
||||||
android:id="@+id/accountSettingsDeepLink"
|
|
||||||
app:uri="linphone-android://account-settings/{Identity}"
|
|
||||||
android:autoVerify="true" />
|
|
||||||
</fragment>
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/advancedSettingsFragment"
|
|
||||||
android:name="org.linphone.activities.main.settings.fragments.AdvancedSettingsFragment"
|
|
||||||
tools:layout="@layout/settings_advanced_fragment"
|
|
||||||
android:label="AdvancedSettingsFragment" />
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/audioSettingsFragment"
|
|
||||||
android:name="org.linphone.activities.main.settings.fragments.AudioSettingsFragment"
|
|
||||||
tools:layout="@layout/settings_audio_fragment"
|
|
||||||
android:label="AudioSettingsFragment" />
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/callSettingsFragment"
|
|
||||||
android:name="org.linphone.activities.main.settings.fragments.CallSettingsFragment"
|
|
||||||
tools:layout="@layout/settings_call_fragment"
|
|
||||||
android:label="CallSettingsFragment" />
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/chatSettingsFragment"
|
|
||||||
android:name="org.linphone.activities.main.settings.fragments.ChatSettingsFragment"
|
|
||||||
tools:layout="@layout/settings_chat_fragment"
|
|
||||||
android:label="ChatSettingsFragment" />
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/contactsSettingsFragment"
|
|
||||||
android:name="org.linphone.activities.main.settings.fragments.ContactsSettingsFragment"
|
|
||||||
tools:layout="@layout/settings_contacts_fragment"
|
|
||||||
android:label="ContactsSettingsFragment" />
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/networkSettingsFragment"
|
|
||||||
android:name="org.linphone.activities.main.settings.fragments.NetworkSettingsFragment"
|
|
||||||
tools:layout="@layout/settings_network_fragment"
|
|
||||||
android:label="NetworkSettingsFragment" />
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/videoSettingsFragment"
|
|
||||||
android:name="org.linphone.activities.main.settings.fragments.VideoSettingsFragment"
|
|
||||||
tools:layout="@layout/settings_video_fragment"
|
|
||||||
android:label="VideoSettingsFragment" />
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/tunnelSettingsFragment"
|
|
||||||
android:name="org.linphone.activities.main.settings.fragments.TunnelSettingsFragment"
|
|
||||||
tools:layout="@layout/settings_tunnel_fragment"
|
|
||||||
android:label="TunnelSettingsFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_global_masterChatRoomsFragment"
|
|
||||||
app:destination="@id/masterChatRoomsFragment" />
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_global_dialerFragment"
|
|
||||||
app:destination="@id/dialerFragment" />
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/phoneAccountLinkingFragment"
|
|
||||||
tools:layout="@layout/assistant_phone_account_linking_fragment"
|
|
||||||
android:name="org.linphone.activities.assistant.fragments.PhoneAccountLinkingFragment"
|
|
||||||
android:label="PhoneAccountLinkingFragment" >
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_phoneAccountLinkingFragment_to_phoneAccountValidationFragment"
|
|
||||||
app:destination="@id/phoneAccountValidationFragment" />
|
|
||||||
<argument
|
|
||||||
android:name="Username"
|
|
||||||
app:argType="string" />
|
|
||||||
<argument
|
|
||||||
android:name="Password"
|
|
||||||
app:argType="string"
|
|
||||||
app:nullable="true" />
|
|
||||||
<argument
|
|
||||||
android:name="HA1"
|
|
||||||
app:argType="string"
|
|
||||||
app:nullable="true" />
|
|
||||||
</fragment>
|
|
||||||
<fragment
|
|
||||||
android:id="@+id/phoneAccountValidationFragment"
|
|
||||||
tools:layout="@layout/assistant_phone_account_validation_fragment"
|
|
||||||
android:name="org.linphone.activities.assistant.fragments.PhoneAccountValidationFragment"
|
|
||||||
android:label="PhoneAccountValidationFragment" >
|
|
||||||
<action
|
|
||||||
android:id="@+id/action_phoneAccountValidationFragment_to_accountSettingsFragment"
|
|
||||||
app:destination="@id/accountSettingsFragment" />
|
|
||||||
<argument
|
|
||||||
android:name="PhoneNumber"
|
|
||||||
app:argType="string" />
|
|
||||||
<argument
|
|
||||||
android:name="IsLogin"
|
|
||||||
app:argType="boolean" />
|
|
||||||
<argument
|
|
||||||
android:name="IsCreation"
|
|
||||||
app:argType="boolean" />
|
|
||||||
<argument
|
|
||||||
android:name="IsLinking"
|
|
||||||
app:argType="boolean" />
|
|
||||||
</fragment>
|
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/textViewerFragment"
|
android:id="@+id/textViewerFragment"
|
||||||
android:name="org.linphone.activities.main.files.fragments.TextViewerFragment"
|
android:name="org.linphone.activities.main.files.fragments.TextViewerFragment"
|
||||||
android:label="TextViewerFragment" />
|
android:label="TextViewerFragment" />
|
||||||
<action android:id="@+id/action_global_textViewerFragment" app:destination="@id/textViewerFragment" />
|
<action
|
||||||
|
android:id="@+id/action_global_textViewerFragment"
|
||||||
|
app:destination="@id/textViewerFragment" />
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/pdfViewerFragment"
|
android:id="@+id/pdfViewerFragment"
|
||||||
android:name="org.linphone.activities.main.files.fragments.PdfViewerFragment"
|
android:name="org.linphone.activities.main.files.fragments.PdfViewerFragment"
|
||||||
android:label="PdfViewerFragment" />
|
android:label="PdfViewerFragment" />
|
||||||
<action android:id="@+id/action_global_pdfViewerFragment" app:destination="@id/pdfViewerFragment" />
|
<action
|
||||||
|
android:id="@+id/action_global_pdfViewerFragment"
|
||||||
|
app:destination="@id/pdfViewerFragment" />
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/imageViewerFragment"
|
android:id="@+id/imageViewerFragment"
|
||||||
android:name="org.linphone.activities.main.files.fragments.ImageViewerFragment"
|
android:name="org.linphone.activities.main.files.fragments.ImageViewerFragment"
|
||||||
android:label="ImageViewerFragment" />
|
android:label="ImageViewerFragment" />
|
||||||
<action android:id="@+id/action_global_imageViewerFragment" app:destination="@id/imageViewerFragment"/>
|
<action
|
||||||
|
android:id="@+id/action_global_imageViewerFragment"
|
||||||
|
app:destination="@id/imageViewerFragment"/>
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/videoViewerFragment"
|
android:id="@+id/videoViewerFragment"
|
||||||
android:name="org.linphone.activities.main.files.fragments.VideoViewerFragment"
|
android:name="org.linphone.activities.main.files.fragments.VideoViewerFragment"
|
||||||
android:label="VideoViewerFragment" />
|
android:label="VideoViewerFragment" />
|
||||||
<action android:id="@+id/action_global_videoViewerFragment" app:destination="@id/videoViewerFragment"/>
|
<action
|
||||||
|
android:id="@+id/action_global_videoViewerFragment"
|
||||||
|
app:destination="@id/videoViewerFragment"/>
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/audioViewerFragment"
|
android:id="@+id/audioViewerFragment"
|
||||||
android:name="org.linphone.activities.main.files.fragments.AudioViewerFragment"
|
android:name="org.linphone.activities.main.files.fragments.AudioViewerFragment"
|
||||||
android:label="AudioViewerFragment" />
|
android:label="AudioViewerFragment" />
|
||||||
<action android:id="@+id/action_global_audioViewerFragment" app:destination="@id/audioViewerFragment"/>
|
<action
|
||||||
|
android:id="@+id/action_global_audioViewerFragment"
|
||||||
|
app:destination="@id/audioViewerFragment"/>
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/configViewerFragment"
|
android:id="@+id/configViewerFragment"
|
||||||
android:name="org.linphone.activities.main.dialer.fragments.ConfigViewerFragment"
|
android:name="org.linphone.activities.main.dialer.fragments.ConfigViewerFragment"
|
||||||
android:label="ConfigViewerFragment" />
|
android:label="ConfigViewerFragment" />
|
||||||
<action android:id="@+id/action_global_configViewerFragment" app:destination="@id/configViewerFragment" />
|
<action
|
||||||
|
android:id="@+id/action_global_configViewerFragment"
|
||||||
|
app:destination="@id/configViewerFragment" />
|
||||||
</navigation>
|
</navigation>
|
Loading…
Reference in a new issue