Questions tagged as 'android-fragment'

1
answer

ExpandableListView - change background color header title group

I need to change the background color of the header group from my ExpandableListView to a green color. Does anyone have any ideas? ExpandableListAdapterpublicclassExpandableListAdapterextendsBaseExpandableListAdapter{StringheaderTitle;privateCo...
asked by 26.02.2018 / 15:41
1
answer

How to set values in a Fragment instead of an Activity using Drawer menu?

I created a sliding menu in my application and was able to call a fragment when I select the menu options but I'm having trouble printing the values in this fragment instead of using an Activity to display the data. Below the application code....
asked by 17.01.2018 / 20:44
2
answers

AlertDialog Custom Layout - NullPointerException error

Talk about beauty? So, I tried to create a custom Aler Dialog, but every time I try to save it, it gives a NullPointerException error, but I do not know what the cause is. The code for the method that Alert has is this: Button btnAlertDataCons...
asked by 29.12.2017 / 20:34
1
answer

How to call a method in the View using a Class that extends Fragment

I have several buttons in a view that call the method addNumero in OnClick, something like this: <Button android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:gravity="center" a...
asked by 19.01.2018 / 13:09
1
answer

Fragments in the TabLayout's ViewPager disappear on the second call

Come on! I have an application that has a DrawerMenu (Menu Sliding), clicking on the Edit Profile item, calls a new Fragment ( EditFragment.class ), So, in this Fragment you have a TabLayout with a ViewPager , which contains 2 Tabs. Each...
asked by 25.10.2017 / 21:03
1
answer

Fragments do not disappear [duplicate]

Good night, I'm creating an app to train and it contains side menu that each menu item calls a Fragment but I'm in trouble, because when I click on an item it appears the called fragment, but when I click on the other item the second fragmen...
asked by 22.07.2017 / 02:33
1
answer

Passing value from a DialogFragment to the Fragment

I have fragment1 and DatePickerFragment In case DatePickerFragment extends DialogFragment I would like when selecting the date to return to the fragment. But you're giving it here: java.lang.NullPointerException: Attempt to inv...
asked by 08.08.2017 / 20:13
1
answer

Exchange information with fragments

I have a CRUD to add users but I'm having trouble implementing the edit. The user clicking edit wanted the edittext to be loaded already filled in. For this, I tried to implement something like: ImageView editarBt = (ImageView) view.findVie...
asked by 23.06.2017 / 16:22
1
answer

Error when using MainActivity method in a fragment [closed]

I'm trying to use a method that returns a list, when I use this same method inside the mainactivity where it was created everything works fine, however when trying to access it in a fragment of the NullPointerException error. log: 06-24 14:...
asked by 24.06.2017 / 16:35
1
answer

Application giving Crash on a button within a custom AlertDialog

I'm working with Alert Dialogs and I had an error where the application stopped responding. The following code refers to a snippet where the Google Maps API is being used, which means that when I click on a specific marker it will open an AlertD...
asked by 22.06.2017 / 19:13