Questions tagged as 'android-fragment'

1
answer

Save the instance of a fragment

MainActivity calls fragment when started. I have tabs that alternate with fragments. I trace a route in one of the fragments and when leaving, clicking on the tab and returning, the route disappears, I would like it to be instantiated...
asked by 25.08.2016 / 02:20
1
answer

How to do in WizzardPager, build a Fragment according to the user's choice?

I'm using WizzardPager based on this here . But what I want is basically the user chooses the sex of the person, and goes to another screen of the WizzardPager where in this, will choose the ethnicity of her, according to the choice of sex. For...
asked by 30.12.2015 / 20:46
1
answer

Error inflating class fragment using maps

When I run my app, after selecting the event that directs to activity with maps, it ends with Fatal Exception .    luizugliano.com.br.lugaresfavoritos.MapsActivity}:   android.view.InflateException: Binary XML file line # 12: Bin...
asked by 23.11.2015 / 16:11
1
answer

Dev Android. Null pointer when accessing a button from a fragment by main activity using set contentview

I made the layout of an application where I use the android menu. Menu is in main activity: @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically han...
asked by 11.01.2016 / 17:37
1
answer

Fragment within ViewPager does not call any method

I have an activity ( MainActivity ) that contains a PagerFragment that has a ViewPager . In the pager I have 4 different tabs. Within each tab I have a Fragment 1 that can be replaced using FragmentManager.replace(...
asked by 19.04.2015 / 18:41
1
answer

Android Transition between Fragments

I have an application that contains 2 fragments. A fragment (A) is a listing of items and the toolbar has a search, and the second (B) is the date of the selected item. I can make the transition well from A -> B and vice versa. My problem is in...
asked by 27.03.2015 / 11:27
1
answer

When to use a Fragment instead of an Activity

I'm working on a project where I'm making use of several fragments and only a activity . Given a search, I saw that many places suggest using fragments when the code will be reused, so I wondered where to use fragments...
asked by 01.12.2014 / 16:25
2
answers

Hide keyboard with Fragment

I'm doing a mobile application that has screens in fragment with Drawer, and they have EditText , but I'm having a problem that when I click on EditText and then click off, or click on menu does not disappear, and it is difficult...
asked by 07.11.2014 / 19:19
1
answer

First item in a duplicate ArrayList

Hello, I have the code below that seems to be working correctly, the problem is that the first item in the list either goes blank or copies the data from the last item in the list. public class TabList extends ListFragment { JSONObject js...
asked by 10.09.2014 / 17:11
1
answer

Good Practices Fragment e Service

Then the question is personal and the following .. I have an activity connected to a service. I want to start a fragment and this fragment will execute functions inside the service. What would be the best practices to perform functions...
asked by 25.07.2014 / 00:19