B4A Library [B4X] B4XThreeState - B4XView

I needed something similar to StateListDrawable B4A but cross-platform (B4X).

Since I was in a hurry, I settled for developing it just for the images.

Obviously you can replace the 3 images (for the 3 states: ENABLED, DISABLED, PRESSED) via properties.

Events: Click and LongClick.



I don't own Apple stuff (iOS, Mac, ...), so I can't guarantee that it will also work with B4i (but being a B4XLib library, you have the source code and can fix it if necessary).

 

Attachments

  • B4XThreeState.b4xlib
    37.4 KB · Views: 174
Last edited:

LucaMs

Expert
Licensed User
Longtime User
Cool, it seems like it has a bug
I was in too much of a hurry.

For some strange reason the B4XImageView used seems not to be ready when you set other images (strange, because in the example, the animated gif, it works without problems).

Now I can't fix it, I don't have time; I'll do it in a couple of hours, most likely. Besides, I also have to create a thread for this today, which should be ok.
 

LucaMs

Expert
Licensed User
Longtime User

Fixed.
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…