zoukankan      html  css  js  c++  java
  • android 开发 drawerlayout出现退不回去的情况

    问题原因:

    id_framelayout2  写在 id_linearlayout2 的后面了;

    注意记得写:
    android:layout_gravity="start"

    正确:

    <?xml version="1.0" encoding="utf-8"?>
    <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/id_drawerlayout2"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
    
        <FrameLayout
            android:id="@+id/id_framelayout2"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#cd9a5b" >
        </FrameLayout>
    
        <LinearLayout
            android:id="@+id/id_linearlayout2"
            android:layout_width="240dp"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            android:background="#45b97c"
            android:orientation="vertical" >
    
            <ListView
                android:id="@+id/id_lv"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:divider="#CD853F"
                android:dividerHeight="2dp" >
            </ListView>
        </LinearLayout>
    
    </android.support.v4.widget.DrawerLayout>
  • 相关阅读:
    cmd命令之set详解
    微信公众号之推送消息
    总结js(1)
    本地文件夹变远程仓库并且提交Github
    npm之使用淘宝源
    页面倒计时返回
    在线sass编译器
    js条件语句之职责链数组
    【轉】靜
    css 實現微信聊天類似的氣泡
  • 原文地址:https://www.cnblogs.com/feijian/p/4693074.html
Copyright © 2011-2022 走看看