我会采取以下方法来确定发生了什么:
#1比较内容,即原始源代码以确保其格式正确。如果您将<Button
元素的缩进和各种android:
属性称为问题,我注意到的一件事是,在链接的页面中,与前几行相比,它们前面的空格数量错误。之前的所有行似乎都使用标准4 spaces
每tab
站,最后一组使用 6 个空格。
当我将您的代码复制到此答案中时,我看到了同样的问题,所以我猜它在您的原始代码中。
<LinearLayout ... >
<TextView ... />
<EditText ... />
<LinearLayout
android:layout_gravity="center"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1" >
<Button
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:padding="5dp"
android:gravity="center"
android:text="@string/setName" />
<Button
android:layout_width="150dp"
android:layout_gravity="center"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="5dp"
android:gravity="center"
android:text="@string/clearName" />
</LinearLayout>
</LinearLayout>
#2如果内容正确,那么考虑到Joomla 扩展目录( JED )上有多少不同的代码荧光笔扩展,我会尝试几种不同的。如果他们都有相同的问题,那么您可能错过了代码示例中的某些内容。