Questions tagged as 'android-fragment'

1
answer

How to pass the value of the EditText from a Fragment to the TextView of another Fragment?

I have a fragment containing an EditText in which the user will enter his name. In another fragment is the TextView that will receive the name entered in the previous fragment. Fragment Edit (where the user will type the name): pub...
asked by 14.04.2015 / 20:01
1
answer

How to use a custom Adapter in the android ListFragment

Hello everyone, I'm having trouble using a custom Adapter and displaying this Adapter in a ListFragment . My Custom Adapter public class UsuariosAdapter extends BaseAdapter { Context ctx; List < Usuario > usuarios; p...
asked by 29.07.2015 / 16:40
2
answers

Change fragment when clicking on a button inside another fragment

I have a button inside my fragment that I want it to call another fragment that is over the current when it is clicked. follows the fragment code: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedIns...
asked by 28.06.2016 / 15:40
2
answers

How do I pass parameters from the last Fragment to the previous Fragment?

I have the following situation: Fragment A is opened and it, with a click event, goes to Fragment B . When in Fragment B and pressing the back button, in order to return to Fragment A , I would like to pass some paramet...
asked by 04.04.2014 / 22:24
1
answer

What does popBackStack () do?

I can not understand or find somewhere that will make me understand what the getActivity().getSupportFragmentManager().popBackStack(); method does Not even reading the documentation I could understand, someone could explain me well exp...
asked by 26.05.2014 / 18:57
1
answer

When I have in Fragment a reference through getActivity () should I use interface?

My question is how best to work for the organization of the methods, I will present 2 implementation options that I am in doubt, whenever I have in Fragment a reference through getActivity () should I use interface? : 1st choice: I'm dec...
asked by 19.10.2014 / 12:14
1
answer

How to change the name in the upper bar dynamically when a fragment is selected?

I want the name in the upper bar to change according to the fragment that is selected, for example, I chose the list of clients list, then on the bar it would appear "List Clients", but I can not do it, it only gets the initial name. Here is the...
asked by 24.03.2016 / 05:12
1
answer

startActivityForResult () and onActivityResult () in Fragments

I have a MainActivity that allows me to open two Fragments . The Fragment_1 class has a Button that in its Listener opens a second activity through the following call: Intent intent = new Intent(getActivity(),...
asked by 24.07.2015 / 16:12
1
answer

Placing click event on the button that is in a Fragment, in an Activity?

I want to put a setOnClickListener on the button that is in a fragment, through my activity. Here are the codes: Activity: private Button mButtonCriarConta; // onCreate da Activity... mButtonCriarConta = (Button) findViewById(R.id.emai...
asked by 10.11.2015 / 16:07
1
answer

Android Xzing library (read barcode) with fragment

My application worked perfectly with Zxing, after implementing fragment, the barcode reading stopped working. I tried configuring the return in the fragment, in the activity ... but I was not successful. Has anyone been able to do this implement...
asked by 09.07.2015 / 04:44