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

nasahapps/Material-Design-Toolbox: Providing whatever Google left out for Materi ...

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

开源软件名称(OpenSource Name):

nasahapps/Material-Design-Toolbox

开源软件地址(OpenSource Url):

https://github.com/nasahapps/Material-Design-Toolbox

开源编程语言(OpenSource Language):

Kotlin 100.0%

开源软件介绍(OpenSource Introduction):

Material Design Toolbox

Release

This library is still a work in progress.

The main purpose of this library is to provide components and helper methods in implementing Material Design concepts with little to no effort. This library in particular focuses on components that are not yet included in Google's support libraries, with most widgets adhering very closely to the guidelines Google has set. Links to already-existing components will be provided.

This library supports Android 4.1 (API 16) and up, however, not all components/methods will be supported pre-API 21.

To use, add Jitpack as a repository in your top-level build.gradle file:

repositories {
    jcenter()
    maven { url "https://jitpack.io" }
}

Then add one (or all) of the following dependencies, depending on what you want specifically:

dependencies {
    // For general utility methods/classes
    compile 'com.github.nasahapps.Material-Design-Toolbox:base:{latest_version}' 
    // For helper methods pertaining to BottomSheets
    compile 'com.github.nasahapps.Material-Design-Toolbox:bottomsheets:{latest_version}' 
}

Note that all modules include the com.github.nasahapps.Material-Design-Toolbox:base module by default.

Components

Steppers

This library provides two stepper layouts:

StepperProgressLayout: Displays step progress using plain text (e.g. Step 4 of 6), dots, or with a tinted ProgressBar. The StepperProgressLayout provides "Back" and "Next" buttons for going forwards/backwards between steps, with the "Next" button turning into a "Finish" button on the last step. Also, it is a ViewGroup, so any views you add to it will automatically be placed accordingly. (TODO: add pictures)

Custom attributes:

  • stepperMaxProgress
  • the max number of steps
  • default value: 1
  • stepperProgress
  • the current step
  • default value: 1
  • stepperBackButtonText
  • default value: "Back"
  • stepperNextButtonText
  • default value: "Next"
  • stepperFinishButtonText
  • the text to be displayed on the "Next" button when on the last step
  • default value: "Finish"
  • stepperProgressType
  • the type of progress to be shown, one of TYPE_TEXT, TYPE_DOTS, or TYPE_BAR
  • default value: TYPE_TEXT
  • stepperProgressAccent
  • the accent color to use for the dots/bar progress
  • default value: R.attr.colorPrimary

HorizontalStepperLayout: Displays steps using Stepper views in either a horizontal or vertical fashion. Steppers have one of four states: COMPLETED, ACTIVE, INACTIVE, or ERROR. Custom attributes:

  • stepperLayoutMargin
  • the margin between each Stepper
  • default value: 56dp

Also provided is the Stepper widget that should be the only child view used in a HorizontalStepperLayout. Custom attributes:

  • stepperTitle
  • stepperSubtitle
  • stepperAccent
  • the accent color to be used as the step number background
  • default value: R.attr.colorPrimary
  • stepperState
  • the initial state of the stepper (ACTIVE, INACTIVE, COMPLETED, or ERROR)
  • default value: ACTIVE

Tabs

The TabLayout widget is part of the design support library.

Text Fields

The TextInputLayout widget is part of the design support library. It is suggested to use a TextInputEditText instead of a regular EditText in this layout.

Toolbars

The Toolbar widget is part of the appcompat-v7 support library.

Tooltips

Tooltips (extends TextView) are similar to Toasts, both in appearance and in function. Creating a Tooltip is very similar to creating a Toast or Snackbar:

Tooltip.makeTooltip(context, "Tooltip text", Tooltip.LENGTH_SHORT, anchorView).show();

The arguments passed in are a Context, string text (or a string resource), a duration of how long you want the Tooltip to appear (LENGTH_SHORT or LENGTH_LONG), and a View to anchor the Tooltip on. By default, the Tooltip will appear below the anchor, unless the anchor is low enough on the screen, then the Tooltip will instead appear above the anchor.

License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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