Questions tagged [tablayout]
26 questions
0
votes
0 answers
Show TabLayout on scroll
I'm trying to achieve behavior for my TabLayout, so it is shown only on scroll, and is hidden when the scroll offset is 0. So it's like inverted collapsing toolbar behavior: the TabLayout is shown when the toolbar is collapsed and is hidden when the…
0
votes
0 answers
Android Studio How to reference an element inside a Fragment in a Tab Layout?
I am trying to reference an element inside a fragment that is also inside a tab layout.
categoryList = tabLayout.findViewById(R.id.admin_category_list);
categoryList.setLayoutManager(new LinearLayoutManager(this));
CategoriesViewAdapter…

CptZ
- 1
0
votes
0 answers
Kotlin use tabLayout with 2 activities
I have 2 activities. Which I tried to convert into fragments but somehow, the code I use for the activities won't work within fragments. I get a bunch of errors.
The first activity is a card where when clicked a random text will appear and the card…

Curiousnoes
- 83
- 8
0
votes
1 answer
Android - Custom tab header with broken event propagation on icon
I have a custom layout as a the tab header in my TabLayout.
In the layout I have a TextView displaying an icon and another TextView displaying a text.
If I click on the icon the TabLayout will not display that tab.
If I click somewhere else on the…

Mc_Topaz
- 567
- 1
- 6
- 21
0
votes
1 answer
How to make a navbar in a fragment android studio
I was running into some trouble making a navbar in a fragment that was loaded by a different navbar.
Basically trying to solve the problem of having a menu in a fragment that was accessed by a navbar.
The easiest thing turned out to be creating a…

brando f
- 311
- 2
- 9
0
votes
0 answers
Getting user input from fragment and displaying it into same fragment
I have an activity with a tablayout containing 3 tabs/fragments (+ ViewPager). Each tab/fragment contains a textfield and a button to submit user input that ideally, would accept and display that input into the same fragment as a radio button as if…
0
votes
0 answers
Android approach to handling landscape mode when portrait mode uses ViewPager2/TabLayout?
I am currently working on an app that I have completed portrait views of everything. This is my first app where I want to have robust orientation support.
So, I'm going through the process of refining the landscape orientation of views. Instead of…

spamalope
- 11
- 1
- 2
0
votes
2 answers
How can I make a custom ArrayAdapter with a TabLayout?
I am programming an app that can execute many commands with one click.
In the setting, for the command selection I use a AutoCompleteTextView with a TabLayout menu.
current menu I made
Here is the code:
AutoCompleteTextView type =…

RobinP2000
- 31
- 3
0
votes
1 answer
Kotlin (android studio) - changing tab by clicking doesn't change button on selected fragment, where swiping to the tab works
I'm new to Kotlin and Android programming.
I Have 2 tabs using TabLayout and ViewPager2.
In my main activity xml I have edit text widget. When I enter text and push ENTER the program needs to take the 'value' of the 'key' from edit text and add it…

Tal Yehuda
- 3
- 3
0
votes
1 answer
How to change the tab layout theme programmatically?
I have created a custom style for my tab layout in styles.xml file.
styles.xml: