mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-02 04:07:42 +08:00
disable View.setDrawingCacheEnabled
This commit is contained in:
parent
f6fb2f3b5d
commit
1dd040c2b0
@ -56,7 +56,8 @@ AnimatedImageDrawable::AnimatedImageDrawable(cdroid::Context*ctx,const std::stri
|
||||
|
||||
AnimatedImageDrawable::~AnimatedImageDrawable(){
|
||||
mStarting = false;
|
||||
LOGD("%p",this);
|
||||
auto frmSequence = mAnimatedImageState->mFrameSequence;
|
||||
LOGD_IF(frmSequence,"%p/%p %dx%dx%d",this,frmSequence,frmSequence->getWidth(),frmSequence->getHeight(),frmSequence->getFrameCount());
|
||||
if(mRunnable)
|
||||
unscheduleSelf(mRunnable);
|
||||
mRunnable = nullptr;
|
||||
@ -300,8 +301,9 @@ Drawable*AnimatedImageDrawable::inflate(Context*ctx,const AttributeSet&atts){
|
||||
if(ctx){
|
||||
d = dynamic_cast<AnimatedImageDrawable*>(ctx->getDrawable(res));
|
||||
LOGD_IF(d,"%s %p",res.c_str(),d);
|
||||
}else{
|
||||
d=new AnimatedImageDrawable(ctx,res);
|
||||
}
|
||||
if(d==nullptr){
|
||||
d = new AnimatedImageDrawable(ctx,res);
|
||||
const bool autoStart = atts.getBoolean("autoStart");
|
||||
const int repeatCount= atts.getInt("repeatCount",REPEAT_UNDEFINED);
|
||||
if(autoStart)d->start();
|
||||
|
@ -2524,7 +2524,8 @@ void View::setOnHoverListener(OnHoverListener l){
|
||||
|
||||
void View::setDrawingCacheEnabled(bool enabled) {
|
||||
mCachingFailed = false;
|
||||
setFlags(enabled ? DRAWING_CACHE_ENABLED : 0, DRAWING_CACHE_ENABLED);
|
||||
//Do not uncoimment this Lines:
|
||||
//setFlags(enabled ? DRAWING_CACHE_ENABLED : 0, DRAWING_CACHE_ENABLED);
|
||||
}
|
||||
|
||||
bool View::isDrawingCacheEnabled()const{
|
||||
|
Loading…
Reference in New Issue
Block a user