Last active
November 11, 2023 13:51
-
-
Save utkukutlu/bd2e37253e7184179d923321e3ea72c1 to your computer and use it in GitHub Desktop.
android navigation component add fragment instead of replace
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
fun openTestDialogFragment(){ | |
findNavController().navigate( | |
R.id.action_mainFragment_to_testDialogFragment | |
) | |
} |
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
<style name="FullScreenDialogStyle" parent="AppTheme"> | |
<item name="android:windowFullscreen">false</item> | |
<item name="android:windowBackground">@android:color/transparent</item> | |
<item name="android:windowIsFloating">false</item> | |
</style> |
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 TestDialogFragment : DialogFragment() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setStyle( | |
DialogFragment.STYLE_NORMAL, | |
R.style.FullScreenDialogStyle | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment