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
0 answers

Android SlidingUp Panel scrolllview not adjusting correctly

WHAT I HAVE DONE I used the following function to resize the size of scrollview (used as a slidinglayout) the second child if slidinglayout is a map fragment. there is a button "select from map" where the sliding view is completely…
2
votes
0 answers

Passing information from Fragment to Activity based on onTimeChangedListener in Fragment

First off, I have this working, but it is not as smooth as I would like. Here is what I am doing: I have a TimePicker in a fragment, and I have the onTimeChangedListener set so that whenever this changes, it grabs the hour and minute, packages them…
Bwvolleyball
  • 2,593
  • 2
  • 19
  • 31
2
votes
1 answer

Assign data to activity variable from fragment, and get variable in another fragment

I have an android application. Which have one activity with two fragments. When my application starts it assigns data to a variable in his activity. Then on the click of a button second fragment opens and it takes data from his activity which is…
Yawar
  • 1,924
  • 3
  • 29
  • 39
2
votes
0 answers

FragmentTransaction.add() not working properly the first time i load my Activity

I'am working on a Product Detail page that opens every time the user clicks on a product on a list. In the page i have some product image at the top, and then 3 tabs below the image, and a fragment container below the tab to switch between the…
2
votes
2 answers

How to control a fragment from another one

I have written this code ,i have data on data base ,i want to sort listview by age when the button is clicked, the listView should be sorted again by age , now the methods work perfect but i can't resort the list view by age,here is the list…
Basil Battikhi
  • 2,638
  • 1
  • 18
  • 34
2
votes
2 answers

How to change the scale of seekBar progress

I have made use of seekbar for other requirements, now I have having trouble with a scale of this scope. I would like my max to be 350,000 (dollars) and my "min" or I should say "1" value to be 5,000. How would I implement this?
droidShot
  • 137
  • 2
  • 12
2
votes
3 answers

Android - Updating ListView on Dialog click

I have been trying this for a while now and my inexperience has been getting the best of me. Any pointers or suggestions about how I should be approaching the issue will be greatly appreciated. I have a custom ListView with each item containing two…
clb9355
  • 289
  • 4
  • 16
2
votes
1 answer

Accessing fragment's view from an activity

I have an activity that holds a fragment, it adds it by doing this in the onCreate (From a Google example): // Check that the activity is using the layout version with // the fragment_container FrameLayout if…
yogi
  • 1,327
  • 2
  • 12
  • 33
2
votes
0 answers

Is it possible to have multiple CoverFlow in same Android activity? How can we manage multiple CoverFlow listeners in same activity?

I have implemented the basic cover flow using http://www.inter-fuser.com/2010/02/android-coverflow-widget-v2.html and it is working fine. Now I am trying to use multiple CoverFlow in same activity but can't do it. I am not able to understand how can…
2
votes
6 answers

How can I avoid using instanceof in this case?

I've had to use instanceofseveral times here while checking what subclass a Fragment is, and I feel like I'm going wrong somewhere: @Override public void onBackPressed() { Fragment frag = mManager.findFragmentByTag("Fragment"); if(frag…
u3l
  • 3,342
  • 4
  • 34
  • 51
2
votes
2 answers

Fragment management when the layout changes

I have an application with a single Activity and two fragments. The desired behavior is (user interaction highlighted in blue color): In portrait In landscape My current solution is: Layout in landscape FrameLayout ContainerRed(FrameLayout) …
Addev
  • 31,819
  • 51
  • 183
  • 302
2
votes
1 answer

Adding child Fragment to Parent Fragment withing a ViewPager in Android

I'm developing an app that has some tabs,something like this Each tab is a Fragment, and each fragment displays a listview of articles, categories and some other information. What I'm trying to do is to when I tap in an item from the listview in a…
Rosie
  • 94
  • 2
  • 11
2
votes
2 answers

Fragment in Activity is gets context null in setAdapter for ListView

this is an issue that I've been having for like a 3 months, actually, since I started to develop this app. I've read hundreds of posts in this web site, in others, I've read tutorials and I haven't found a solution. I believe this problem has to do…
2
votes
1 answer

Android Fragment Tabs using - android.support.v4.app.Fragment

I am trying to create a app with 3 tabs Fragments but I want to use the new android.support.v4.app.Fragment in Android. But I can't get it to work. I tried this example implementing-fragment-tabs-in-android. it works but the problem is that…
2
votes
1 answer

ListViewAnimation from nhaarman within fragment

Hi guys I have a problem with the cool lib from nhaarman I integrated successfully his lib with an activity extends ListActivity public class MainActivity extends ListActivity{ @Override protected void onCreate(Bundle savedInstanceState) { …
lephtism
  • 23
  • 3
1 2 3
99
100