Questions tagged [android-tablayout]

Android TabLayout provides a layout to organize pages of information.

TabLayout provides a horizontal layout to display tabs.

Population of the tabs to display is done through TabLayout.Tab instances. You create tabs via newTab(). From there you can change the tab's label or icon via setText(int) and setIcon(int) respectively. To display the tab, you need to add it to the layout via one of the addTab(Tab) methods.

Useful links

2044 questions
0
votes
1 answer

Themes who can use with action bar and tabLayout

I need a help about to find a theme who fits in this part of my project, but first I believe is nice to explain first the structure of the activities to find the answer: Example of project style The main activity (left) don't have any Action Bar,…
0
votes
0 answers

Can I put a ProgressBar on each Header of my TabLayout?

I have a TabLayout consisting of 6 fragments, controlled by a ViewPager. Its function is to look up a word in one (or more) dictionary onlines, each online dictionary represented by the tab. Once I have the word to look up, I launch multiple…
0
votes
0 answers

Removing and adding specific tab in ViewPager tablayout

I am having 4 tabs in tablayout and I am using fragments with view pager for them.Now for better customisation,I am providing user a choice to remove any tab or add any tab when they require. But the problem is now I am not able to remove a tab and…
0
votes
1 answer

Fragment inside TabAdapter Refuse to Update TextView

I have a super simple Fragment that exists in a TabAdapter. I can't for some reason update one of the textViews. Here is what it looks like. I want to update the textView that says "hello there home fragment" (the bigger one). Here is my main…
Peter Weyand
  • 2,159
  • 9
  • 40
  • 72
0
votes
0 answers

Shows multiple tabs in Android

When I use TabLayout.MODE_SCROLLABLE, overflowed tabs can be scrolled. But I want to show overflowed tabs below of visible tabs. What's solution? Now, I'm using two TabLayout to perform this, But in that case two tabs can select same time.
user6022289
  • 65
  • 1
  • 7
0
votes
1 answer

"Unfortunately, App has stopped" After clicking the Item in ListView to Fragment Activity

I'm a beginner for doing this application and I encounter this problem after I put Listview in Tab Activity. In Listview there are items are onclick to go for the new activity (That activity is fragment) for VR Panorama View I will display the codes…
0
votes
1 answer

Best way to implement a "viber sticker list" behavior (Android)?

I'm trying to decide which is the best/proper way to implement a dynamic horizontal list of icons that will behave similar to the sticker list in Viber android app.There will be a list that will be populated with icons according to a JSON file from…
Vely
  • 381
  • 5
  • 8
0
votes
1 answer

How to pragmatically set/change the color of the Toolbar home icon?

I have setup the following AppBarLayout + TabLayout for the main activity of my Android app.
Andrei Herford
  • 17,570
  • 19
  • 91
  • 225
0
votes
1 answer

Tab buttons do not appear under action bar

I want to add a TabLayout with three buttons. underneath my app bar. I'm using this walk-through to add tab buttons (TabLayout) underneath my app bar. The swipe and everything is working fine. The only problem is no button appears! What is going…
Fatima
  • 869
  • 10
  • 35
0
votes
0 answers

SwipeRefreshLayout + ViewPager with Fragments not working

I have implemented the SwipeRefreshLayout in many of the pages,and it working fine. but here i got stuck with one specific implementation , where i have a SwipeRefreshLayout for the ViewPager and ViewPager holding the FragmentPagerAdapter. In my…
0
votes
1 answer

How to align selected tab to center of tablayout?

I am developing an android application. I need to use a tablayout on a section of the application. But I'm unable to align the selected tab to the center of the tablayout. Can anyone help me please ?
0
votes
2 answers

How do I change my bottom tablayout icon and text color using custom layout?

I have added custom layout. I had used tabLayout.setOnTabSelectedListener(); but still, it's not showing selected icon change. I had done this I want to do this
0
votes
3 answers

Showing the first fragment after returning from the next tab

I use ViewPager and Tabs. I have 3 tabs and in the first tab (Tab_1) I switch from FragmentA to FragmentB. Then I pass to the second tab (Tab_2). After that I return to Tab_1. Actually, it is the fragmentB that is showing but I want fragmentA to…
0
votes
0 answers

TabLayout only in Toolbar in landscape mode

I created a TabLayout referring to this tutorial: https://guides.codepath.com/android/google-play-style-tabs-using-tablayout My xml looks like this:
progNewbie
  • 4,362
  • 9
  • 48
  • 107
0
votes
3 answers

View Pager is calling other fragments on startup and on swiping too

List of components in my app is following : TabLayout - Tab1, Tab2, Tab3. Fragments for Tabs - Tab1.xml & class, Tab2.xml & class, Tab3.xml & class. ViewPager to show Fragments on tabs. So, when app starts as i debugged the startup process, it…
1 2 3
99
100