28 Commits

Author SHA1 Message Date
Nobody
59495ab924 Add explicit imports for CoreGraphics in files which use it.
PiperOrigin-RevId: 642080231
2024-06-10 17:48:33 -07:00
David Collazo
d8c1e9ac5c Change progressTintColors array to generic <UIColor *>.
PiperOrigin-RevId: 481663653
2022-10-17 09:44:11 -07:00
Jeff Verkoeyen
a8e4831fd0 Flattening all unit tests into single directories as per convention.
PiperOrigin-RevId: 367426300
2021-04-08 07:33:29 -07:00
Alyssa Weiss
fdb53be95e Add snapshot and unit tests.
PiperOrigin-RevId: 355626654
2021-02-04 08:02:03 -08:00
Jeff Verkoeyen
fbb1f20aa2 Internal change
PiperOrigin-RevId: 332151481
2020-09-16 21:01:21 -07:00
Nobody
1a75f9dbbb Add and indeterminate state to the progress bar.
PiperOrigin-RevId: 315687797
2020-06-10 07:43:47 -07:00
Wenyu Zhang
9c480c21a4 [ProgressView] Add support for gradient progress bar.
PiperOrigin-RevId: 310977753
2020-05-12 15:11:46 -04:00
Wenyu Zhang
7ea4449645 [ProgressView] Change progressTintColor and trackTintColor to nullable.
PiperOrigin-RevId: 310612107
2020-05-08 12:59:48 -07:00
Wenyu Zhang
14bdd278b4 Update expected translated string value for Progress localization test.
PiperOrigin-RevId: 309880028
2020-05-04 21:56:28 -07:00
Nobody
e035d70f50 Project import generated by Copybara.
PiperOrigin-RevId: 309039129
2020-04-29 17:00:59 +00:00
Yarden Eitan
a8a560da42 [ProgressView] Adding default accessibility label
PiperOrigin-RevId: 302624787
2020-03-24 02:38:42 -07:00
Nobody
58a181306f [ProgressView] Adding default accessibility label
PiperOrigin-RevId: 301788026
2020-03-19 04:46:12 -07:00
Yarden Eitan
8fe34d13e0 [ProgressView] Adding default accessibility label
PiperOrigin-RevId: 301786524
2020-03-19 04:33:10 -07:00
Jeff Verkoeyen
2fb26e01b1 [ProgressView] Allow the progress view to be sized to fractional points.
This allows the progress view to more smoothly represent fractional progress and to take advantage of multi-pixel points on devices with retina displays.

PiperOrigin-RevId: 292342291
2020-01-30 07:22:12 -08:00
Bryan Oltman
a049592f23
[ProgressView] Add accessibilityLabel (#8775) 2019-11-11 15:21:22 -05:00
featherless
63bb1a8c9f
[ProgressView] Add cornerRadius API. (#7417)
This new API enables clients to customize the corner radius of the filled portion of the progress view. Clients have requested this functionality via https://github.com/material-components/material-components-ios/issues/5429.

Example usage to create a "rounded progress pill" effect:

```objc
progressView.cornerRadius = CGRectGetHeight(progressView.bounds) / 2;
```

This feature request was requested by client team in service to their brand requirements.

This PR adds an example that demonstrates the new behavior. See the associated snapshot tests for a complete suite of screenshots of the new behavior.

## Screenshots

![Simulator Screen Shot - iPhone 7 - 2019-05-20 at 09 13 17](https://user-images.githubusercontent.com/45670/58024150-89d14600-7adf-11e9-9c94-6eb023c7f48e.png)

Closes https://github.com/material-components/material-components-ios/issues/5429
2019-09-16 09:58:13 -04:00
Cody Weaver
5ebe48ba4e
[ProgressView] Add traitCollectionDidChange block (#8035)
Adds a traitCollectionDidChangeBlock to MDCProgressView, called when its trait collection changes.
2019-07-23 12:04:58 -07:00
Robert Moore
8dcf1e4a56
[*] Remove RTL snapshot method overrides. (#7996)
With #7986, most snapshot tests began overriding a method that had nearly the
same behavior.
2019-07-22 21:11:17 -07:00
Robert Moore
6f2d5eb654
[ProgressView] Provide unique names for methods. (#7824)
ProgressView, its Theming Extension, and its tests all declared the same
method. This can introduce linker or compiler problems. Unique names are
provided based on their contexts.

Follow-up to #7791
2019-07-09 09:58:07 -04:00
Andrew Overton
43920aed56
[ProgressView] Add an MDCProgressView theming extension (#7791)
This PR adds a theming extension for MDCProgressView in support of b/136013554.
2019-07-08 13:11:08 -04:00
featherless
9664fce4b3
[ProgressView] Add cornerRadius snapshot tests. (#7416)
These tests are pre-work for adding support for customizing the corner radius of the filled portion of the progress bar. As-is, these tests demonstrate that customizing the MDCProgressView layer's cornerRadius only affects the outer radius of the progress view and not the filled portion of the progress view.

Part of https://github.com/material-components/material-components-ios/issues/5429
2019-05-20 08:49:14 -04:00
Robert Moore
018e72e3cf
[ProgressView] Add basic Snapshot tests. (#6825)
Adding Snapshot tests for different progress amounts in LTR and RTL.

Closes #6808
2019-03-11 21:36:33 -04:00
Robert Moore
03f3351ad5
Global replace of single-precision floats with CGFloat casts. (#5718)
Replacing all non-integral, single-precision floating point literals with double-precision values explicitly cast to CGFloat.  For example, `0.1f` should become `(CGFloat)0.1`.

Regex used:
```
([0-9]*\.)([0-9]*?)([1-9]+)([0-9]*?)[fF]
```

PiperOrigin-RevId: 220683126
2018-11-12 10:50:01 -05:00
Robert Moore
74a27253e8
Global replace of integral single-precision literals with integer literals. (#5709)
Global replace of integral single-precision literals with integer literals.

Regular expression used:
```perl
/[^\w]([0-9]+)\.[0]*[fF]/$1/
```
2018-11-08 14:02:04 -05:00
Robert Moore
675235ed05
{Tests} Deallocate test objects at the end of tests. (#5397)
Deallocating many of the properties created for each unit test. Since all
XCTestCase instances survive until the end of the test suite, any properties
created for a test will be preserved as well. This frees up around 3.7 MB
(~6%) of memory from the entire test suite, as measured on my desktop.

|Before|After|
|----|----|
|![test-objcs-before](https://user-images.githubusercontent.com/1753199/46813473-c3b9bd00-cd44-11e8-990c-28dff4ab5ad2.png)|![test-objcs-after](https://user-images.githubusercontent.com/1753199/46813481-c7e5da80-cd44-11e8-90e4-2e6d532ebbfb.png)|

See also: https://qualitycoding.org/xctestcase-teardown/

Closes #5395
2018-10-12 08:33:58 -04:00
featherless
2181084272
[automated] Standardize our open source license stanza to what Xcode generates. (#4985)
Removes the need to copy-paste stanzas from other files anymore as we'll rely on #4478 to generate the correct stanza for us instead.

This was an automated change generated by running a find-and-replace regular expression:

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at

 http://www\.apache\.org/licenses/LICENSE-2\.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
/\*
Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

Licensed under the Apache License, Version 2\.0 \(the "License"\);
you may not use this file except in compliance with the License\.
You may obtain a copy of the License at

http://www\.apache\.org/licenses/LICENSE-2\.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
See the License for the specific language governing permissions and
limitations under the License\.
\*/
```

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at
 http://www\.apache\.org/licenses/LICENSE-2\.0
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
// Copyright $1-present the Material Components for iOS authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
```
2018-08-31 12:13:07 -04:00
Adrian Secord
8c3af252be Adding AUTHORS and removing CONTRIBUTORS.txt.
We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has...

Summary:

We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has no legal change, since the contributors always retained their copyright despite the copyright notice, but it's a nice acknowledgement.

Changed copyright statement to include non-Google authors.

Command run:

find * \( -name '*\.m' -or -name '*\.h' -or -name '*\.swift' \) -and -not \( -path 'scripts/external*' -name Pods  \) -print0 | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'

Added non-source files.

Command run:

grep -Rl 'Copyright .* Google Inc' * --exclude-dir scripts/external --null | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'

Reviewers: featherless, O1 Material components iOS, randallli

Reviewed By: O1 Material components iOS, randallli

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1415
2016-08-08 08:16:37 -07:00
Louis Romero
a806413bd6 [ProgressView] Add the ProgressView component.
Summary:
Adds a ProgressView component. It displays determinate progress linearly.

Note: the README.md and API has previously been reviewed. Feel free to leave comments, but you can also skip for this review and focus on the implementation.

Test Plan: - Open Catalog > Progress View and verify looks.

Reviewers: randallli, junius, iangordon, O1 Material components iOS, ajsecord

Reviewed By: O1 Material components iOS, ajsecord

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1103
2016-07-09 00:28:19 +02:00