Comments (2)
可以为控件定义个共同的style
from notes.
可以为控件定义共同的style, 举个例子, 对话框的背景, 如果是纯色的, 没有问题, 如果是selector的话, 就不好配置了.
ThemeUtils.Theme theme = ThemeUtils.getCurrentTheme(context);
AlertDialog.Builder builder;
int style = R.style.RedDialogTheme;
switch (theme){
case BROWN:
style = R.style.BrownDialogTheme;
break;
case BLUE:
style = R.style.BlueDialogTheme;
break;
case BLUE_GREY:
style = R.style.BlueGreyDialogTheme;
break;
case YELLOW:
style = R.style.YellowDialogTheme;
break;
case DEEP_PURPLE:
style = R.style.DeepPurpleDialogTheme;
break;
case PINK:
style = R.style.PinkDialogTheme;
break;
case GREEN:
style = R.style.GreenDialogTheme;
break;
default:
break;
}
builder = new AlertDialog.Builder(context, style);
return builder;
from notes.
Related Issues (20)
- 一些交互细节 HOT 1
- 恩,根本就跑不起来 HOT 3
- 绑定印象笔记停止运行 HOT 6
- DaggerActivityComponent不存在 HOT 3
- 这个是模仿Google Keep的吗?
- 导入项目后有错误 HOT 1
- 没有com.lguipeng.notes.injector.component.DaggerActivityComponent;这个类 HOT 3
- 不要标题
- Copy, paste and cut note
- 直接运行后,印象笔记绑定奔溃 HOT 3
- db 为何使用afinal
- 搜索笔记处按回车键后会退出应用
- 重复
- 无法Bind Evernote
- icon for notes
- crash
- My HTML notes\
- 小米note上不能运行 HOT 1
- .
- 在Android6.0 nexus5上报错 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notes.