mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-01 19:58:14 +08:00
modify RippleDrawable,change macro MASK_LAYER_ID to cdroid::R:🆔:mask
This commit is contained in:
parent
d838a2eafc
commit
4adabdcfd3
@ -42,7 +42,6 @@ class CDROIDHandler( xml.sax.ContentHandler ):
|
||||
if self.isMyNS(value):
|
||||
self.addID(value)
|
||||
if 'string/' in value:
|
||||
#value = self.normalizeXMLString(value),this is done in cdroid Assets::getString
|
||||
self.addString(value)
|
||||
if 'type' in attributes and 'name' in attributes:
|
||||
self.addID("@id/"+attributes.get('name'))
|
||||
|
@ -232,7 +232,7 @@ int RippleDrawable::getRadius()const{
|
||||
|
||||
bool RippleDrawable::setDrawableByLayerId(int id, Drawable* drawable){
|
||||
if (LayerDrawable::setDrawableByLayerId(id, drawable)) {
|
||||
if (id == MASK_LAYER_ID/*R.id.mask*/) {
|
||||
if (id == cdroid::R::id::mask) {
|
||||
mMask = drawable;
|
||||
mHasValidMask = false;
|
||||
}
|
||||
@ -393,7 +393,7 @@ void RippleDrawable::drawContent(Canvas& canvas) {
|
||||
std::vector<ChildDrawable*> &array = mLayerState->mChildren;
|
||||
const int count = mLayerState->mChildren.size();
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (array[i]->mId != MASK_LAYER_ID) {
|
||||
if (array[i]->mId != cdroid::R::id::mask) {
|
||||
array[i]->mDrawable->draw(canvas);
|
||||
}
|
||||
}
|
||||
@ -471,6 +471,6 @@ Drawable*RippleDrawable::inflate(Context*ctx,const AttributeSet&atts){
|
||||
|
||||
void RippleDrawable::updateLocalState() {
|
||||
// Initialize from constant state.
|
||||
mMask = findDrawableByLayerId(MASK_LAYER_ID);//R.id.mask);
|
||||
mMask = findDrawableByLayerId(cdroid::R::id::mask);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user