18 Commits

Author SHA1 Message Date
gauthams
add453fe8f Fix link to deprecated API in TabLayout documentation
PiperOrigin-RevId: 242672044
2019-04-19 13:16:55 -04:00
cketcham
0ce688ddf2 Automated g4 rollback of changelist 239207045
PiperOrigin-RevId: 239229246
2019-03-22 16:55:47 -04:00
Material Design Team
af15a5f943 Adding TabLayoutMediator to MDC tabs library
The TabLayoutMediator makes it possible for a ViewPager2 to be linked to
a TabLayout similarly to how a ViewPager was linked to TabLayout.

PiperOrigin-RevId: 239207045
2019-03-22 16:51:43 -04:00
gauthams
1db449c897 Refactor dpToPx method into ViewUtils
PiperOrigin-RevId: 235243747
2019-02-24 14:38:37 -05:00
Material Design Team
9dab50e145 Expose methods for fine grained control of TabLayout animation
Makes the following methods public:
- setScrollPosition(int, float, boolean, boolean)
- selectTab(Tab)
- selectTab(Tab, boolean)

This makes it possible to separate the link between a TabLayout and a ViewPager to another class.

PiperOrigin-RevId: 228887919
2019-01-18 14:01:38 -05:00
cketcham
dc72aaeed4 Migrate Gradle build and sources to androidx
PiperOrigin-RevId: 225551505
2018-12-21 11:07:45 -05:00
cketcham
cce3b93a9d Remove binary incompatibility between 27.1.1 and 28.0.0 for TabLayout
PiperOrigin-RevId: 223444074
2018-12-06 11:39:28 -05:00
melaniegoetz
bd2a4484c3 Update tablayout javadocs to refer to the method correctly
PiperOrigin-RevId: 222443665
2018-12-06 11:20:25 -05:00
melaniegoetz
f94800f7b0 Add TabLayout labelVisibility getter method
PiperOrigin-RevId: 222301891
2018-12-06 11:17:22 -05:00
afohrman
7656db9b1e Update TabLayout and MaterialButtonHelper documentation for LayerDrawable workaround.
PiperOrigin-RevId: 219127481
2018-11-01 16:03:25 -07:00
marianomartin
9e36c150c0 Fix most javadocs errors
PiperOrigin-RevId: 216697274
2018-10-11 18:24:53 -04:00
melaniegoetz
69eebe785f TabLayout functionality to set label visibility
PiperOrigin-RevId: 213554775
2018-09-28 14:54:44 -04:00
gauthams
460c226fdf Fix bug in TabLayout where TabViews initialized to unselected would not have unselected state.
Essentially, the issue is that when "selected" tabs were added to a TabLayout, we were calling tab.select() which updated the state of the selected tab to selected, and sets all other tabs to unselected. HOWEVER, when an "unselected" tab is added, we never call tab.select(), so the unselected tab's state never gets updated until a tab is clicked manually. The default state of tabs is "selected", so unselected tabs appeared selected.

PiperOrigin-RevId: 209622793
2018-08-28 16:32:34 -04:00
gauthams
65e33f20af Clarify documentation for TabLayout's GRAVITY_FILL behavior to specify that it does not take effect on screens wider than 600dp.
PiperOrigin-RevId: 209524721
2018-08-28 16:30:27 -04:00
gauthams
8cbde4c219 Update tabs to use type scale attributes, and enforce textAppearance check
PiperOrigin-RevId: 202501993
2018-07-02 09:46:58 -04:00
gauthams
cfe88cad74 Fix a long-standing selection bug in TabLayout, where an OnTabSelectedListener onTabUnselected() method would interpret the now-unselected tab as still being selected, resulting in broken behavior where an unselected tab was still being displayed as selected.
PiperOrigin-RevId: 197806355
2018-05-30 17:30:18 -04:00
Material Design Team
b07bcdeefd [a11y] Set the content description of the entire TabView, rather than just on the icon or the TextView. Use the text as the content description if the content description property hasn't been set.
PiperOrigin-RevId: 193727801
2018-04-30 11:37:02 -04:00
dniz
9ca33544ac Update package name to com.google.android.material
PiperOrigin-RevId: 193236235
2018-04-30 11:24:23 -04:00