全屏的popupwindow会向上一一点,懵逼

handsome_pen 2017-05-20 11:00:27
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg_hui"
android:orientation="vertical">


<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/y30"
android:background="@color/bg_bai"
android:gravity="center"
android:orientation="horizontal">

<ImageView
android:id="@+id/include_tital_image_left"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:src="@drawable/fanhui"/>

<TextView
android:id="@+id/include_tital_text_center"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="5"
android:gravity="center"
android:text="选择代发"
android:textColor="@color/blacked"
android:textSize="@dimen/x15"/>

<TextView
android:id="@+id/include_tital_text_right"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:text="确定"
android:textColor="@color/textgray"
android:textSize="@dimen/x13"/>

</LinearLayout>

<TextView
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/shenhuitiao"/>

<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/sr"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<in.srain.cube.views.GridViewWithHeaderAndFooter
android:id="@+id/gv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/bg_hui"
android:horizontalSpacing="@dimen/x10"
android:numColumns="2"
android:paddingLeft="@dimen/x10"
android:paddingRight="@dimen/x10"
android:scrollbars="none"
android:verticalSpacing="5dp">
</in.srain.cube.views.GridViewWithHeaderAndFooter>

</android.support.v4.widget.SwipeRefreshLayout>

<!--这个不加会向上移-->
<!-- <ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"/>-->

</LinearLayout>

</RelativeLayout>
这是我的popwindow布局代码 ,显示出来是这个效果

然后把上面代码中的ListView注释去掉,就是这个效果了

开始一直找不到原因,找了一天才发现,但是我不知道是什么原因。为什么会这样啊,求朋友们指导指导

...全文
183 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧