android 开源库收藏

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

原文地址:android 开源库收藏

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);
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章