Cannot start activity with XmlLayoutBuilder - Load Xml layouts

Nickle

Member
Licensed User
Longtime User
Hi There, I have tried and managed to get my xml from Android Studio to my Project in B4A and screen look exactly as in Android Studio, Issue now is, If I click on Login button with Sub Login_click event, nothing happens. I have also given the Android Tag Name as per tutorial.

Is there something I am missing...

B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim btnLogin As Button
    Dim btnLinkToRegisterScreen As Button
    Dim vdsLogo As ImageView
    Dim vMobile As EditText
    Dim vPassword As EditText

End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Dim x As XmlLayoutBuilder
    x.LoadXmlLayout(Activity, "activity_login")
    Dim tc As Int = 0xffffffff
    Activity.Color = tc
    vdsLogo = x.GetView("vdsLogo")
    vMobile = x.GetView("mobile")
    vPassword = x.GetView("password")
    Login = x.GetView("btnLogin")

End Sub

Sub btnLogin_click
    Log("Testing")
End Sub


B4X:
    <Button
        android:id="@+id/btnLogin"
        android:layout_width="250dp"
        android:layout_height="60dp"
        android:text="Sign IN"
        android:layout_marginTop="70dp"
        android:textStyle="bold"
        android:background="@drawable/button_background_blue"
        android:tag="btnLogin"/>
 

Nickle

Member
Licensed User
Longtime User
Yes, Aside this I have other xml that I need to import to B4A so if I can get someone t work with me on that for a charge...
 

Star-Dust

Expert
Licensed User
Longtime User
I do not think the job offer is understandable.

Want to be taught to develop B4A?
You do not know how to import XML from AS and want someone else to do it for you?
 
Top