I would like to hide tabs in a specific fragment. I have MainActivity and two tabs - fragments (I use viewPager). However, in the third fragment I need to hide these tabs and show only the toolbar.
I know how to hide a toolbar, but nowhere I find how to hide tabs dynamically.
thanks for the help
TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs); //your tablayout id
For hide
tabLayout.setVisibility(View.GONE); // or View.INVISIBLE
To display
tabLayout.setVisibility(View.VISIBLE);
Source: https://habr.com/ru/post/1652028/More articles:The UIPDFPageRenderOperation 0x12de5fcf0 object is overridden upon release; break on objc_overrelease_during_dealloc_error for debugging - iosHow to set configuration parameter from console argument? - symfonyHow to partially update a region object - javaHow to draw a line with a custom round pen in Qt - qthide div if specific text is displayed in between - javascriptJquery onclick event with angular datatable - jquerySpring Data Layer: the difference between getSize () and getNumberOfElements () - javaSearch bar, such as Google in HTML and CSS - htmlКак получить определения сборки из TFS с использованием REST API в виджетах VSTS? - restдобавление гиперссылок в некоторые ячейки openpyxl - pythonAll Articles