microsoft / fluentui-android

MIT License
580 stars 103 forks source link

Fluent UI for Android

The Android UI framework for building experiences for Microsoft 365.

Fluent UI for Android is a native library that provides the Office UI experience for the Android platform. It contains information about colors and typography, as well as custom controls and customizations for platform controls, all from the official Fluent design language used in Microsoft 365 products.

Build status (master branch)

Build Service Status
App Center Build status
Build Pipeline Android CI
Release Pipeline Build Status

Contents

Colors and typography

Fluent UI for Android provides colors and typography based on the Fluent design language.

In version 0.0.12, as a part of modularization, the colors and typographies have been moved to respective modules Please refer to Modularization section for more details

Controls

Fluent UI for Android includes an expanding library of controls written in Kotlin. These controls implement the Fluent design language and bring consistency across Office app experiences.

XML based Controls (v1)

Compose based Controls (v2)

Install and use Fluent UI

Requirements

API 21+

1. Using Gradle

a) Develop for Surface-Duo:

NOTE: Some modules already have the SDK dependency added for providing customizations for Surface Duo. Please add the maven url to repositories section in your gradle script to use these modules.

2. Using Maven

3. Manual installation

Modularized FluentUI manual installation involves building individual AARs of required modules

Import and use the library

In code:

import com.microsoft.fluentui.persona.AvatarView

In XML:

<com.microsoft.fluentui.persona.AvatarView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:name="Mona Kane" />

Demo app

Included in this repository is a demo of currently implemented controls. A full list of implemented controls available in the demo can be found here: Demos.

To see samples of all of our implemented controls and design language, run the FluentUI.Demo module in Android Studio.

Modularization

Starting from version 0.0.12, Fluent UI has been split into multiple modules by grouping related controls together. The main objective of this is to reduce the size impact of library on the applications which want to use only specific controls from Fluent UI

The list of modules and their respective controls is as follows

Modules v1 Controls v2 Controls
fluentui_calendar Calendar, DateTime Picker
fluentui_ccb ContextualCommandBar
fluentui_controls AnnouncementCard, BasicCard,
BasicChip, Button,
Checkbox, Citation,
FileCard, FloatingActionButton,
Label, RadioButton,
TextField, ToggleSwitch
fluentui_core TemplateView, Utilities
fluentui_drawer Drawer, BottomSheet,
Persistent BottomSheet
BottomSheet, Drawer
fluentui_listitem ListItemView ListContentBuilder, Divider,
ListItem, TabItem
fluentui_menus Pop up Menu Dialog, Menu
fluentui_notification Badge, CardNudge,
NotificationCommon, Snackbar,
ToolTip
fluentui_others Action Bar Layout, Bottom Navigation, Buttons, View Pager
fluentui_persona AvatarView, AvatarGroup View,
PersonaChipView, PersonaListView
Avatar, AvatarCarousel,
AvatarGroup, Persona,
PersonaChip, PersonaList,
SearchBarPersonaChip
fluentui_peoplepicker PeoplePickerView PeoplePicker
fluentui_progress Linear Progress Bar, Circular Progress Bar CircularProgressIndicator, LinearProgressIndicator,
ProgressText, Shimmer
fluentui_tablayout Tablayout SideRail, TabBar,
Pill, PillSwitch,
PillTabs
fluentui_topappbars Toolbar, AppBar Layout, SearchBar AppBar, SearchBar
fluentui_transients Snackbar, Tooltip

Contributing

Post bug reports, feature requests, and questions in Issues. Contributions to any specific controls should be done in respective modules. Refer Modularization section for more details

Changelog

We use GitHub Releases to manage our releases, including the changelog between every release. You'll find a complete list of additions, fixes, and changes on the Releases page.

License

All files on the Fluent UI for Android GitHub repository are subject to the MIT license. Please read the LICENSE file at the root of the project.

Usage of the logos and icons referenced in Fluent UI for Android is subject to the terms of the assets license agreement.