2016-11-26 65 views
1

我有VS和Xamarin一些問題,但是那是另一點, 我寫了一個.axml文件,但我不明白的錯誤也不會顯示任何內容:: ..經與.axml麻煩Xamarin

這裏是我的碼:::。 將是巨大的,如果有人能幫助我:: ...

<?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> 

回答

1

你沒有拼寫錯誤TextView元素屬性的名稱。 屬性名稱區分大小寫。

您必須更改

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

謝謝你,不知道我didint看看吧XD你解決我的問題:: .. – Hamappelman