Sinan Tuzcu Well-Known Member Licensed User Longtime User Aug 20, 2021 #1 Hi, is there an option to change the Z-Order of LeftMenu? Because I have created a dynamic scrollview on the Main Activity and if I open the Left menu, then the left menu slide under the scrollview. BR Sinan
Hi, is there an option to change the Z-Order of LeftMenu? Because I have created a dynamic scrollview on the Main Activity and if I open the Left menu, then the left menu slide under the scrollview. BR Sinan
Jeffrey Cameron Well-Known Member Licensed User Longtime User Aug 20, 2021 #2 I've not used the control, but you could try something like Code: LeftMenu.GetBsae.Elevation = 20dip Upvote 0
Sinan Tuzcu Well-Known Member Licensed User Longtime User Aug 20, 2021 #3 Unfortunately not. there is only Upvote 0
Alexander Stolte Expert Licensed User Longtime User Aug 20, 2021 #4 ExtraWidth is for the swipe area. Upvote 0
Sinan Tuzcu Well-Known Member Licensed User Longtime User Aug 20, 2021 #5 Extrawidth responsible for width not for stay on top Upvote 0
Alexander Stolte Expert Licensed User Longtime User Aug 20, 2021 #6 just "LeftPanel.Top = 10dip" ? Upvote 0
Sinan Tuzcu Well-Known Member Licensed User Longtime User Aug 21, 2021 #8 That happens if I create the scroll view dynamic only And this Drawer.LeftPanel.BringToFront doesn't works Last edited: Aug 21, 2021 Upvote 0
That happens if I create the scroll view dynamic only And this Drawer.LeftPanel.BringToFront doesn't works
Alexander Stolte Expert Licensed User Longtime User Aug 21, 2021 #9 Does anyone have a crystal ball and can look into their code? Upvote 0
Sinan Tuzcu Well-Known Member Licensed User Longtime User Aug 21, 2021 #10 B4X: #Region Project Attributes #ApplicationLabel: B4A Example #VersionCode: 1 #VersionName: 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: unspecified #CanInstallToExternalStorage: False #End Region #Region Activity Attributes #FullScreen: False #IncludeTitle: True #End Region #Extends: android.support.v7.app.AppCompatActivity Sub Process_Globals End Sub Sub Globals Private ACToolBarLight1 As ACToolBarLight Private ToolbarHelper As ACActionBar Private Drawer As B4XDrawer Private ListView1 As ListView Private ScrollView1 As ScrollView Private Button1 As Button End Sub Sub Activity_Create(FirstTime As Boolean) Drawer.Initialize(Me, "Drawer", Activity, 300dip) Drawer.CenterPanel.LoadLayout("1") ToolbarHelper.Initialize ToolbarHelper.ShowUpIndicator = True 'set to true to show the up arrow Dim bd As BitmapDrawable bd.Initialize(LoadBitmap(File.DirAssets, "hamburger.png")) ToolbarHelper.UpIndicatorDrawable = bd ACToolBarLight1.InitMenuListener Drawer.LeftPanel.LoadLayout("Left") For i = 1 To 30 ListView1.AddSingleLine("Item " & i) Next ScrollView1.Initialize(100dip) ScrollView1.Color=Colors.White Activity.AddView(ScrollView1, 5dip, Button1.Top + Button1.Height, 70%x - 10dip, 70%y - (Button1.Top + Button1.Height)) Drawer.LeftPanel.BringToFront End Sub Sub ACToolBarLight1_NavigationItemClick Drawer.LeftOpen = Not(Drawer.LeftOpen) End Sub Sub Activity_KeyPress (KeyCode As Int) As Boolean If KeyCode = KeyCodes.KEYCODE_BACK And Drawer.LeftOpen Then Drawer.LeftOpen = False Return True End If Return False End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub pls see in attachment Attachments AppCompat.zip AppCompat.zip 11.6 KB · Views: 575 Upvote 0
B4X: #Region Project Attributes #ApplicationLabel: B4A Example #VersionCode: 1 #VersionName: 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: unspecified #CanInstallToExternalStorage: False #End Region #Region Activity Attributes #FullScreen: False #IncludeTitle: True #End Region #Extends: android.support.v7.app.AppCompatActivity Sub Process_Globals End Sub Sub Globals Private ACToolBarLight1 As ACToolBarLight Private ToolbarHelper As ACActionBar Private Drawer As B4XDrawer Private ListView1 As ListView Private ScrollView1 As ScrollView Private Button1 As Button End Sub Sub Activity_Create(FirstTime As Boolean) Drawer.Initialize(Me, "Drawer", Activity, 300dip) Drawer.CenterPanel.LoadLayout("1") ToolbarHelper.Initialize ToolbarHelper.ShowUpIndicator = True 'set to true to show the up arrow Dim bd As BitmapDrawable bd.Initialize(LoadBitmap(File.DirAssets, "hamburger.png")) ToolbarHelper.UpIndicatorDrawable = bd ACToolBarLight1.InitMenuListener Drawer.LeftPanel.LoadLayout("Left") For i = 1 To 30 ListView1.AddSingleLine("Item " & i) Next ScrollView1.Initialize(100dip) ScrollView1.Color=Colors.White Activity.AddView(ScrollView1, 5dip, Button1.Top + Button1.Height, 70%x - 10dip, 70%y - (Button1.Top + Button1.Height)) Drawer.LeftPanel.BringToFront End Sub Sub ACToolBarLight1_NavigationItemClick Drawer.LeftOpen = Not(Drawer.LeftOpen) End Sub Sub Activity_KeyPress (KeyCode As Int) As Boolean If KeyCode = KeyCodes.KEYCODE_BACK And Drawer.LeftOpen Then Drawer.LeftOpen = False Return True End If Return False End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub pls see in attachment
Alexander Stolte Expert Licensed User Longtime User Aug 21, 2021 #11 Sinan Tuzcu said: Activity.AddView(ScrollView1, 5dip, Button1.Top + Button1.Height, 70%x - 10dip, 70%y - (Button1.Top + Button1.Height)) Click to expand... instead of this: B4X: Activity.AddView(ScrollView1, 5dip, Button1.Top + Button1.Height, 70%x - 10dip, 70%y - (Button1.Top + Button1.Height)) make this: B4X: Drawer.CenterPanel.AddView(ScrollView1, 5dip, Button1.Top + Button1.Height, 70%x - 10dip, 70%y - (Button1.Top + Button1.Height)) Upvote 0
Sinan Tuzcu said: Activity.AddView(ScrollView1, 5dip, Button1.Top + Button1.Height, 70%x - 10dip, 70%y - (Button1.Top + Button1.Height)) Click to expand... instead of this: B4X: Activity.AddView(ScrollView1, 5dip, Button1.Top + Button1.Height, 70%x - 10dip, 70%y - (Button1.Top + Button1.Height)) make this: B4X: Drawer.CenterPanel.AddView(ScrollView1, 5dip, Button1.Top + Button1.Height, 70%x - 10dip, 70%y - (Button1.Top + Button1.Height))
Sinan Tuzcu Well-Known Member Licensed User Longtime User Aug 21, 2021 #13 Hi, how can do this in this case? B4X: accord.Initialize(Me,"accord") accord.AddToParent(Activity,0dip,Label1.height + Label1.Top,100%x,100%y - Panel1.height) accord.addPanel(41dip, 290dip, createPanel("Settings",Colors.ARGB(255,255,255,255),0)) I have do this Drawer.CenterPanel.Parent.AddView(accord,0dip,Label1.height + Label1.Top,100%x,100%y - Panel1.height) but I get an error Upvote 0
Hi, how can do this in this case? B4X: accord.Initialize(Me,"accord") accord.AddToParent(Activity,0dip,Label1.height + Label1.Top,100%x,100%y - Panel1.height) accord.addPanel(41dip, 290dip, createPanel("Settings",Colors.ARGB(255,255,255,255),0)) I have do this Drawer.CenterPanel.Parent.AddView(accord,0dip,Label1.height + Label1.Top,100%x,100%y - Panel1.height) but I get an error
Sinan Tuzcu Well-Known Member Licensed User Longtime User Aug 21, 2021 #14 Nobody has an idea? Upvote 0
Alexander Stolte Expert Licensed User Longtime User Aug 21, 2021 #16 and what was the problem? Upvote 0
Sinan Tuzcu Well-Known Member Licensed User Longtime User Aug 23, 2021 #17 accord.AddToParent(Drawer.CenterPanel,0dip,Label1.height Upvote 0
Chris Guanzon Active Member Licensed User Longtime User Aug 23, 2021 #18 To move the scrollview under the drawer, just add scrollview.sendtoback Upvote 0
Alexander Stolte Expert Licensed User Longtime User Aug 23, 2021 #19 Chris Guanzon said: To move the scrollview under the drawer, just add scrollview.sendtoback Click to expand... thats false, because the drawer.centerpanel above the activity, a .sendtoback would not have helped in this case. Upvote 0
Chris Guanzon said: To move the scrollview under the drawer, just add scrollview.sendtoback Click to expand... thats false, because the drawer.centerpanel above the activity, a .sendtoback would not have helped in this case.
Chris Guanzon Active Member Licensed User Longtime User Aug 23, 2021 #20 Alexander Stolte said: thats false, because the drawer.centerpanel above the activity, a .sendtoback would not have helped in this case. Click to expand... I already tried and tested it: Attachments AppCompat.zip AppCompat.zip 11.6 KB · Views: 519 Upvote 0
Alexander Stolte said: thats false, because the drawer.centerpanel above the activity, a .sendtoback would not have helped in this case. Click to expand... I already tried and tested it: