android-fragment

What is the meaning of fragments in Android?

What is the meaning of fragments in Android?

Moxy example with Fragments

Maybe someone figured out how Moxy works with Fragment ? Please help me! I've been having fun for a week now. I can't impleme ... ation 'com.github.moxy-community:moxy-androidx:1.0.13' implementation 'com.github.moxy-community:moxy-material:1.0.13' }

The app crashes when replacing a fragment

When I click on the replace fragment button, the app crashes. MainActivity.java: public class MainActivity extends AppCompa ... at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at

How to fix a doubleclick in a fragment

There are 3 fragments and a bottomNavBar. When switching from fragment to fragment, the docx file must be processed. everythi ... ferences.edit(); ed.putString(SAVED_TEXTDocx, textViewMain.getText().toString()); ed.commit(); } }

Enabling the fragment (item) in the recycler view)

There is a separate fragment with a Recyclerview. You need to "include" some items in the recycler view in order for it to di ... android:src="@drawable/ic_play_button"> </ImageView> </RelativeLayout> </LinearLayout>

In Unreachable code

I'm learning how to write rss news. In this code: public class Fragment1 extends Fragment { public View onCreateView(La ... this line: if (savedInstanceState == null){addRssFragment();} - Unreachable code What am I doing wrong? How is it correct?

Android MediaPlayer: save when you rotate the screen

My app can play sounds in different situations. The sounds are short - about 1 second. Sounds are downloaded from the Interne ... rrupted when the screen is rotated , this is acceptable. Which of these options is better? Maybe there is a better solution?

Error Attempt to invoke virtual method ' ... ' on a null object reference

I just understand Android. There is a fragment: public View onCreateView(LayoutInflater inflater, ViewGroup container, ... ppearanceLarge" android:text="Large Text" android:id="@+id/textView2" android:layout_gravity="right|top" />

Switching from Fragment to Fragment

Guys, how to make sure that when you start the application in the Activity there is one Fragment, and when you click on the button, another Fragment appears, while the 1st one is deleted.

Scroll View and fragment scrolling

There is such a fragment markup file: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http:// ... elements still fit into the screen. The second is when I expand ExpandableListView and the screen doesn't start scrolling.

Running DialogFragment with onListItemClick?

There is a class like this, which describes the custom ListView. I need to make sure that when each item from the list is cli ... adapter.getFilter().filter(txt); return false; } }); return rootView; } }

Android startActivity

There are Fragment and buttons on it that need to define a listener that would open different Activity. For example: bt_sta ... :class.java)) } I understand that you need to call the Activity method from the fragment, which will run Activity, but how?

Animation of the fragment appearance

I want to animate the appearance of a fragment. At the same time, so that it appears "from top to bottom". I partially manag ... ="y" android:valueFrom="0" android:valueTo="-1000" android:valueType="floatType" /> </set>

Error inflating class fragment android fragment

I make a training program in which there is a certain list of questions that can be answered yes or no. Depending on the answ ... l" android:layout_alignParentTop="true" android:layout_alignParentStart="true" /> </RelativeLayout>

Android Google Map v2 draw a route

I have a Google Map fragment: <fragment xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tool ... ng, 16); mMap.animateCamera(cameraUpdate); } You need to show the route to the specified coordinates, as in the photo:

putExtra in fragment

There is a main Activity that goes to another Activity where the TabLayout is located, well, fragments of course.I need to pa ... tIntent().getExtras().getString("P")); Toast.makeText(getContext(), P, Toast.LENGTH_SHORT).show(); return view; } }

What is a fragment in plain language?

I reread all the documentation on this case. But somehow I still didn't understand what fragments are. Have an idea for yours ... thing there is sitting on one activity, and everything else(except probably after clicking on the user) - fragments? Or what?

Android. The fragments overlap each other

Of course, I read the topics here and in Google. And I didn't find a solution. I think it is, but I did not succeed. I just s ... roup container, @Nullable Bundle savedInstanceState) { rootView.setClickable(true); return rootView; } }

Fragment not attached to a context

When recreating an activity, I rarely get an error associated with a fragment (fragments are nested in a fragment). As far as ... Callback { fun dataReady() } } } There is a lot of code therefore, I specified only critical parts of the code.

How do I insert a button after a listview?

Hello, I need to insert a button right after my listview. That is, when I finish sliding my listview will have a button at th ... e equipamentos possuem selo de liberação por um líder Gerdau e está dentro do prazo de validade?", 'A', "Condição Fisica"));