Я создаю приложение для подробностей студента в android.I нужно отобразить фотографию студента наверху и отобразить имя, номер рулона, адрес и т. Д. В качестве таблицы. Я добавил изображение в верхней части и списке чуть ниже изображения. Могу добавить изображение внутри вида списка (теперь изображение не прокручивается).Добавить изображение в ListView Android
activity.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/def"
android:layout_centerHorizontal="true"
android:layout_gravity="center_horizontal"/>
<ListView
android:id="@id/list"
android:layout_above="@+id/ad_view"
android:layout_width="fill_parent"
android:layout_height="match_parent" >
</ListView>
</LinearLayout>
Activity.java
list = (ListView) findViewById(R.id.list);
ArrayList<HashMap<String, String>> productsList;
productsList = new ArrayList<HashMap<String, String>>();
/*
adding data from database to productsList
*/
ListAdapter adapter =
new SimpleAdapter(this, productsList, R.layout.full, new String[]{"left", "right"},
new int[]{R.id.left, R.id.right});
list.setAdapter(adapter);
full.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:background="@drawable/background_border"
android:padding="15dp"
>
<TextView
android:id="@+id/left"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="cnsdsdsf:"
android:layout_weight="1"
android:gravity="center"
/>
<TextView
android:id="@+id/right"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="TextView"
android:layout_weight="1"
android:gravity="center"
/>
</LinearLayout>
спасибо, что вы спасли мое время –