0

Recently installed Visual Studio 2015 and Xamarin for Android development. Latest releases.

GridView has no options for column span and relative view has no options for positioning.

    <?xml version="1.0" encoding="utf-8"?>
    <GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:useDefaultMargins="true"
    android:alignmentMode="alignBounds"
    android:columnOrderPreserved="false"
    android:columnCount="7">
    <TextView
        android:text="Lathe Control by Wire"
        android:textStyle="bold|italic"
        android:layout_gravity="center_horizontal"
        android:layout_columnSpan="7"        <!-- attribute not declared -->
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:id="@+id/textView1" />
</GridLayout>

Thanks

1
  • What result did you expect? Or what is the final view you want to get? I've tried your code in Xamarin and it's only match all GridLayout width. Commented Dec 17, 2016 at 14:47

2 Answers 2

1

GridLayout is deprecated use other layouts like RelativeLayout, LinearLayout ,CoordinatorLayout and etc.

Sign up to request clarification or add additional context in comments.

3 Comments

I'm new to Android and Xamarin so how could I have known GridLayout is deprecated? After all, I can drag it from the tools menu but then can't use it. Weird.
I assume you are coming from XAML the best way for you might be Xamarin.Forms , you can write XAML and compile app to 3 platforms Android,iOS and UWP
Thanks for the help. With Studio now installed and working I'm not keen to try another approach.
0

Gave up on Xamarin. Either I've done something really dumb (most likely!) or Xamarin does not support grid or relative views.

Installed Android Studio and it works fine.

Pity as I've used Visual Studio for years of Windows and web development with no problems.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.