Paulsche Well-Known Member Licensed User Longtime User Mar 10, 2013 #1 i have a Tabhost and insert in a Layout in Designer a Scrollview with code Code: Copy AutoScaleAll SCV02KategorieListe.SetLeftAndRight(0,100%x) SCV02KategorieListe.SetTopAndBottom(10dip,80%y) In IDE Code Code: Copy Activity.AddView(TabHost1,0,0,100%x,100%y) The Right Position of Scrollview is not equal the Right of Tabhost. Whats Wrong ? Attachments scroll.jpg 13.1 KB · Views: 421
i have a Tabhost and insert in a Layout in Designer a Scrollview with code Code: Copy AutoScaleAll SCV02KategorieListe.SetLeftAndRight(0,100%x) SCV02KategorieListe.SetTopAndBottom(10dip,80%y) In IDE Code Code: Copy Activity.AddView(TabHost1,0,0,100%x,100%y) The Right Position of Scrollview is not equal the Right of Tabhost. Whats Wrong ?
D doncx Active Member Licensed User Longtime User Mar 11, 2013 #2 Just posted a similar problem Mine was the opposite, though. My layouts loaded into the TabHost are clipped on the right. If you learn anything, please let me know. I'll do that same. Thanks - Doncx Upvote 0
Just posted a similar problem Mine was the opposite, though. My layouts loaded into the TabHost are clipped on the right. If you learn anything, please let me know. I'll do that same. Thanks - Doncx
Erel B4X founder Staff member Licensed User Longtime User Mar 11, 2013 #3 How are you loading the inner layout? Can you post the code. There is some internal horizontal padding inside TabHost. Upvote 0
How are you loading the inner layout? Can you post the code. There is some internal horizontal padding inside TabHost.
D doncx Active Member Licensed User Longtime User Mar 11, 2013 #4 More information from doncx Erel, thanks for your reply. Paulsche, my apologies for jumping in. Perhaps this helps us both. I've uploaded images of my issue. Please find the following: - Image of tabhost in designer (320x480,scale=1) - Image of tab contents (sample layout) in designer (320x480,scale=1) - Image of emulator with tabhost and sample within a tab (320x480) - Image of emulator with sample layout outside of tabhost (320x480) The code is ultimately simple: Code: Copy Activity.LoadLayout("sampling_tabs") tbh_sampling.AddTab("Sample Data", "sample") tbh_sampling.AddTab("Notes and Photo", "sample_notes") All designer scripts declare: Code: Copy AutoScaleRate(1) AutoScaleAll Putting the sample layout in a tab actually expands it! I'm hoping there's a predictable way to make it fit as scaled in the designer. Attachments tabhost_designer.jpg 9.9 KB · Views: 408 sample_designer.jpg 17.4 KB · Views: 399 within_tabhost.jpg 19.1 KB · Views: 379 outside_tabhost.jpg 18.5 KB · Views: 400 Last edited: Mar 11, 2013 Upvote 0
More information from doncx Erel, thanks for your reply. Paulsche, my apologies for jumping in. Perhaps this helps us both. I've uploaded images of my issue. Please find the following: - Image of tabhost in designer (320x480,scale=1) - Image of tab contents (sample layout) in designer (320x480,scale=1) - Image of emulator with tabhost and sample within a tab (320x480) - Image of emulator with sample layout outside of tabhost (320x480) The code is ultimately simple: Code: Copy Activity.LoadLayout("sampling_tabs") tbh_sampling.AddTab("Sample Data", "sample") tbh_sampling.AddTab("Notes and Photo", "sample_notes") All designer scripts declare: Code: Copy AutoScaleRate(1) AutoScaleAll Putting the sample layout in a tab actually expands it! I'm hoping there's a predictable way to make it fit as scaled in the designer.
Erel B4X founder Staff member Licensed User Longtime User Mar 11, 2013 #5 See my answer in the other thread about AutoScale. Upvote 0
Paulsche Well-Known Member Licensed User Longtime User Mar 11, 2013 #6 I define the ScrollView now in the ide as the TabHost, it fits again. TabHost in the designer does not define, because the tabs do not agree then correctly. Upvote 0
I define the ScrollView now in the ide as the TabHost, it fits again. TabHost in the designer does not define, because the tabs do not agree then correctly.