Category "android-fragments"

I cannot add new destination into navigation component in android studio

I got some problems when I create a navigation graph to control fragments, the problem is that whenever I add any new destination to this graph, this destinatio

Persistable URI Permissions for a Document Provider

Not sure if what I'm trying to do is possible or not. I have a "proxy" document provider meaning a document provider that exports aliases for other content usi

I am doing bottom navigationview but my Fragments are stacking on top of each other

I am new in android and I don't know what's up with my code I need help I put 2 or 3 code in same one and somehow works, but only problem I have with this is In

Android Studio - Clickable CardViews inside Fragement

I am new to Android Studio, I have a "Settings Fragment" in which I have multiple CardViews (ID's: "account", "store", "bank", "Language", "User Interface", "su

Image Slider working under activity but unrecognized in fragment

<com.smarteist.autoimageslider.SliderView android:id="@+id/imageSlider" android:layout_width="match_parent" android:layout_height="300dp" app

Data reset when moving from one to another fragment using Bottom Navigation Bar

I am using bottom navigation bar dan fragment in my project. When it moved from one to another fragment, I dont want to lose the state or data How can I do it?

Update recyclerview item from background thread after changing configuration

I have a RecyclerView in a Fragment. Also I have an AsyncTask which updates items of RecyclerView from background thread. The problem is when I rotate the devic

Jetpack Nav-Graph navigation to current fragment itself also having it in stack

Fragment Structure Fragment Stack I want so that on back press I load fragment with my old data state A->B->C->C Fragment Stack, nav graph created even

Add toolbar and drawer menu to Android Google Maps Activity

I have created a standard Google Maps Activity in my app in Android Studio and the map works as expected. My Activity is called 'NativeMap' and then the activit

How do I resolve InflateException: Binary XML file line problem?

I'm going to inflate the recycler view in the home fragment using the Navigation component. There are two problems here. InflateException Issues Only one first

Pass Date from Datepicker to Spinner selected item and load API Response in Fragment

I have a working app where user select an option from Spinner the datepicker auto open user select the date and view data. However, I am trying to include an Im

Android APP crashes while Loading the ads

I am trying to make a social media application. I am trying to insert ads in between the posts. In the below code when running app crashes while executing the a

How to convert an activity to fragment in Android studio

Can someone tell me how i do that or someone can change this activity to fragment for me. i have very few experiance in cooding right now, so i can't do this my

I want to integrate ad to my app, but the problem is that the ( Type mismatch. Required: Context!, Found Fragment class)

I want to integrate ad to my app, but the problem is that the MobileAds.initialize(this){ initStatus-> not work this method( onCreateView) But I am use this

Multiple/Nested NavHostFragments - Jetpack Navigation

I have two NavHostFragments, one in an activity which is the startDestination and another one in a Fragment. I can't seem to make the Bottom Navigation work in

Do I have to use Bundle for data exchange between activity and fragment?

Multiple Fragments are created in one Activity to switch pages to Fragment binding. At this point, the data in Main Activity must be used by all fragments. So I

Error: Hilt Fragments must be attached to an @AndroidEntryPoint Activity

Fragment is not loading in Unit Test. Code: @RunWith(AndroidJUnit4::class) class DataFeature { @Test fun testEventFragment() { val fragmen

Error inflating Class Fragment in Recyclerview with Navigation Activity

I'm making an app that uses Android studio to write and call messages. This error message appears during the process of inflating the recycler view into the fra

Android why are two identical Fragments created when navigating with NavController

I have an app that uses the single activity and multiple fragments approach and I use the NavController for navigating. Unfortunately, when navigating to a Frag

Android - mixing NavGraph with ViewPager2

I'm looking for the following design in my android app: I want the main screen to be a TabLayout with 3 tabs, and a ViewPager2. From each one of the 3 fragments