Comments (4)
。。我是直接在代码中改变toolbar和statusbar颜色的0 0
from changeskin.
我能想到的办法也是这样,不过感觉这样不优雅
from changeskin.
我找到了个办法,在SkinAttrSupport类中增加如下一个分支判断,获取主题中的颜色值
else if (attrValue.startsWith("?"))
{
int id = Integer.parseInt(attrValue.substring(1));
TypedValue typedValue = new TypedValue();
TypedArray a = context.obtainStyledAttributes(typedValue.data, new int[]{id});
String entryName = context.getResources() .getResourceEntryName(a.getResourceId(0, 0));
a.recycle();
Timber.d("%s's entryName=@%s", attrName, entryName);
if (entryName != null && entryName.startsWith(SkinConfig.ATTR_PREFIX))
{
skinAttr = new SkinAttr(attrType, entryName);
skinAttrs.add(skinAttr);
}
}
from changeskin.
加进去了如何使用呢
from changeskin.
Related Issues (20)
- 项目是不是代码没传好? HOT 1
- BaseSkinActivity#onCreateView中为什么用反射来创建 view? HOT 2
- 在使用databinding情况下无法换肤 HOT 1
- Getting more done in GitHub with ZenHub
- No package identifier when getting value for resource number 0x00000000
- 使用监听 onCreateView 在view重绘时会出现重复添加的skinView HOT 1
- 使用插件式更换皮肤时,没有皮肤包的情况下。仍然回调更换成功!
- View控件不能换肤
- 闪回主页面
- background 设置为null导致 空指针 HOT 1
- 继承 baseSkinActivity后 SearchView 不识别? HOT 3
- 下边的这个类找不到。就是你的基类里的。
- 问一下设置夜景很卡,里边拖动卡顿倒是anr
- createViewFromTag(context, name, attrs);什么时候知道到这个呢? HOT 2
- Android 6.0以上找不到皮肤包中资源名称对应的资源ID HOT 1
- ListView 和gradView item中的图片切换 怎么做了 HOT 2
- 代码中给view设置的资源,怎么处理好?
- 自定义控件怎么换肤! 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 changeskin.