Issue Question: How does one create a callback from a DialogFragment to another Fragment. In my case, the Activity involved should be completely unaware of the DialogFragment. Consider I have public class MyFragment extends Fragment implements OnClickListener Then at some
Continue readingTag: android-fragments
Swipe to refresh data using SwipeRefreshLayout in fragment?
Issue I want my layout to be refreshed when the app starts and the data should show in and when the user swipes the data should be updated and show new data if new data is available on the server.
Continue readingRefresh Recyclerview from another Activity
Issue I have my main Activity with a fragment, which has a Recyclerview retrieving all the data populated from the database. In this fragment I got a button which calls another activity to insert an object into the database. The
Continue readingCannot find a setter for ~ItemBinding~ that accepts parameter type 'androidx.lifecycle.LiveData<
Issue Cannot find a setter for <the_derek.dogstuff.databinding.DogItemBinding app:product> that accepts parameter type ‘androidx.lifecycle.LiveData<the_derek.dogstuff.db.entity.DogEntity>’ If a binding adapter provides the setter, check that the adapter is annotated correctly and that the parameter type matches. I’ve been going line-by-line through my app
Continue readingSocial link don't added in Fragment
Issue I’m trying to add social media links in fragment in my app. When I staring adding img_vk, findViewById selected red color. In empty project ImageView working fine. public class Fragment5 extends Fragment { ImageView img_instagram,img_vk; @Nullable @Override public View
Continue readingChange background color of a Fragment from DialogFragment ColorPicker using Mutablelivedata not working
Issue My app should be able to change color of one part of my screen in a Fragment (called Color Preview) from Color Picker that is DialogFragment and appears once a Button is clicked. I used the same ViewModel with
Continue readingi have a fragment contain List View, on a item click how to send position (int) to a new activity
Issue i am creating simple counting app i create a main activity contain tab layout of two tab then each tab contain fragment on fragment i have a list view when and onitem clicked i like to stat a new
Continue readingHighlighting a menu item in system settings
Issue Trying to bring up an unaswered question I found here – How to highlight android setting app menu item? As seen in this video https://www.youtube.com/watch?v=eHXBc5Mmsqs The "Power Shade" menu item is being highlighted once you enter the screen. I
Continue readingHow do you observe LiveDat outside a fragment
Issue I have a TextView inside a Fragment. Using LiveData I am able to change the text from within the fragment. By using a button in the MainActivity (outside the fragment) I am trying to change the text in the
Continue readingBottomNavigationView with navigation component – selected fragment not showing
Issue I’m currently migrating to android navigation component and cannot get the fragment transitions to work when a new item is being selected in the BottomNavigationView. I followed the instructions in the official documentation and I did not found any
Continue reading