RelativeLayout在ViewPager中的一个bug
来源:互联网 发布:windows xp下载 msdn 编辑:程序博客网 时间:2024/06/03 17:46
RelativeLayout在ViewPager中的一个bug
<?xmlversion="1.0"encoding="utf-8"?><LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="center_horizontal" android:background="@drawable/bg_list_item" android:gravity="center_horizontal" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:text="@string/app_name"/> </RelativeLayout> <LinearLayout android:id="@+id/top" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_gravity="center_horizontal"> <ImageView android:id="@+id/image_logo" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/ic_launcher" android:scaleType="fitCenter"/> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:background="@drawable/bg_like"> <ImageView android:id="@+id/image_like" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:background="@drawable/card_like"/> <TextView android:id="@+id/text_star" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignEnd="@id/image_like"/> </RelativeLayout> <TextView android:id="@+id/text_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:text="@string/app_name"/> </LinearLayout> <RelativeLayout android:id="@+id/bottom" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal"> <ListView android:id="@+id/content_list" android:layout_width="match_parent" android:layout_height="wrap_content"> </ListView> </RelativeLayout> </LinearLayout>
在ViewPager的子view中,如果配置如上,在第二层中是RelativeLayout,尽管配置的是wrap_content,会发现RelativeLayout的Height始终都是全屏的。
如果改成LinearLayout,一切正常
0 0
- RelativeLayout在ViewPager中的一个bug
- Ajax在FireFox中的一个BUG
- 动态改变RelativeLayout中元素在RelativeLayout中的布局
- 关于ListView和ViewPager的一个Bug
- 解决android:layout_marginBottom在RelativeLayout中无效的bug
- ARM GNU 工具链在使用gprof中的一个bug
- 一个长期潜伏在微软拼音输入法中的Bug
- total commander在64位系统中的一个小"bug"
- 一个bug在redmine中的诞生到终结
- Cg中的一个Bug
- IE7中的一个bug
- ipconntrack中的一个BUG
- 违例中的一个BUG
- NALDecoder中的一个bug
- LinearLayout与RelativeLayout在布局中的使用
- Relativelayout布局的bug
- RelativeLayout的bug
- [DNN中的Bug]在时区编辑器中存在的一个Bug
- I/O-输入输出流
- 腾讯云更改yum源
- Dos命令查看端口占用及关闭进程
- Debug Assertion Failed问题解决
- ROS学习手记 9 -- 阶段性复习
- RelativeLayout在ViewPager中的一个bug
- 设计模式之工厂模式
- python——scrapy安装成功,check项目成功,运行出现一下问题
- ROS学习手记 - 2.1: Create and Build ROS Package 生成包(Python)
- error:#5:cannotopensourceinputfile"stm32f10x_lib.h":Nosuchfileordirectory
- 每个对象都有自己的由其他对象所构成的存储
- search for a range
- 【线段树】 HDOJ 5283 Senior's Fish
- shell学习四十二天----使用touch更新文件时间