already did in my development versionadd Enabled property
will do for next releaseand a method to set Background
already did in my development versionadd Enabled property
will do for next releaseand a method to set Background
i dont think so. I dont think that i can implement this at all.
This lib EXTENDS the native Android Buttonobject. But in behind it is still a button with all it´s rules to place the text.
Maybe the lib can be extended with much more knowledge about the buttonobject but i dont know how
Great lib !
In your example when I click the button it "clicks" ok (it changes color for a few msecs so the user knows it'clicked..)
But in my App does not ,whats the problem ?
There is no Color propety in this lib. https://www.b4x.com/android/forum/t...-picture-to-a-button.50825/page-2#post-318721!
Yap,that was the problem ! Thanks
But how can i choose a background color and not lose the "click" functionality ?
Download the newest versionStill need the visible method.
** Activity (main) Create, isFirst = true **
Error occurred on line: 52 (Main)
java.lang.NullPointerException
at de.donmanfred.IconButtonWrapper.getHeight(IconButtonWrapper.java:273)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:636)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:302)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
at b4a.example.main.afterFirstLayout(main.java:100)
at b4a.example.main.access$100(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:78)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5021)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:827)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:643)
at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Resume **
Log(ib3.Height)
Shouldn't be a problem.
The standard button have a Gravity property for horizontal/vertical text aligning. The icon button miss this property and ignores the settings from designer.
If you add "Gravity" and additionally a property "IconGravity" with the same behaviour for the icon all text/icon position combinations are doable.