XML中“android:id”的开放引用是什么?

时间:2011-07-07 14:15:10

标签: android xml

         '<?xml version="1.0" encoding="utf-8"?>
          <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
           android:layout_width="fill_parent"
           android:layout_height="fill_parent"
           android:background="@drawable/droid_background" >
          <TextView
           android:layout_width="fill_parent"
           android:layout_height="fill_parent"
           android:gravity="center_horizontal"
           android:text="@string/hello"
           android:textColor="#FFFFFF"
           android:textStyle="bold" />
          <GridView 
           android:id=”@+id/videoGrdVw”
           android:layout_width=”fill_parent”
           android:layout_height=”fill_parent”
           android:numColumns=”auto_fit”
           android:verticalSpacing=”5dip”
           android:horizontalSpacing=”5dip”
           android:columnWidth=”80dip”
           android:stretchMode=”columnWidth”
           android:gravity=”center”/>      
          </RelativeLayout>                   

2 个答案:

答案 0 :(得分:1)

您使用常规的普通旧引号混合了花哨的引号 - 将替换为",它应该可以正常工作。

答案 1 :(得分:0)

您发布的报价似乎有一个奇怪的问题。其中一些类型与其他类型不同 - 请查看GridView中的类型。我会尝试将它们更改为与上面的引号相同,看看是否有帮助。