Good evening, I am interested in the following question: how to put a news line in the tab menu? There is a first fragment:

package com.learn2crack.loginregistration.fragments; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.learn2crack.loginregistration.R; public class OneFragment extends Fragment{ public OneFragment() { // Required empty public constructor System.out.println("любой текст"); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_one, container, false); } } 

enter image description here instead of text ONE should be a tape

Are there any examples of adding a ribbon or something else to the menu? Thank you very much, I will be glad to any answers!

    1 answer 1

    Displaying a list of data is in no way associated with the presence / absence of tabs.

    You need:

    1. add RecyclerView to markup.
    2. Get / create list with data
    3. Create an adapter for RecyclerView
    4. Display a list of data through the adapter in RecyclerView.