Граф коммитов

105 Коммитов

Автор SHA1 Сообщение Дата
Emily Lynam d3f2d0ed87 Merged PR 239416: PeoplePicker: Center count span + bug fixes
This PR introduces a new `CenterVerticalSpan` class to handle centering the `CountSpan`.  It's inspired by Android's `SuperscriptSpan`.

### Bug fixes:
1. In the process of testing this change across devices, I discovered a bug in my Nexus 4, api 19 emulator, where we crash and get an `IllegalAccessError` due to generic type issues when retrieving persona spans. I put in a fix for that using a [reified type](https://kotlinlang.org/docs/reference/inline-functions.html#reified-type-parameters).
2. The count span string was not updating correctly on rotation. I reverted the change that caused this and added back a todo to revisit the original bug.

### Before (CountSpan is too low):
![original.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/239416/attachments/original.png)
### After (CountSpan is centered):
![count_span_centered_new.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/239416/attachments/count_span_centered_new.png)

Related work items: #693617
2019-03-12 17:19:06 +00:00
William Do 63d37158db Merged PR 240832: Made Tooltip More Accessible
In Talkback the Tooltip would only get focus once the main view had been tabbed through.

In this PR:
- Focus is set immediately on the Tooltip once it is created in when a device is in Talkback
- Tooltip's in ANYWHERE mode are dismissed on double tap as in INSIDE mode when Talkback is turned on
- AccessibilityUtils was refactored to use extensions.

Related work items: #696071
2019-03-11 18:37:50 +00:00
William Do d69482624e Merged PR 240479: Tooltip Background Color Fixes
- Replaced \#212121 with uifabric black for the Tooltip background
- Refactored Tooltip layout to use alpha transparency for the background as opposed to ARGB
- Prepended integer resources with uifabric.
2019-03-07 02:07:21 +00:00
William Do 5728f7cecd Merged PR 240412: Border gray and border light gray swap
This fixes a bug in the naming of the border grays. The border lighter gray was darker than border gray.

These names are swapped to fix this bug.

Related work items: #695950
2019-03-07 01:10:27 +00:00
William Do fb80b59a86 Merged PR 235061: Tooltip
This adds a Tooltip control to Fabric Android as well as demo to the Demo App.

The Tooltip includes:
- Support for RTL
- Multiline text
- Dynamic positioning depending on screen position of anchor view
- X and Y Offsets
- Dismiss listener

![Screenshot_1550878714.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/235061/attachments/Screenshot_1550878714.png =400x)

Related work items: #679244, #679761
2019-03-06 23:22:32 +00:00
Emily Lynam a7a43ae523 Merged PR 240335: Remove unused strings
Some strings came over from Outlook but ended up not being used in our code. Removing them to help out with localization.

Related work items: #695908
2019-03-06 22:40:59 +00:00
Emily Lynam c89b8da75f Merged PR 236550: PeoplePicker polish
- **Dropdown:** Moved `getMaxAvailableHeight` closer to the source so that it is called every time a dropdown is shown. This fixes a bug where dropdown was not resizing on scroll, which was particularly noticeable when the field had many tokens.
- **Text alignment:** The goal is now to have the label, `PersonaChipView` text, and `CountSpan` text aligned center instead of baseline. This PR accounts for `PersonaChipView` text, but center aligning `CountSpan` will be more involved.
- Added **vertical spacing for chips**
- **Drag and drop:** This functionality is now activated with a long press. This requires the use of a `GestureDetector`, which resulted in some big refactoring in how touch is handled.

Related work items: #691654
2019-03-01 22:32:14 +00:00
Emily Lynam 0647f90aa6 Merged PR 233445: PeoplePicker: click api + accessibility for selection and click style
### Click api
- New `PersonaChipClickListener` that allows users to assign an onClick() event to persona chips / tokens.
- We implemented a click listener similar to this for `PersonaChipView`, but this does not work in the PeoplePicker due to the complex touch interface.
- Outlook has this click functionality implemented. For them, the token click opens the live persona card.
- Only works with `SelectDeselect` click styles because the other click styles have a deeper meaning. This is the click style Outlook uses. Our demo for `SelectDeselect` has a listener for this.
- TalkBack announces when a persona chip / token has been clicked with customizable text.
### Accessibility for selection
- When a chip is accessibility focused, Talkback reads which action is available for that chip based on it's click style and whether or not it's selected. It used to just say "Double-tap to Select" regardless of click style.
- Selected chips have new custom text read that describes the secondary action that happens on the next click, depending on click style. Secondary action could be click, deselect, or delete. Since we can't add a real secondary action, we have to describe one best we can.

Related work items: #686969
2019-02-21 23:26:10 +00:00
William Do 818b26835f Merged PR 226553: App Theme Primary Color
This PR removes direct references to the color `uifabric_primary` and substitutes it with the app theme color `colorPrimary` for selected states and accent colors so applications consuming Fabric Android will have those states and colors customized by their application theme.
- Updated colors to reference colorPrimary
- Removed redundant and unnecessary code
- Removed initialization of threeten library in CalendarView
- Updated month overlay text color to match Outlook's, removing the primary color and replacing it with Fabric black

Related work items: #668154
2019-02-19 22:44:50 +00:00
Emily Lynam 550811f775 Merged PR 232115: PersonaView: convert base class to TemplateView
The title says it all. Should work just like before. I clean up a little code while I was in the files so that they align with other patterns we've established.

Related work items: #631352
2019-02-14 22:46:22 +00:00
Emily Lynam b82a22458d Merged PR 231663: PeoplePicker: enhancements and bug fixes
- Added `personaChipLimit` back into the api. `TokenCompleteTextView` was missing a check to make `setTokenLimit()` work correctly, which I added in.
- Truncated persona chips will no longer disappear and be added to the `CountSpan` when they are the first persona span. To fix this, I shortened the max width for the persona span.
- Since the latest accessibility PR, it's no longer possible to cut spans via the clipboard, so that break is gone. If we some day want to add the cut feature in, it is possible, but it's big feature. Devs can limit what appears in the context menu from their app.
- Improves chip layout on orientation change.

Related work items: #686978
2019-02-14 19:44:27 +00:00
Emily Lynam 97c1ae2ea0 Merged PR 232044: Snackbar: fix animation
Checked in with design about the animation, and they wanted a smoother animation. Matching android's animation did the trick, ported it over from SnackbarContentLayout. The example I originally pulled them from was off.

Related work items: #687335
2019-02-14 19:15:17 +00:00
Emily Lynam 7adf1ee8ce Merged PR 228363: Snackbar
- New Snackbar component
- Outlook's Snackbar was Google's built-in Snackbar, but they overrode the library's background drawable in the file system and used a styling utility to customize. Instead, I'm using a class so devs can use our Snackbar like a regular Snackbar. Thus the api is designed similarly. This website helped guide me: https://materialdoc.com/components/snackbars-and-toasts/
- This implementation includes all variants currently listed in the toolkit
![Screenshot_1549307432.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/228363/attachments/Screenshot_1549307432.png)

Related work items: #683492
2019-02-13 01:18:34 +00:00
Emily Lynam 4b7130f879 Merged PR 223933: PeoplePicker: Accessibility / Explore By Touch
This introduces a new accessibility helper class for `ExploreByTouch`. This class allows us to create nodes and virtual views for the spans inside of `PeoplePickerTextView` so that they are discoverable in `ExploreByTouch` mode and `TalkBack`.

I added one api entry point to customize the accessibility text to keep it simple - this is now in a separate file.

Also fixed a drag and drop bug - it was too sensitive to touch.

**Future improvements / fixes:**
1. ~~Fix bugs for dropdown list virtual views - these were existing before this PR - and even before I started messing with dropdown height / layout when I added the "Search Directory" button~~
2. ~~Instead of ignoring the text view label (currently we mark it as `android:importantForAccessibility="no"`, it should be hover-able, and tapping to select should focus the edit box. This is what Gmail does - Outlook ignores the label. I think this feature will make the fields easier to navigate and to select - sometimes it's hard to select the field when it's full of persona spans.~~
3. I need to do some more investigation on how to handle "deselection", but I have the feeling it might tie into future work that exposes click events for `PersonaChip`

Related work items: #678124
2019-02-12 01:10:03 +00:00
Vlad Filyakov 92c4b14e20 Merged PR 230212: New launch icons for demo 2019-02-09 01:38:53 +00:00
William Do 3544a052c5 Merged PR 225125: Duration bug fix and updates from last date picker PR
Kotlin conversion of NumberPicker's `quicklyAnimateValueTo` method created incorrect values causing a bug after assigning certain end times.
- Refactored `quicklyAnimateValueTo` method to correct the bug
- Refactored `ZonedDateTime. getNumberOfDaysFrom` to calculate days from start date time
- Removed unneeded code

Related work items: #678694
2019-01-25 01:32:30 +00:00
William Do a9db2bdc1c Merged PR 221145: Date Time Range
This PR adds selection of date and time ranges.
- Demo updated with a button that allows the selection of a date time range as well as text views reflecting start and end date times
- Added 1200 months before and 1200 months after current date to the DateTimePicker to align with the DatePicker as well as Outlook
- Alpha ordered constants and variables
- Added TIME DisplayMode constant for scenarios where start and end dates fall on different dates aligning with Outlook

Related work items: #672218
2019-01-23 20:08:12 +00:00
Emily Lynam ea43301431 Merged PR 218498: PeoplePicker: Add support for Drag and Drop
- New flag for enabling drag and drop for `PeoplePickerTextView`s
- Drag events should maintain all relevant data for the `Persona` object so that the token can be recreated on drop. In cases where it's not clear we have a `Persona` object, I kept Outlook's `getObjectForClipDataOnDrop` method that recreates such an object if possible. You can test how this fallback works by commenting this out in `swallowPersonaChipDrop`:
```
if (localState != null && localState is IPersona)
    persona = localState
```
- Fixed a bug where `avatarImageBitmap` and `avatarImageUri` were not loading for the `PersonaChipView`s
- Added emails to the example to better track data moving during drag and drop
- I left out the `View.OnDragListener` for now because it didn't seem essential - we are using `onDragEvent` instead. However, we could open this api up (can read about it [here](https://developer.android.com/guide/topics/ui/drag-drop)). If we did expose that api, I think we'd need a way to enforce that it returns false to maintain drag and drop functionality. Outlook uses the listener tell their cc and bcc fields to expand when a drag from the to field starts.
- To test Outlook's drag and drop, comment out the check for `Feature.COMPOSE_CONTACTS_DRAG_AND_DROP` on line 1507 in `ComposeActivity`.

Related work items: #671303
2019-01-10 23:13:38 +00:00
William Do 37fb4f5950 Merged PR 218600: Date Picker Duration
This PR adds duration to the DateTimePickerDialog
- Since in this scenario we are only picking dates, the start date of a range is set to midnight so 24 hour periods are selected.
- The demo is expanded to show Date Range
- The demo is refactored to iterate through enums to create date pickers
- Some DatePickerExtra constants have been removed that aren't being used
- Date range was expanded to 100 years back and 100 years forward to match Outlook's DatePicker

**Demo**|**Date Range**
-|-
![Screenshot_1546903330.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/218600/attachments/Screenshot_1546903330%20(2).png) |![Screenshot_1546903343.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/218600/attachments/Screenshot_1546903343%20(3).png)

Related work items: #669253
2019-01-09 21:27:58 +00:00
Emily Lynam 53c02187dc Merged PR 218379: PeoplePicker - Fix click listener 2019-01-07 17:46:41 +00:00
Emily Lynam 0d7d98a319 Merged PR 217257: PeoplePicker: Search directory button
- Added optional `SearchDirectory` button that goes at the end of the PeoplePicker's persona list to create secondary search capability. In Outlook's case, they use this button to return a new batch of search results from their "Global Address List".
- Discovered that some colors and dimens are now shared amongst multiple components so I adjusted the naming and organization accordingly

![Screenshot_1546534440.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/217257/attachments/Screenshot_1546534440.png)

Related work items: #670911
2019-01-05 00:14:34 +00:00
Emily Lynam 80dd8257b3 Merged PR 216546: PeoplePicker: Dropdown polish
- Using Outlook's adjustDropDownPositionAndSize and getMaxAvailableHeight methods in ContactPickerView to resize the drop down to the available space in the view. This makes the list less jumpy, which is most noticeable when it appears above the anchor.
- Switching between portrait and landscape mode no longer dismisses the dropdown nor removes the constraint text. The dropdown also resizes smoothly to adapt. Going from landscape to portrait, the dropdown takes up the full screen, but it does this in Outlook, also.
- Removed the default drop shadow for the dropdown and replaced it with a layer-list drawable that gives it a border along the anchor.
- Refactored some dimens / color naming

Related work items: #670910
2019-01-02 22:53:22 +00:00
Vlad Filyakov 9e9db96d81 Merged PR 216102: - Marked internal things internal
- Marked internal things `internal`
- Moved callback for item clicked event from `PersonaListAdapter` to `PersonaListView` and renamed it to `OnItemClickedListener` (also updated property names that use this callback as type)
2018-12-28 18:50:12 +00:00
Vlad Filyakov 425d996906 Merged PR 214768: Demo: Switched from using DemoActivity + DemoFragments to have an activity per demo
- `DemoActivity` is now abstract and got new `contentId` and `contentNeedsScrollableContainer` properties. Sets its own title and loads its content from demo layout file.
- Demo requires `DemoActivity` as a demo class
- Converted demo fragments to demo activities (subclassing from `DemoActivity`)
- Renamed demo files: *Fragment.kt to *Activity.kt
- Renamed demo files: fragment_*.xml to activity_*.xml
- Some clean up and refactoring

Related work items: #659039
2018-12-21 23:16:56 +00:00
William Do d7a30b7acd Merged PR 211388: DateTimePicker
This PR adds time picking as well as another method for date picking within the same view and combines it with the DateTimePickerDialog, giving options for date only, time only, as well as date and time
- NumberPicker widget is minimally refactored for Kotlin as this class is Android's modified NumberPicker class and is 2600+ lines long
- Scroller class is minimally refactored for Kotlin as this class is Android Modified Scroller class
- Listeners are added for TimeSlot change and pick
- DateTimePickerDialog Demo has three additional buttons for the various options the DateTimePickerDialog can be shown
- DateTimePicker is added to ViewPager within DateTimePickerDialog allowing users to switch between two picking modes

**Date Time Picker Only**|**Date Time Picker with Calendar**
-|-
![Screenshot_1544497603.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/211388/attachments/Screenshot_1544497603.png) | ![Screenshot_1544497609.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/211388/attachments/Screenshot_1544497609.png)

Related work items: #666637
2018-12-20 03:12:53 +00:00
Vlad Filyakov a64a9de77e Merged PR 213584: Removed Button demo
Removed Button demo
2018-12-17 23:44:59 +00:00
Emily Lynam 621d9d178f Merged PR 206822: PeoplePicker
- Extends open source [TokenCompleteTextView](https://github.com/splitwise/TokenAutoComplete) (TCTV)
- Extending this class has some limitations, the important ones are listed at the top of `PeoplePickerTextView`
- Because many of Outlook's code was embedded in TCTV, a lot of it either no longer made sense or was incompatible. I've beed doing a lot of functionality testing and comparison to Outlook's ComposeActivity to make sure the behavior feels the same.
- I maintained much of the customization that the TCTV offers through the PeoplePicker api. Some aspects I locked down for consistency.
- If you start typing, a `DropDownListView` (an android component) appears showing suggestions. Choosing a suggesting will add a token to the view. You can also add a token by typing in a correctly formatted email and hitting enter.
- The demo shows the four different token / chip selection options
  - Select = you can select AND delete it
  - SelectDeselect = you can only select/deselect. no delete action.
  - None = no selection available
  - Delete = instantly delete on click, skips selection

![Screenshot_1543359007.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/206822/attachments/Screenshot_1543359007.png)

Related work items: #643287
2018-12-12 21:40:35 +00:00
William Do c1e9d98549 Merged PR 206365: Refactored style naming and created UIFabric theme
##Style Naming
The naming standard for styles in Android is Pascal case with dot notation. Dot notation works when inheriting from another style so parent styles have been added. Where an exact one to one match exists between UIFabric styles and Android styles the style is not adjusted. Inheriting styles has the advantage of leveraging font weight, size and text colors of parent styles.

Additionally "TextAppearance" is appended to text styles as is the standard implemented in Outlook and by other Android developers.

##Theme.UIFabric
`Theme.UIFabric` has been added to declare `textColorPrimary` as well as `colorPrimary` and `colorPrimaryDark` which are used in the ToolBar and Statusbar colors, now using Fabric colors.

`textColorPrimary` is added to the application theme enabling utilization of this text color by many of the parent TextAppearance styles. As a result text color is removed many of the TextViews in **_fragment_typography.xml_**.

This theme is extended in the Demo app. Where Fabric Android is consumed this Theme can be used as a parent where properties can be added and others overriden to suit the theme of the consumer App.

##CalendarDayView Colors
Two styles, `TextAppearance.UIFabric.CalendarDay` and  `TextAppearance.UIFabric.CalendarDay2` derive from the base font styles, `TextAppearance.UIFabric.Subheading` and `TextAppearance.UIFabric.Subheading2` as they all share font weight and size. However, the colors are being handled in **_calendar_week_day_text_selector.xml_** which necessitates the parent color be overriden with `@null `

##Primary Dark
Consulted with @<Jack Cowan> to add `uifabric_primaryDark`.

Related work items: #658677
2018-11-30 00:46:03 +00:00
William Do 1694971af8 Merged PR 204823: Drawables prepended with "ms"
- prepended generic drawables and added Microsoft copyright
- removed spaces between selector items

Related work items: #658726
2018-11-21 22:50:03 +00:00
William Do db6ca1fb6c Merged PR 204597: Renamed DatePickerView and associated classes, files and references to use CalendarView
- renamed DatePickerView and associated files, classes and references to use CalendarView
- removed lifecycle dependency from gradle file

Related work items: #648067
2018-11-21 00:41:31 +00:00
William Do 27b5c71d7e Merged PR 200986: DateTimePickerDialog
This PR adds the DateTimePickerDialog control which houses both a DatePicker and TimePicker controls in a modal dialog with a ViewPager switching between the two controls. The TimePicker development is next up in the pipeline.
Including:
- Refactors the callback interface for the date selection
- Adds a onDatePick callback for Activities to implement
- Adds a UiUtility class to handle UI related configuration information and operations
- Adds FragmentDialog and ViewPager derived classes to mange resize and positioning
- Adds UI layouts for the dialogs

![Screenshot_1541729167.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/200986/attachments/Screenshot_1541729167.png)

Related work items: #642747, #656420, #656421
2018-11-20 00:25:54 +00:00
Vlad Filyakov 5f507ebfbb Merged PR 196135: Updated build related files after Android studio update
Updated to the latest Android Studio and related tools.

Android Studio 3.2.1
Gradle Plugin 3.2.1
Gradle 4.6

There is a breaking change in Gradle Plugin requiring build.gradle update.
2018-10-26 01:35:41 +00:00
Emily Lynam 1774400035 Merged PR 193327: PersonaChip intro
- Calling this `PersonaChip` as design suggested there will be other `Chip` implementations. Also `Badge` means something different in android than it does in ios.
- Adds new IAvatar interface to help with all the duplicate properties we now have. Refactored AvatarView to use this and also to have more accessor properties (which is more Kotlin-y than having to call set).
- Also moved the documentation comments to the interface instead of duplicating them all over.
- Adds new xsmall AvatarSize.
- Examples should show each of the interactive states: normal, pressed, active, error, error active, and disabled.

![Screenshot_1539900895.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/193327/attachments/Screenshot_1539900895.png)

Related work items: #640378
2018-10-24 19:42:04 +00:00
William Do a4a2d8c12c Merged PR 194583: ThreeTenABP License
- added a folder for licenses
- added license for threetenabp date time library
2018-10-23 01:34:08 +00:00
William Do 6fbdcf7cda Merged PR 187925: DatePicker
DatePicker is a control that allows users to scroll through a calendar and select a dater.

This PR provides the base functionality of the DatePicker.
- Scrolling through calendar
- Date selection
- Interface to handle changes in date selection
- Helper objects for handling time and getting user preferences
- Views for individual days and week day initial heading
- Month and year overlay
- Fabric demo app updated with the control

![Screenshot_1538703278.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/187925/attachments/Screenshot_1538703278.png)

Related work items: #623282
2018-10-18 23:27:22 +00:00
Emily Lynam e891704b7c Merged PR 188108: PeoplePicker intro
- This control has a list of personas with onclicklisteners, which we can later use to control selection. Right now the example just shows a snackbar on "click". No interaction states from design yet.
- Fixed a padding bug I missed in the PersonaView PR
- Added all the example images from the sketch toolkit so we can have more robust demos

![Screenshot_1538759233.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/188108/attachments/Screenshot_1538759233.png)

Related work items: #640377
2018-10-18 15:49:15 +00:00
Vlad Filyakov 02cfcf74a5 Merged PR 182735: Updated repo.json
Updated repo.json
2018-09-21 20:10:03 +00:00
Emily Lynam 8c3bc97689 Merged PR 178301: Persona compound view, initial bits
- Refactored AvatarView, including size naming, @JvmOverloads constructors, and safer bound setting
- New `persona` package for Persona related items, seems cleaner at the moment anyway
-  `PersonaView` is a compound custom view. This PR is for MVP that I discussed with Jack: `title` and `subtitle` text with single line only, horizontal layout that will be used in cells. Later I will add horizontal scroll, static layout, caption text, line wrapping, and dense text layouts.
- Setting `title` and `subtitle` with a function instead of with properties because I thought it would be cleaner for the user to pass all text related properties at once, rather than using dot notation for all of them. Right now, there are just two properties, but there will be many more in the future (caption, multi line title, multi line subtitle, dense, etc)

![Screenshot_1536859636.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/178301/attachments/Screenshot_1536859636.png)

Related work items: #621024
2018-09-18 23:30:50 +00:00
Vlad Filyakov 51e98542c2 Merged PR 179320: TemplateView for creating views that have their UI structure defined in layout files and hidden from consuming developer
TemplateView is an abstract class designed for building views that have their UI defined in one or more layout files. These layout files are called templates. Once template is loaded it's added to the view as the only child. After that the view becomes a proxy and forwards onMeasure/onLayout calls to its template root view.

This approach allows to hide UI implementation details from consuming developer and easily switch from one UI to another.

@<Emily Lynam> This is what we can use later as a superclass for PersonaView.

Related work items: #624932
2018-09-14 21:42:44 +00:00
Vlad Filyakov de4a9aeefc Merged PR 176561: Support for the App Center in the Demo
- Added Dogfood and Development product flavors to the Demo
- Added App Center support to the Demo

Related work items: #600576, #625153, #625204
2018-09-07 00:53:17 +00:00
Emily Lynam e749b892f5 Merged PR 174966: Add Typography via Outlook and toolkit
Checked with Jack and typography isn't expected to change too much from the working version of the toolkit. I'll be using some of these text styles in Persona.
- styles_font.xml is mostly from Outlook, just tweaked a couple names and removed unused styles
- pulled font files from Outlook
- dimens and fragment.xml are quite similar to Outlook, too
- the rest is mostly for the demo
- check the Typography page from the working branch in abstract for design

![Screenshot_1536098627.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/174966/attachments/Screenshot_1536098627.png)

Related work items: #610108
2018-09-05 23:11:59 +00:00
Emily Lynam 329a0c3e72 Merged PR 169504: Avatar initial bits via Outlook
- AvatarView draws Avatar with initials via `setInfo` and loads Avatar with image via four overridden public methods, this view replaces AvatarDrawable and RoundedDrawable from Outlook
- I replaced Outlook's RoundedDrawble with android's RoundedBitmapDrawable, but we can easily switch back if we run into compat problems
- `setImageDrawable` intercepts calls from Glide and Picasso to set the rounded drawable, the other three methods give flexibility for setting the image on AvatarView in all the other built in ways. Added examples of most of these in the demo.
- InitialsDrawable and ThemeUtil logic is pretty much straight from Outlook. We need the ThemeUtil for setting initials backgroundcolor
- I changed the API level in gradle from 28 to 27 because 28 is still a bit buggy

![Screenshot_1535668084.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/169504/attachments/Screenshot_1535668084.png)

Related work items: #617650
2018-08-31 17:53:27 +00:00
Vladislav Filyakov d3bf09a127 Converted instrumented test to Kotlin 2018-07-30 11:47:09 -07:00
Vladislav Filyakov 0c9bb7e751 - Button: added another test for CI testing 2018-07-18 12:51:30 -07:00
Vladislav Filyakov 08dd182a6f Fixed test 2018-07-17 17:42:31 -07:00
Vladislav Filyakov cde62a1173 Temporary commenting tests out for CI build 2018-07-16 18:03:39 -07:00
Vladislav Filyakov a20b922428 - Button: updated constructors 2018-07-16 18:02:00 -07:00
Vladislav Filyakov 7943ad2a15 - Button: derived from the correct class 2018-07-16 13:41:40 -07:00
Vladislav Filyakov 44b989940c Added metadata for repo scanner 2018-07-13 15:10:47 -07:00
Vladislav Filyakov 8d3894cf16 Button: Added design-time support 2018-07-12 14:04:31 -07:00