Forum Xamarin.Forms

Alternate Layouts for Android in Xamarin.Forms

MUR0MUR0 USMember

Is it possible to use layout folders for the android part of Xamarin.Forms? For example layout-sw320dp or layout-sw720dp?
Do those layout folders only accept .axml files? I create my UI with Code.

Is the approach with the Device class and the OnSizeChanged function (for Rotation) the only way to create different layouts in Xamarin.Forms?

Answers

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    If you're trying to do that sort of micromanagement you're opening yourself up for a world of hurt - maintenance wise.

    As a rule, your app really shouldn't care about such things. Maybe portrait or landscape orientation. But not screen resolution. It just shouldn't matter to your app.

  • MUR0MUR0 USMember
    edited January 2017

    @ClintStLaurent said:
    If you're trying to do that sort of micromanagement you're opening yourself up for a world of hurt - maintenance wise.

    As a rule, your app really shouldn't care about such things. Maybe portrait or landscape orientation. But not screen resolution. It just shouldn't matter to your app.

    Maybe you are right but I need to know this because I'm evaluating Xamarin.Forms.
    I know that it's possible to use layout folders in Xamarin.Android but I'm not sure if it's possible on Forms, too.

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @MUR0

    Its not a cross-platform paradigm, which is the basis of Xamarin.Forms. Basically you get all the features that fall into the least-common-denominator of all platforms you're targeting.

    For example, since not all platforms have a checkbox control - Xamarin.Forms doesn't have one: It would have to have a custom implementation.

    Maybe you are right but I need to know this because I'm evaluating Xamarin.Forms for my master thesis.

    Really? You're doing a masters thesis on Xamarin.Forms?

  • NMackayNMackay GBInsider, University admin

    @ClintStLaurent said:
    @MUR0

    Its not a cross-platform paradigm, which is the basis of Xamarin.Forms. Basically you get all the features that fall into the least-common-denominator of all platforms you're targeting.

    For example, since not all platforms have a checkbox control - Xamarin.Forms doesn't have one: It would have to have a custom implementation.

    Maybe you are right but I need to know this because I'm evaluating Xamarin.Forms for my master thesis.

    Really? You're doing a masters thesis on Xamarin.Forms?

    Reminds me of uni, while I slaved away in turbo Pascal my mate used a 4GL (Paradox) to do the same thing in a quarter of the time :neutral:

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @NMackay
    I just can't figure out how Xamarin.Forms is a topic for a masters thesis. And if it is, then all of us that are Xamarin certified should probably just be given our masters degrees. Goes to show what I've always said:

    A degree shows you have a piece of paper. A program you've created shows you can do the job.

  • MUR0MUR0 USMember

    @ClintStLaurent said:
    @MUR0

    Its not a cross-platform paradigm, which is the basis of Xamarin.Forms. Basically you get all the features that fall into the least-common-denominator of all platforms you're targeting.

    For example, since not all platforms have a checkbox control - Xamarin.Forms doesn't have one: It would have to have a custom implementation.

    Maybe you are right but I need to know this because I'm evaluating Xamarin.Forms for my master thesis.

    Really? You're doing a masters thesis on Xamarin.Forms?

    I'm sorry but the thesis is under confidentiality. So I can't explain what it's exactly about. I can tell you that it's only indirectly about Xamarin.Forms.

    Instead of checkbox controls, one can use switches, they exist in all platforms.

Sign In or Register to comment.