Category : fragment

I create a Fragment, but I can’t even move item. If item is in the middle of my Fragment everything is correct, but if I try to add something that thing is invisible in my fragment> Some pictures: This is waht I need https://imgur.com/a/D9Adzzu but I get something like that: https://imgur.com/a/qDzUXJj As you can see, ..

Read more

I’m working with fragments and I’ve encountered an exception when trying to change the fragment from current fragment. The basic design is: An activity with a frame layout. Fragment A that is initially placed in the frame layout of activity. Fragment A layout has a frame layout lets say frame_layout_a. Child_Fragment_A that is initially loaded ..

Read more

I’m trying to implement a bottom navigation bar, however even though all the functions are called, the fragment view is not shown. Here is my code, please point out what I’m doing wrong or missing. Main Activity public class mActivity extends AppCompatActivity { BottomNavigationView bottomNavigationView; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.m_activity); bottomNavigationView ..

Read more

I’ve implemented the zxing-android-embedded library in my android project and trying to get the QR code scan result but onActivityResult() is not being called. My fragment initiates the scan with the intent sent for the camera to scan a QR code. The camera loads fine, scans a QR code, and returns. The onActivityResult however is ..

Read more

i want to inflate a layout containing a single seekBar. in this way i’ve created a java class that extends fragment class and then i inflate the layout. but the following error occurred: Binary XML file line #9: Binary XML file line #9: Error inflating class com.google.android.material.slider.Slider warming.XML is in the following: <?xml version="1.0" encoding="utf-8"?> ..

Read more

I am an Android developer newbie, and I am having a hard time hiding the bottom navigation bar when a dialog is displayed. I want that to NOT appear since the application is shown in full-screen mode. Here is the class that builds the dialog: class CreateNewFolderDialogFragment : DialogFragment() { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog ..

Read more

I have an Activity called login and in that activity i have a button support when i am click the support button it should be navigates to an supportFragment. I wrote below code to navigate to fragment. @Override public void run() { supportLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent supportIntent = new ..

Read more