如下:会造成imagebutton被遮盖

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff"
>
<ImageButton
android:id="@+id/proper_scan_result_refresh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/refresh"
android:layout_marginTop="3dip"
android:layout_marginRight="5dip"
android:layout_alignParentRight="true"
/>
<TextView
android:id="@+id/proper_scan_result_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="请您选择要连接的网络"
style="?android:attr/textAppearanceLarge"
android:textColor="#3a3a3a"
android:paddingLeft="10dip"
android:gravity="left|center_vertical"
android:background="@drawable/system_title_bg"
/>

</RelativeLayout>

但如果这样写,则imagebutton会浮在textview之上

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ffffff"
>
<TextView
android:id="@+id/proper_scan_result_title"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="请您选择要连接的网络"
style="?android:attr/textAppearanceLarge"
android:textColor="#3a3a3a"
android:paddingLeft="10dip"
android:gravity="left|center_vertical"
android:background="@drawable/system_title_bg"
/>
<ImageButton
android:id="@+id/proper_scan_result_refresh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/refresh"
android:layout_marginTop="3dip"
android:layout_marginRight="5dip"
android:layout_alignParentRight="true"
/>

</RelativeLayout>

更多相关文章

  1. Android入门教程(三)之------导入现有Android工程
  2. adb通过TCP/IP来调试Android设备
  3. android标题栏的选择与使用,AppCompatActivity!
  4. android 怎样做SDK
  5. 了解Android和数据库连接
  6. Android在Eclipse环境下安装配置
  7. Android入门教程(三)之------导入现有Android工程
  8. Android入门教程(三)之------导入现有Android工程
  9. android SDK包引用了java SDK哪些包

随机推荐

  1. 【Android】给Android(安卓)Studio设置代
  2. 《深入探索Android热修复技术原理》安卓
  3. Android之Apk加壳
  4. Android Studio如何更改SDK的版本(针对非g
  5. 想从iOS转移到Android阵营?这里有你必须要
  6. 第三部分:Android 应用程序接口指南---第
  7. 初尝PFA ----- PHP 在 Android 环境配置
  8. Android开发实践:玩转EditText控件
  9. Android 避免内存泄漏(译)
  10. Android图像处理技术(实现Android中的PS)(五