最近要做个动态添加N个重复布局的功能、这种做法也是看了别的大神的博客、做下记录
外层布局文件
<LinearLayout
android:id="@+id/layout_implement"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
style="@style/text_sp15"
android:layout_gravity="center_vertical"
android:paddingBottom="@dimen/qb_px_8"
android:paddingLeft="@dimen/qb_px_15"
android:paddingRight="@dimen/qb_px_15"
android:paddingTop="@dimen/qb_px_8"
android:text="PTR实施过程" />
<View style="@style/line" />
<LinearLayout
android:id="@+id/layout_add"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
<TextView
android:id="@+id/tv_again"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginRight="@dimen/qb_px_15"
android:layout_marginTop="@dimen/qb_px_10"
android:background="@drawable/btn_shape"
android:paddingBottom="@dimen/qb_px_5&#