Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add XML attributes in Chinese explanation #74

Merged
merged 2 commits into from
Nov 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,41 @@ And XML init:
app:ntb_title_size="10sp"/>
```

XML属性中文详解:
============

```xml
<!-- NavigationTabBar各属性详解
全局:
app:ntb_bg_color="#000" ntb的背景颜色 可自定义
app:ntb_active_color="#000" ntb活动时的图标+标题颜色 可自定义
app:ntb_inactive_color="#0f0" ntb不活动时的图标+标题颜色 可自定义
app:ntb_corners_radius="10dp" ntb切换时的动画弧度大小 可自定义
app:ntb_animation_duration="1000" ntb切换时的动画时间 单位:ms
图标相关:
app:ntb_icon_size_fraction="1" 图标所占的大小比例 最佳值:0.5
标题相关:
app:ntb_titled="true" 是否显示图标所对应的标题 默认为false
app:ntb_title_mode="active" 图片所对应的标题显示模式 active:活动时才显示 all:总是显示 PS:app:ntb_titled属性值为 true 时才可用
app:ntb_title_size="10sp" 设置图标所对应的标题文字大小 请自定义
勋章相关:
app:ntb_badged="false" 是否显示勋章 默认为false
app:ntb_badge_gravity="top" 勋章的上下位置 top|bottom
app:ntb_badge_position="right" 勋章的左右位置 left(25%), center(50%) and right(75%)
app:ntb_badge_bg_color="#ffff0000" 勋章的背景颜色 可自定义
app:ntb_badge_title_color="#000000" 勋章的标题文字颜色 可自定义 PS:不设置的话默认为切换动画的背景色
app:ntb_badge_size="12sp" 勋章的标题文字大小 可自定义
字体相关:
app:ntb_badge_use_typeface="false" 是否使用自定义字体 默认为false
app:ntb_typeface="fonts/by3500.ttf" 设置ntb的自定义字体 请将自定义的字体文件放在 asset/fonts 文件夹下
其他:
app:ntb_preview_colors="@array/colors"
app:ntb_scaled="true"
app:ntb_tinted="true"
app:ntb_swiped="true"
-->
```

Getting Help
============

Expand Down Expand Up @@ -325,4 +360,4 @@ You can contact us via [email protected] or [email protected].
Thanks in advance.

Devlight LLC, 2016
[devlight.io](http://devlight.io)
[devlight.io](http://devlight.io)