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