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

Android: Display and Hide Fragment

I have inside some Activity single full screen Fragment. Inside that Fragment I have another Fragment overlaying bottom part of the screen. So in the top part of the screen I have Button controlling Visible/Hide of the inner Fragment: Layout of the…
0
votes
1 answer

remove a fragment with fragment manager android

in the application I am developing I add fragments dynamically, and now i want to remove them but I cannot, the application crashes. Thanks a lot for the help in advance. Here is my code Here are declared the things that i use static int…
0
votes
2 answers

Android Fragment Activity initialized variable is giving null value

I've created tab view using the code example on the android web. http://developer.android.com/training/implementing-navigation/lateral.html I've added this code to call a the setTitle method which would set the title. …
Tim
  • 306
  • 2
  • 10
0
votes
2 answers

Otto Subscribe method not called from Activity to Fragment in Another Activity

This is my first activity where Im making a post call. The bus provider is the default one in the otto sample app. void openNextActivity() { manager.bus.post("Hi"); // Intent to my next Activity } This is my fragment in another activity…
0
votes
1 answer

CoordinatorLayout cannot be cast to android.support.v4.widget.DrawerLayout

The app initialized with a splash and that shows and works well. Then when you try to access the menu bar the app crashes. This is my Main_Activity.j import android.content.res.Configuration; import android.os.Bundle; import…
0
votes
3 answers

How backPress works in fragment?

I am trying to use backpress on fragments. I am not able to fix it. Here is my code below. /** * Diplaying fragment view for selected nav drawer list item * */ private void displayView(int position) { // update the main content by replacing…
Shivv
  • 65
  • 2
  • 11
0
votes
3 answers

Android crash when button added in fragment

I have two fragment class I am adding with proper fragment transaction following google developer doc. Whenever I am adding a button in my first fragment layout, my app crash. The fragment page does not open in the app. So I tried without the button…
0
votes
1 answer

fragment error while including a java file

I am getting exception while including a particular class in my manifest file.If i hide that class from my manifest my app will run without any problem.When i try to include the class my app get stopped This is the message shown by log cat while i…
0
votes
1 answer

Fragment activity communication by passing Context object to onAttach()

Im trying to implement fragment to activity communication. Went through android developer doc where an Activity object is passed to onAttach life cycle and set up the Fragment-Activity communication. This documentation asks to pass Context object…
0
votes
3 answers

How to pass an entire class into an Activity

I have this class: public class Weather { public Today today = new Today(){}; public Tomorrow tomorrow = new Tomorrow(){}; public DayAfter dayafter = new DayAfter(){}; public DayDayAfter daydayafter = new DayDayAfter(){}; public class Today { …
0
votes
2 answers

FragmentActivity always on screen

I have a fragmentActivity (public class WearRunActivity extends FragmentActivity) that I want to be always on on the screen. I can't setAmbientEnabled(); because it is not an wearableActivity.... How can i keep my app on
cdlc
  • 323
  • 1
  • 8
0
votes
1 answer

Chronometer Share between fragments

I have a FragmentActivity that has 3 fragments attached.This 3 fragments have a chronometer and i want them to share the same time between them... I've tried to start() them all at same time but sometimes they suddenly start over from 00.00... …
0
votes
0 answers

Why is my DrawerToggle onClick not getting called?

When I am adding a fragment to my activity I am changing the hamburger icon to back arrow image and trying to set onClick to it. But for some reason it is not getting…
0
votes
1 answer

android: Error when use setAdapter in Fragment to call Activity

I'm doing the application fetches the data from the database and displayed in Listview and Must be all the Classes be a Fragment so I can put it in tabs The error is: this.getlistdata.setAdapter(new GetAllSongs(jsonArray,this)); Exactly ...…
0
votes
1 answer

NPE in custom actionbar for all fragments

I'm using ActionBar in my Activity and custom ActionBar with separate layout file for each Fragment. There are total 6 Fragments that I'm adding in FrameLayout MainActionBarActivity.java public class MainActionBarActivity extends ActionBarActivity…