Android Question Half transparent buttons

Cadenzo

Active Member
Licensed User
Longtime User
I use in the IDE Designer Drawable: BitmapDrawable with a PNG as view backround. The buttons over this backroud immage are beautiful half transparent, but only on my developer smartphone. With other devices (younger and older OS versions) I get just buttons with 100% opacity, without any backround immage. How I should improve this?
 
Nobody any ideas? I tried some things with ManifestEditor, but without success :-( This is a screenshot how it should be: Screenshot_2017-08-07-23-08-08.png
 
Upvote 0
Thanks for answer. I will make a small project showing this problem. And I try to descripe it better.

I use the Designer in the B4A IDE. In Activity Properties I choose property Drawable: BitmapDrawable, I load a PNG-Bitmap and add some buttons (all in the designer tool).
So the effect on my phone is seen at the attached screenshot in #2. I like this buttons, which are a bit transparent, means, you can still see the piano-graphic in the backround. But on other phones you see the buttons without any transparenz.
 
Upvote 0
OK, here is a sample project. When I first time tried this backround-graphik and buttons, it was with that nice transparency and I thought, that it is a default. Now I see, that many phones do not show this, and my question is, can I force to be transparent on any phone?
 

Attachments

Upvote 0
In your project the Background Drawable for the Button is DefaultDrawable!
There are no images for the buttons like those in the image in post #2

upload_2017-8-12_17-54-5.png


So what do you expect?
I modified your project to show a semi-transparent button with a FontAwesome icon.

upload_2017-8-12_17-54-22.png
 

Attachments

Upvote 0
Wow, thank you, your example works!
OK, you use for the button StatelistDrawable, not DefaultDrawable like me. Beleve me, I never used StatelistDrawable, I even dont know what it is.
I used DefaultDrawable, but it was also good (transparent) on my main smartphone, only not on the others. So I did not know that this is the important property for me to change for my needs.

Great, only now I see, that with StatelistDrawable I can even set the transparency to a value I want, and set round corners and so on...

Thanks.
 
Last edited:
Upvote 0
Back
Top