Thank you. I knew there had to be a way.
Mark Murphy wrote:
Try Resources#getIdentifier().
Ok, here's the problem. I have a layout file with 25 ImageButtons in in
laid out in a 5x5 grid. During my application setup, I need to go
through and add onClick and onLongClick handlers to each butt
Alternatively, you could just create and set up these 25 buttons in code.
>for (int i = 0; i < R.attr.GRID_SIZE; ++i) {
> for (int j = 0; j < R.attr.GRID_SIZE; ++j) {
> ImageButton button = new ImageButton(this);
> setupButton(button,i,j);
>
Try Resources#getIdentifier().
> Ok, here's the problem. I have a layout file with 25 ImageButtons in in
> laid out in a 5x5 grid. During my application setup, I need to go
> through and add onClick and onLongClick handlers to each button and add
> the buttons to a local array. The problem is, I d
Ok, here's the problem. I have a layout file with 25 ImageButtons in in
laid out in a 5x5 grid. During my application setup, I need to go
through and add onClick and onLongClick handlers to each button and add
the buttons to a local array. The problem is, I don't want to explicitly
name every b
4 matches
Mail list logo