Questions tagged [fragment]

**DO NOT USE**: fragment is an ambiguous tag, used to refer to numerous technologies. Prefer less ambiguous tags. For Android Fragments, use [android-fragments]. For URL fragments, use [url-fragment]

'fragment' Tag Disambiguation

8161 questions
2
votes
2 answers

DialogFragment causing ANR

I'm having some weird issues with DialogFragment on a real Device. Samsung Galaxy Note 4. When I try to open an dialog, the application enters an infinte loop (something from the system) and it gives ANR after a while. Everything is blocked. There…
Ionut Negru
  • 6,186
  • 4
  • 48
  • 78
2
votes
1 answer

FragmentPagerAdapter showing fragments wrongly in ViewPager

I have an ActionBarActivity inside which I have a ViewPager. I expect to see four (first, second, third, four) fragments in four (first, second, third, fourth) pages. Problem: I see the second fragment on the first page. I then move to the second…
2
votes
1 answer

VideoView inside Fragment

Edit: i thought i had a problem with my implementation of the fragment that caused the videoView not to work, but it turned out that the implementation was correct and i just had a problem with the layout xml of the videoView. ill keep the code as…
niryo
  • 1,275
  • 4
  • 15
  • 26
2
votes
1 answer

Buttons not working in fragment

I'm implementing two buttons in a fragment which on getting clicked will transfer to two different activities. However on clicking, nothing happens. The app does not force close nor the debugger shows any exception. Using Log.d I found that onClick…
static95
  • 33
  • 3
2
votes
1 answer

Android TabActivity calls onDestroyView when i tap the third tap

My application has 2 tab and works like a charm. But today I tried to expand my tabbar and I added a third tab. When I tap the third tab it destroys the first tab fragment and it calls onDestroyView method in first tab fragment. When I tap the…
2
votes
3 answers

Passing values between Fragments in FragmentPagerAdapter

In FragmentPageradapter I have 3 fragments. In first two fragments there is a SeekBar. When either of the SeekBar changes its value in fragment1, I want to change the value ofSeekBar which is inside fragment2. How can I achieve It?
2
votes
0 answers

disable swipe gesture that is set on whole screen for mapView fragment, allow only map movement

I have a ListFragment and at the footer of the list fragment I added another fragment that contains google map. I added swipe gestures left->right, right->left to whole Activity and that works fine. The problem is that when user swipes on top of…
Vaidas
  • 1,297
  • 1
  • 13
  • 14
2
votes
1 answer

Import text from fragmentactivity to fragment

I want to create a common search for different websites at same time.So I imported text of an EditText from an activity to Fragment activity.Now how to import that text to a fragment? FragmentActivity: public class MyActivity6 extends…
user4626905
2
votes
2 answers

Prevent clicking on a button in an Activity while showing a Fragment

I am having a problem with the interaction between an Activity and a Fragment. I have a main Activity and an into Activity with layout buttons and text inputs. When I open the Fragment in the main Activity, I can still click on a button in the…
2
votes
4 answers

Click on image inside ArrayAdapter to remove item in listview

I have Fragment... public class MyFragment extends Fragment {... which calls adapter... MyArrayAdapter adapter = new MyArrayAdapter... my.setAdapter(adapter); adapter has image for delete item. I can listen image click but cannot…
Arnes
  • 403
  • 1
  • 5
  • 20
2
votes
2 answers

ListView with custom adapter in Fragment

Im trying to use ListView with custom adapter (baseAdapter) in fragmnet. When I us this code directly inside the MainActivity everything works fine, but when I use this in fragment it did't crash but it din't show anything, it is just a blank…
Alex Mensak
  • 158
  • 1
  • 2
  • 14
2
votes
1 answer

SAPUI5 My fragment gets closed

I'm Developing SAPui5 APP. I create a fragment xml with a sap.m.Popover, In Content of Popover I add 2 sap.m.MultiCombobox. When I close the selection of multicombobox my popover gets closed. Any solution? Fragment code:
Mmarset
  • 149
  • 3
  • 7
  • 16
2
votes
0 answers

It's possible put a fragment into a swipe tabs?

I have one swipe tab with 3 fragments. In the first fragment I want to put two fragment, one fragment for information and one for login operation. I'll ask you if it's possible doing it and with how API it's possible this. I've searched in the web…
ste9206
  • 1,822
  • 4
  • 31
  • 47
2
votes
1 answer

Repaint/Invalidate Fragment View

I have an activity with a fragment, which contains different views for User Input. Whenever this fragment changes, the view seems not to be updated, as you can see in the screenshot below. I also tried to invalidate the view. What am I…
van
  • 380
  • 3
  • 10
2
votes
1 answer

OnDrawerItemClickListener Does not work.

I have been working on this navigation drawer with toolbar.Now am stuck with the click listener. When i click the items in the drawer it does nothing. My class is fragment. Here its the code. package com.vivek.ss; import…
Vivek_Neel
  • 1,343
  • 1
  • 14
  • 25