arb*_*erb 4 android relativelayout
嘿我正在尝试通知我的文件上传通知.这是我的XML:但它一直给我错误:RelativeLayout中不存在循环依赖.我究竟做错了什么?我没有看到它有什么问题吗?我也试图使它看起来类似于浏览器下载器
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/left"
android:layout_toLeftOf="@+id/right">
<ImageView
android:id="@+id/status_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
/>
<TextView
android:id="@+id/progress_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/status_icon"
android:text="0%"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/right"
android:layout_toRightOf="@+id/left">
<TextView
android:id="@+id/status_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
/>
<ProgressBar
android:id="@+id/status_progress"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/status_text"
android:progressDrawable="@android:drawable/progress_horizontal"
android:indeterminate="false"
android:indeterminateOnly="false"
/>
</RelativeLayout>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
RelativeLayout"left"试图根据RelativeLayout"right"的位置进行自我介绍.这是不可能的,因为例外情况说,它是循环的.如果那辆车还在移动的话,你如何根据另一辆车的停车停车?
根据您的xml文件,我建议您使用LinearLayout.你在这里做的事情确实没有用两个LL和父亲RelativeLayout来解决.
归档时间: |
|
查看次数: |
5633 次 |
最近记录: |