2017.1-TOP5 Android开源库
Colorful (Github)
Colorful简单实用,通过这个开源库可以通过编码的方式来改变应用的主题,不再需要定义不同的style
dependencies {
compile 'com.github.garretyoder:Colorful:1.1'
}
public class SampleApp extends Application {
@Override
public void onCreate() {
super.onCreate();
Colorful.init(this);
}
}
你需要改变主题的Activity必须继承CActivity
public class MainActivity extends CActivity
或者在 setContentView()
之前调用下面的方法
Colorful.applyTheme(Activity activity);
也可以调用 Colorful.applyTheme(Activity activity, Boolean overrideBase);
参数 overrideBase
说明是否要覆盖本身的主题
可以在初始化时,设置默认的主题
public class SampleApp extends Application {
@Override
public void onCreate() {
super.onCreate();
Colorful.defaults()
.primaryColor(Colorful.ThemeColor.RED)
.accentColor(Colorful.ThemeColor.BLUE)
.translucent(false)
.dark(true);
Colorful.init(this);
}
}
在代码中可以使用配置随时修改
Colorful.config(this)
.primaryColor(Colorful.ThemeColor.RED)
.accentColor(Colorful.ThemeColor.BLUE)
.translucent(false)
.dark(true)
.apply();

Stencil (Github)
是时候给你的文字来点花样了
dependencies {
compile 'com.github.thoughtbot:stencil:1.0'
}

WaveLoading (Github)
波浪形动画
compile 'com.race604.waveloading:library:1.1.1'
使用
Drawable mWaveDrawable = new WaveDrawable(otherDrawable);
// Use as common drawable
imageView.setImageDrawable(mWaveDrawable);
其他的配置方法
public void setWaveAmplitude(int amplitude), set wave amplitude (in pixels)
public void setWaveLength(int length), set wave length (in pixels)
public void setWaveSpeed(int step), set wave move speed (in pixels)
public void setIndeterminate(boolean indeterminate), like progress bar, if run in indeterminate mode, it'll increase water level over and over again, otherwise, you can use boolean setLevel(int level) to set the water level, acting as loading progress.
public void setIndeterminateAnimator(ValueAnimator animator), set you customised animator for wave loading animation in indeterminate mode.

BufferTextInputLayout (Github)
一个简单的定制化的TextInputLayout
<org.buffer.android.buffertextinputlayout.BufferTextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:counterEnabled="true"
app:counterMaxLength="10"
app:counterOverflowTextAppearance="@style/counterOverride"
app:counterTextAppearance="@style/counterText"
app:hintEnabled="true"
app:counterMode="ascending">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/text_hint" />
</org.buffer.android.buffertextinputlayout.BufferTextInputLayout>



PageLoader (Github)
定制页面加载的一个开源库
dependencies {
compile 'id.arieridwan:pageloader:0.0.2'
}
<id.arieridwan.lib.PageLoader
android:id="@+id/pageloader"
android:layout_width="match_parent"
android:layout_height="match_parent">
SomeMethod(){
pageLoader.startProgress();
...
onComplete(){
...
}
onNext(){
...
pageLoader.stopProgress();
}
onError(){
...
pageLoader.stopProgressAndFailed();
}
}

分类:
android提高篇
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!