How to programmatically change the background image of an Android Activity

前端 未结 3 989
野性不改
野性不改 2021-02-06 05:24

I have been able to change colour of an activity background (see this post). Now a requirement is to do the same with background image. I mean I can click a button, select an op

3条回答
  •  误落风尘
    2021-02-06 06:02

    webView.setBackgroundColor(0);
    WebView.setBackgroundResource(R.drawable.yourImage);
    

    use this above code, may this help you....

提交回复
热议问题