• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

nativescript-community/ui-material-components: Monorepo that contains all of the ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

nativescript-community/ui-material-components

开源软件地址(OpenSource Url):

https://github.com/nativescript-community/ui-material-components

开源编程语言(OpenSource Language):

TypeScript 82.8%

开源软件介绍(OpenSource Introduction):

Nativescript Material Components

lerna

Build beautiful, usable products using Material Components for NativeScript.

Installation

Android

Ensure your Android Theme is inheriting from MaterialComponents. Inside App_resources/android/res/values/styles.xml replace all occurences of Theme.AppCompat with Theme.MaterialComponents You can see an example in the demo-vue app.

Theming

Defining the theme and the default colors must be done a bit differently on iOS and Android

  • Android: You must set the colors through android Style
  • iOS: You must set the colors programmatically at your app startup
import { themer } from '@nativescript-community/ui-material-core';
if (global.isIOS) {
    themer.setPrimaryColor('#bff937');
    themer.setAccentColor('#ff8a39');
    themer.setSecondaryColor('#a830d7');
}

Mixins

Through this component you can apply elevation or rippleColor to any View. To enable that feature your must "install" the mixins. Make sure you do it before creating any view.

import { installMixins } from '@nativescript-community/ui-material-core';
installMixins();

Components

Name README npm Material design
Circular progress indicator README.md @nativescript-community/ui-material-activityindicator Circular progress indicators
Bottom navigation README.md @nativescript-community/ui-material-bottom-navigation Bottom navigation
Bottom navigation bar README.md @nativescript-community/ui-material-bottomnavigationbar Bottom navigation
Bottom sheet README.md @nativescript-community/ui-material-bottomsheet Sheets: bottom
Button README.md @nativescript-community/ui-material-button Buttons
Card README.md @nativescript-community/ui-material-cardview Cards
Dialogs README.md @nativescript-community/ui-material-dialogs Dialogs
Floating action button README.md @nativescript-community/ui-material-floatingactionbutton Buttons: floating action button
Linear progress indicator README.md @nativescript-community/ui-material-progress Linear progress indicators
Ripple README.md @nativescript-community/ui-material-ripple Ripple
Slider README.md @nativescript-community/ui-material-slider Sliders
Snackbar README.md @nativescript-community/ui-material-snackbar Snackbars
Speed dial README.md @nativescript-community/ui-material-speeddial Speed dial
Tabs README.md @nativescript-community/ui-material-tabs Tabs
Text field README.md @nativescript-community/ui-material-textfield Text fields
Text view README.md @nativescript-community/ui-material-textview Material Text View

FAQ

Question: How to use the latest version of this plugin for iOS?

Answer: To get latest versions of Material Components for iOS (> 112.1) you will need to change Pod min version to 10.0 To do that modify or create App_Resources/iOS/Podfile to add platform :ios, '10.0'. You can see an example in the demo-vue app.

Q: How to migrate to AndroidX with this plugin installed (Android only)?

A: For Material Components to work correctly with {N} 6 and AndroidX you need to update your android app theme. Inside App_resources/android/res/values/styles.xml replace all occurences of Theme.AppCompat with Theme.MaterialComponents You can see an example in the demo-vue app.

Q: What is the difference between Bottom Navigation and Bottom Navigation Bar component?

A: The Bottom Navigation Bar is a new component to draw a bottom navigation bar in material design. The Bottom Navigation component is a simple extract of the eponymous component from NativeScript, which probably will be removed in the future so this one can be used for easy transition.

Q: How can I contribute?

A:

npm i
npm run setup # this should happen for every typescript update
npm run build.all
npm run demo.ios
npm run demo.android



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap