Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
62 views

I have a fragment where I am trying to display a recyclerview with few data. But nothing seems to be working, the emulator finally shows a blank screen. The PreferenceMenuFragment is added via xml ...
Satyasarathi's user avatar
0 votes
0 answers
215 views

I'm trying to instantiate a fragment and have it replace another fragment. Looking at multiple sources hasn't worked, yet. When I use the findNavController to see if the other fragment does indeed ...
Shanré Scheepers's user avatar
0 votes
0 answers
499 views

I'm handling back button of device via fragments but while calling from nested fragments I'm facing issue. It always calls the backPressed method of MainActivity. I'm handling it as: class ...
Anshul Tyagi's user avatar
  • 2,218
0 votes
0 answers
99 views

I am using nested fragments so fragment1 opens fragment2 and they share a viewmodel. This viewmodel calls a repository to get data and using a LiveData it posts the result and then fragment2 displays ...
user2327866's user avatar
0 votes
1 answer
370 views

I have an Activity A which implements NavigationView.OnNavigationItemSelectedListener that connects it to fragments 1, 2, 3. Fragment 1 has a viewPager and a pagerAdapter which connects it to fragment ...
Reinaldo's user avatar
0 votes
0 answers
148 views

I have a DialogFragment which contains a FragmentContainerView with the following layout: <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget....
Daniel's user avatar
  • 1
0 votes
1 answer
26 views

I have Navhost which contains photo fragment and map fragment. Map fragment is working when I use it alone, but when I try to integrate it in parent fragment I can scroll map but I cannot use any ...
Vitaly Kononenko's user avatar
0 votes
0 answers
108 views

In main Activity I show new DialogFragment which is ParentFragment with only 1 frameLayout in it. From this fragment i add new Fragment into frame layout. (Fragment A) val fragment = ...
Evgeny Yurin's user avatar
2 votes
0 answers
699 views

as per my name I am new to this, and need help. This is a simple app with one main activity that has a bottom navigation bar used to navigate to multiple different fragments. In the main activity, ...
newatthis_pleasehelp's user avatar
0 votes
2 answers
2k views

I have below screen hierarchy [Activity1] -> [fragment1] -> [fragment2] -> [fragment3] I have a deep-link which should open [Activity1] with [fragment3]. On back press, It should navigate to [...
Ujjwal Goyal's user avatar
1 vote
1 answer
347 views

I have an Activity with a fragment called MainFragment which has a ViewPager2 to display a few Fragments. One of which is SearchFragment. SearchFragment has an EditText with a TextWatcher, upon text ...
v15h4l's user avatar
  • 31
0 votes
1 answer
34 views

I'm trying to wrap my head around how and where i should be setting up my fragments. Use case senario i'm trying to implement I have a mainActivity that has a bottomNigationView widget that will open ...
Barcode's user avatar
  • 970
-1 votes
1 answer
156 views

I am frustrated. i want to get value from child fragment to parent fragment i had tries many method. interface, viewModel, sharedpreferences but no one work. I had follow this method but it doesn't ...
irabeka's user avatar
2 votes
0 answers
239 views

I have a Fragment named HomeFragment, consisting of a TabLayout and ViewPager in it. TabLayout is populated with data from backend. So each tab item has a name and on changing the tab position, I ...
visakh r's user avatar
  • 175
4 votes
4 answers
6k views

I am having issues with nested/child fragments. My use case is: I have Frag A as parent fragment and FragChild1, FragChild2, FragChild3 as child fragments to be displayed inside Frag A. Now on back ...
Bella's user avatar
  • 99
1 vote
1 answer
940 views

I need to display multiple set of instructions to the user. For each instruction(FragmentA) the user can navigate to another screen (FragmentA1). I have used a ViewPager that hold list of fragments. ...
user2234's user avatar
  • 1,302
3 votes
0 answers
313 views

I am using NavigationDrawer and on item selection, I am changing fragment using hide/show technique instead of replace. if(fragmentManager.findFragmentByTag(TAG_TASKS_FRAGMENT) != null){ ...
Faizan Mubasher's user avatar
0 votes
1 answer
2k views

I have an activity containg framelayout, fragment A is hosted with getSupportFragmentManager() in this. This fragment A hosts two more fragments which has recycler views in it -Fragment A1 and ...
Raviteja's user avatar
  • 107
0 votes
2 answers
684 views

I have a Fragment A which has an interface that will return the value of a TextView. The Fragment A is initialized and Attached to FragmentB. Here is the code for Fragment A and B. Fragment A ...
Neo Shen's user avatar
  • 120
0 votes
1 answer
140 views

I have a parentfragment called Planning in which I want to show a DialogFragment called DatePickerfragment.The DatePickerFragment has a button that when clicked, will show a datepicker for the user. ...
jonamar's user avatar
  • 17
1 vote
1 answer
258 views

as in topic i have huge problem with optymalization of my activity. wireframe At root level we have three controls: - Tab Layout, related with ViewPager - SurfaceView displaying plot for every ...
Maciek's user avatar
  • 61
2 votes
1 answer
202 views

Maybe this is a stupid question, but this is ruining my day... I have a recyclerview in a fragment override fun setUpRecyclerView(pics: List<Pictures>) { recyclerView.setHasFixedSize(true) ...
moskis's user avatar
  • 1,146
1 vote
0 answers
4k views

I am adding fragment like bellow : @OnClick(R.id.lnNews) void newsList() { String tagName = returnStatusFragment(getString(R.string.news_list_fragment)); if (!TextUtils.isEmpty(tagName) &&...
user avatar
0 votes
0 answers
536 views

I created the tabs by following this https://www.youtube.com/watch?v=zcnT-3F-9JA but in this tutorial the tabs are within an activity where as I need them within fragments something like nested ...
Rounak Polley's user avatar
-1 votes
1 answer
670 views

I am working on a simple application and replacing fragments on top of the parent fragment.I am using below code for opening child fragments.This is the code which I am using in PendingFragment to ...
malli's user avatar
  • 640
3 votes
1 answer
1k views

I am working on simple application having nested fragments with tab layout. Parent activity is LandingActivity. Inside of the LandingActivity i am calling LandingFragment. Inside of the ...
malli's user avatar
  • 640
0 votes
0 answers
447 views

UPDATE 1: Adding android:windowSoftInputMode="adjustPan" in manifest file solved the problem for portrait mode. But in landscape mode the problem still exists. ORIGINAL QUESTION: Current structure ...
WOLF.L's user avatar
  • 374
0 votes
1 answer
753 views

Hi I am using google's places autocomplete api in my app. I need the google places fragment in another fragment and have got it working. Basically I have a tab with 3 imagviews and when you click on ...
Nicky Schranz's user avatar
0 votes
0 answers
75 views

I have a GenericContainer That extends an activity. GenericContainer takes case of my fragments, i am using viewStubs to populate them. How to implement nested fragments in GenericContainer. I will ...
BRDroid's user avatar
  • 4,458
18 votes
2 answers
2k views

Hello good programmers of stack overflow! I've spent a good week with this problem and am now very desperate for a solution. The scenario I'm using android.app.Fragment's not to be confused with the ...
zafrani's user avatar
  • 4,131
1 vote
1 answer
499 views

This is a famous problem of getting result from activity to a nested fragment, the activity could send the result to only the Fragment that has been attached directly to Activity but not the nested ...
Abrd's user avatar
  • 278
0 votes
1 answer
41 views

I thought that calls to a fragment were synchronous but it's not. I have a fragment 1 that contains a listview that I update through an adapter. Then I have a button that launches fragment 2. Frag2 ...
narb's user avatar
  • 988
1 vote
3 answers
764 views

I'm suffering through nested fragments. I have a mainactivity which calls a fragment 1 which in turns call a fragment via a button. The fragment frag2 is well instantiated but the screen is blank. Is ...
narb's user avatar
  • 988
-1 votes
2 answers
479 views

I cant' find where it returns in Fragment A after a call to fragment B. Fragment A calls fragment Test as follows: btn.setOnClickListener(new View.OnClickListener() { public void onClick(...
narb's user avatar
  • 988
0 votes
1 answer
123 views

I have a Viewpager contains Recylerview which has 2 different holders. One of them is also view pager. Hence I have nested viewpager nad nested fragments. When I tap the second tab and tap back the ...
Salih Akşit's user avatar
0 votes
2 answers
3k views

Currently, I am trying to create a nested view pager using a fragment, how can I access top parent function to refresh the View? Let's say I have: public class ParentFragment extends Fragment { ...
Aldi Renaldi Gunawan's user avatar
1 vote
2 answers
1k views

Edit: Hey guys I have deleted everything because I finally found the answer to my question (basically how to use a scrollview inside ViewPager inside a fragment). Here is my code for everything. I am ...
Harrison's user avatar
3 votes
3 answers
7k views

I have searched for solution and found so many cases (not relevant to my situation or may be i didn't understood them properly). My case is : Let's say i have one parent Fragment Parent; And i'm ...
Suresh Gogu's user avatar
0 votes
1 answer
355 views

I have two fragments, Fragment A and Fragment B. Fragment A contains 4 tabs as shown below: Tab 3 has recycler view, from which user will select an option. Now user will go to Fragment B, and does ...
Nitish's user avatar
  • 3,155
5 votes
1 answer
5k views

I have viewPager which contains fragments each of these fragment has viewpager to display Images and banners now to each fragment Image adapter I am passing getChildFragmentManager() as below ...
amodkanthe's user avatar
  • 4,540
6 votes
1 answer
1k views

In order to focus on the problem I will simplify the case to the following - I have an activity A and a fragment F which is adding another fragment Child. The simplified code of each is Activity A @...
Mojo Risin's user avatar
  • 8,142
0 votes
1 answer
2k views

I have MainActivity and has a FragmentLayout inside. I am showing different fragments inside that layout when tabs selected (like instagram) with this code. MABaseFragment fragment = ...
Demirhan Karademir's user avatar
0 votes
1 answer
720 views

I displayed a fragment A that implements a ViewPager with several fragments (nested fragments). In my nested fragments, I inflate a menu with the following method. @Override public void ...
user2634966's user avatar
0 votes
2 answers
82 views

I'm trying to add a FrameLayout in my fragment layout, just to reserve space to add another fragment, programmatically. Here's code : FRAGMENT XML LAYOUT <?xml version="1.0" encoding="utf-8"?> ...
Robin's user avatar
  • 315
1 vote
2 answers
2k views

I have a fragment in which there is a nested fragment which I add in this way: if (home == null) { home = new MyFragment(); FragmentTransaction transaction ...
charbinary's user avatar
  • 1,905
1 vote
1 answer
93 views

I would like to have a nested fragment which should take the rest of the space. The problem is that it even doesn't show because the height is 1 px. If I set the height to 300 dp for example ...
charbinary's user avatar
  • 1,905
1 vote
2 answers
2k views

i have app like this one activity and inside it > fragment a (loaded when run app also from menu can open it ) fragment b (open it from just menu) fragment c (can open it from fragment a and also ...
user avatar
1 vote
1 answer
57 views

As far as I know it is recommended to attach InteractionListener interface to a fragment inside the onAttach method like this @Override public void onAttach(Activity activity) { super.onAttach(...
T.Vert's user avatar
  • 279
-1 votes
1 answer
2k views

I have an activity with fragment A added to it dynamically. Now, I transact from fragment A to fragment B. And then from fragment B to fragment C. Now I have a button here when clicked will place a ...
Krishna's user avatar
  • 11
2 votes
1 answer
1k views

I have a parent fragment in my view in which 2 child fragments are added programmatically to display maps. This is the layout for the child fragment, the map is rendered in FrameLayout. ...
Nitin Mathur's user avatar

1
2 3 4 5 6