Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
获取显示Android Studio的按钮的问题_Android_Xml - Fatal编程技术网

获取显示Android Studio的按钮的问题

获取显示Android Studio的按钮的问题,android,xml,Android,Xml,所以我最初的问题是,当我添加导航抽屉时,它使我的其他按钮无法点击。我在StackOverflow中发现了另一个线程,它在使他们的应用程序滚动动作停止工作方面存在类似的问题。我接受了建议,把这些东西放到抽屉里。我的按钮现在可以点击了,但是,你看不到它们,配色方案也乱七八糟。我不确定我是否误用了这些片段,或者我遗漏了一些需要放入抽屉XML代码中的内容。如果我能得到一些我错在哪里的指示,我真的会很感激 这是我的活动_main.xml <?xml version="1.0" encoding="u

所以我最初的问题是,当我添加导航抽屉时,它使我的其他按钮无法点击。我在StackOverflow中发现了另一个线程,它在使他们的应用程序滚动动作停止工作方面存在类似的问题。我接受了建议,把这些东西放到抽屉里。我的按钮现在可以点击了,但是,你看不到它们,配色方案也乱七八糟。我不确定我是否误用了这些片段,或者我遗漏了一些需要放入抽屉XML代码中的内容。如果我能得到一些我错在哪里的指示,我真的会很感激

这是我的活动_main.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context="msse655.regis.edu.ddcharacters.MainActivity">

    <android.support.v4.widget.DrawerLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/drawer_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    <android.support.design.widget.AppBarLayout
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:theme="@style/AppTheme.AppBarOverlay">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:popupTheme="@style/AppTheme.PopupOverlay" />

    </android.support.design.widget.AppBarLayout>

    <include layout="@layout/content_main"/>

        <ListView
            android:id="@+id/navList"
            android:layout_width="200dp"
            android:layout_height="match_parent"
            android:layout_gravity="left|start"
            android:background="#ffeeeeee"/>

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

    </android.support.design.widget.CoordinatorLayout>

这是它应该遵循的配色方案/布局,以及其他活动的外观(当然还有可点击列表和按钮)。

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/content_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="0dp"
    android:paddingRight="0dp"
    android:paddingTop="0dp"
    android:paddingBottom="0dp"
    tools:showIn="@layout/activity_main"
    tools:context="msse655.regis.edu.ddcharacters.MainActivityFragment">

    <ListView
        style="@style/ListofItems"
        android:id="@+id/list_of_characters" />

    <Button
        style="@style/NextScreenButton"
        android:text="Add New Character"
        android:onClick="addCharacter"
        android:layout_below="@+id/list_of_characters"
        android:id="@+id/button" />
</RelativeLayout>
<resources>

    <style name="AppTheme.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="android:windowDrawsSystemBarBackgrounds">true</item>
        <item name="android:statusBarColor">@android:color/transparent</item>
    </style>

    <color name="custom_theme_color">#000000</color>
    <style name="CustomTheme" parent="AppTheme.NoActionBar">
        <item name="colorPrimary">#800020</item>
        <item name="colorPrimaryDark">#000000</item>
        <item name="colorAccent">#D3D3D3</item>
        <item name="android:windowBackground">@color/colorAccent</item>

    </style>

    <style name="ListofItems">
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_height">380dp</item>
        <item name="android:layout_alignParentTop">true</item>
        <item name="android:layout_alignParentLeft">true</item>
        <item name="android:layout_alignParentStart">true</item>
    </style>

    <style name="NextScreenButton">
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_width">wrap_content</item>
        <item name="android:layout_centerHorizontal">true</item>
        <item name="android:layout_marginTop">12dp</item>
    </style>
</resources>