ActionBarOverlayLayout如何修复它

时间:2017-11-28 16:50:23

标签: android

我正在使用Android Studio构建应用。 我正在构建一个视图。但我看不到动作栏,我看不到预览视图。

所以这是预览视图的消息:

Android....ActionBarOverlayLayout

所以这是我的View.xml

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:background="@color/cardview_dark_background">
    <android.support.v7.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        card_view:cardBackgroundColor="@color/cardview_light_background">

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content">
            <ImageButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/articoli"
                android:onClick="visualizzaArticoli"
                android:background="@null"/>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Articoli"
                android:layout_gravity="center_vertical"
                android:layout_marginLeft="50dp"/>
        </LinearLayout>
    </android.support.v7.widget.CardView>
    <android.support.v7.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dp"
        card_view:cardBackgroundColor="@color/cardview_light_background">

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content">
            <ImageButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/order"
                android:onClick="creaOrdine"
                android:background="@null"/>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/ordini"
                android:layout_gravity="center_vertical"
                android:layout_marginLeft="50dp"/>
        </LinearLayout>
    </android.support.v7.widget.CardView>   
</LinearLayout>

这是我的主要文件:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.mcsolution.easymanagementandroid">

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" >
    <activity
            android:name="com.mcsolution.easymanagementandroid.main.MainActivity"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name="com.mcsolution.easymanagementandroid.main.nuovoOrdine"></activity>
        <activity android:name="com.mcsolution.easymanagementandroid.ordine.creaOrdine"></activity>
        <activity android:name="com.mcsolution.easymanagementandroid.ordine.mainOrdine"></activity>
        <activity android:name="com.mcsolution.easymanagementandroid.ordine.viewOrdine"></activity>
        <activity
            android:name="com.mcsolution.easymanagementandroid.setting.setting"
            android:label="@string/app_name"
            android:windowSoftInputMode="stateVisible|adjustResize"
            android:configChanges="orientation|screenSize"/>
        <activity android:name="com.mcsolution.easymanagementandroid.articoli.viewArticoli"
            android:windowSoftInputMode="stateVisible|adjustResize"
            android:configChanges="orientation|screenSize"/>
        <activity android:name="com.mcsolution.easymanagementandroid.clienti.mainClienti"
            android:windowSoftInputMode="stateVisible|adjustResize"
            android:configChanges="orientation|screenSize"/>
        <activity android:name="com.mcsolution.easymanagementandroid.clienti.viewClienti"
            android:windowSoftInputMode="stateVisible|adjustResize"
            android:configChanges="orientation|screenSize"/>
        <activity android:name="com.mcsolution.easymanagementandroid.clienti.infoCliente"
            android:windowSoftInputMode="stateHidden|adjustResize"
            android:configChanges="orientation|screenSize"/>
        <activity android:name="com.mcsolution.easymanagementandroid.clienti.operazioniCliente"
            android:windowSoftInputMode="stateHidden|adjustResize"
            android:configChanges="orientation|screenSize"/>
        <activity android:name="com.mcsolution.easymanagementandroid.clienti.operazioniClienteDettaglio"
            android:windowSoftInputMode="stateHidden|adjustResize"
            android:configChanges="orientation|screenSize"/>
    </application>

</manifest>

我该如何解决?

  

EDIT   这是Android Studio中的预览:   enter image description here

这是我的智能手机的应用程序:

enter image description here

0 个答案:

没有答案