У меня есть следующий файл main.xml с LinearLayout
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weightSum="1" android:id="@+id/llid">
<TextView android:text="Client profile"
android:id="@+id/ProfileName"
android:layout_width="fill_parent"
android:textStyle="bold"
android:layout_height="wrap_content"
android:gravity="center_horizontal">
</TextView>
<TextView android:text="Specs"
android:id="@+id/Specs"
android:layout_width="fill_parent"
android:textStyle="bold"
android:layout_height="wrap_content"
android:gravity="center_horizontal">
</TextView>
</LinearLayout>
Я добавляю изображение в LinearLayout через код во время выполнения таким образом
ImageView image = new ImageView(this);
image.setImageBitmap(bmp);
LinearLayout ll = (LinearLayout) findViewById(R.id.llid);
ll.addView(image);
Однако я хочу добавить ImageView между 2 TextViews в моем LinearLayout. Я не могу найти способ в документах Android для добавления представления перед другим представлением или после него. Как я могу это сделать?
NB Я звоню
setContentView(R.layout.main);
До Я добавляю ImageView в LinearLayout.