Android Question Transparent Button Question

Andrew A Gray

Member
Licensed User
I read this:
https://www.b4x.com/android/forum/t...hat-changes-color-when-clicked.37935/#content

OK, so I edited a "1.ccs" file like you instruct and put it into "Files"

Then I added it.

Then I typed in the code "MyButton.StyleClasses " and got an
"Unknown member StyleClasses".

OK, so I searched and found that I needed to add CSSUtils.
So I added CSSUtils and got a missing library warning.

OK, so I searched and found out that I need the jfx library.
So I added the jfx library to my Libraries directory.

As soon as I did this, the "StyleClasses unknown member" went away,
but now I have

"Unknown member geturi"
"Unknown member checked"

for
B4X:
Dim uri As String = File.GetUri(Dir, FileName)
data = Array as Object(toggle.Checked)
data = Array as Object(radio.Checked)

in StateManager.



It is a little disconcerting to go through this process and not know what to do with no
more documentation that I can find.
Help?

How to fix "geturi" and "checked" "unknown member" errors in StateManager now that jfx is added.
(uncheck jfx and these errors go away while returning "unknown type jfx" error)

Thanx for your help in advanced.
 
Last edited:

Andrew A Gray

Member
Licensed User
OK, Thanx, Stevel05!

It turns out that if you make the button "StateListDrawable" under the button properties in the Designer Properties Window, then the button is transparent by default. That is all I had to do was change "Drawable" from "DefaultDrawable" to "StateListDrawable" and the button became transparent.

B4X:
MyButton.Color = Colors.Transparent

was available but not necessary. The text of the button shows up with a transparent background with no border. That is what I wanted!

Thanx Again!
 
Upvote 0
Top