android 开源库(字体图标,MD控件等)


记录自己最近在开发中使用的开源库及部分使用方法,链接地址为个人fork后的地址,可以参见原作者仓库。本文将持续更新,大家有什么好用的可以留言,一起交流学习下。

1. android 开发常用工具类

地址:https://github.com/txadf/Lazy

2. 字体图标

地址:https://github.com/txadf/material-icon-lib
用法:
2.1.添加依赖

compile 'net.steamcrafted:materialiconlib:1.0.9'

2.2.xml中使用
注:需要添加命名空间

<net.steamcrafted.materialiconlib.MaterialIconView
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/icon"
        android:layout_width="24dp"
        android:layout_height="24dp"
        android:scaleType="center"
        app:materialIcon="account"
        app:materialIconColor="@color/mainColor"
        app:materialIconSize="24dp"/>

示例效果:

3. UI Model

地址:http://genius.qiujuer.net/module/ui.html
按原作者网上站上的配置。
具体使用,按钮的使用:

<net.qiujuer.genius.ui.widget.Button
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:id="@+id/gbtn_login"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="25dp"
            android:background="@color/mainColor"
            android:onClick="LoginClickEvent"
            android:text="@string/login_btn"
            android:textColor="@color/white"
            app:gFont="roboto.ttf"
            app:gTouchColor="@color/black_alpha_32"
            app:gTouchDurationRate="0.7"
            app:gTouchEffect="ripple"/>

同样需要注意添加命名空间。

4. xutils3

地址:https://github.com/txadf/xUtils3

5.进度条

地址:https://github.com/txadf/spots-dialog
效果:

6.对话框

地址:https://github.com/txadf/sweet-alert-dialog
示例效果:

7. EventBus

地址:https://github.com/txadf/EventBus
注意:在使用,进行注册订阅时,使用下面的方式,其中“XXX”表示需要订阅的Activity或者Fragment名,避免直接使用“this”:

EventBus.getDefault().register(XXX.this);

文章作者: imtianx
版权声明: 本博客所有文章除特別声明外,均采用 CC BY-NC 4.0 许可协议。转载请注明来源 imtianx !
评论
 上一篇
android 异常捕获-UncaughtExceptionHandler android 异常捕获-UncaughtExceptionHandler
在android开发中,异常信息的捕获有多种方式,比如第三方的友盟、蒲公英等,这里主要使用 android 原生的 Thread.UncaughtExceptionHandler 来捕获出现的异常信息,并给出友好的提示,避免出现停止运行,提
下一篇 
TabLayout+ViewPager创建tab TabLayout+ViewPager创建tab
在degingn库中有TabLayout控件,可以方便的实现tab切换的效果,配合ViewPager.如下展示效果: 1. 添加依design赖库 compile 'com.android.support:design:23.4.0' 2.
  目录