我想在其他图像视图或视图上显示一个Imageview。如下图所示。显示一个imageview高于其他?
为了实现这一目标,我写代码
<LinearLayout
android:id="@+id/linear_restaurent_info"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight=".35"
android:background="@color/white"
android:orientation="vertical" >
<FrameLayout
android:id="@+id/framelayout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/frameImage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
android:src="@drawable/demo_pics" />
<ImageView
android:id="@+id/imageView_restaurent_pic"
android:layout_width="70dp"
android:layout_height="55dp"
android:layout_gravity="bottom"
android:layout_marginBottom="-20dp"
android:layout_marginLeft="10dp"
android:src="@drawable/icon_search" />
</FrameLayout>
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight=".15"
android:orientation="vertical" >
<!-- android:background="@color/Orange" -->
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/restaurent_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:text="Laziz"
android:textColor="@color/list_restaurent_name_text" />
<TextView
android:id="@+id/restaurent_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/restaurent_name"
android:layout_below="@+id/restaurent_name"
android:layout_marginTop="10dp"
android:singleLine="true"
android:paddingLeft="10dp"
android:text="151 Radford Road, Nottingham, NG7"
android:textColor="@color/list_restaurent_name_text" />
</RelativeLayout>
</LinearLayout>
但不能达到esired之一。
我的输出看起来如下;任何建议表示赞赏。
我已经使用的FrameLayout。但我无法解决实际输出的组合。 –
@shihab_returns你的代码的第二部分(我的意思是第二个线性布局)呢?问题可能在那里... – tonakriz