mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed keyboard & contacts search bar
This commit is contained in:
parent
254cf3d9cf
commit
58d2362390
9 changed files with 271 additions and 191 deletions
|
|
@ -22,20 +22,25 @@ package org.linphone.ui
|
|||
import android.Manifest
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.R
|
||||
import org.linphone.databinding.ActivityMainBinding
|
||||
import org.linphone.databinding.MainActivityBinding
|
||||
import org.linphone.utils.hideKeyboard
|
||||
import org.linphone.utils.showKeyboard
|
||||
|
||||
class MainActivity : AppCompatActivity() {
|
||||
companion object {
|
||||
private const val CONTACTS_PERMISSION_REQUEST = 0
|
||||
}
|
||||
|
||||
private lateinit var binding: ActivityMainBinding
|
||||
private lateinit var viewModel: MainActivityViewModel
|
||||
private lateinit var binding: MainActivityBinding
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
WindowCompat.setDecorFitsSystemWindows(window, true)
|
||||
|
|
@ -54,8 +59,30 @@ class MainActivity : AppCompatActivity() {
|
|||
Thread.sleep(20)
|
||||
}
|
||||
|
||||
binding = DataBindingUtil.setContentView(this, R.layout.activity_main)
|
||||
binding = DataBindingUtil.setContentView(this, R.layout.main_activity)
|
||||
binding.lifecycleOwner = this
|
||||
|
||||
viewModel = ViewModelProvider(this)[MainActivityViewModel::class.java]
|
||||
binding.viewModel = viewModel
|
||||
|
||||
binding.setAvatarClickListener {
|
||||
if (binding.sideMenu.isDrawerOpen(Gravity.LEFT)) {
|
||||
binding.sideMenu.closeDrawer(binding.sideMenuContent, true)
|
||||
} else {
|
||||
binding.sideMenu.openDrawer(binding.sideMenuContent, true)
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.focusSearchBarEvent.observe(this) {
|
||||
it.consume { take ->
|
||||
if (take) {
|
||||
// To automatically open keyboard
|
||||
binding.search.showKeyboard(window)
|
||||
} else {
|
||||
binding.search.hideKeyboard()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPostCreate(savedInstanceState: Bundle?) {
|
||||
|
|
|
|||
52
app/src/main/java/org/linphone/ui/MainActivityViewModel.kt
Normal file
52
app/src/main/java/org/linphone/ui/MainActivityViewModel.kt
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) 2010-2023 Belledonne Communications SARL.
|
||||
*
|
||||
* This file is part of linphone-android
|
||||
* (see https://www.linphone.org).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.linphone.ui
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class MainActivityViewModel : ViewModel() {
|
||||
val searchBarVisible = MutableLiveData<Boolean>()
|
||||
|
||||
val searchFilter = MutableLiveData<String>()
|
||||
|
||||
val focusSearchBarEvent: MutableLiveData<Event<Boolean>> by lazy {
|
||||
MutableLiveData<Event<Boolean>>()
|
||||
}
|
||||
|
||||
init {
|
||||
searchBarVisible.value = false
|
||||
}
|
||||
|
||||
fun openSearchBar() {
|
||||
searchBarVisible.value = true
|
||||
focusSearchBarEvent.value = Event(true)
|
||||
}
|
||||
|
||||
fun closeSearchBar() {
|
||||
searchBarVisible.value = false
|
||||
focusSearchBarEvent.value = Event(false)
|
||||
}
|
||||
|
||||
fun clearFilter() {
|
||||
searchFilter.value = ""
|
||||
}
|
||||
}
|
||||
|
|
@ -33,8 +33,6 @@ import androidx.transition.AutoTransition
|
|||
import org.linphone.R
|
||||
import org.linphone.databinding.ContactsFragmentBinding
|
||||
import org.linphone.ui.contacts.viewmodel.ContactsListViewModel
|
||||
import org.linphone.utils.hideKeyboard
|
||||
import org.linphone.utils.showKeyboard
|
||||
|
||||
class ContactsFragment : Fragment() {
|
||||
private lateinit var binding: ContactsFragmentBinding
|
||||
|
|
@ -86,17 +84,6 @@ class ContactsFragment : Fragment() {
|
|||
}
|
||||
}
|
||||
|
||||
listViewModel.focusSearchBarEvent.observe(viewLifecycleOwner) {
|
||||
it.consume { take ->
|
||||
if (take) {
|
||||
// To automatically open keyboard
|
||||
binding.search.showKeyboard(requireActivity().window)
|
||||
} else {
|
||||
binding.search.hideKeyboard()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*(view.parent as? ViewGroup)?.doOnPreDraw {
|
||||
startPostponedEnterTransition()
|
||||
}*/
|
||||
|
|
|
|||
|
|
@ -19,34 +19,6 @@
|
|||
*/
|
||||
package org.linphone.ui.contacts.viewmodel
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
import org.linphone.utils.Event
|
||||
|
||||
class ContactsListViewModel : ViewModel() {
|
||||
val searchBarVisible = MutableLiveData<Boolean>()
|
||||
|
||||
val searchFilter = MutableLiveData<String>()
|
||||
|
||||
val focusSearchBarEvent: MutableLiveData<Event<Boolean>> by lazy {
|
||||
MutableLiveData<Event<Boolean>>()
|
||||
}
|
||||
|
||||
init {
|
||||
searchBarVisible.value = false
|
||||
}
|
||||
|
||||
fun openSearchBar() {
|
||||
searchBarVisible.value = true
|
||||
focusSearchBarEvent.value = Event(true)
|
||||
}
|
||||
|
||||
fun closeSearchBar() {
|
||||
searchBarVisible.value = false
|
||||
focusSearchBarEvent.value = Event(false)
|
||||
}
|
||||
|
||||
fun clearFilter() {
|
||||
searchFilter.value = ""
|
||||
}
|
||||
}
|
||||
class ContactsListViewModel : ViewModel()
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ import android.view.Window
|
|||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.widget.AppCompatEditText
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.databinding.BindingAdapter
|
||||
import coil.load
|
||||
import coil.transform.CircleCropTransformation
|
||||
import com.google.android.material.textfield.TextInputLayout
|
||||
import org.linphone.R
|
||||
import org.linphone.contacts.ContactData
|
||||
|
||||
|
|
@ -37,14 +37,14 @@ import org.linphone.contacts.ContactData
|
|||
* This file contains all the data binding necessary for the app
|
||||
*/
|
||||
|
||||
fun AppCompatEditText.showKeyboard(window: Window) {
|
||||
fun TextInputLayout.showKeyboard(window: Window) {
|
||||
this.requestFocus()
|
||||
/*val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
imm.showSoftInput(this, InputMethodManager.SHOW_IMPLICIT)*/
|
||||
WindowCompat.getInsetsController(window, this).show(WindowInsetsCompat.Type.ime())
|
||||
}
|
||||
|
||||
fun AppCompatEditText.hideKeyboard() {
|
||||
fun TextInputLayout.hideKeyboard() {
|
||||
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
imm.hideSoftInputFromWindow(this.windowToken, 0)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View" />
|
||||
</data>
|
||||
|
||||
<!-- Background color here is mandatory for transparency effect on child views -->
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/primary_color"
|
||||
tools:context=".ui.MainActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/main_nav_host_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:defaultNavHost="true"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:navGraph="@navigation/main_nav_graph"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
</layout>
|
||||
|
|
@ -21,121 +21,15 @@
|
|||
android:layout_height="match_parent"
|
||||
android:background="@color/primary_color">
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="avatar, title, search_toggle"
|
||||
android:visibility="@{viewModel.searchBarVisible ? View.GONE : View.VISIBLE, default=gone}" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="cancel_search, search, clear_field"
|
||||
android:visibility="@{viewModel.searchBarVisible ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/background_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="title, search"
|
||||
app:barrierDirection="bottom" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/contact_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="@id/title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="Contacts"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toStartOf="@id/search_toggle"
|
||||
app:layout_constraintStart_toEndOf="@id/avatar"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_toggle"
|
||||
android:onClick="@{() -> viewModel.openSearchBar()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:layout_marginEnd="9dp"
|
||||
android:src="@drawable/search"
|
||||
app:layout_constraintBottom_toBottomOf="@id/title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/title"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cancel_search"
|
||||
android:onClick="@{() -> viewModel.closeSearchBar()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@drawable/back"
|
||||
app:layout_constraintBottom_toBottomOf="@id/search"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/search"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/search"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="@color/gray_6"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:textCursorDrawable="@null"
|
||||
android:text="@={viewModel.searchFilter}"
|
||||
android:hint="Search contact"
|
||||
android:background="@android:color/transparent"
|
||||
app:hintTextColor="@color/gray_6"
|
||||
app:boxStrokeWidth="0dp"
|
||||
app:boxStrokeWidthFocused="0dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/clear_field"
|
||||
app:layout_constraintStart_toEndOf="@id/cancel_search"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/clear_field"
|
||||
android:onClick="@{() -> viewModel.clearFilter()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:layout_marginEnd="9dp"
|
||||
android:src="@drawable/close"
|
||||
app:layout_constraintBottom_toBottomOf="@id/search"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/search"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/background"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="17dp"
|
||||
android:src="@drawable/shape_white_background"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/background_barrier" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/no_contacts_image"
|
||||
|
|
|
|||
180
app/src/main/res/layout/main_activity.xml
Normal file
180
app/src/main/res/layout/main_activity.xml
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout
|
||||
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">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View" />
|
||||
<variable
|
||||
name="avatarClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="org.linphone.ui.MainActivityViewModel" />
|
||||
</data>
|
||||
|
||||
<!-- Background color here is mandatory for transparency effect on child views -->
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/primary_color"
|
||||
tools:context=".ui.MainActivity">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="avatar, title, search_toggle"
|
||||
android:visibility="@{viewModel.searchBarVisible ? View.GONE : View.VISIBLE, default=gone}" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="cancel_search, search, clear_field"
|
||||
android:visibility="@{viewModel.searchBarVisible ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/background_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="title, search"
|
||||
app:barrierDirection="bottom" />
|
||||
|
||||
<ImageView
|
||||
android:onClick="@{avatarClickListener}"
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/contact_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="@id/title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="Contacts"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toStartOf="@id/search_toggle"
|
||||
app:layout_constraintStart_toEndOf="@id/avatar"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/search_toggle"
|
||||
android:onClick="@{() -> viewModel.openSearchBar()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:layout_marginEnd="9dp"
|
||||
android:src="@drawable/search"
|
||||
app:layout_constraintBottom_toBottomOf="@id/title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/title"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cancel_search"
|
||||
android:onClick="@{() -> viewModel.closeSearchBar()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@drawable/back"
|
||||
app:layout_constraintBottom_toBottomOf="@id/search"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/search"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="?attr/textInputFilledStyle"
|
||||
android:id="@+id/search"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textColorHint="@color/gray_6"
|
||||
android:hint="Search contacts"
|
||||
app:hintEnabled="@{viewModel.searchFilter.length() == 0}"
|
||||
app:hintAnimationEnabled="false"
|
||||
app:hintTextColor="@color/gray_6"
|
||||
app:boxStrokeWidth="0dp"
|
||||
app:boxStrokeWidthFocused="0dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/clear_field"
|
||||
app:layout_constraintStart_toEndOf="@id/cancel_search"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textColor="@color/gray_6"
|
||||
android:textStyle="bold"
|
||||
android:textSize="16sp"
|
||||
android:inputType="text"
|
||||
android:paddingVertical="10dp"
|
||||
android:text="@={viewModel.searchFilter}"
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/clear_field"
|
||||
android:onClick="@{() -> viewModel.clearFilter()}"
|
||||
android:enabled="@{viewModel.searchFilter.length() > 0}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="6dp"
|
||||
android:layout_marginEnd="9dp"
|
||||
android:src="@drawable/close"
|
||||
app:layout_constraintBottom_toBottomOf="@id/search"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/search"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
android:id="@+id/side_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="17dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/background_barrier"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/main_nav_host_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:defaultNavHost="true"
|
||||
app:navGraph="@navigation/main_nav_graph"/>
|
||||
|
||||
<!-- Side Menu -->
|
||||
<RelativeLayout
|
||||
android:id="@+id/side_menu_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:layout_gravity="left">
|
||||
|
||||
<!-- TODO -->
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
</layout>
|
||||
4
app/src/main/res/values/styles.xml
Normal file
4
app/src/main/res/values/styles.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<resources>
|
||||
|
||||
</resources>
|
||||
Loading…
Add table
Reference in a new issue