I have a grid of buttons arranged in a 2x4 layout. I am looking to create both an up bitmap for each button and a "pressed" bitmap for each button. All buttons are created at run time and are assigned a background and pressed images stored in two 8-element arrays. one array contains up image and another for the down image. I need help with code to assign a bitmap for at least one of my buttons during run time. Any example showing how to do this for a single button will work fine for me. Once I have this I can apply it to the rest of my code.
I have been looking at statelist drawable code and believe this is the answer to my problem but need some guidance working with a button rather than another object. I am not using the designer because the code I have is working just fine for my grid at runtime. I am putting this in a separate activity module to be reused with future projects. I am using the AHdashboard library to generate the grid and all except the bitmap section of the code is working so far.
Any ideas how to assign display the two bitmaps to a single button?
thx,
Ray
I have been looking at statelist drawable code and believe this is the answer to my problem but need some guidance working with a button rather than another object. I am not using the designer because the code I have is working just fine for my grid at runtime. I am putting this in a separate activity module to be reused with future projects. I am using the AHdashboard library to generate the grid and all except the bitmap section of the code is working so far.
Any ideas how to assign display the two bitmaps to a single button?
thx,
Ray