Top "Android-fragments" questions

Fragments represent reusable behaviors or portions of the user interface in an Android app.

How do I open a new fragment from another fragment?

I tried making a navigation between fragments. I've got the NewFragment.java with the new fragment working. My problem is: …

android android-fragments onclicklistener android-button
How to use data-binding with Fragment

I'm trying to follow data-binding example from official google doc https://developer.android.com/tools/data-binding/guide.html except that …

android android-fragments android-databinding
Communicating between a fragment and an activity - best practices

This question is mostly to solicit opinions on the best way to handle my app. I have three fragments being …

android android-fragments android-activity communication
Fragment pressing back button

I am now having an activity containing fragments [1] , [2] , [3] , [4] If pressing buttons , [3] , it can be redirected to [4] I would like to …

android android-fragments back
Android - save/restore fragment state

I have an Activity in which I go through several fragments. In every fragment I have several views (EditText, ListView, …

android android-fragments fragment onresume back-stack
android.content.Context.getPackageName()' on a null object reference

Hi I am working with Fragments which implements an interface. public class SigninFragment extends Fragment implements SigninInterface The interface's method …

android android-fragments fragment
get the latest fragment in backstack

How can I get the latest fragment instance added in backstack (if I do not know the fragment tag & …

android android-fragments back-stack
Android SharedPreferences in Fragment

I am trying to read SharedPreferences inside Fragment. My code is what I use to get preferences in any other …

android android-fragments sharedpreferences
Removing a Fragment from the back stack

I have a 3 fragments in an activity when the a tablet is held in portrait. However I only have 2 of …

android android-fragments