B4J Question [ABMaterial] ABMDateTimePicker showing OK button outside the frame

Anser

Well-Known Member
Licensed User
Longtime User
Hi,

I am sure that this is definitely some mistake that I have done in my code. As am I am newbie just need some help.

In the ABMDateTimePicker section in the demo application hosted at http://abmaterial.com is working fine, but when I try to do the same in my application, the OK button is displayed outside the ABMDateTime Picker window. Can anyone point me where I am going wrong.

Here are the pictures of what I am trying to explain.

The correct one in the ABMMaterial Demo application

Correct.png



The problem in my application

Wrong.png



Here is the relevant code that I have used
B4X:
public Sub BuildPage()
    ' initialize the theme
    BuildTheme
   
    ' initialize this page using our theme
    page.InitializeWithTheme(Name, "/ws/" & ABMShared.AppName & "/" & Name, False, ABMShared.SessionMaxInactiveIntervalSeconds, theme)
    page.ShowLoader=True
    page.PageHTMLName = "AddCustomer.html"
    page.PageTitle = ""
    page.PageDescription = ""
    page.PageKeywords = ""
    page.PageSiteMapPriority = ""
    page.PageSiteMapFrequency = ABM.SITEMAP_FREQ_YEARLY
       
    page.ShowConnectedIndicator = True
               
    ' adding a navigation bar
    ABMShared.BuildNavigationBar(page, "Add Customer","../images/logo.png", "", "", "")
   
    'page.DebugConsoleEnable(True,250)
                   
    ' create the page grid
    page.AddRows(1,True, "").AddCells12(1,"centre")
    page.AddRows(2,True, "").AddCellsOS(2,0,0,0,6,6,6,"")
    page.AddRows(1,True, "").AddCells12(1,"")
    page.AddRows(1,True, "").AddCellsOS(2,0,0,0,6,6,6,"")
   
    page.BuildGrid 'IMPORTANT once you loaded the complete grid AND before you start adding components           
End Sub

public Sub ConnectPage()       
   '   connecting the navigation bar   
   ABMShared.ConnectNavigationBar(page)
   
   ' add your own components
   
   Dim inp2 As ABMInput
   inp2.Initialize(page, "inp2", ABM.INPUT_TEXT, "Last Name", False, "input")
   inp2.PlaceHolderText = "Last name"
   page.Cell(2,2).AddComponent(inp2)
   
   Dim myDtPicker As ABMDateTimePicker
   DateTime.DateFormat = "yyyy-MM-dd"
   myDtPicker.Initialize(page,"myDtPicker",ABM.DATETIMEPICKER_TYPE_DATE,DateTime.Now,"Date of birth","picker")
   myDtPicker.Language = "en"
   myDtPicker.CancelText = "Cancel"
   myDtPicker.PickText = "Ok"
   myDtPicker.TodayText = "Today"
'   myDtPicker.ClearText = "Clear"
   myDtPicker.FirstDayOfWeek = ABM.FIRSTDAYOFWEEK_MONDAY
   myDtPicker.ReturnDateFormat = "YYYY-MM-DD"
   myDtPicker.ReturnTimeFormat = ""
   page.Cell(3,1).AddComponent(myDtPicker)

  ' refresh the page   
   page.Refresh     
   
   ' Tell the browser we finished loading
   page.FinishedLoading
   ' restoring the navigation bar position
   page.RestoreNavigationBarPosition
End Sub

Any help will be appreciated
 

alwaysbusy

Expert
Licensed User
Longtime User
You should upgrade to 4.03 as it was fixed in Dragonfly 4.00. You can download the newest version from https://www.b4x.com/android/forum/threads/abmaterial-framework-for-webapps.60072/

Make sure you reed the CheckList 4.00 pdf file!

Note that you don't need to be a donator to use the feedback app. All this info is in there. Just drop a PM with your email and I'll create a guest account. You can see/add/comment cases in the feedback app.
 
Upvote 0

Anser

Well-Known Member
Licensed User
Longtime User
Just one more doubt.

To use ABMaterial 4.03, should I upgrade my current stable B4J v 5.90 to the B4J 6.0 beta ? OR can I continue using the current B4J 5.90 ?
 
Upvote 0
Top