80,351
社区成员
发帖
与我相关
我的任务
分享
<?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:background="@color/black"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dip" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/corner1" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:src="@drawable/corner2" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:src="@drawable/corner3" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:src="@drawable/corner4" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/dian" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/d_units_info1"
android:textColor="@color/d_units_info"
android:textSize="@dimen/d_units_info" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
这个属性,而且它的上一层又是 android:layout_width="wrap_content"
android:layout_height="wrap_content"
所有达不到你要的效果。
[/quote]
你觉得我应该怎么写?请指教!!!android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
这个属性,而且它的上一层又是 android:layout_width="wrap_content"
android:layout_height="wrap_content"
所有达不到你要的效果。
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
这个属性,而且它的上一层又是 android:layout_width="wrap_content"
android:layout_height="wrap_content"
所有达不到你要的效果。
[/quote]
你觉得我应该怎么写?请指教!!![/quote]
你把最上层布局的
android:layout_width="match_parent"
android:layout_height="match_parent"
改成wrap_content属性,你要全黑的效果可以在activity的style定义
你试试看行不行,能不能达到你的效果。<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/dian" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/d_units_info1"
android:textColor="@color/d_units_info"
android:textSize="@dimen/d_units_info" />
</LinearLayout>