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
1 answer

fragment already exist in android

**i've set here three onClickListener and tried to replace the fragment accordingly ... but whenever i try to click on the today onClickListener the application crashes and sends "fragment already exist" and points to fragment.setArguments(b) of…
Sajan Rai
  • 35
  • 5
0
votes
1 answer

How do I create a pop-up Android Fragment that takes in a text input before returning to my main activity?

For my app, I want my user to be able to press a "Change User" button, have a fragment pop-up, take in a text input, and then save to shared preferences upon exit, returning to the activity it was called from. I would like my methodology to be…
0
votes
0 answers

FragmentActivity within Fragment

I need help because I implemented a navigation drawer , but I need this load a FragmentActivity @Override public void onNavigationDrawerItemSelected(int position) { Fragment objFragment = null; switch (position) { case 0: …
0
votes
1 answer

Android how to use a activity in default case in switch

I'm using a view pager library in my application, where I use switch case with view pager. Here my code: private class MyPagerAdapter extends FragmentPagerAdapter { public MyPagerAdapter(FragmentManager fm) { super(fm); } …
0
votes
1 answer

Convert an Activity into Fragment for another activity (android)

So I'm having difficulties in understanding how these things work. I have an activity called MapsActivity. Its signature is: package com.ap2.demoapp; import android.app.ActivityManager; import android.location.Location; import…
dan
  • 105
  • 1
  • 13
0
votes
1 answer

setUserVisibleHint() issue with FragmentStatePagerAdapter

I know this question has already been asked on different website (such as here and there for example, but I struggle to find a solution to my specific use case. Here is the thing: I have 3 tabs (each tabs extends Fragment) which are hosted by an…
0
votes
1 answer

Starting AlertDialog fragment from MainActivity

I'm sure there is a simple answer for this. I'm trying to start an AlertDialogFragment (RegForXapo) from my main activity without a button. It pops up but app force closes when i click the positive or negative button. Here is my main sharedPref =…
0
votes
2 answers

How many levels of Activity/Fragments can I start?

I have a problem starting an activity to pick an image from the gallery when I start it from the 3rd level of FragmentActivity/Fragment combinations. If I start it from the 1st or 2nd level, it works. In the app, there are up to 5 levels of…
0
votes
2 answers

ViewPager not showing the view

I am working recently on ViewPager using a FragmentStatePagerAdapter , when I'm emulating the app it's not showing the current fragment's view ... Here is my FragmentActivity class : import android.os.Bundle; import…
0
votes
0 answers

View getting blurred occasionally on a specific Android device

I have come across a problem where the screen of my Android device(Moto G2) gets blurred on click of a specific button in my app. This event happens occasionally and not everytime I click this button. This scenario is not happening on few other…
Mikki
  • 128
  • 2
  • 12
0
votes
1 answer

Refresh fragment inside viewpager

In my example am having a view pager inside a fragment and tabs in View pager are crated dynamically. For example, am having tab for three subjects Sub 1, Sub 2, Sub 3 each subject tab having some number of questions. Now what i want is when i…
0
votes
1 answer

How to cast the cursor from a fragment to a new activity?

I have a working ListView, in a fragment and when the ListItem is clicked I want to link the data to a new Activity. I am getting an error that my db object cannot be cast to the db Cursor import android.app.ActionBar; import…
0
votes
1 answer

how to fetch data from php and display in android listview in FRAGMENT?

Error throwing in onPostExecute(): The constructor SimpleAdapter(Commodities, ArrayList>, int, String[], int[]) is undefined The problem is in onPostExecute() of my AsyncTask: @Override protected void onPostExecute(Void result) { …
0
votes
1 answer

Callback from Spinner Class to FragmentActivity

I have to know the click event from the spinner in the Activity. The OnClick Method of the MultiSelectionSpinner Class gets called, but I have no idea how to create a callback method for the Activity. Following is the Spinner Class and the…
user1390816
  • 623
  • 2
  • 13
  • 34
0
votes
0 answers

FragmentPagerAdapter and Pager NullPointerException. pager.setOffscreenPageLimit(3)

I have a problem. I have 4 pages. and I used the method that pager.setOffscreenPageLimit(3);... It is very well page swiping. However, When I called finish() at FragmentActivity, Error happened that Fragment BackStack NullPointerException. How do I…