Questions tagged [tablayout]
26 questions
2
votes
0 answers
Android reverse curve corner drawable/canvas
Is that possible to create different corner for drawable (or draw over the canvas whatever) like this in Android?
demo picture
My goals is to become tab layout indicator to look like that picture, I can make tab layout indicator to be a full width…

Sue007
- 21
- 2
2
votes
0 answers
Android TabLayout scroll to random position when new Tabs are added
I have a TabLayout with scrollable tabs that I setup with a TabLayoutMediator attached to a ViewPager2, and when I add new tabs to the TabLayout it scrolls to a random position.
When I create the TabLayoutMediator I tried to set autoRefresh…

TheModularMind
- 2,024
- 2
- 22
- 36
1
vote
1 answer
TabLayout removing using removeTabAt() causes NullPointerException: void android.view.View.unFocus(android.view.View)' on a null object reference
I was using this code to remove a tab element . Of course I validate if the tab is null and the tab count. But I still receiving that error.
rootBinding?.tabs?.removeTabAt(TOYS_TAB_POSITION_INDEX)

Cristofer
- 1,046
- 13
- 21
1
vote
0 answers
AM trying to add AutoSlider Timer Android
and am getting this Error.
MainActivity.java:52: error: cannot find symbol
sliderTimer.scheduleAtFixedRate(new AutoSlider(), 4000, 6000);
^
symbol: class AutoSlider
location: class MainActivity
CODE
sliderTimer.scheduleAtFixedRate(new…

KURONICZ STUDIO
- 9
- 4
1
vote
0 answers
ViewPager and tablayout not showing anything
I am following a youtube tutorial on a login/signup screen using ViewPager and tablayout. Unfortunately, both aren't working. I would very much appreciate it if you could help me find the solution for this.
activity_log_in.xml:

rita
- 11
- 1
0
votes
2 answers
How to start TabLayout with second item ? (In Android, on Fragment, using Kotlin)
My Android app works perfectly. Fragment with TabLayout starts at first item and works as I need.
But now I need to start Fragment with TabLayout from second item. And then I ran into problems.
I found a way to open a second tab (not sure if it's…

Anatolii
- 23
- 6
0
votes
0 answers
Repeat tabs using TabLayoutMediator
How should we repeat a tabs after finish the last tab again first onward start. Like a cycle.
Ex:1, 2,3 and again 1,2,3
And selected tab always center only.
And need to show fragments for each tab .
With supporting Viewpager2.
Can any one please…

suresh vanga
- 71
- 2
- 11
0
votes
0 answers
Creating multiple tabs inside of a preset layout and keeping data within them. -- PyQT5 within KLayout API
I am attempting to generate output information in a tabbed layout using PyQT5. In the case that I have multiple devices, I would expect multiple tabs to show up in the output with information corresponding to their respective device.
For some…
0
votes
0 answers
Cannot persist TabLayout after rotating screen
I try to persist my UI after rotating the screen. I used onSaveInstanceState() to track the current tab position. Everything is working fine. The currentTabPosition has the correct value.
But this portion of code is not working:
viewPager2.post(()…

Hasan Seam
- 3
- 4
0
votes
0 answers
Is it possible to create a drop down spinner inside of one out of 8 tabs that was created using fragments?
So I created 8 tabs using the custom tab activity from android studio, and my next goal is to put in two drop downs in the first tab. Is this possible in android studio? , and if so then how? I already have the spinners code and drop down completed…
0
votes
0 answers
Shrinking Tab Indicator (TabLayout) & Limits of it's Design Requirements
Here's a design requirement for our project, as far as I know the TabLayout is highly customisable but it has it's limitations.
So far I've tried the below:

Kaan
- 63
- 1
- 6
0
votes
0 answers
How to implement custom TabLayout with ViewPager2 with recyclerView in Kotlin?
I am stuck with this problem and I am not getting any solution to that, I want a tablayout with viewpager2 which has recycler view inside it. MainActivity.kt:-
@RequiresApi(Build.VERSION_CODES.Q)
override fun…

Vivek Jaiswal
- 11
- 4
0
votes
0 answers
How to implement TabLayout with ViewPager2 with recyclerView in Kotlin?
I am stuck with this problem and I am not getting any solution to that,
I want a tablayout with viewpager2 which has recycler view inside it.
MainActivity.kt:-
@RequiresApi(Build.VERSION_CODES.Q)
override fun onCreate(savedInstanceState: Bundle?) {
…

Vivek Jaiswal
- 11
- 4
0
votes
1 answer
How to combine two activities together to use it as a single feature?
I am stuck with a problem where I have designed a tab layout that I have used as a library in the current project which has a Recycler View. I want to show the tab layout on top and the recycler view under the tab layout.
For reference in Whatsapp,…

Vivek Jaiswal
- 11
- 4
0
votes
0 answers
Activity with tablayout and another tablayout within fragment
I have an activity with tablayout and four fragments. This works fine and i can swipe between the fragments.
But now i need a tablayout within one of this fragments for a submenu. So there will be two tablayout on top of each other. I thought i can…

maddy
- 1
- 1