Questions tagged as 'fragment'

1
answer

how can I retrieve values from an EditTextPreference?

I'm working with Preferences in android and I have a problem, I have a fragment that is a PreferenceFragment, in that fragment I have several options one of them when I click it opens a dialogue box with a field to place text inside as shown i...
asked by 22.01.2018 / 17:38
2
answers

Some fragments disappear when you rotate the screen in Android

I have a four fragments, when the screen turns one disappears, if I turn again two disappear and the one that was missing appears at the beginning and finally all disappear except for one, the strangest thing of all is that this only happens in...
asked by 05.03.2017 / 05:36
2
answers

Android Fragments bundle getArguments () returns null

I try to pass an arraylist (which is not empty) from one fragment to another. This is the code in which I try to pass through the arguments: Instalaciones_fragment itf = new Instalaciones_fragment(); Bundle bundle = new Bundle();...
asked by 14.05.2018 / 13:45
2
answers

Error trying to load map in a fragment

I'm having a problem loading Maps, I'm using SupportMapFragment, it does not show any visible error in the code but in Logcat it shows me the following error:    java.lang.NullPointerException: Attempt to invoke virtual method 'void   com.goo...
asked by 01.11.2017 / 23:16
1
answer

Is it possible to initialize an Activity from a Fragment in Android?

I have this code in a fragment and I want to start an Activity: @Override public void onResume() { super.onResume(); if (!getUserVisibleHint()) { return; } MainActivity mainActivity...
asked by 20.06.2017 / 20:01
1
answer

Save user ID in all the fragments of an app?

I have a fragment login, a fragment to register clients and depending on who enters the login we will collect a different ID for each user entered. In an answer to this question I was recommended to create a class with a couple of get and set...
asked by 21.12.2018 / 02:40
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
2
answers

Error calling listview in a fragment

I get the following error    java.lang.NullPointerException: Attempt to invoke virtual method   'android.view.View android.view.View.findViewById (int)' on a null   object reference In the android studio Code package com.example.lab_des...
asked by 23.08.2018 / 18:02
2
answers

fragment on android

Hi, I am using fragment in android and the problem is that from a button that has an activity it calls a fragment but the views of the activity overlap in the fragment this is the activity and when I pulse in the floatingbutton it ca...
asked by 02.12.2017 / 19:19
1
answer

FATAL EXCEPTION: main java.lang.NullPointerException Android Studio

Can someone help me solve this execution error please, I'm trying to show a map, in a fragment, I'm working from the template of a navigationDrawer. I have generated a fragment that contains the following code: import android.net.Uri; import a...
asked by 31.08.2017 / 16:51