Android Question Msgbox/Msgbox2 Label Wrap on non-Holo themes

Discussion in 'Android Questions' started by Jeffrey Cameron, Jun 17, 2015.

  1. Jeffrey Cameron

    Jeffrey Cameron Active Member Licensed User

    I have several customers still using old devices that are running gingerbread. This started sometime back in B4A version 4.x but I'm just now getting around to addressing it. Any long messages I display using the MsgBox or the MsgBox2 functions are not wrapped and any explicit CRLF pairs are ignored when the box is displayed, for example:
    Msgbox2("Line 1" & CRLF & "Really long line two to see if this wraps on the display." & CRLF & "Line 3""Wrap Test""""OK""",Null)
    will produce:
    I understand that I might be able to remove the theme entry from the manifest to fix this, or code my own message box function, but I was hoping there was something that can be done without a bunch of recoding or penalizing people with newer OS builds.

    Is there any way you can modify the label you're using in the message box to have explicit wrap, or is there any way through reflection to access the label you're using and set it myself?

    Thanks in advance,
    - Richard
  2. Erel

    Erel Administrator Staff Member Licensed User

    B4A msgbox is based on the standard AlertDialog. It doesn't add any label. You can use one of the other dialogs libraries that allow you to create a custom dialog.
  3. frapel

    frapel Active Member Licensed User

  4. mshafiee110

    mshafiee110 Member Licensed User

    I clear @android:style/Theme.Holo in manifest.and it work correctly.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice