czxzx2014 2016-04-06 16:38 采纳率: 15.4%
浏览 1382

android中使用了侧滑菜单,在侧滑菜单的布局中用gridview不会显示

侧滑菜单中的布局文件如下,请各位大神指点一下,谢谢你们
<?xml version="1.0" encoding="utf-8"?>
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/red"
android:orientation="vertical" >

    <LinearLayout 
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="25dp"
        android:layout_marginLeft="20dp"
        android:orientation="horizontal">

        <ImageView 
            android:id="@+id/btnSwitchs"
            android:layout_width="45dp"
            android:layout_height="45dp"
            android:background="@drawable/name"/>

        <TextView 
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:textSize="16sp"
            android:text="@string/app_name"/>

    </LinearLayout>
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" 
                    android:orientation="vertical">
                        <GridView
                            android:id="@+id/info"
                            android:layout_width="fill_parent"
                            android:layout_height="fill_parent"
                            android:verticalSpacing="2pt"
                            android:horizontalSpacing="2pt"
                            android:numColumns="2"
                            android:gravity="center"
                        />
                </LinearLayout>

  • 写回答

5条回答

  • 斩月sama 博客专家认证 2016-04-07 06:11
    关注

    你的GridView写了适配器嘛?

    评论

报告相同问题?

悬赏问题

  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大