Hamappelman
Hamappelman

Reputation: 13

Having trouble with .axml in Xamarin

I have some Problems with VS and Xamarin but thats another point, I wrote a .axml file but i dont get Errors also nothing is displayed::..

Here is my Code:::. would be great if someone can help me ::...

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/linearLayout_Phone"
android:layout_weight="1">
<TextView
    android:id="@+id/TextView"
    android:Layout_height="0dp"
    android:Layout_width="match_parent"
    android:layout_weight=".2"
    android:Text="TextView" />
<GridLayout
    android:layout_height="0dp"
    android:layout_width="match_parent"
    android:layout_weight=".8"
    android:rowCount="2"
    android:columnCount="2">
    <Button
        android:id="@+id/button1"
        android:layout_height="25dp"
        android:layout_width="wrap_content"
        android:text="button1"
        android:background="@android:color/holo_blue_dark" />
    <Button
        android:id="@+id/button2"
        android:layout_height="25dp"
        android:layout_width="wrap_content"
        android:text="button2"
        android:background="@android:color/holo_green_dark" />
    <Button
        android:id="@+id/button3"
        android:layout_height="25dp"
        android:layout_width="wrap_content"
        android:text="button3"
        android:background="@android:color/holo_orange_dark" />
    <Button
        android:id="@+id/button4"
        android:layout_height="25dp"
        android:layout_width="wrap_content"
        android:text="button4"
        android:background="@android:color/holo_red_dark" />
</GridLayout>
</LinearLayout>

Upvotes: 1

Views: 65

Answers (1)

Marek Rzeźniczek
Marek Rzeźniczek

Reputation: 484

You did misspelling attribute names in TextView element. Attribute names are case sensitive.

You must change for

<TextView
    android:id="@+id/TextView"
    android:layout_height="0dp"
    android:layout_width="match_parent"
    android:layout_weight=".2"
    android:text="TextView" />

Upvotes: 1

Related Questions