1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Bug? Bug? Or Strange Attractors?

Discussion in 'Bugs & wishlist' started by William Lancee, May 20, 2019.

  1. William Lancee

    William Lancee Member Licensed User

    As is common in this forum, bugs are often caused by lack of full understanding of the underlying processes. This may be one of those. Nevertheless, I found it interesting and challenging to solve.

    In my app, an editText appears to magically change shape, based on a strange attraction to the activity of another editText.

    Press "Return" on soft keyboard to advance to next part.

    Attached Files:

    Last edited: May 21, 2019
  2. DonManfred

    DonManfred Expert Licensed User

    My first thought when seeing your code: You should never reuse the same drawable with multiple/different views. Add a third Option to the thread title: "Coding error/mistake".

    Sub CreateCD() As ColorDrawable
    Dim cd As ColorDrawable
    Colors.RGB(240240 ,255), 3dip1dipColors.Black)
    Return cd
    End Sub
    Sub Activity_Create(FirstTime As Boolean)
    Activity.Color = Colors.RGB(245,245,245)

        editBox.TextSize = 
        editBox.TextColor = 
        editBox.Gravity = 
        editBox.Visible = 
        editBox.Background = CreateCD
        editBox.InputType = 
    Bit.Or(editBox.InputType, 524288)        'to remove autosuggest
        Activity.addView(editBox, 10%x33%y80%x25%y)
        inputBox.TextSize = 
        inputBox.TextColor = 
        inputBox.Visible = 
        inputBox.Background = CreateCD
        inputBox.InputType = 
    Bit.Or(inputBox.InputType, 524288)        'to remove autosuggest
        Activity.addView(inputBox, 50%x10%y20%x5%y)

    Dim alphnum As String = "abcdefghijklmnopqrstuvwxyz"
        alphnum = alphnum & alphnum.toUppercase & 
        kbInput.SetCustomFilter(inputBox, inputBox.INPUT_TYPE_TEXT, alphnum)

        kbEdit.SetCustomFilter(editBox, editBox.INPUT_TYPE_TEXT, alphnum)

    "showProblem")         'callSubDelayed to let the kb handlers get ready
    End Sub
    Last edited: May 21, 2019
  3. William Lancee

    William Lancee Member Licensed User

  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