Linked Questions

9 votes
1 answer
17k views

I want to create fragment in activity. I have 4 fragment in 1 activity I have a code like this private void setupViewPager(ViewPager viewPager) { ViewPagerAdapter adapter = new ViewPagerAdapter(...
56 votes
7 answers
95k views

I need to place a ViewPager inside of a fragment, but I have two fragments, Fragment 1 is my MENU, and Fragment 2 I want to use as a ViewPagerIndicator. But a fragment can't have another fragment... ...
45 votes
3 answers
59k views

I need to replace a Fragment in one Activity with another Fragment, below is the layer file of the Activity: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://...
37 votes
5 answers
40k views

I have a Fragment that has a FrameLayout. This first fragment (A) loads inside its Framelayout another fragment (B). When I call getParentFragment from inner fragment (B), I get null. How should this ...
30 votes
2 answers
100k views

I'm working on an Android App and I want to use 3 tabs for navigation using Fragments for each tab, but I don't know how to create the structure for doing it. I want to add each fragment separately ...
9 votes
1 answer
4k views

I'm really messed up with the android ViewPager's lifecycle, and I'm starting to think that there something wrong in the structure of my app. So I would like a confirmation if I can do the following : ...
6 votes
1 answer
2k views

After migrating my navigation to the new Jetpack Navigation Component, I found that after navigating back and forth using the the libraries, the content/layout of the first two fragments in my ...
4 votes
2 answers
2k views

In my application I'm trying to create 2 fragments with ViewPagers. The fragments have 3 tabs/pages each with RecyclerViews and they are supposed to be backed by a database, so I'm keeping them in a ...
1 vote
1 answer
5k views

I'm trying to implement a two tabs and also have a navigation drawer. I'm able to do both separately but when I try to combine the two I run into problems. I originally had the code for creating my ...
0 votes
3 answers
5k views

i have an Activity with 02 tabLayout i added First Fragment in my first tab, every thing was just fine since i added my Second Fragment in second tab my Second Fragment works but when i rotate the ...
0 votes
6 answers
3k views

I am using GoogleMap in android app using Android Studio. It was working fine and don't know why suddenly it stopped working. minSdkVersion is 15 and targetSdkVersion is 24. Please check my below code ...
0 votes
1 answer
2k views

I want to add a interface in my fragment and my bottom sheet and when bottom sheet done an action(like select a button) it call in my background fragment but when i call interface it returns null and ...
4 votes
1 answer
1k views

I have a fragment that most of it's layout is creating programmatically. First time that fragment appears everything is OK but when I open another fragment and press back button I got ...
4 votes
1 answer
2k views

There are several different kinds of fragmentManagers in Android: parentFragmentManager, childFragmentManager, supportFragmentManager and plain fragmentManager, which is already deprecated. But what ...
Ksenia's user avatar
  • 3,751

15 30 50 per page
1
2