Calling setcontentview multiple times?

前端 未结 3 1419
被撕碎了的回忆
被撕碎了的回忆 2021-01-22 17:53

Can i call setcontentview multiple times if my layout is same but the resource changes.for instance if images get exchanged in 2 imageview widgets??(this is infact all that is h

3条回答
  •  野性不改
    2021-01-22 18:03

    You can "refresh" the ImageViews by calling

    myImageView.invalidate();

    This will make the view be redrawn. If you're using an AdapterView (such as a ListView) call

    myListView.notifyDataSetChanged();

提交回复
热议问题