Questions tagged as 'android-fragment'

4
answers

Apply onBackPressed in a fragment

How to apply onBackPressed() in a fragment ? It does not work the same as in an activity, then I explain exactly my case: I need to be in my fragment when I press the "back" button that all the android files bring by de...
asked by 22.01.2017 / 23:17
2
answers

ListView.setAdapter "null Object Reference"

I'm implementing a ListView loaded with an External database, and I'm getting the data with a JSON This project had it running smoothly in an Activity, but wanting to implement it in a fragment marks me these errors: This is the Code that...
asked by 14.12.2016 / 03:05
1
answer

How to store the values of the controls of a Fragment with viewpager?

already implement several things and simply do not find as, good step to the point:  I have several fragments that I display with the viewpager, I want to save the data that is in the fragment controls, for this I have a function in the fragment...
asked by 13.10.2016 / 20:52
1
answer

access a view that is in a fragment from activity?

I want to access from the main activity a Button that is in a fragment by means of this code: Button button = blankFragment.getView().findViewById(R.id.btnFragment); but I get the following error: Caused by: java.lang.NullPointerException...
asked by 28.12.2018 / 04:23
1
answer

Send a Boolean from an adapter to its fragment

I have a problem, maybe you can help me, in the onclick event of a recycler I want to send a boolean to its fragment to update a method, but I do not know how to do it. before I had done it but not with an adapter from a fragment, this is the...
asked by 25.10.2018 / 02:24
1
answer

Animation XML fragment with setTransition does not work

I've been programming with Android Studio for a long time, I do not like to use a lot of XML, so Animations usually create them in java but what I realized is that with the FragmentManager there is not a method to place it, it touches by...
asked by 28.08.2018 / 17:30
1
answer

How to Fill a ListView with an ArrayAdapter in a Fragment

I'm trying an example of how to read remote xml files, and after testing it works correctly I have modified it to integrate it into a fragment of a Drawer Layout, with the disappointment that it seems that it does not work the same at the time o...
asked by 05.08.2018 / 03:04
1
answer

How to define a unique ID to a fragment in android studio?

I try to call a fragment for my Navegation Drawer but it does not have an ID and if I try to put it in the XML file it marks me error FragmentManager manager=getSupportFragmentManager(); manager.beginTransaction().replace(R.id.aquiMarcaErr...
asked by 20.06.2018 / 01:52
1
answer

Issues when compiling on Android

I have this problem when I try to compile an Apk from my Android project. Could someone help me solve this: Gradle sync failed: Could not find org.jetbrains.trove4j:trove4j:20160824. Searched in the following locations:...
asked by 12.06.2018 / 00:35
2
answers

set bookmark in google maps android (API V2)

I have these two classes that call my map, and my activity that contains it, the issue is that I need to pass on the parent activity, the coordinates for the child activity, but I do not know how to do it, if I do a new method that go to the fra...
asked by 16.05.2018 / 06:49