Android 4+ doesn't allow applications to make network calls on the main thread. There is a good reason for this restriction as such calls cause the UI to freeze and after 5 second Android will show the "Application not responding" dialog.
Proper libraries take care of handling network calls...
When using full screen mode with the following code in Activity_Create:
B4X:
Sub GetRealSize As LayoutValues
Dim lv As LayoutValues
Dim p As Phone
If p.SdkVersion >= 17 Then
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim display As JavaObject =...
Purpose is to create a panel that clips its child views to a circle or rounded rect.
1. Set the round corners with the visual designer.
2. Use this code:
B4X:
Public Sub SetCircleClip (pnl As B4XView)
#if B4J
Dim circle As JavaObject
Dim radius As Double = Max(pnl.Width / 2, pnl.Height...
Hi,
I have a simple example of B4XComboBox and Spinner. when I do JavaObject. RunMethod("performClick",Null) it works on Spinner but not on B4XComboBox (see attached picture)
Is it possible to have "perform click" another way/other means for B4XComboBox?
Any help is appreciated
B4X:
'This...
Hi,
I have a simple example of B4XComboBox and Spinner. when I do JavaObject. RunMethod("performClick",Null) it works on Spinner but not on B4XComboBox (see attached picture)
Is it possible to have "perform click" another way/other means for B4XComboBox?
Any help is appreciated
B4X:
'This...
I have turned on the ability to select text on a label like this:
B4X:
Dim jo As JavaObject = Label
jo.RunMethod("setTextIsSelectable", Array As Object(True))
And using this method, I have created my custom-context-menu-for-text-selection :
Android Tutorial - Custom Context Menu for Text...
I have been using notificationListener for a while now and could not find the way on how to get the small icon, so I'm sharing this code that works for me, it gets the small icon but not the background color (don't know how to get it).
First we need to get the android.icon int and package name...
I've included the last B4XDrawer library
Android Tutorial - [B4X] B4XPages + B4XDrawer
B4XDrawer v1.53 adds support for B4J. This is a good opportunity to create a B4XPages example using B4XDrawer. It does require some configuration so pay attention. The example is based on the three pages...
Hi All
I am having an issue where my test app is crashing when moving to the second page of my App, It seems to relate to the left Pane drawer but I cant see what I am doing wrong.
Error log below, Also attached a sample project for reference.
One other question, How do I set the size for a...
Hi All.
I'm working on connection between ESP8266 and my B4A app. For a proper connection in perent of phone mobile data I should use PreferWifiRouting function that Erel presented here :
Erel: If you are using Android 5+ then you can try this solution
PreferWifiRouting:
Sub...
Hi all.
How can I initialize a class as a view?
I didn't understand the logic...
Example (Admob by @Erel )
B4X:
Private BannerAd As AdView
BannerAd.Initialize2("BannerAd", "ca-app-pub-3940256099942544/6300978111", BannerAd.SIZE_SMART_BANNER)
Dim height As Int
If...