F Frank.G Member Licensed User Longtime User Jun 20, 2019 #1 Hi, as my app is growing I encountered a "problem" that I was not able to solve. Basically I implemented the B4ADrawer sliding menu from this thread https://www.b4x.com/android/forum/threads/97828 but without using any additional libary regarding Navigation bars. I created my own custom panel area at the top just with two buttons and a label. The left button (Burger design) to open my sliding menu other than swiping does not work when i put it into the full left corner. It seems that the swipe detection uses this space and prevents the button click. I moved the button in the designer about 30 to the right to catch the click. Is there any possibility to adjust this? Maybe adjust the sliding drawer to start below my navigation bar as I fear adjusting the swipe detection will leave it useless as to far to the edge for detection. I reviewd the B4XDrawer class but was not able to adjust something (still to new I think to fully understand). Regards Frank Edit:Screenshot Last edited: Jun 20, 2019
Hi, as my app is growing I encountered a "problem" that I was not able to solve. Basically I implemented the B4ADrawer sliding menu from this thread https://www.b4x.com/android/forum/threads/97828 but without using any additional libary regarding Navigation bars. I created my own custom panel area at the top just with two buttons and a label. The left button (Burger design) to open my sliding menu other than swiping does not work when i put it into the full left corner. It seems that the swipe detection uses this space and prevents the button click. I moved the button in the designer about 30 to the right to catch the click. Is there any possibility to adjust this? Maybe adjust the sliding drawer to start below my navigation bar as I fear adjusting the swipe detection will leave it useless as to far to the edge for detection. I reviewd the B4XDrawer class but was not able to adjust something (still to new I think to fully understand). Regards Frank Edit:Screenshot
Erel B4X founder Staff member Licensed User Longtime User Jun 21, 2019 #2 Clicks (without movement) should always work. If a precise click doesn't work then there is probably a different problem. You can modify Base_OnInterceptTouchEvent and check whether y < 30dip. If so then return False immediately. Upvote 0
Clicks (without movement) should always work. If a precise click doesn't work then there is probably a different problem. You can modify Base_OnInterceptTouchEvent and check whether y < 30dip. If so then return False immediately.
F Frank.G Member Licensed User Longtime User Jun 21, 2019 #3 Erel said: Clicks (without movement) should always work. If a precise click doesn't work then there is probably a different problem. You can modify Base_OnInterceptTouchEvent and check whether y < 30dip. If so then return False immediately. Click to expand... Hi Erel, Thx for the Info. I tried but unfortunate the changes did not solve the issue. As I also use the BTX4Table and TablePanel I also tried modifying this class, with no positive result. For further help request I attached the APP as a ZIP file. Internally I disabled all functions concerning the used database because of copyright issues. But the rest is functional and also the burger button is full on the left. Maybe someone has an idea whats going wrong. BTW Great support and swift responses Regards Frank Attachments PurCal.zip PurCal.zip 16 KB · Views: 550 Upvote 0
Erel said: Clicks (without movement) should always work. If a precise click doesn't work then there is probably a different problem. You can modify Base_OnInterceptTouchEvent and check whether y < 30dip. If so then return False immediately. Click to expand... Hi Erel, Thx for the Info. I tried but unfortunate the changes did not solve the issue. As I also use the BTX4Table and TablePanel I also tried modifying this class, with no positive result. For further help request I attached the APP as a ZIP file. Internally I disabled all functions concerning the used database because of copyright issues. But the rest is functional and also the burger button is full on the left. Maybe someone has an idea whats going wrong. BTW Great support and swift responses Regards Frank
Erel B4X founder Staff member Licensed User Longtime User Jun 23, 2019 #4 1. A non-process global should be initialized whenever the activity is created. Initializing it only when FirstTime is true is a bug. 2. You are not setting B4XDrawer correctly. All the layout should be added to Drawer.CenterPanel. Otherwise it will not work properly. Upvote 0
1. A non-process global should be initialized whenever the activity is created. Initializing it only when FirstTime is true is a bug. 2. You are not setting B4XDrawer correctly. All the layout should be added to Drawer.CenterPanel. Otherwise it will not work properly.
F Frank.G Member Licensed User Longtime User Jun 23, 2019 #5 Erel said: 1. A non-process global should be initialized whenever the activity is created. Initializing it only when FirstTime is true is a bug. 2. You are not setting B4XDrawer correctly. All the layout should be added to Drawer.CenterPanel. Otherwise it will not work properly. Click to expand... I feel stupid now Looking at my code for hours and didn't realize that I commented out the line Code: Copy Drawer.CenterPanel.LoadLayout("form1") for setting up the drawer correctly. After un-comment the line the button worked as supposed, thx for the tip anyways. I also moved the part Code: Copy tp.Initialize(Me, "tp", Activity) tp.base.LoadLayout("form1") As I think that was the first of your comment regarding a non-process global. Marked as solved Frank Upvote 0
Erel said: 1. A non-process global should be initialized whenever the activity is created. Initializing it only when FirstTime is true is a bug. 2. You are not setting B4XDrawer correctly. All the layout should be added to Drawer.CenterPanel. Otherwise it will not work properly. Click to expand... I feel stupid now Looking at my code for hours and didn't realize that I commented out the line Code: Copy Drawer.CenterPanel.LoadLayout("form1") for setting up the drawer correctly. After un-comment the line the button worked as supposed, thx for the tip anyways. I also moved the part Code: Copy tp.Initialize(Me, "tp", Activity) tp.base.LoadLayout("form1") As I think that was the first of your comment regarding a non-process global. Marked as solved Frank