布局\layout_main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rR1MessageBubble"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/rR2MessageBubble"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/drawable_sky_background_frame">
</RelativeLayout>
</RelativeLayout>
布局\layout_component.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="50dp"
android:layout_height="50dp"
android:orientation="vertical"
android:background="@drawable/frame">
<TextView
android:id="@+id/txtViewTest"
android:layout_width="50dp"
android:layout_height="50dp"
android:text="Hello!"
android:gravity="center" />
</LinearLayout>
可绘制\frame.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="#FF07DD43" />
<corners android:bottomRightRadius="3dp"
android:bottomLeftRadius="3dp"
android:topLeftRadius="3dp"
android:topRightRadius="3dp"/>
</shape>
MainActivity.java

要求 所有我想在 layout_main.xml 中添加 layout_component.xml 的多个实例,所以不要投反对票,请建议我通过我可以实现这一点的方式...谢谢