Android Question Why is the ImageView1.Bitmap and Button1.Text NOT changing by "N"?

Discussion in 'Android Questions' started by sibutr, Sep 7, 2015.

  1. sibutr

    sibutr Member Licensed User

    Sub Globals
    DimButton1AsButton : DimBitmapTempAsBitmap : PrivateImageView1AsImageView​

    End Sub

    Sub Activity_Create(FirstTime AsBoolean)
    Activity.LoadLayout("LayOutTest")​

    End Sub

    Sub Button1_Click
    For N = 1 To 6
    BitmapTemp.Initialize(File.DirAssets, N & ".jpg")
    ImageView1.Bitmap = BitmapTemp
    Button1.Text= N


    For t = 1 To 60000000 : Next ' Delaying ( Pause )
    Next

    End Sub
     

    Attached Files:

    Last edited: Sep 7, 2015
  2. DonManfred

    DonManfred Expert Licensed User

    You CAN NOT stop the main thread. It works. But all you can see is probably just the LAST image...
     
  3. Johan Schoeman

    Johan Schoeman Expert Licensed User

    Try the attached. It will change when you click the button. If you want a delay then you should use a timer and not a for/next loop
     

    Attached Files:

  4. Johan Schoeman

    Johan Schoeman Expert Licensed User

    And this will do it automatically with a timer (i.e without having to click the button)
     

    Attached Files:

    sibutr likes this.
  5. sibutr

    sibutr Member Licensed User

    Thanks Johan, now I have my working Code.
     

    Attached Files:

    Johan Schoeman and DonManfred like this.
Loading...
  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