我有一個main.xml中的文件和文件cell_shape.xml。如何導入一個XML文件到另一個
在我main.xml中我在cell_shape.XML有這個
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:weightSum="100" >
<include
android:id="tables"
layout="@layout/cell_shape" />
我有這個
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tables"
android:shape= "rectangle" >
<solid android:color="#000"/>
<stroke android:width="1dp" android:color="#ff9"/>
</shape>
我有這個錯誤
Exception raised during rendering: You must specify a valid layout
reference. The layout ID @layout/cell_shape is not valid. Couldn't
resolve resource @layout/cell_shape Exception details are logged in
Window > Show View > Error Log
,我不瞭解我如何正確導入,如果它我的main.xml
是否有教程介紹如何從一個xml文件導入不同的元素到另一個?