我有一个用XML定义的布局.它还包含:
<RelativeLayout
android:id="@+id/item"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
Run Code Online (Sandbox Code Playgroud)
我想用其他XML布局文件来扩充这个RelativeView.我可能会根据情况使用不同的布局.我该怎么办?我正在尝试不同的变化
RelativeLayout item = (RelativeLayout) findViewById(R.id.item);
item.inflate(...)
Run Code Online (Sandbox Code Playgroud)
但他们都没有做好.