Android Question TimeDialog under Android 6 (API23) - empty

Discussion in 'Android Questions' started by peacemaker, Mar 25, 2016.

  1. peacemaker

    peacemaker Well-Known Member Licensed User

    HI, All

    Under Android 5.1.1 - TimeDialog is still OK.
    But not under Android 6.
    Lib v.2.92.
     

    Attached Files:

    • 5.1.1.png
      5.1.1.png
      File size:
      104.8 KB
      Views:
      327
    • 6.0.png
      6.0.png
      File size:
      76.8 KB
      Views:
      375
    Last edited: Mar 25, 2016
  2. Erel

    Erel Administrator Staff Member Licensed User

    MarcoRome likes this.
  3. Marc De Loose

    Marc De Loose Member Licensed User

    I have a similar problem and have no clue how to solve it: I am on the latest version and android 7 this is the code.
    THe dialog shows as in the above post:

    Any help how to rewrite it so it works is appreciated. thx

    Code:
    If LOCKED_STATE = False Then
            
    Dim td As TimeDialog
            
    Dim huidige=lEttape.get(params.LastKnown) As Ettape
            td.Is24Hours = 
    True
            
    If params.LastKnown > 0 Then
                
    Log (huidige)
                
    If huidige.rusttijd.Length < 5 Then huidige.rusttijd = 0 & huidige.rusttijd
                
    Log (huidige)
                td.Hour = huidige.rusttijd.SubString2(
    0,2)
                td.Minute = huidige.rusttijd.SubString2(
    3,5)
                
    If td.Show("Pauze","","ok","cancel","",Null) = DialogResponse.POSITIVE Then
                    
    Log (huidige)
                    huidige.rusttijd= 
    NumberFormat(td.Hour,2,0) & ":" & NumberFormat(td.Minute,2,0)
                    huidige.Vertrek = 
    DateTime.TIME(DateTime.TImeParse(huidige.Aankomst)+ DateTime.TimeParse(huidige.rusttijd))
                    lEttape.Set(params.LastKnown,    huidige    ) 
    ''write in list
                    Log (huidige)
                    CalculateEtappes(
    True)
                    UpdatePanel1(params.LastKnown)
                
    End If
            
    End If
        
    End If
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    What is the device orientation? It should be portrait.
     
  5. Marc De Loose

    Marc De Loose Member Licensed User

    Its indeed landscape. I was trying to reuse and old app I made and the dialog box showed up empty. It used to work perfectly.

    There is no easy fix ?
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    It is a bug in some Android versions. I've tested it with Android 8 and it works fine in landscape mode.

    Tested with this code:
    Code:
    Sub Activity_Click
       
    Dim td As TimeDialog
       td.TimeTicks = 
    DateTime.Now
       
    Dim sf As Object = td.ShowAsync("""Select time""Yes""""Cancel"NullFalse)
       
    Wait For (sf) Dialog_Result(Result As Int)
       
    If Result = DialogResponse.POSITIVE Then
         
    Log(DateTime.Time(td.TimeTicks))
       
    End If
    End Sub
    Worth testing it with and without a title.
     
  7. Marc De Loose

    Marc De Loose Member Licensed User

    YES YES I changed the platform path to android-8 and the targetSDK in the manifest to 8 and BOOM it worked as it always was. In landscape.
    THX for the help!!
     
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