73Challenger Member Licensed User Jan 3, 2023 #1 (Screenshots below) I'm having an interesting issue with the tab strip control. When scrolling through the tabs, some of my panel borders resize themselves in an odd way. Please see the screen shots below. 1. Normal condition on "dash" tab after entering data. Borders are full size. 2. Scroll to "other" tab. 3. Scroll back to "dash" tab....borders "shrink." I manually draw these by applying a ColorDrawable object to the B4XView Panel. The borders re-draw normally after the next data point is entered. It's not a huge deal just kind of untidy. I thought I'd see if any of you all have encountered something like this. I've been thinking of converting to a different tab strip architecture/library at some point. This might be a good time to look into that as well. Appreciate it if anyone has any thoughts. Thanks much!
(Screenshots below) I'm having an interesting issue with the tab strip control. When scrolling through the tabs, some of my panel borders resize themselves in an odd way. Please see the screen shots below. 1. Normal condition on "dash" tab after entering data. Borders are full size. 2. Scroll to "other" tab. 3. Scroll back to "dash" tab....borders "shrink." I manually draw these by applying a ColorDrawable object to the B4XView Panel. The borders re-draw normally after the next data point is entered. It's not a huge deal just kind of untidy. I thought I'd see if any of you all have encountered something like this. I've been thinking of converting to a different tab strip architecture/library at some point. This might be a good time to look into that as well. Appreciate it if anyone has any thoughts. Thanks much!
Erel B4X founder Staff member Licensed User Longtime User Jan 3, 2023 #2 73Challenger said: I manually draw these by applying a ColorDrawable object to the B4XView Panel. Click to expand... You are probably reusing the same ColorDrawable with multiple views. Tip: I never use ColorDrawable. Cast the panel to B4XView and use B4XView.SetColorAndBorder. Upvote 0
73Challenger said: I manually draw these by applying a ColorDrawable object to the B4XView Panel. Click to expand... You are probably reusing the same ColorDrawable with multiple views. Tip: I never use ColorDrawable. Cast the panel to B4XView and use B4XView.SetColorAndBorder.
73Challenger Member Licensed User Jan 3, 2023 #3 Thank you @Erel I was doing exactly as you described. I changed all my border controls to B4XView.SetColorAndBorder as suggested and it worked. Bonus....my borders look MUCH cleaner/better now as well. I've also learned something...all this time I've been casting to "View" in my B4X projects, I'm happy to learn the correct way is to cast to "B4XView." Thanks again! Time to refactor Upvote 0
Thank you @Erel I was doing exactly as you described. I changed all my border controls to B4XView.SetColorAndBorder as suggested and it worked. Bonus....my borders look MUCH cleaner/better now as well. I've also learned something...all this time I've been casting to "View" in my B4X projects, I'm happy to learn the correct way is to cast to "B4XView." Thanks again! Time to refactor
Erel B4X founder Staff member Licensed User Longtime User Jan 4, 2023 #4 73Challenger said: I'm happy to learn the correct way is to cast to "B4XView." Click to expand... For most views you can simply declare them as B4XView. Upvote 0
73Challenger said: I'm happy to learn the correct way is to cast to "B4XView." Click to expand... For most views you can simply declare them as B4XView.