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

Add Options Menu in Android

I have tried to add options menu to my application, but when adding a Create Options Menu to the code it is not used. It looks like this: I used in this page on Fragment Activity and implements Tab Listener. What is the right way to add the…
0
votes
1 answer

App force closes on calling a class from main

The application works fine in previous android versions but not in Android 5.0+. I'm guessing that there is some issue in backward compatibility. I tried determining the reason for the application crash from log but could't. protected void…
motox
  • 759
  • 10
  • 17
0
votes
1 answer

Adding gridview with images and texts

I am trying to create a gridview in Android Studio with images and texts. I found a couple of solutions but they were specific to the a single activity and not with activity with fragment. I can populate the text in grid using the following code.…
0
votes
2 answers

Fragment inside a fragment android

I am working with Fragments. See the image below. can we hold different activity's(Activity A) fragment(Fragmet A1) inside a fragment(Fragment B2) of another activity(Activity B)? Is it possible how can we do this ?
0
votes
0 answers

Start Activity from FragmentActivity

Am getting an exception when am trying to start an Activity A from FragmentActivity B. The FragmentActivity B contains two tabs.It also contains a Home button on the custom action bar. When i click on the home button it should jump to activity A.…
0
votes
2 answers

How to attach fragment to activity?

I have activity with fragments: for (String tab_name : tabs) { getActionBar().addTab(mActionBar.newTab().setText(tab_name) .setTabListener(this)); } FragmentManager fm =…
Rendy
  • 5,572
  • 15
  • 52
  • 95
0
votes
0 answers

Fragments, How to maintain UI state in BackStack , if Layout UI element is created at Runtime (programmatically)

Using Fragments, i want to restore the UI state if UI elements are created dynamically at Run-time. Like below is my layout image, Above, is my default Layout with one Edit Text box. And buttons are created dynamically at Run-time. On click ADD…
0
votes
2 answers

Is it possible to convert Blank Activities to Fragment Activities

I currently have an Unit Converter app that I'm working in. Here I've used multiple Blank Activities. Where each Unit's Activity can be opened using MainActivity. But now I want to make it tablet friendly. Hence I want to use FragmentActivity now.…
0
votes
1 answer

getFragmentManager to Fragment

I am trying to convert an activity to a fragment and have problems with getFragmentManager. my xml file:
Diego Said
  • 31
  • 7
0
votes
0 answers

ListView update refresh in android

I have a fragment class that contains a ListView and I have my own custom layout for the list, The process of adding something on the list is, within the fragment there is an add button, this button when clicked will open DialogFragment then passes…
0
votes
1 answer

Android fragment to Activity method calling

I have three files such as activity class db handler class fragment class From my resource file, on a button click I am calling a method (add). The method is defined in the DB Class. and I am trying to call it from the fragment class related with…
0
votes
2 answers

Android passing data from MainActivity to fragments

I am trying to think of this logically, so my MainActivity basically just creates the viewpagertabstrip using an adapter but thats all it contains, I have a map fragment as one tab and another tab containing a listView. What I am trying to do is…
0
votes
0 answers

How to pick image from gallery?

I have a FragmentActivity which contains three Fragments. In Fragment No. 3, I have an ImageView where on click of that ImageView I want pick up image from gallery and set to that ImageView but when I try to do this, I get following exception and…
VVB
  • 7,363
  • 7
  • 49
  • 83
0
votes
1 answer

Using ViewPager and PagerTabStrip - extending FragmentActivity

First - sorry for the newbish question. I've started building an app that has a single Activity and a navigation drawer. Each menu item loads a new fragment in the middle frame layout. I want to create another fragment that: has tabs allows for…
0
votes
2 answers

Android use FragmentActivity instead of TabActivity

I want to change TabActivity to FragmentActivity because TabActivity is deprecated. My code is public class Fragment_Activity extends TabActivity implements TabHost.OnTabChangeListener { /** Called when the activity is first created. */ …