当前位置: 首页 > 软件库 > 手机/移动开发 > >

ui-material-components

授权协议 Apache-2.0 License
开发语言 JavaScript TypeScript
所属分类 手机/移动开发
软件类型 开源软件
地区 不详
投 递 者 严远
操作系统 iOS
开源组织
适用人群 未知
 软件概览

Nativescript Material Components

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.MaterialComponentsYou 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.0To 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.MaterialComponentsYou 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
 相关资料
  • Material UI 是一套实现了 Google 的 Material Design 全新设计语言的 CSS 框架。Material UI 提供了 npm 包的形式,使用示例: /** * @jsx React.DOM*/var React = require('react'),  mui = require('material-ui'),  PaperButton = mui.PaperBut

  • MUI Quickly build beautiful React apps. MUI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system, or start w

  • React Native Material UI (iOS and Android supported) Highly customizable material design components for React Native! Documentation Getting Started Usage Demo & Examples Components Showroom Savee.io i

  • 问题内容: 刚开始(再次)使用实质性UI并做出反应。有两个软件包material-ui和@ material-ui,这是截至2019-07年的最佳起点(最新)吗? 我认为它基于… https://material-ui.com/getting- started/installation/ 。GIT仓库位于https://github.com/mui-org/material- ui 简单的问题,希

  • 问题内容: 我在项目中一直使用这两个工具,有时我发现需要在Bootstrap组件和UI显示中使用Material UI组件,这与我期望的一样。有人建议我不要使用这种方法。既然两者都在使用网格并且可以灵活使用,那有什么理由吗? 问题答案: 我倾向于冗长,因此我将简洁的答案放在这里: 结论: 谁说不好用两者可能只是在表达自己的观点,实际上说不好用两者在设计时确实缺乏上下文。@ user3770494提

  • 问题内容: 我想给我的新应用程序一致的外观和使用感觉。另外,我希望样式等易于维护。因此,默认主题似乎是一个不错的开始。该所提供的似乎要检查所有的盒子,所以我想试一试。令人惊讶的是,这没有用。CSS主题不是我真正的事情。我在这里被误导了吗?以下代码是我在App.js组件中实现的,没有运气(从此处获取)。我希望这只是一个实现细节。 编辑 :这是位于项目的根目录: 编辑: 我新的App.js 问题答案: