I need to hide the first tab. The first page should work, but when the user selects it, it should look like tabs. How can i do this?
I found some solutions with TabHost and it is useless to me.
public class TabFragmentClients extends Fragment { public static TabLayout tabLayout; public static ViewPager viewPager; public static int int_items = 5 ; FinanceClients FinanceClients; public ClientsFragment clientsFragment; public FinanceFragment financeFragment; @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View x = inflater.inflate(R.layout.tab_layout_clients,null); tabLayout = (TabLayout) x.findViewById(R.id.tabs); viewPager = (ViewPager) x.findViewById(R.id.viewpager); viewPager.setAdapter(new MyAdapter(getChildFragmentManager())); tabLayout.post(new Runnable() { @Override public void run() { tabLayout.setupWithViewPager(viewPager); } }); return x; }
source share