Я построил макет, который может отображать изображение в трех разных областях. Это не имело значения, когда я использовал изображение, но почему-то это не работает с видом на поверхность. В основном есть три области, подобные приведенным ниже, а третья область (или область № 3) - это место, где я хочу поместить изображение через вид с поверхности
<a href="http://imageshack.us/m/202/3189/000hjb.jpg" rel="nofollow noreferrer">http://imageshack.us/m/202/3189/000hjb.jpg</a>
Изображение, созданное SurfaceView, может отображаться в области № 1, но не на 2 и 3, как показано ниже.
<a href="http://img215.imageshack.us/img215/9891/111lcv.jpg" rel="nofollow noreferrer">http://img215.imageshack.us/img215/9891/111lcv.jpg</a>
Ниже приведен скриншот, который я пробовал с изображением, и у них не было проблем.
<a href="http://imageshack.us/m/199/7231/222mlr.jpg" rel="nofollow noreferrer">http://imageshack.us/m/199/7231/222mlr.jpg</a>
Понятия не имею. Я хочу поместить изображение, созданное SurfaceView, в области 2 и 3 с идентификатором tableRow_cardImage - TableRow и assistant_cardboard - LinearLayout.
Если у кого-нибудь есть идея выяснить это, не могли бы вы мне помочь?
Заранее спасибо, и ниже приведен мой XML-код макета
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<LinearLayout android:id="@+id/header" android:layout_height="wrap_content" android:layout_width="match_parent">
<TextView android:id="@+id/header_life_title" android:textSize="20sp" android:text="Life: " android:layout_height="wrap_content" android:layout_width="wrap_content"></TextView>
<TextView android:id="@+id/header_life_value" android:textSize="20sp" android:text="20" android:layout_height="wrap_content" android:layout_width="wrap_content"></TextView>
<Button android:text="Inc." android:id="@+id/header_btn_inc" android:layout_width="wrap_content" android:layout_height="35dp" android:layout_gravity="center_vertical">
<Button android:text="Dec." android:id="@+id/header_btn_dec" android:layout_width="wrap_content" android:layout_height="35dp">
<Button android:text="Put L." android:id="@+id/header_btn_putLand" android:layout_width="wrap_content" android:layout_height="35dp">
<Button android:text="Remove L." android:id="@+id/header_btn_removeLand" android:layout_width="wrap_content" android:layout_height="35sp">
<LinearLayout android:layout_width="wrap_content" android:layout_height="match_parent" android:id="@+id/land_space">
</LinearLayout>
</LinearLayout>
<ScrollView android:id="@+id/scrollView1" android:layout_height="wrap_content" android:layout_width="match_parent">
<LinearLayout android:id="@+id/linearLayoutInScrollview"
android:orientation="horizontal"
android:layout_height="wrap_content"
android:layout_width="wrap_content">
<TableLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/cardboard">
<LinearLayout android:layout_height="40dp"
android:layout_width="wrap_content" android:id="@+id/layout_menu">
<Spinner android:id="@+id/spinner_creature"
android:layout_height="wrap_content"
android:layout_width="130dp">
<Button android:id="@+id/btn_creature"
android:layout_height="wrap_content"
android:layout_width="wrap_content" android:text="Cast">
<Spinner android:id="@+id/spinner_noncreature"
android:layout_height="wrap_content"
android:layout_width="130dp">
<Button android:id="@+id/btn_noncreature"
android:layout_height="wrap_content"
android:layout_width="wrap_content" android:text="Cast">
<Button android:id="@+id/btn_delete"
android:layout_height="wrap_content"
android:layout_width="wrap_content" android:text="Del."></Button>
</LinearLayout>
<TableRow android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/tableRow_cardImage">
<TableRow android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/tableRow_cardData">
<TableRow android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/tableRow_cardImage2">
<TableRow android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/tableRow_cardData2">
</TableLayout>
<LinearLayout android:layout_height="wrap_content" android:layout_width="wrap_content"
android:id="@+id/assistant_cardboard"
android:orientation="vertical" >
<ImageView android:src="@drawable/icon" android:layout_height="wrap_content" android:id="@+id/imageView1" android:layout_width="wrap_content"></ImageView>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>