Issue I am following Shrine example application which is implemented in Kotlin part of Google official codelabs for developers. The application and codelab The last step, We are asked to Modify your Shrine application to change the product images shown
Continue readingTag: android-fragments
Interoperability with Compose and motion layout doesn't scroll?
Issue I have a the following layout in a fragment Header Image ==================================== Tab 1. Tab2. Tab3. ==================================== Frag A. Frag B. Frag C. This fragment has a motion scene that when you scroll up the header image transitions to
Continue readingRecreate Fragment from parent Activity
Issue I need to recreate a fragment from its parent Activity. The solutions I found were all 10 years old and in Java. Is there a neat way without too much boiler plate to implement something like this? Like from
Continue readingWhy am I getting a "Nested fragments should always use the child FragmentManager" while using FragmentContainerView and AndroidViewBinding
Issue Fatal Exception: java.lang.IllegalStateException The Fragment SwlmFragment{6eaed00} (85ccadae-8789-4527-8c0f-9dfb23db0388 id=0x7f0a065e) that owns View androidx.fragment.app.FragmentContainerView{43d1939 V.E…… …….. 0,0-1080,1978 #7f0a0926 app:id/locked} has already been destroyed. Nested fragments should always use the child FragmentManager. ^ This is the crash I’m getting. This is the
Continue readingHow to get NavHostFragment
Issue I’m integrating Android’s Navigation Architecture Components into my app. I ran into some problems with passing data to the start of a fragment from an activity, so I was following this answer: Navigation Architecture Component- Passing argument data to
Continue readingWhy registerForActivityResult always return the same result?
Issue when I press switch first and second time request dialog show and press Do not allow the switch work normally. But third time when I press switch the request dialog not showing and I always get the value of
Continue readingHow to replace a Fragment on button click of that fragment?
Issue I have an activity containing multiple fragments. Activity initially have fragment and in it have two buttons. Upon clicking this button I have to replace the fragment by new fragment. Each fragment has various widgets and replace the current
Continue readingHow to replace setTargetFragment() now that it is deprecated
Issue setTargetFragment() is deprecated in Java, and I don’t understand the correct replacement for it as android documentation uses it and is outdated. I believe the FragmentManager is the correct replacement for it. I am using the deprecated setTargetFragment function
Continue readingHow to replace setTargetFragment() now that it is deprecated
Issue setTargetFragment() is deprecated in Java, and I don’t understand the correct replacement for it as android documentation uses it and is outdated. I believe the FragmentManager is the correct replacement for it. I am using the deprecated setTargetFragment function
Continue readingHow to tap to zoom an image like in instagram? Kotlin
Issue I am trying to get a similar functionality to Instagram, when you tap or pinch on an image, and now the image covers the screen above all the other views, like this I have a Fragment with 3 images
Continue reading