Material Design Team
8624748ed8
Use getText() in ChipTouchHelper for consistency
...
PiperOrigin-RevId: 204138629
2018-07-11 15:21:45 -04:00
connieshi
602a9b63a4
Switch ChipGroup to inherit from FlowLayout.
...
PiperOrigin-RevId: 204005581
2018-07-11 15:17:56 -04:00
cketcham
2cb77c9331
Update Snackbar documentation to include LENGTH_INDEFINITE
...
PiperOrigin-RevId: 203952007
2018-07-11 15:17:32 -04:00
connieshi
662aa06b77
Add null check before access attribute set.
...
PiperOrigin-RevId: 203830200
2018-07-11 15:17:15 -04:00
cketcham
ad1d5f2614
Use ViewCompat.getPaddingEnd() instead of getPaddingEnd for backwards compatibility in Chip
...
PiperOrigin-RevId: 203812719
2018-07-09 17:27:17 -04:00
connieshi
84c6020605
Check if a user explicitly set any of the deprecated xml attributes but not the updated counterparts:
...
chipIconEnabled vs. chipIconVisible
closeIconEnabled vs. closeIconVisible
checkedIconEnabled vs. checkedIconVisible
PiperOrigin-RevId: 203804667
2018-07-09 15:01:40 -04:00
afohrman
631301e4b1
Update outline box to take on the counter overflow color when overflowed.
...
PiperOrigin-RevId: 203775391
2018-07-09 15:01:23 -04:00
connieshi
aedfc1cf7c
Prevent users from setting the gravity on chips, chip text must be vertically center and start aligned.
...
PiperOrigin-RevId: 203767756
2018-07-09 15:00:54 -04:00
afohrman
61672b79a4
Remove prefixes from variables in TextInputLayout.
...
mHelperTextAppearance and mErrorTextAppearance slipped by when the fields were changed.
PiperOrigin-RevId: 203173302
2018-07-09 15:00:21 -04:00
gauthams
fb148f47a4
Use onDraw() instead of draw() in MaterialButton
...
PiperOrigin-RevId: 203012234
2018-07-09 14:59:09 -04:00
marianomartin
8aa6261493
Icon only buttons
...
PiperOrigin-RevId: 202660201
2018-07-02 09:51:34 -04:00
connieshi
6020fcdbf1
Fix API issue with icon visibility.
...
Deprecate *iconEnabled methods to is*iconVisible and setIs*iconVisible methods.
PiperOrigin-RevId: 202658616
2018-07-02 09:50:53 -04:00
dniz
7cd55d872b
Add Toolbar styles that use themed text appearances based on type scale
...
PiperOrigin-RevId: 202636817
2018-07-02 09:50:23 -04:00
gauthams
58df7b8baa
Fixing MaterialButton padding API surface
...
PiperOrigin-RevId: 202584064
2018-07-02 09:49:33 -04:00
dniz
21dff0f641
Update MaterialComponents Snackbar to use themed text appearance
...
PiperOrigin-RevId: 202532773
2018-07-02 09:47:41 -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
dniz
24867f367c
Fix error in Gradle build due to TextAppearance variable scope
...
PiperOrigin-RevId: 202488746
2018-07-02 09:46:29 -04:00
gauthams
98350d8bdf
Update TextAppearance enforcement error to be more clear.
...
PiperOrigin-RevId: 202189106
2018-07-02 09:43:00 -04:00
dniz
b30c567719
AppBarLayout expose setLiftable() and setLifted() as a workaround for ListView lift on scroll
...
Example of workaround:
appBarLayout.setLiftable(true);
listView.setOnScrollListener(
new OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
boolean isAtTop = firstVisibleItem == 0 && (view.getChildCount() == 0 || view.getChildAt(0).getTop() == 0);
appBarLayout.setLifted(!isAtTop);
}
});
PiperOrigin-RevId: 202187470
2018-07-02 09:42:27 -04:00
dniz
b1a784ce75
Implement new Material Snackbar according to spec
...
This commit updates MaterialComponents Snackbars to have margins and rounded corners, as well as makes Snackbars styleable at the app theme level via a snackbarStyle attribute.
PiperOrigin-RevId: 202141103
2018-07-02 09:41:41 -04:00
connieshi
608d2b2fd7
Add support for android:maxWidth to ChipDrawable. Restrict the intrinsic width of the ChipDrawable by the max width. Fixes bug that ignored maxWidth set in Chip.
...
PiperOrigin-RevId: 202048514
2018-07-02 09:40:13 -04:00
gauthams
c852e7f0cf
Make ThemeEnforcement TextAppearance check more robust
...
PiperOrigin-RevId: 202039029
2018-07-02 09:39:28 -04:00
connieshi
d584f91ccc
Resolve fonts asynchronously to avoid ANR.
...
Added flag to specify that fonts should be resolved synchronously for instrumentation tests.
PiperOrigin-RevId: 202033678
2018-07-02 09:37:14 -04:00
cketcham
8f7dc21a27
Add android:fontFamily to all text styles
...
This lets us support clients who can't or don't need to use AppCompatTextView. Using `android:fontFamily` will work for clients with min sdk >= 16.
PiperOrigin-RevId: 202032242
2018-07-02 09:26:47 -04:00
Andhie Wong
e1c8886c6c
[AppBar] appbar_scrolling_view_behavior as public res
...
PiperOrigin-RevId: 201416419
2018-06-20 17:30:59 -04:00
connieshi
24bd4a9531
Remove Chip method.
...
PiperOrigin-RevId: 201199382
2018-06-20 17:30:21 -04:00
cketcham
841ba156fc
Automated g4 rollback of changelist 199530791
...
PiperOrigin-RevId: 201188669
2018-06-20 17:29:57 -04:00
gauthams
580f63bd4d
Remove unused ThemeEnforcement method
...
PiperOrigin-RevId: 201101785
2018-06-20 17:29:16 -04:00
afohrman
6d28b64043
Update documentation to discourage setting the hint on TextInputEditText.
...
Remove ambiguity about where to set the hint by strongly recommending that it be set on the TextInputLayout.
This commit also updates the documentation to more strongly encourage the use of TextInputEditText over an EditText.
PiperOrigin-RevId: 201037651
2018-06-20 17:28:41 -04:00
dniz
005a0044c3
Update AppBarLayout liftOnScroll start scroll check to not depend on scrolling
...
view size
This fixes an issue where the app bar would not lift if a bottom margin is
applied to the scrolling view
PiperOrigin-RevId: 201008179
2018-06-20 17:28:13 -04:00
Material Design Team
79d3c53632
Automated g4 rollback of changelist 199854529
...
PiperOrigin-RevId: 200785748
2018-06-20 17:27:56 -04:00
connieshi
00a132b6a0
Remove Chip method.
...
PiperOrigin-RevId: 200735866
2018-06-20 17:27:41 -04:00
connieshi
3f00c13ebe
Fix api issues, defer to TextView to render the chip text and ChipDrawable to render everything else.
...
List of text related attributes/methods supported with this approach:
android:autoLink
android:hint
android:text
android:textAllCaps
android:textAppearance
android:textColor
android:textColorHint
android:textColorLink
android:textIsSelectable
android:textScaleX
android:textSize
android:textStyle
android:typeface
android:fontFamily
Not supported:
android:textColorHighlight
android:textColorLink
PiperOrigin-RevId: 200578044
2018-06-20 17:27:20 -04:00
Material Design Team
63f5c53c7e
Repair bottomsheetbehavior on swipe
...
PiperOrigin-RevId: 199854529
2018-06-20 17:27:00 -04:00
connieshi
649a13fa2e
Replace calls to deprecated method Chip#getChipText() with its replacement Chip#getText().
...
Replace calls to deprecated Chip#setChipText(...) methods with their replacement Chip#setText...).
PiperOrigin-RevId: 199663849
2018-06-20 17:26:38 -04:00
cketcham
8e3cbc3463
Fix BottomAppBar background when no Fab is anchored
...
PiperOrigin-RevId: 199656555
2018-06-20 17:25:55 -04:00
connieshi
860b04767b
Unwrap mutated drawable (chipIcon and closeIcon) before returning it in the getter.
...
PiperOrigin-RevId: 199636765
2018-06-20 17:25:37 -04:00
afohrman
b087cbad7a
Roll back deletion of FAB attachment functionality.
...
PiperOrigin-RevId: 199530791
2018-06-20 17:24:55 -04:00
connieshi
412ee4c1f1
Add support for tinting the chip icon.
...
PiperOrigin-RevId: 199526967
2018-06-20 17:24:18 -04:00
cketcham
cdb99838c6
Don't allow the fab to be detached from the BottomAppBar unless the fab isn't visible, or the BottomAppBar is scrolled off the screen
...
PiperOrigin-RevId: 199511216
2018-06-20 17:24:01 -04:00
connieshi
434be9ff15
Restores chip text after it's being cleared by TextView's onRestoreInstanceState, this was causing an clearing the chip text on config change for pre-L devices.
...
PiperOrigin-RevId: 199482051
2018-06-20 17:23:38 -04:00
dniz
11d5335ea9
Remove 1 pixel hairline from BottomAppBar
...
PiperOrigin-RevId: 199356320
2018-06-20 17:23:17 -04:00
dniz
a0457bce83
Restrict AnimatorSetCompat to library usage
...
PiperOrigin-RevId: 199231917
2018-06-20 17:22:57 -04:00
marianomartin
dc36a0999c
Allow icon to be centered with text in MaterialButton
...
PiperOrigin-RevId: 199138977
2018-06-20 17:22:24 -04:00
dniz
ad573c764b
Clarify sizing for FloatingActionButton
...
PiperOrigin-RevId: 198914008
2018-06-04 10:51:12 -04:00
dniz
91196d1163
Add get/setItemBackground() Drawable methods to BottomNavigationView
...
PiperOrigin-RevId: 198911383
2018-06-04 10:50:40 -04:00
connieshi
57aeb2b7f8
Android Studio is looking for a "Chip" declare-stylable when trying to determine what attributes are applicable for the "Chip" component. Android Studio doesn't know that "ChipDrawable" is used internally and all attributes to "ChipDrawable" applies.
...
This is preventing completions of attribute names for Chip and the attribute panels shows up empty for Chip.
Rename R.styleable.ChipDrawable to R.styleable.Chip and update ChipDrawable to use it.
AS 3.2 canary > 14 (currently 16) is required to see the attributes in the attribute panel.
PiperOrigin-RevId: 198909123
2018-06-04 10:49:01 -04:00
connieshi
4a7bd84360
Add null check to Chip#setText and ChipDrawable#setText. Set null text to empty string, this is done internally by TextView.
...
Changed Chip#getText and ChipDrawable#getText to be @NotNull
PiperOrigin-RevId: 198868472
2018-06-04 10:48:35 -04:00
cketcham
cf65d74636
Fix BottomSheetBehavior bug for horizontal swipes.
...
This fixes a jumpy behavior caused by swiping quickly horizontally on a bottom sheet.
PiperOrigin-RevId: 198868074
2018-06-04 10:48:01 -04:00
dniz
c9fbe7fed6
Annotate MaterialButton color and dimension methods
...
PiperOrigin-RevId: 198770878
2018-05-31 17:04:32 -04:00