13 Commits

Author SHA1 Message Date
Galia Kaufman
9d9bd93847 [Dialogs] Adding accessoryViewHorizontalInset API
The API allows setting horizontal insets for the accessory view that are different from the message. This is most often used for dialogs that have both a message and an accessory view, as demonstrated in the attached example.

Additionally, this example demonstrates how to add an horizontal hairline as shown on the material.io spec for Confirmation Dialogs.

Note:
This new API is needed because clients do not always have control over the view that is being used as an accessory view, or that the view is used in multiple areas in the app, and cannot be customized.
Additionally, there's no way currently to set 0 insets for the accessory view, while still keeping the 24 value insets for the message, which is a relatively common scenario.
PiperOrigin-RevId: 334142026
2020-09-28 06:12:48 -07:00
Galia Kaufman
e9b0eee25d [Dialogs] Add an accessoryView with a collection example
This example demonstrates adding a collection view as an accessory view of a Material alert.  It also demonstrates adding a horizontal line above the actions, as shown on material.io's spec for Confirmation Dialogs. The line will be fixed to reach the edges of the dialogs in a followup PR (cl/331128888).

PiperOrigin-RevId: 333376220
2020-09-23 14:43:24 -07:00
Alyssa Weiss
d40c6d8608 Remove iOS 10+ checks now that the minimum support contract is iOS 10.
PiperOrigin-RevId: 332836975
2020-09-21 06:28:30 -07:00
Galia Kaufman
6f1b595d0d [Dialogs] Adding dynamic type to accessory view examples
PiperOrigin-RevId: 319075226
2020-06-30 12:31:18 -07:00
Galia Kaufman
97b1a1f6ce [Dialogs] Moving attributed message example out from accessory view examples
* Moving attributed message example out from accessory view
  examples into its own examples file.
* Fixing examples:
   1. Using latest theming versions in examples.
   2. Enabling dynamic type.
   3. Renaming examples.

PiperOrigin-RevId: 319013022
2020-06-30 06:57:49 -07:00
Andrew Overton
aa95547953 [TextControls] Annotate API using UITextItemInteraction to be iOS 10 only
Develop currently doesn't build in Xcode. One of the errors pertains to the use of UITextItemInteraction without availability checks.

PiperOrigin-RevId: 315491912
2020-06-09 08:53:28 -07:00
Galia Kaufman
ea8887e284 [Dialogs] Adding attributed link color API and updating theming extension
PiperOrigin-RevId: 314453930
2020-06-02 20:00:28 -07:00
Galia Kaufman
6bb3ece393 [Dialogs] Adding tappable link support to the alert message
Adding an action API for notifying caller when a message link is tapped.

PiperOrigin-RevId: 314135831
2020-06-01 08:45:13 -07:00
Galia Kaufman
e9802b3e14 [Dialogs] Fix UITextView accessory view example
Fixing incorrect sizing of accessoryView after returning from 3D Touch
Subclassing UITextView and implementing `systemLayoutSizeFittingSize:` so the alert's accessory view will be sized correctly during layout.

PiperOrigin-RevId: 310577286
2020-05-08 10:06:42 -07:00
Jeff Verkoeyen
1920b96b2a [Dialogs] Add example snapshot tests.
PiperOrigin-RevId: 309275412
2020-04-30 12:22:43 -07:00
Galia Kaufman
78f2369dfb [Dialogs] Add accessory view examples
Adding examples for accessory view, including:
* A textfield accessory view. This example uses an accessory view with auto-layout.
* A default label with a button as an accessory view
* An accessory view with a label and a button subclasses. Using auto-layout.

PiperOrigin-RevId: 307889891
2020-04-22 13:55:47 -07:00
featherless
88d3bed28a
[Dialogs] Make the "Dialogs with accessory view" example's cells accessibility buttons. (#8939)
Fixes https://github.com/material-components/material-components-ios/issues/8880
2019-11-15 13:10:48 -05:00
featherless
b0966cca86
[Dialogs] Add accessoryView to MDCAlertController (#8538)
[Dialogs] Add accessoryView to MDCAlertController
2019-10-01 10:21:06 -04:00