IconButton - Add a icon or an Picture to a button

DonManfred

Expert
Licensed User
Longtime User
Sorry, no.
there is no method in the lib to do this.
 

Dave O

Well-Known Member
Licensed User
Longtime User
I have been using iconButton in a new app I'm developing, and just tried changing the typeface to FontAwesome (using the new B4A icon-font feature).

If I change it in the designer, it doesn't change the typeface in the running app.

But if I change it in code (by assigning the typeface from another button's FA typeface), it works just fine.

So, it seems that the Designer is not honoring that setting for Typeface. Bug?
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
maybe. Probably. i dont think that changing the typeface is part of the lib. Additionally it was written before B4A introduced the new Typefacechanges.


But i can´t check it as yet. I damaged a hdd yesterday :-( ... The sata-connection is broken...

Sadfully it is my Developmentdisc. All my libs, all my b4a sources... :mad:

It can be fixed maybe but it will take some time. A good friend, an electrican, said he can probably fix it...

Ask again in two weeks i would say. Hopefully i can look at it then. For now you need to use it by code.
 

Dave O

Well-Known Member
Licensed User
Longtime User
Sorry to hear about your disk failure. A competent tech should be able to wire a new SATA connector/cable to it. Hope you can recover your data, from the drive or a backup.

No worries on the Typeface problem, I've worked around it for now.

Thanks!
 

DonManfred

Expert
Licensed User
Longtime User
A competent tech should be able to wire a new SATA connector/cable to it.
This is one i trust. I´m positive....

or a backup.
That´s the problem! :-/ My Backupdisc died a few weeks ago and i did not replaced it in the meantime (had no time to buy one). Murphys Law can be hard sometimes :D

I should backup it on Dropbox (i have a Pro-Account) o_O
 

MaFu

Well-Known Member
Licensed User
Longtime User
This is one i trust. I´m positive....


That´s the problem! :-/ My Backupdisc died a few weeks ago and i did not replaced it in the meantime (had no time to buy one). Murphys Law can be hard sometimes :D

I should backup it on Dropbox (i have a Pro-Account) o_O
A damaged backup weeks ago and no time to replace: shame on you.
For a correct backup you should use at least two backup disc's in turn. Because your pc can crash during backup and may damage all connected drives.
 

Dave O

Well-Known Member
Licensed User
Longtime User
Hi @DonManfred , I hope you were able to recover your drive.

For IconButton, do you know the minimum Android version needed?

I tried testing my app on some emulated devices, and iconButton reported "method not found" on an Android 4.0 device. I'll do some further testing, but thought I'd ask in the meantime.

Cheers!
 

DonManfred

Expert
Licensed User
Longtime User

DonManfred

Expert
Licensed User
Longtime User
But if I change it in code (by assigning the typeface from another button's FA typeface), it works just fine.

So, it seems that the Designer is not honoring that setting for Typeface. Bug?
Probably

I´ll do a new wrap for this project.
 

DonManfred

Expert
Licensed User
Longtime User
If I change it in the designer, it doesn't change the typeface in the running app.

But if I change it in code (by assigning the typeface from another button's FA typeface), it works just fine.

So, it seems that the Designer is not honoring that setting for Typeface. Bug?


Today i rewrote the wrap. The Method to change the Typeface is a selfmade method. this is the cause why it works in code.

Setting it in the designer:
Honestly i do not know how to read the Typeface you set in the designer to set it to the customview...

So, even if i rewrote the wrapper; the problem persists. Sorry.
 

Dave O

Well-Known Member
Licensed User
Longtime User
No worries, I'm still using 1.11 and it's working pretty well so far for me. Thanks! :)
 

Dave O

Well-Known Member
Licensed User
Longtime User
FYI, iconButton seems to need Android 4.1.2 (API 16) or later.

It ran fine on those, but crashed on Android 4.0.3 (API 15), so I suspect API 16 is the minimum.
 

Javier Campo Martinez

Member
Licensed User
Hi DonManfred !!!
Excellent library !!!! 5 stars of 5 ... !!!
I just have a question .... the text inside the button is entirelly capitalized ... how can i make to put it in mixed caps?


Thanks in advance.
 

Rusty

Well-Known Member
Licensed User
Longtime User
Can the iconbutton use a statelist drawable that includes the Disabled attribute?
Rusty
 

Zlgo

Member
it is not possible
I'm looking in this example (given with lib) and found out that events EventName_Down() and counterpart EventName_Up() fire almost in same time. Maybe I'm wrong but this has to behave in role like "finger on buton" fire EventName_Down() and releasing fire EventName_Up(). Same thing hapend with EventName_HoverEnter() and
EventName_HoverExit() , so can't detect that user move finger from button.
 
Top