У меня есть несколько линейных макетов, расположенных друг над другом, у центра есть изображение. Я пытаюсь получить текст в верхней части изображения в центре, но у меня проблемы. Я пробовал с относительной компоновкой, но это испортило все мои другие макеты. Любые простые решения? EDIT ----Наложение текстового изображения с помощью линейного макета изображения image
<?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="match_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#000000"
android:orientation="horizontal"
android:paddingLeft="50dp"
android:paddingRight="50dp" >
<ImageButton
android:id="@+id/btnBck"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:src="@drawable/ic_launcher" />
<ImageButton
android:id="@+id/btnHome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:src="@drawable/ic_launcher" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="6"
android:orientation="vertical" >
<ImageView
android:id="@+id/picPreview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
android:contentDescription="@string/imageDesc"
android:src="@null" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#000000"
android:orientation="horizontal"
android:paddingLeft="50dp"
android:paddingRight="50dp" >
<ImageButton
android:id="@+id/btnAccept"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:src="@drawable/ic_launcher" />
<ImageButton
android:id="@+id/btnDecline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@null"
android:src="@drawable/ic_launcher" />
</LinearLayout>
</LinearLayout>
Я пытаюсь получить представление текста поверх/Просмотр изображения picPreview ид
пожалуйста, напишите XML (и код?) – Jim
обновляется с XML – SpunkTrumpet