Код: Выделить всё
if (cursor.moveToFirst()){ Если строки есть
String[] from=new String[]{"Название поля"};
int[]to =new int[]{R.id.tvText}; Это мой текстВью
scAdapter=new SimpleCursorAdapter(this,R.layout.item,cursor,from,to); Ниже этот айтем
lvList.setAdapter(scAdapter);
}else{Код: Выделить всё
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView android:id="@+id/ivImg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher"></ImageView>
<TextView
android:id="@+id/tvText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="ddgdg"
android:textSize="18sp" ></TextView>
</LinearLayout>Код: Выделить всё
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/tvText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="ddgdg"
android:textSize="18sp" ></TextView>
<ImageView android:id="@+id/ivImg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher"></ImageView>
</LinearLayout>Ну и вопрос - шозахер? ))))