记录我的bug问题,关于View隐藏对其他空间的影响问题
来源:互联网 发布:青岛网络问政 编辑:程序博客网 时间:2024/06/01 03:58
首先,先上代码
RelativeLayout insuranceChild = (RelativeLayout) findViewById(R.id.insuranceChild);insuranceChild.setVisibility(View.GONE);RelativeLayout insuranceAgecoverAge = (RelativeLayout) findViewById(R.id.insuranceAgecoverAge);insuranceAgecoverAge.setVisibility(View.GONE);RelativeLayout insuranceLimit = (RelativeLayout) findViewById(R.id.insuranceLimit);insuranceLimit.setVisibility(View.VISIBLE);
看起来没有任何问题吧,三个RelativeLayout,隐藏两个,另一个现实,然后外层的是LinearLayout,没问题。
在我的模拟器上,正常现实,nexus5正常显示,但是在小米,三星等几部机型,出现下方的布局全部消失了,那我一个找啊
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/Appointment" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#F2F2F2" > <ScrollView android:id="@+id/ScrollView" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_marginBottom="50dip" android:background="#F2F2F2" android:fillViewport="true" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <RelativeLayout android:layout_width="match_parent" android:layout_height="80dp" android:background="#fefefefe" android:gravity="center_vertical" > <TextView android:id="@+id/appointment_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="12dp" android:text="中融信托-兴创美林湖" android:textColor="#404040" android:textSize="18sp" android:textStyle="bold" /> </RelativeLayout> <View android:layout_width="match_parent" android:layout_height="wrap_content" android:src="@drawable/main_listitem_view_h" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="7dp" android:layout_marginRight="7dp" android:background="#F2F2F2" android:orientation="vertical" > <RelativeLayout android:layout_width="match_parent" android:layout_height="52dip" android:layout_marginTop="10dp" android:background="#DBDBDB" android:padding="1dp" > <EditText android:id="@+id/appointment_name" android:layout_width="match_parent" android:layout_height="52dp" android:background="#fefefefe" android:hint="理财师姓名" android:paddingLeft="10dp" /> </RelativeLayout> <RelativeLayout android:layout_width="match_parent" android:layout_height="52dp" android:layout_marginTop="10dp" android:background="#DBDBDB" android:padding="1dp" > <EditText android:id="@+id/app_phoneNumber" android:layout_width="match_parent" android:layout_height="52dp" android:background="#fefefefe" android:hint="理财师电话" android:paddingLeft="10dp" /> </RelativeLayout> <RelativeLayout android:layout_width="match_parent" android:layout_height="52dp" android:layout_marginTop="10dp" android:background="#DBDBDB" android:padding="1dp" > <RelativeLayout android:id="@+id/ins_fujiaxian" android:layout_width="match_parent" android:layout_height="52dp" android:background="#fefefefe" android:gravity="center_vertical" > <TextView android:id="@+id/app_money" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="12dp" android:background="#fefefefe" android:text="预约金额" android:textColor="#ffbbbbbb" android:textSize="18sp" /> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_marginRight="10dp" android:layout_marginTop="3dp" android:background="@drawable/arrow" /> </RelativeLayout> </RelativeLayout> <RelativeLayout android:layout_width="match_parent" android:layout_height="150dp" android:layout_marginTop="10dp" android:background="#DBDBDB" android:padding="1dp" > <EditText android:id="@+id/app_content" android:layout_width="match_parent" android:layout_height="150dp" android:background="#fefefefe" android:gravity="top" android:hint="其他说明" android:maxLength="50" android:paddingLeft="10dp" android:paddingTop="18dp" /> </RelativeLayout> </LinearLayout> </LinearLayout> </ScrollView> <RelativeLayout android:layout_width="match_parent" android:layout_height="45dip" android:layout_alignParentBottom="true" android:layout_marginLeft="7dp" android:layout_marginRight="7dp" android:layout_marginTop="2dp" > <Button android:id="@+id/btn_post" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="3dip" android:background="#BB8855" android:text="提交预约" android:textColor="#fefefefe" /> </RelativeLayout></RelativeLayout>
布局也完全没问题,看吧看,可纠结了,咋回事呢
~~~~~~~
好了,最后就说一个词 view
杨峥啊
0 0
- 记录我的bug问题,关于View隐藏对其他空间的影响问题
- 记录我的bug,关于setVisibility()出现的奇怪问题
- 关于navigationBar影响view的frame问题
- 【iOS-Cocos2d游戏开发之七】在cocos2d中添加/删除系统组件,并解决View设置透明会影响View中的其他组件的问题!【11月28日更新解决添加组件Cocos2d动画停止播放的BUG】
- 【iOS-Cocos2d游戏开发之七】在cocos2d中添加/删除系统组件,并解决View设置透明会影响View中的其他组件的问题!【11月28日更新解决添加组件Cocos2d动画停止播放的BUG】
- 【iOS-Cocos2d游戏开发之七】在cocos2d中添加/删除系统组件,并解决View设置透明会影响View中的其他组件的问题!更新解决添加组件Cocos2d动画停止播放的BUG】
- 关于我对ABA问题的理解
- 关于自定义view使用,命名空间问题,记录而已
- [在cocos2d中添加/删除系统组件,并解决View设置透明会影响View中的其他组件的问题
- 记录一下 关于进程隐藏摘链操作的问题
- 对我的影响
- 关于navigationBar半透明属性对view布局的影响
- 关于android中layout_gravity和gravity对View的影响
- 浅析关于Swap空间对性能的影响
- 关于BUG收缩的问题!
- vclskin对嵌入窗体的影响问题
- 关于tr隐藏的问题
- 关于收缩隐藏的问题
- HTML XML CSS JS 迅速学习
- 多线程编程
- 并行运行环境
- UVa 12657 双向链表
- 动态规划
- 记录我的bug问题,关于View隐藏对其他空间的影响问题
- Two Pointers/hash/3Sum/4Sum类题目
- C++ 一些STL
- Android实现简单的文件上传
- Maximum Depth of Binary Tree
- Remove Element
- C语言 16进制转10进制 不用强制转换
- 剑指offer
- C++ blog阅读记录