[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Carbon-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1491)
[![Maven Central](https://img.shields.io/badge/Maven%20Central-0.7.0-brightgreen.svg)](https://oss.sonatype.org/content/groups/public/tk/zielony/carbon/0.7.0/)
[![Dropbox](https://img.shields.io/badge/Dropbox-Sample%20app-brightgreen.svg)](https://www.dropbox.com/s/qp4gu6m5so1o0df/samples.apk?raw=1)
Carbon
================
Material Design implementation for Android 2.1 and newer. This is not the exact copy of the Lollipop's API and features. It's a custom implementation of the most useful things as shown in the design specification. The library also features some additional non-standard extensions, like rounded corners for layouts or a Divider view for easy divider creation.
![Circular progress indicators](https://github.com/ZieIony/Carbon/blob/master/images/progress.png)
![Text appearances](https://github.com/ZieIony/Carbon/blob/master/images/textappearances.png)
![Calculator](https://github.com/ZieIony/Carbon/blob/master/images/calculator.png)
![ScrollView](https://github.com/ZieIony/Carbon/blob/master/images/scrollview.png)
![Sample app](https://github.com/ZieIony/Carbon/blob/master/images/sampleapp.png)
![RecyclerView and CardView](https://github.com/ZieIony/Carbon/blob/master/images/recyclercards.png)
![CheckBoxes](https://github.com/ZieIony/Carbon/blob/master/images/checkboxes.png)
![PagerTabStrip](https://github.com/ZieIony/Carbon/blob/master/images/pagertabstrip.png)
### Features
- realtime, animated shadows
- the touch ripple
- an elevation system (changing z order changes view rendering order)
- rounded corners
- SVG rendering
- a floating action button view
- text appearances, sizes, colors and many more useful definitions
- roboto and roboto condensed fonts for buttons and text fields
- predefined animation styles and visibility change animations
- a saturation/brightness/alpha fade for ImageView
- Divider, StatusBar and NavigationBar drag&drop view
- dark and light themes in standard and AppCompat versions
- a radial transition animation
- circular progress indicators
- CardView with real shadows and rounded corners
- state animators
- debug mode showing draw and hit areas when in edit mode
- tab strip with animated underline
- fading edges
- checkboxes and radiobuttons
### Instalation
Add the following line to dependencies:
compile 'tk.zielony:carbon:0.7.0'
And these two lines to android/defaultConfig:
renderscriptTargetApi 20
renderscriptSupportModeEnabled true
In case of any problems with these check the sample app.
### FAQ
##### Why Android 2.1? Isn't 4.0 enough?
I have an old Galaxy S with Android 2.3, so I did that to support my own phone. It's also fun to push the limits. Android 2.1 should work, the code compiles, but I have never checked that.
##### Is it stable?
Seems like it's pretty stable. I'm testing it heavily on different devices and on real projects. There are minor problems with SVG rendering and shadow generation. Also the themes aren't perfect yet. These are the issues I know about. If you have something else, please let me know.
##### Are you using Lollipop's API on Lollipop devices?
No. Maybe one day.
##### Are you thinking about uploading the library to Maven?
Done!
##### Do you plan to offer your Material elements as separate modules? I would prefer not to include the whole project only to use ripples.
I thought about it, but it's not that easy, because almost everything is tightly integrated with other components. For example the ripple. Due to clipping issues in Android < 5.0 it's not possible to draw borderless backgrounds just by setting the background drawable. That's why I would have to export the ripple with all layouts only to make the borderless mode work.
If you wish, you can copy RippleDrawable.java to your project and integrate it with your code manually.
##### Can you add [put your feature name here]?
If it's possible and reasonable, sure! Just let me know.
##### The shadows aren't working. It says something about the RenderScript
You have to add these lines to your android build config:
renderscriptTargetApi 20
renderscriptSupportModeEnabled true
Carbon uses RenderScript for generating shadows. Gradle doesn't support renderscript very well, so it has to be done that way.
##### What is the debug mode? How to enable it?
Debug mode is a special rendering mode used for UI/UX debugging. Some of material components have touch areas larger than the actual components. It means that a user can tap outside a view and still trigger an action. Using debug mode you can preview all touch and draw areas in the editor. Red rectangles show hit areas, green rectanges - draw areas. Debug mode is also useful for SVG views debugging. SVG views appear empty, because SVG rendering is not supported in the editor.
[![RecyclerView and CardView](https://github.com/ZieIony/Carbon/blob/master/images/debugmode2.png)](https://github.com/ZieIony/Carbon/blob/master/images/debugmode.png)
To enable the debug mode, add the following line to your theme:
<item name="carbon_debugMode">true</item>
Then go to the editor and pick that theme to be used by the editor. You can create two themes, with and without the debug info, so you can switch between them.
<style name="AppTheme" parent="carbon_Theme.Light">
<!-- Customize your theme here. -->
</style>
<style name="AppTheme.Debug">
<item name="carbon_debugMode">true</item>
</style>
### Changelog
##### 0.7.0
- added ripple fade in,
- updated CardView,
- fixed edge effect color,
- fixed setting ripples and backgrounds,
- added transformations support for shadow casting,
- fixed rounded corners and animations on hardware accelerated devices,
- fixed elevation bug
##### 0.6.7.2
- fixed issues with checkboxes and radiobuttons,
- added colorstatelist support to checkboxes and radiobuttons,
- fixed issue with z-order
##### 0.6.7.1
- fixed issues with pagertabstrip, listview and edittext,
- added tab builder to pagertabstrip
##### 0.6.7
- added CheckBox and RadioButton,
- added ListView, ScrollView and HorizontalScrollView with correct edge effects
##### 0.6.6
- merged circular and bar progress, added bar modes,
- textAllCaps compatibility mode,
- added up arrow to toolbar,
- software shadows,
- added ripple to CardView,
- tuned calculator a bit,
- working on edge effects for listview and scrollview,
- Carbon themes extend correct Android and AppCompat themes,
- fixed bugs: animations for progress bars, correct text appearance handling, styles and super constructor calls
##### 0.6.5
- added PagerTabStrip widget,
- started working on fading edges,
- added ripple sample to the animations activity,
- formatted the code,
- fixed bug with views visibility animation
##### 0.6.4
- added GridLayout,
- rearranged the sample app,
- started working on calculator demo,
- added progress bar demo,
- added debug mode,
- color state list can now be passed as a filter color of SVGView,
- fixed bugs: uninitialized state animator list, window not attached to windowmanager
##### 0.6.3.1
- fixed bugs: setting corners for layouts, drawing 0dp views, null hotspot
##### 0.6.3
- added ripple styles, demo and more ripple settings,
- added state animators,
- cleaned up a bit,
- fixed bugs: setting background color, RelativeLayout's drawing
##### 0.6.2
- added CardView and a sample,
- added a sample and a style for flat buttons,
- fixed rounded corners in layouts
##### 0.6.1
- CircularProgress in and out animation,
- shadows improvements,
- elevation bugfix,
##### 0.6.0
- namespace changed to just 'carbon' - less to write in xml,
- uploaded to Maven repository,
- added a sample for using the new image loading animation with Picasso
##### 0.5.2
- added CircularProgress and a pro
没有合适的资源?快使用搜索试试~ 我知道了~
Carbon-master.zip_float_安卓开发carbon
共243个文件
java:108个
xml:63个
png:19个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 6 浏览量
2022-09-20
21:55:40
上传
评论
收藏 1.95MB ZIP 举报
温馨提示
遵循android 5.0 设计规范的float button 向下兼容2.x,值得学习
资源推荐
资源详情
资源评论
收起资源包目录
Carbon-master.zip_float_安卓开发carbon (243个子文件)
gradlew.bat 2KB
.gitignore 87B
.gitignore 35B
.gitignore 18B
maven-push.gradle 3KB
build.gradle 980B
build.gradle 934B
build.gradle 436B
settings.gradle 30B
gradlew 5KB
gradle-wrapper.jar 49KB
GridLayout.java 15KB
RelativeLayout.java 15KB
FrameLayout.java 15KB
LinearLayout.java 15KB
CheckableDrawable.java 12KB
EditText.java 12KB
Button.java 12KB
AnimUtils.java 12KB
ImageView.java 10KB
RadioButton.java 10KB
CheckBox.java 10KB
EdgeEffect.java 9KB
ListView.java 9KB
ScrollView.java 7KB
PagerTabStrip.java 7KB
TransitionLayout.java 7KB
GestureDetector.java 7KB
HorizontalScrollView.java 7KB
AnimatedLayout.java 6KB
TextView.java 6KB
RippleDrawable.java 6KB
Snackbar.java 5KB
ShadowGenerator.java 5KB
Carbon.java 4KB
BottomSheet.java 4KB
SaveStateActivity.java 4KB
Toolbar.java 4KB
ProgressBar.java 4KB
ProgressDrawable.java 4KB
CardView.java 3KB
SVGView.java 3KB
RecyclerAdapter.java 3KB
NavigationBar.java 3KB
CornersDrawable.java 3KB
CircularProgressActivity.java 2KB
ValueAnimation.java 2KB
CircularProgressDrawable.java 2KB
StatusBar.java 2KB
CalculatorActivity.java 2KB
WidgetsActivity.java 2KB
ProgressBarDrawable.java 2KB
Roboto.java 2KB
TabsActivity.java 2KB
FeaturesActivity.java 2KB
Window.java 2KB
ValidatedEditText.java 2KB
MainActivity.java 2KB
AnimationsActivity.java 2KB
ViewPager.java 2KB
LargeShadowActivity.java 2KB
ViewUtils.java 2KB
AppsLibrariesActivity.java 2KB
NinePatchShadow.java 2KB
PopupWindow.java 1KB
ElevationStateAnimator.java 1KB
SnackbarActivity.java 1KB
AnimationsActivity.java 1KB
ShadowActivity.java 1KB
FastLayout.java 1KB
Divider.java 1KB
MainListAdapter.java 1KB
ZOrderActivity.java 1KB
StateAnimator.java 1KB
TextFieldsActivity.java 1KB
ListRippleAdapter.java 1KB
LayoutAnimation.java 1KB
RadialTransitionActivity.java 1KB
PicassoView.java 1KB
SaveStateActivity.java 1KB
RecyclerCardsActivity.java 1019B
ControlCheckedColorStateList.java 1017B
DialogActivity.java 981B
PicassoActivity.java 953B
ToggleButton.java 860B
SimpleFragment.java 832B
AllCapsTransformationMethod.java 827B
ImageActionButton.java 810B
SVGActionButton.java 796B
ImageFadeActivity.java 756B
OnGestureAdapter.java 753B
EditText.java 701B
ElevationComparator.java 686B
RootView.java 675B
ListRippleActivity.java 661B
ViewHelper.java 629B
ButtonsActivity.java 587B
Shadow.java 564B
RippleStateAnimator.java 559B
OnGestureListener.java 503B
共 243 条
- 1
- 2
- 3
资源评论
小贝德罗
- 粉丝: 71
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- proteusntion-model-for-network-id开发笔记
- dockerntion-model-for-network-ids开发笔记
- 工程伦理e-MM-m开发笔记
- zlibrary-attention-model-for-network-i开发笔记
- matlab GUI仿真ntion-model-for-network-ids开发笔记
- 注意力机制t-JavaWeb-m开发笔记
- 雾霾分析的MATLAB GUI仿真程序
- 基于Matlab的超声场可视化研究及GUI仿真模拟
- DJ宏财-全外文FunkyHouse音乐总有一天你会出现在我身边必听精选专辑串烧.mp3
- kuzu 5.16(是2.18回锅饭).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功