javaobject

  1. practicalsoft

    B4X FEED Workaround the NetworkOnMainThread exception

    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...
  2. practicalsoft

    B4X FEED Full Screen

    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 =...
  3. practicalsoft

    B4X FEED [B4X] Round clipping panel

    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...
  4. practicalsoft

    B4X FEED [SOLVED]JavaObject RunMethod Perform Click Error on B4XComboBox

    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...
  5. practicalsoft

    B4X FEED JavaObject RunMethod Perform Click Error on B4XComboBox

    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...
  6. practicalsoft

    B4X FEED get selection on label

    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...
  7. practicalsoft

    B4X FEED NotificationListener get small icon

    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...
  8. practicalsoft

    B4X FEED B4XDrawer error object should first be initialized

    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...
  9. practicalsoft

    B4X FEED B4XPages & B4XDrawer -> App Crashes when Loading page with Drawer

    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...
  10. practicalsoft

    B4X FEED Being stuck in PreferWifiRouting

    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...
  11. practicalsoft

    B4X FEED How get class as view

    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...
عقب
بالا