Jeff Verkoeyen
08051b7bda
Remove all pre-iOS 12 logic.
...
PiperOrigin-RevId: 400798440
2021-10-04 13:20:55 -07:00
Wenyu Zhang
b156c37d0f
[Banner] Update the icons used in Banner examples to standardize them.
...
PiperOrigin-RevId: 389851461
2021-08-10 04:54:08 -07:00
Alyssa Weiss
7fa200758d
Delete mdc_adjustsFontForContentSizeCategory from MDCBannerView.
...
PiperOrigin-RevId: 372545111
2021-05-07 06:42:15 -07:00
Jeff Verkoeyen
1abdf16760
Optimizing imports
...
PiperOrigin-RevId: 357185990
2021-02-12 07:36:41 -08:00
Wenyu Zhang
c13125fb26
[Banner] Support two buttons on a single row style banner.
...
PiperOrigin-RevId: 316110015
2020-06-12 08:40:14 -07:00
Wenyu Zhang
f2f99a4520
[Banner] Add example snapshot tests for verifying MDCColorSchemeDefaultsMaterial201907 color scheme.
...
PiperOrigin-RevId: 314125715
2020-06-01 07:24:18 -07:00
Wenyu Zhang
be3c97421b
[Banner] Apply container theme in examples.
...
PiperOrigin-RevId: 313820573
2020-05-29 11:45:45 -07:00
Jeff Verkoeyen
a9512e0dba
[Banner] Add snapshot test hooks to the examples.
...
PiperOrigin-RevId: 308163954
2020-04-23 17:32:40 -07:00
Jeff Verkoeyen
fb7a6f4f26
[Banner] Make the primary demo presentable.
...
The primary demo was previously not presentable, meaning it was not appearing in the Banner list of examples and one of the other examples was being selected as the "primary" example. This was breaking testing automation because the expectation for each component is that it has a primary demo and that it is presentable.
PiperOrigin-RevId: 306297190
2020-04-13 13:28:59 -07:00
Robert Moore
8eb7296dab
[Catalog] Fix container scheme properties. ( #9192 )
...
Making remaining examples use protocol for container schemes to match the
project's expected convention.
Found while reviewing #9188
2019-12-09 10:48:25 -05:00
Wenyu Zhang
0fcef85a44
[Banner] Post accessibility notification when Banner shows on the screen in examples. ( #9111 )
...
closes https://github.com/material-components/material-components-ios/issues/9079 .
2019-12-05 12:00:51 -05:00
Bryan Oltman
bd0d571ae3
[Catalog] Fix Banner positioning in example for iOS 10 ( #8829 )
...
* [Catalog] Fix Banner positioning in example for iOS 10
* PR feedback
2019-11-14 17:16:04 -05:00
Wenyu Zhang
52361f8ac8
[Banner] update constraint when frame is changed. ( #8765 )
...
Because Banner needs to update constraints when there is a bound change, and when some view controller in the view hierarchy changes Banner's frame, it might forget to update constraint. Setting it in the frame setter would help making sure it is not missed.
2019-11-11 11:39:01 -05:00
Wenyu Zhang
93f9527e94
[Banner] Refactor typical example view controller. ( #8373 )
...
closes https://github.com/material-components/material-components-ios/issues/6842 .
There is a minor behavior change here that the background of content view changes from blue to grey.
2019-08-28 11:46:05 -04:00
Wenyu Zhang
8428e0690c
[Banner] Add an example to show super long text case. ( #8372 )
...
closes https://github.com/material-components/material-components-ios/issues/7017 .
|Screenshot|
|---|
||
2019-08-27 15:34:13 -04:00
Wenyu Zhang
7f98089580
[Banner] Add a missing button title in example. ( #8369 )
...
Closes https://github.com/material-components/material-components-ios/issues/8368 .
A button is missing from the example. Note: these two buttons are not aligned well. To be fixed in https://github.com/material-components/material-components-ios/pull/8319 .
| Before | After |
| --- | --- |
|  |  |
2019-08-27 10:31:49 -04:00
Wenyu Zhang
42fbedcc4a
[Banner] Apply text theme to button in the typical example. ( #8337 )
...
closes https://github.com/material-components/material-components-ios/issues/7531 .
Originally the text theme was not applied in the example. It is fixed in this PR.
2019-08-22 11:41:11 -04:00
Wenyu Zhang
e58c550a21
[Banner] use UITextView for text instead of UILabel. ( #7993 )
...
closes #7990
This API change enables more flexibility on the text configuration on banner. Minor visual difference was generated by UITextView's implementation.
2019-07-24 16:23:50 -04:00
Wenyu Zhang
112433335c
[Banner] fix dynamic type support for attributed string. ( #7820 )
...
close #7819
Previously, Banner only looks at the font on the textLabel to make dynamic type changes. After the change, an attributed string displayed on a banner is able to auto adjust its size based on content sizing category.
|Before|After|
|---|---|
|| |
2019-07-09 16:20:26 -04:00
Wenyu Zhang
7c1b055ab9
[Banner] Support Dynamic Type in Banner ( #7709 )
...
Closes https://github.com/material-components/material-components-ios/issues/7621 .
Screenshot:
|Adjusted Sizing Category 1 | Adjusted Sizing Category 2|
|---|---|
|||
2019-06-26 16:10:48 -04:00
Wenyu Zhang
e90426bb0a
[Banner] Fix horizontal constraint between text label and button. ( #7648 )
...
Fix the issue that label are not correctly laid out and shrunk because of low compression priority.
An example content view update issue is fixed to show a correct example screenshot.
Note: this issue doesn't happen on iPhone X and only happens on some OS of iPhone 7.
| Before | After |
| --- | --- |
|  |  |
| |  |
2019-06-19 14:40:08 -04:00
Wenyu Zhang
5f23995620
[Banner] Remove a redundant header file of a typical example. ( #7610 )
2019-06-17 16:49:10 -04:00
Wenyu Zhang
23497ebc80
[Banner] Rename layoutMode to layoutStyle. ( #7605 )
2019-06-14 17:06:26 -04:00
Wenyu Zhang
f717bd3b37
[Banner] set trailingButton default to hidden under SingleRow layout ( #7604 )
...
Only one button (leading button) is allowed under Single Row mode. This PR is meant for reducing configuration steps for clients.
2019-06-14 15:22:41 -04:00
Wenyu Zhang
9aa61a98a6
[Banner] Expose LayoutMode and add an automatic layout mode. ( #7572 )
...
An MDCBannerViewLayoutMode variable was used to control the automatically calculated layout style previously. Because users need to manually control the layout style in some case, a `bannerViewLayoutMode` property is exposed to enable this functionality. An `MDCBannerViewLayoutModeAutomatic` enum has been added to preserve the original automatically layout behavior.
Two examples are added in this PR to show the difference between the automatic style mode and the manual style selection.
Screenshots:
Automatic:

Manual:

2019-06-13 13:12:43 -04:00
Wenyu Zhang
2c47d9514e
[Banner] Add support for divider in MDCBannerView. ( #7567 )
...
This PR adds support for a divider showing at the bottom of a banner view. Snapshot tests will be added in a following PR.
Screenshot:

2019-06-12 14:51:06 -04:00
Wenyu Zhang
0c9e8b427d
[Banner] Elevate Banner component to Beta. ( #7065 )
...
closes https://github.com/material-components/material-components-ios/issues/5241 .
2019-04-04 16:56:43 -04:00
Wenyu Zhang
3d7ef8fb02
[Banner] Use autolayout internally for BannerView. ( #6991 )
...
Major changes for review:
- Remove `MDCBannerViewLayout` class to reduce confusion on `layout` and simplify code structure.
- Use Autolayout to layout subviews in MDCBannerView to simplify the layout calculation logic
Note:
- This class is intended to only support iOS9+ following up the design meeting, though support for iOS8 could be recovered.
- This PR is a follow-up to https://github.com/material-components/material-components-ios/pull/6963 . The API of this MDCBannerView has been reviewed. This PR serves as implementation details.
- This PR is also a follow-up PR split from https://github.com/material-components/material-components-ios/pull/6830 . The original version was approved, this is a much simpler version with less code.
Constraints Screenshot:
(1) Single Line:

(2) MultiLine Stacked Buttons

(3) MultiLine Aligned Buttons

* [Banner] Update BannerTypicalUseExample with latest API changes (#6994 )
Major changes:
- This PR updates the example for typical BannerView usage with latest BannerView API changes.
- This PR add a separate example to each of three existing examples with no icon displayed on the banner view.
- This PR updated some constants in BannerTypicalUseExample.
Screenshots Before Changes:


Screenshots After Changes:



2019-04-01 11:58:33 -04:00
Wenyu Zhang
9eba591db1
[Banner] Add an umbrella header for Banner ( #6932 )
2019-03-19 11:53:36 -04:00
Wenyu Zhang
7605e3aae2
[Banner] Fix banner revert ( #5833 )
...
* Revert "Revert "[Banner] Banner MVP (#5536 )""
This reverts commit b81ab6a9d0b2cc82594f2328aba89d0c4cd38b5d.
* fix BUILD and import
2018-11-29 10:33:45 -05:00
Yarden Eitan
b81ab6a9d0
Revert "[Banner] Banner MVP ( #5536 )"
...
This reverts commit 6d76a63ea982b930f448389de3dcab14dc55abe1.
2018-11-21 12:48:49 -05:00
Wenyu Zhang
6d76a63ea9
[Banner] Banner MVP ( #5536 )
...
* Add MDCBannerViewLayout class
* Add MDCBannerView class
* Add three examples to the Banner example
Screenshots:



2018-11-16 15:21:58 -05:00
Wenyu Zhang
190453e518
[Banners] Prepare component for prototyping ( #5252 )
...
Spec Link: https://material.io/design/components/banners.html#
2018-10-01 11:10:31 -04:00