Questions tagged as 'android-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
1
answer

Read data from a Custom Dialog generated in a Fragment

By clicking on the "Add Client" button that is seen in the first photo, it generates a dialog (of a layout) where I will enter data. I'm doing the tests to capture that data with a Toast but it returns it as null: "Added clientenull" (I...
asked by 24.10.2016 / 18:43
2
answers

go from one fragment to another when selecting an item from a ListView

When executing and doing click on the item of listview the app is closed. Any ideas to solve this? The list is in a fragment, and I want to go to another fragment I leave my code public class DiezFrut extends Fragment { //...
asked by 18.01.2017 / 00:57
1
answer

Problem with DialogFragment on Android?

I am trying to develop an application that looks like a feed news where the information is obtained from a json that is in a host , from there I can add and modify the data, the information is displayed in a cardview the problem...
asked by 10.11.2016 / 21:03
1
answer

When rotating the screen, the instances of the controls are lost?

Curiously enough I have not had problems with rotating the screen and controls, until now, I have my controls, until the Fragment arrived I have that happy problem when rotating the device loses the instance of the controls:    java.la...
asked by 16.12.2016 / 18:42
1
answer

problems to interact with the database from a fragment

From so much research I realized that the fragment do not work the relation with the database SQLite as do the activity directly, that this could help me to work or what is the correct code line for to be able to work with t...
asked by 07.12.2016 / 06:54
1
answer

WebView in a Fragment?

I have this error:    Second_Fragment can not be converted to Fragment Code: public class Second_fragment extends Fragment { String direccion_web = "https://www.google.es/"; public View onCreateView(LayoutInflater inflater, @N...
asked by 27.10.2016 / 23:31
1
answer

Pass between activities, Fragments

I've been working with Activity and Fragments , of which I know how to move from one activity to another and from one fragment to another, ..... But how do I go from a fragment to an activity? Here I leave the code:) 1.- Move fro...
asked by 02.08.2018 / 23:50
3
answers

"No view found for id" error when trying to open a Fragment on android

I have a problem trying to load a fragment, I use a navigation drawer, where I have different options: When I click on the Facebook tab, it has to open a fragment, the prolema is that when I click on the option the application closes, the err...
asked by 26.12.2017 / 19:37
1
answer

How to save the state of a switch in a fragment? Android

I've been working on an app that in fragment has switch and mark them subscribe to the user in a few topics in Firebase but when you reload the fragment the switch return to their state initial. Here I leave th...
asked by 26.02.2018 / 22:04