imagevIEw在布局的右侧.如果messagedetail_row_text的内容太长,则不会显示.如果messagedetail_row_text的内容不太长,则会显示imagevIEw.
<?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="wrap_content" androID:layout_margintop="15dp" androID:gravity="right" androID:orIEntation="horizontal" > <linearLayout androID:ID="@+ID/dfDWasdfds" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:background="@drawable/outgoing" androID:orIEntation="vertical" > <linearLayout androID:layout_wIDth="fill_parent" androID:layout_height="22dip" androID:orIEntation="horizontal" > <TextVIEw androID:ID="@+ID/messagedetail_row_name" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:paddingtop="1dp" androID:textcolor="#000000" androID:textSize="18sp" /> <TextVIEw androID:ID="@+ID/messagedetail_row_date" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_marginleft="20dip" androID:paddingtop="1dp" androID:textcolor="#000000" androID:textSize="16sp" /> </linearLayout> <TextVIEw androID:ID="@+ID/messagedetail_row_text" androID:layout_wIDth="fill_parent" androID:layout_height="wrap_content" androID:paddingleft="2dp" androID:textcolor="#000000" androID:textSize="20sp" /> </linearLayout> <linearLayout androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:orIEntation="vertical" androID:layout_toRightOf="@ID/dfDWasdfds" > <ImageVIEw androID:ID="@+ID/messagegedetail_rov_icon2" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_gravity="top" androID:gravity="right" androID:src="@drawable/retouxiang" /> </linearLayout></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="wrap_content" androID:layout_margintop="15dp" androID:gravity="right" androID:orIEntation="horizontal" > <linearLayout androID:ID="@+ID/xyz" androID:layout_alignParentRight="true" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:orIEntation="vertical" > <ImageVIEw androID:ID="@+ID/messagegedetail_rov_icon2" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_gravity="top" androID:gravity="right" androID:src="@drawable/retouxiang" /> </linearLayout> <linearLayout androID:ID="@+ID/dfDWasdfds" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_toleftOf="@+ID/xyz" androID:background="@drawable/outgoing" androID:orIEntation="vertical" > <linearLayout androID:layout_wIDth="fill_parent" androID:layout_height="22dip" androID:orIEntation="horizontal" > <TextVIEw androID:ID="@+ID/messagedetail_row_name" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:paddingtop="1dp" androID:textcolor="#000000" androID:text="messagedetail_row_name" androID:textSize="18sp" /> <TextVIEw androID:ID="@+ID/messagedetail_row_date" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_marginleft="20dip" androID:paddingtop="1dp" androID:text="messagedetail_row_date" androID:textcolor="#000000" androID:textSize="16sp" /> </linearLayout> <TextVIEw androID:ID="@+ID/messagedetail_row_text" androID:layout_wIDth="fill_parent" androID:layout_height="wrap_content" androID:paddingleft="2dp" androID:text="messagedetail_row_text and this is a long text" androID:textcolor="#000000" androID:textSize="20sp" /> </linearLayout></relativeLayout>
总结 以上是内存溢出为你收集整理的android-为什么imageview在布局上消失了?全部内容,希望文章能够帮你解决android-为什么imageview在布局上消失了?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)