-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Setup navigation to work beyond the bottom bar and nav drawer
- Loading branch information
1 parent
7752583
commit 329650f
Showing
5 changed files
with
73 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
networksurvey/src/main/java/com/craxiom/networksurvey/ui/main/SharedViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.craxiom.networksurvey.ui.main | ||
|
||
import android.app.Application | ||
import androidx.lifecycle.AndroidViewModel | ||
import androidx.lifecycle.LiveData | ||
import androidx.lifecycle.MutableLiveData | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class SharedViewModel @Inject constructor(application: Application) : | ||
AndroidViewModel(application) { | ||
private val _navigateToQrCodeScanner = MutableLiveData(false) | ||
val navigateToQrCodeScanner: LiveData<Boolean> = _navigateToQrCodeScanner | ||
|
||
fun triggerNavigationToQrCodeScanner() { | ||
_navigateToQrCodeScanner.value = true | ||
} | ||
|
||
fun resetNavigationFlag() { | ||
_navigateToQrCodeScanner.value = false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
networksurvey/src/main/res/layout/container_mqtt_qr_code_scanner_fragment.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.fragment.app.FragmentContainerView xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/mqtt_qr_code_scanner_fragment_container_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:name="com.craxiom.networksurvey.fragments.CodeScannerFragment" /> |