Questions tagged [android-fragmentactivity]

An Activity subclass introduced through the compatibility package to provide an implementation of the Fragment framework on version below Honeycomb.

An Activity subclass introduced through the compatibility package to provide an implementation of the Fragment framework on version below Honeycomb. This class doesn't work with Fragments from the SDK, it needs the Fragment related classes from the compatibility package.

More information can be found in the documentation of the FragmentActivity.

2111 questions
0
votes
2 answers

Keep value of editText on Fragment after switching to another activity and return

I'm new to fragments and currently struggling with a setback. I've got this TabLayout in my activity, inside of it, two Fragments. My problem is within the first one. On it there is a EditText, that when clicked opens a new Activity which contains a…
0
votes
1 answer

Unable to use OptionsMenu in Fragment Activity

I want to use options menu inside Fragment Activity .I have used the following code to add option menu: 1.menu_chat.xml
Deepak Rattan
  • 1,279
  • 7
  • 21
  • 47
0
votes
0 answers

Android Fragmnet activity from Fragment.Noe in Fragment Activity getting nullpointer exception on getActionBar()

I am starting Fragment Activity from Fragment... Now in Fragment Activity I need android.app.ActionBar mainactionbar = getActionBar(); mainactionbar.setIcon(R.drawable.sq_mobile); But in above line mainactionbar.setIcon(R.drawable.sq_mobile); i am…
Android
  • 8,995
  • 9
  • 67
  • 108
0
votes
3 answers

Calling FragmentActivity from main class (appCompatActivity)

I have the main class and more 2 fragment classes but one of these is extended from FragmentActivity, when I call a fragment from a class which isn't extended from FragmentActivity but just extended from Fragment, it works. How could I call a…
0
votes
2 answers

Android Fragment waiting on another Fragment's data

I have question about fragments updating values to each other. I have a fragment called UserFragment and another called CarsFragment. UserFragment gets the user data and the carFragment gets multiple cars for the user owns. I then need to save…
0
votes
2 answers

ViewPager return type mismatch error when using android.support.v4.app.FragmentStatePagerAdapter

I used this example of ViewPager in my app and to solve the "android.support.v13.app.FragmentStatePagerAdapter error: cannot be resolved error" used in this post. But I got a new "return type-mismatch error" because the create() method…
Behy
  • 483
  • 7
  • 23
0
votes
1 answer

Fragment with Both Activity and FragmentActivity doesn't work

I want to show a bar graph in my Activity in a fragment but it is showing inflating issue. So, I changed my Activity to FragmentActivity it worked my application is running but Fragment part output is not displaying. Here is my Code I am unable to…
0
votes
3 answers

SharedPreferences in Non-Activity

Hi I need to get a String from an Activity to another Class. I need the String VideoID in the Test2 class. I wanted to use sharedpreferences, but this does not work. How can i use sharedpreferences here? Or any other idea how i can get the String?…
0
votes
2 answers

Unable to get GridView in FragmentActivity

When I implement the GridView in the Fragment instead of the MainActivity class and after I run the app on my phone, the screen is blank. The app fetches the data from the server correctly but does not show anything on the mobile screen. Here is my…
I.shL
  • 769
  • 2
  • 8
  • 16
0
votes
3 answers

I cannot use this method from this fragment activity

FATAL EXCEPTION: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference at…
user4247042
0
votes
2 answers

start fragment from another fragment (Android)

i need to start a fragment from another fragment. i have my MainActivity @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); …
0
votes
0 answers

how to handle activity when returning null post launch of the camera application from the fragment

In a fragment,I am having the view pager(using fragmentPageAdapter) and recycler views to display the images.I have option to take the pictures and add to both of them(viewpager and recycler), During oncreateView of the fragment,adapter has been…
Rakesh
  • 14,997
  • 13
  • 42
  • 62
0
votes
1 answer

Android: Get Parent View's Framelayout from Fragment inside TabHost

I have a FragmentActivity in which I am displaying two Fragments, Fragment A and Fragment B. In Fragment A I have another Fragment with Tabs. I have done this using classic TabHost. In this TabHost I have 2 more Fragments which has a ListView. Now…
0
votes
1 answer

onRequestPermissionResult of the parent activity is called instead of the fragment

I am trying to implement the new permissions model into my application. I am facing a weird issue. When I request with code i in a fragment, then onRequestPermissionResult of that fragment is not called, instead only the parent activity's…
0
votes
1 answer

Method worked in Activity but not in a fragment

i converted my activity to a fragment, the method network_reinit_activity worked fine before, but when i run it in fragment it wont, this is the method: private final Context c = getActivity(); private void network_reinit_activity() { new…