Android Question DateDialog Width?

LéonE

Member
Licensed User
Longtime User
Hi,

Is there a way to determine the width for a datedialog. what i mean: on a tablet the scroll day,month and year are shown. on phone "Year" it is not.

Thanks in advance,

Léone
 

LéonE

Member
Licensed User
Longtime User
Hi LucaMS,
i have dialogs 2.92

the code is simple-forward

B4X:
Dim strf1 As StringFunctions
    Dim b As EditText
    b=Sender
    Dim keuzeDate As String
    Dim ret As Int
    Dim Dd As DateDialog
    If passeddate="" Then
        Dd.Year = DateTime.GetYear(DateTime.Now)
        Dd.Month = DateTime.GetMonth(DateTime.Now)  
        Dd.DayOfMonth = DateTime.GetDayOfMonth(DateTime.Now)
    Else
        Dd.Year = strf1.Mid(passeddate,7,4)
        Dd.Month= strf1.Mid(passeddate,4,2)
        Dd.DayOfMonth = strf1.Mid(passeddate,1,2)
    End If
    ret=Dd.show("Start/end date", "", "OK", "CANCEL", "",Null)
    If ret=DialogResponse.CANCEL Then
        Return
    Else
        keuzeDate=NumberFormat(Dd.DayOfMonth,2,0) & "-" & NumberFormat(Dd.month,2,0) & "-" &  Dd.Year
        b.Text=keuzeDate
    'Msgbox(NumberFormat(Dd.DayOfMonth,2,0) & "-" & NumberFormat(Dd.month,2,0) & "-" &  Dd.Year,"Datum")
    End If

thanks for replying.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Sorry, but I'm going crazy!

I have an app that contains code very similar to yours.

The dialog that appears in my app does not have the calendar on the right side.

AND I CAN NOT FIND THE DIFFERENCES IN THE CODE.

Someone will respond (I hope)
 
Upvote 0

LéonE

Member
Licensed User
Longtime User
upload_2014-6-17_18-0-52.png


having. Api 19, 18, 8
 
Upvote 0

LéonE

Member
Licensed User
Longtime User
Both my test devices are above 14 (a-4.2 and 4.2.2). does this means i have less possibilities or is there no difference?
thanks
 
Upvote 0
Top