Forum Xamarin.Android

What is your fav layout?

HalukmyHalukmy TRMember ✭✭

i usually use relative layout, but sometimes gets trouble on me different sizes, is there any way you choice for fix that? i like to listen yours develop steps


  • SteveFlackSteveFlack GBMember ✭✭

    I think on Android relative layout is probably not as useful as it seems at first glance. I know from the app I've been working on that I started out with a lot of RelativeLayouts but have gradually moved to things like nested LinearLayouts.

  • CheesebaronCheesebaron DKInsider, University mod

    Problem with nested LinearLayouts is that when using a lot of them it takes longer time to render. I recommend using as little nesting as possible. Often RelativeLayout can lead to an almost flat layout without much nesting.

    FrameLayout is really nice for layering stuff on top of each other.

  • HalukmyHalukmy TRMember ✭✭

    is there a great seminer for "better layout desing for monodroid"?

  • MarkRileyMarkRiley GBMember ✭✭

    Once you get comfortable with the intricacies of the RelativeLayout, it is by far the most useful I find, simply because it is so flexible, though its horses for courses really and you should use the most appropriate for the situation.

    Sometimes you have to do a bit of nesting of layouts. Personally I have a couple of screens with complex layouts which involve a fair amount of nesting and I find the performance to be fine, though if you have thousands of nested layouts in a scrolling screen for example, then I am sure it will start to bite.

  • MarkRileyMarkRiley GBMember ✭✭
    edited January 2014

    Thanks for the links. The pdf is probably the most useful: it is a good checklist to refer to when you are thinking about performance. Also, the ViewStub was a new one to me, for dynamically inflating your layout on demand. I am actually just doing the final tests on my first Android app, so am looking at the performance side of things as we speak.

Sign In or Register to comment.