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

56 Коммитов

Автор SHA1 Сообщение Дата
Vladislav Filyakov 747688b812 Changed version to 0.2.3 2019-05-03 16:45:15 -07:00
Emily Lynam ae8ba70f4a Merged PR 264973: Rename AvatarSize XSMALL
Found this egregious bug while debugging something else!

Related work items: #713657
2019-05-03 23:38:45 +00:00
Emily Lynam 327f77c7f9 Merged PR 264386: PeoplePicker: fix focus issue and collapse jump issue on start
This PR fixes two bugs:
1. [In API 28, views no longer automatically receive focus.](https://developer.android.com/about/versions/pie/android-9.0-changes-28#focus) To create a consistent experience, we not request focus for the first `PeoplePickerView` in the demo.
2. For unfocused `PeoplePickerView`s that have more views added than can fit in one line on start up, you can see a jump that occurs as `performLayoutAndCollapse` hides the appropriate tokens. Now the tokens are only added if they can fit. **NOTE**: to test this, you can comment out the fix for no. 1 in the activity and test on api 28.

Related work items: #713012
2019-05-03 23:06:14 +00:00
William Do efefffb1ae Merged PR 264378: CalendarView/ DateTimePickerDialog Crash Fix
A crash is occurring when CalendarView or DateTimePickerDialog instances are created. This is caused by the ThreeTenABP library not being initialized.

This PR fixes the crash by initializing the library within CalendarView and DateTimePickerDialog.

Couple of things:
- The initialization method, `AndroidTreeTen.init`, checks if the library has been initialized and does not initialize it again
- Added defaults to DateTimePickerDialog's newInstance params for `dateTime` and `duration` which is why their order changed
- ~~The library must be initialized by a consumer in their project if they want to set the time on the controls otherwise the current time will be used~~
- The library needs to be initialized in the Demo; however if consuming as an AAR module, initialization is not required

Related work items: #718332
2019-05-03 01:29:56 +00:00
Vladislav Filyakov 645381bdba Changed version to 0.2.2 2019-05-01 17:43:59 -07:00
Vladislav Filyakov 9db1f98ad7 Changed version to 0.2.1 2019-04-24 14:47:25 -07:00
Vlad Filyakov 0adcda7893 Merged PR 259833: Demo: UI Fabric version is shown in the subtitle of toolbar on the main screen
- Demo: now shows UI Fabric version in the subtitle of toolbar on the main screen

Related work items: #713614
2019-04-23 01:08:14 +00:00
Emily Lynam 7cb8377c20 Merged PR 258993: Add conditional use of secret global gradle variables
Conditional variables so you don't need them in your local gradle file. Demo now runs without them.

Related work items: #713635
2019-04-19 22:27:55 +00:00
Vladislav Filyakov 4601df50e0 Changed version to 0.2.0 2019-04-18 11:23:03 -07:00
Emily Lynam 2672e29f87 Merged PR 256092: Snackbar: Ability to update text + Updates to demo + Bug fix
**Ability to update text**
- The OneDrive team requested the ability to update text on snackbars that have already been created and are showing.
- We already had this ability, but the layout was buggy. Updating the view's background when setting text was the cause of this.
- Added an example to the demo where text updates.

**Updates to demo**
- Used the existing Headline + divider pattern with descriptions to organize the demo. Ported over some list item text styles from my open PR that we can use.
- Moved descriptions from button text to a `TextView` for legibility.

**Bug fix**
- Found a bug in API 22 where the bottom margin was not added to the content / RelativeLayout. From some research, it appears that `RelativeLayouts` can have problems with bottom margins.
- To fix this, I added the margin to the parent `FrameLayout` (via Android's `SnackbarLayout`). This seems to render much more reliably.

| Top of page | Bottom of page |
| --- | --- |
| ![Screenshot_1555102041.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/256092/attachments/Screenshot_1555102041.png) | ![Screenshot_1555102045.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/256092/attachments/Screenshot_1555102045.png) |

Related work items: #710721
2019-04-16 22:16:50 +00:00
Vlad Filyakov 591da1edeb Merged PR 256195: Updated demo appearance to match Design Toolkit
- Demo: updated padding and style of demo list item
- Demo: added row divider in demo list
- Demo: defined demo list background explicitly

I decided not to style toolbar since system style we have is exactly the design in Toolkit.

Related work items: #710814
2019-04-13 00:24:35 +00:00
Emily Lynam e4f6d98c14 Merged PR 253842: Basic and Borderless Button
Basic button implementation using style for default and borderless variants. Applied the style to the theme and updated the demo with a new Button demo and updated other demos using button to be consistent.

| Design | Demo |
| ------ | ------|
|![Screen Shot 2019-04-09 at 2.18.19 PM.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/253842/attachments/Screen%20Shot%202019-04-09%20at%202.18.19%20PM%20(2).png) ![Screen Shot 2019-04-09 at 2.19.02 PM.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/253842/attachments/Screen%20Shot%202019-04-09%20at%202.19.02%20PM%20(2).png)  | ![Screenshot_1555083988.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/253842/attachments/Screenshot_1555083988%20(2).png)  |

Related work items: #708719
2019-04-12 16:47:07 +00:00
Vladislav Filyakov 8bfd78b426 Changed version to 0.1.10 2019-04-08 13:09:05 -07:00
Emily Lynam 665dc1ccf4 Merged PR 251892: Snackbar: Bug fixes and polish for icon variant
- Fix a bug so that we can use `Snackbar`s in `RecyclerView`s with `findSuitableParent` method borrowed from android (discovered this while working on `ListItemView`)
- Add single line Snackbar with icon variant to the demo and fix bugs so that the icon and text are centered properly
- Give a default duration (per design and pm request)
- Note which duration is used in the demo button text.

| Single-line with icon | Single-line with icon and action |
| ------------- |:-------------:|
|![Screenshot_1554738893.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/251892/attachments/Screenshot_1554738893.png) | ![Screenshot_1554738897.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/251892/attachments/Screenshot_1554738897.png) |
| Multi-line with icon | Multi-line with icon and action |
|![Screenshot_1554738900.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/251892/attachments/Screenshot_1554738900.png) | ![Screenshot_1554738905.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/251892/attachments/Screenshot_1554738905.png) |

Related work items: #706313
2019-04-08 19:11:34 +00:00
Emily Lynam 475e3f07af Merged PR 252409: PeoplePicker: Create proxy api for TokenClickStyle
Because we exposed `TokenClickStyle` in `PeoplePickerView`, we had to use
`api 'com.splitwise:tokenautocomplete:2.0.8@aar'`
instead of the desired
`implementation 'com.splitwise:tokenautocomplete:2.0.8@aar'`
in gradle. To get around this, I created a "proxy" enum, `PersonaChipClickStyle` to port our click style to `TokenCompleteTextView`.

All functionality should remain the same.

Related work items: #706980
2019-04-05 23:33:42 +00:00
Emily Lynam 6164493020 Merged PR 251134: Splash / Launch screen for demo app
This PR introduces a launch screen xml to the demo that serves as a template that other apps can use to get a launch screen that matches the Fabric design toolkit.

To test the launch screen without it disappearing, you can comment out everything in `onCreate` in `DemoListActivity` except `super.onCreate(savedInstanceState)`.

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

Related work items: #701127
2019-04-03 21:45:43 +00:00
William Do 0b34e11c72 Merged PR 244831: Accessible Date Picker
This PR adds a Date Picker for accessibility that includes month, day and year pickers as well as refactors parts of the DateTimePicker control.
- Added new functionality to `DateTimePicker` to enable picking of dates (month, day, year) in TalkBack mode.
- Refactored function names and enums for more clarity and broader usage.
- Added functionality to automatically switch to accessibility date picker in `DateTimePickerDialog` depending on TalkBack mode
- Removed unused DisplayModes and unused DisplayMode properties
- Updated dialog titles to reflect different representations depending on TalkBack mode
- Modified DateTime Picker demo to reflect different accessibility modes

Accessibility interaction for the whole DateTimePicker control will be implemented in another work item.

**Accessible Date Picker** | **Demo**
-|-
![Screenshot_1552932429.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/244831/attachments/Screenshot_1552932429.png) | ![Screenshot_1552935346.png](https://onedrive.visualstudio.com/4dcbf0bc-c3cd-49c8-a7c3-ec1924691d9b/_apis/git/repositories/32fa6338-45ea-42a0-aca0-484938e1962a/pullRequests/244831/attachments/Screenshot_1552935346.png)

Related work items: #667471, #702105
2019-04-03 20:34:06 +00:00
Vladislav Filyakov ffbb198eec Changed version to 0.1.9 2019-04-01 16:47:26 -07:00
Vlad Filyakov 8678e94d3c Merged PR 249403: Updated/added license information in/to source files
- Updated/added license information in/to source files
- Removed unused files
2019-03-29 01:21:06 +00:00
Vlad Filyakov 0d636dc5db Merged PR 248744: Changed version to 0.1.8
Changed version to 0.1.8
2019-03-28 00:24:27 +00:00
Vlad Filyakov ba3524a15b Merged PR 248731: Updated API to 28
Updated API to 28

Related work items: #703313
2019-03-28 00:12:02 +00:00
Vlad Filyakov 87420b8e4e Merged PR 248461: Demo update
1) Demo list - removed extra horizontal padding
2) Typography demo - made descriptions more descriptive; removed extra horizontal padding
2019-03-27 18:08:33 +00:00
Vlad Filyakov 49a7ebf18e Merged PR 248183: Changed version to 0.1.7
Changed version to 0.1.7
2019-03-27 00:35:29 +00:00
Vladislav Filyakov 2632bad356 Added sanitized files back 2019-03-21 12:10:25 -07: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 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 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 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 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 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
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 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
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