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
abstract class Destination( | |
... | |
) { | |
private var parcelableArguments: HashMap<String, Parcelable> = hashMapOf() | |
protected fun saveParcelableArgument(key: String, argument: Parcelable) { | |
parcelableArguments[key] = argument | |
} | |
@Suppress("UNCHECKED_CAST") |
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
class AppViewModel( | |
... | |
): BaseViewModel() { | |
private val _pendingNavigationRoutes = Channel<List<String>>( | |
capacity = 1, | |
onBufferOverflow = BufferOverflow.DROP_LATEST | |
) | |
fun tryOpenScreenChain(routes: List<String>) { |
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
class AppActivity : BaseActivity() { | |
private val viewModel: AppViewModel by viewModel() | |
override fun onNewIntent(intent: Intent?) { | |
super.onNewIntent(intent) | |
tryOpenScreenChain(intent) | |
} | |
private fun tryOpenScreenChain(intent: Intent?) { |
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
class AppActivity : BaseActivity() { | |
private val viewModel: AppViewModel by viewModel() | |
override fun onNewIntent(intent: Intent?) { | |
super.onNewIntent(intent) | |
tryOpenScreenChain(intent) | |
} | |
private fun tryOpenScreenChain(intent: Intent?) { |
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
import android.app.Dialog | |
import android.os.Bundle | |
import android.view.View | |
import android.widget.FrameLayout | |
import androidx.fragment.app.FragmentActivity | |
import androidx.fragment.app.FragmentManager | |
import com.google.android.material.bottomsheet.BottomSheetBehavior | |
import com.google.android.material.bottomsheet.BottomSheetDialog | |
import com.google.android.material.bottomsheet.BottomSheetDialogFragment |
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
import android.content.Intent | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.os.Handler | |
import android.os.Looper | |
import android.util.Log | |
import android.widget.TextView | |
import java.util.* | |
const val ARG_ACTIVITY_NO = "ARG_ACTIVITY_NO" |
NewerOlder