开发者

Displaying images when click on next button

I am developing an application with next and previous buttons. Between those buttons, I want to place numbers. This would look like:

PreviousBtn 1 2 3 4 5 NextBtn

How can I place the five numbers between the buttons? Instead of ButtonField I have a custom button class to implement开发者_Go百科 buttons. I am using the following code.

numberBtn = new ImgButtonField[ total().size()];
for (i = 0; i <total().size(); i++) {
    numberBtn[i] = new ImgButtonField(total().elementAt(i).getNo());
}

the numberBtn is having total 40 numbers. How can I display (PreviousBtn 1 2 3 4 5 NextBtn) format, if I clicked on next or pre buttons it should show (PreviousBtn 2 3 4 5 6 NextBtn).

I have images corresponding to the numbers suppose if I click on 1 it should display one image on the screen and so on. So how to place these all images without giving all image resource paths for each corresponding number. Is any simpler way to get all images at a strech when numbers are clicked?


Place that 40 image button in to horizontal field manager.. Scroll the manager whenever you press next and previous button.. This is simple way to do this..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜