开发者

load image from an array to an image view and show next or previous with flipper

I have a static array.

private Integer[] mThumbIds = {
        R.drawable.sample_0, R.drawable.sample_1,
        R.drawable.sample_2, R.drawable.sample_3,
        R.drawable.sample_4, R.drawable.sample_5,
        R.drawable.sample_6, R.drawable.sample_7,
        R.drawable.sample_0
}

Now I have to show these image开发者_StackOverflow社区s in image view one by one and with the help of flipper(or anything else) show the previous or next image. First question how to load these images in image view. It would be good for me if you can provide some sample code. Thank you.


you can display image using array like this way.

int id= mThumbIds[5];

youImageView.setBackgroundDrawable(getResources().getDrawable(id))
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜