Android Question text at the labels and buttons are wrapped in different screen sizes

Baris Karadeniz

Active Member
Licensed User
I have a very simple view app. There are labels and buttons. And tere are texts on them. I added all labels and buttons in the designer. And I used horizontal anchors for labels and buttons.

I used AutoScale and AutoScaleRate in the designer. Labels and buttons are ok but the texts on them are wrapped at the different screen sizes (UI Cloud). How can I solve this problem? Why AutoScaleRate doesn't work for the texts? I searched forums, there are many complicated solutions. Can anyone give a simple solution for this problem? Just the text should fit on the label and buttons.

Designer script;

B4X:
'All variants script
AutoScaleRate(0.3)
AutoScaleAll
 

klaus

Expert
Licensed User
Longtime User
Modify the Activity_KeyPress routine like below:
Add these two lines:
Else If PanelMain.Visible = True Then
Return False

Return False will not consume the event, it will be transmitted to the system and pauses the program.
That's the 'standard' way to leave a program.

B4X:
Sub Activity_KeyPress (KeyCode As Int) As Boolean       'Return True to consume the event
    If KeyCode = KeyCodes.KEYCODE_BACK Then
        If PanelMap.Visible = True And WebViewMap.Url.Contains("http://www.taksi-m.com.tr/track") = True Then
            BtnMapBack_Click
        Else If PanelMap.Visible = True And CanGoBack(WebViewMap) Then     'test if webview can go back another page
            WebViewMap.Back
        Else If PanelMessage.Visible = True Then
            BtnMessageBack_Click
        Else If PanelCamera.Visible = True Then
            BtnCameraBack_Click
        Else If PanelStatus.Visible = True Then
            BtnStatusBack_Click
        Else If PanelDrvUserManual.Visible = True Then
            BtnDrvUserManualBack_Click
        Else If PanelLanguage.Visible = True Then
            PanelLanguage.Visible = False
        Else If PanelMain.Visible = True Then
            Return False
        End If
    End If
    Return True
End Sub
 
Upvote 0

Baris Karadeniz

Active Member
Licensed User
I tried. If I leave the app with Back Key, System On/Off and Occupied/Unoccupied button commands are lost. It exists the app totally. But, user commands should stay. In this case, home button is better for me?
 

Attachments

  • TaksimDriver20B4Ax.zip
    27.3 KB · Views: 107
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…