Dynamic Background (on LinearLayout) - what is my error?

前端 未结 1 1233
-上瘾入骨i
-上瘾入骨i 2021-01-16 04:59

I have a problem, I\'m trying to get my apps background to change, each ten seconds, based on a timer... I have done what i could and cant work it out as im a beginner to ja

相关标签:
1条回答
  • 2021-01-16 05:56
    layout.setBackgroundDrawable(getDrawable(images[index++]));
    
    protected Drawable getDrawable(int i) {
        // TODO Auto-generated method stub
        return null;
    }
    

    This is the problem, you are setting null to the background.return some valid drawable and it will work.

    0 讨论(0)
提交回复
热议问题