2017-05-18 10 views
1

私は多くのチュートリアルに従っていましたが、私は何かを逃したと思うので...私の問題はWhatsappのようなアクションモードメニューを作成したい、ということです。そして、私は正常に作成されますが、それは正しく私のツールバーのオーバーレイいない...ツールバーのキャブオーバーレイ

私は

を期待通りの結果が反映されていない理由は、私はすでに私のスタイルシートで以下の行を試みたが、私は知りません
<!-- It should be true otherwise action mode will not overlay toolbar --> 
     <item name="windowActionModeOverlay">true</item> 


    <!-- For Custom Action Mode Background Color/Drawable --> 
    <item name="actionModeBackground">@color/colorAccent</item> 

ツールバーのxml:

<android.support.v7.widget.Toolbar 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:background="#1E1E21" 
    android:id="@+id/toolbar" 
    android:layout_gravity="center" 
    android:gravity="center" 
    app:layout_scrollFlags="scroll|enterAlways" 
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" 
    local:popupTheme="@style/MyCustomToolBarTheme" 
    > 
<TextView 
    android:id="@+id/toolbarTitleTextView" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_gravity="center" 
    android:textSize="@dimen/ToolbarText" 
    android:textStyle="bold" 
    android:textColor="@color/colorAccent"/> 
</android.support.v7.widget.Toolbar> 

スタイルシート:

<resources> 

<!-- Base application theme. --> 
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> 
    <!-- Customize your theme here. --> 
    <item name="colorPrimary">@color/colorPrimary</item> 
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item> 
    <item name="colorAccent">@color/colorAccent</item> 
    <!-- It should be true otherwise action mode will not overlay toolbar --> 
    <item name="windowActionModeOverlay">true</item> 

    <!-- For Custom Action Mode Background Color/Drawable --> 
    <item name="actionModeBackground">@color/colorPrimary</item> 
</style> 
<style name="RatingBar" parent="Theme.AppCompat.Light.NoActionBar"> 
    <item name="colorControlNormal">#00BFF3</item> 
    <item name="colorControlActivated">#00BFF3</item> 
</style> 
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar"> 
    <item name="android:windowBackground">@drawable/background_splash</item> 
</style> 

<style name="MyCustomToolBarTheme" parent="ThemeOverlay.AppCompat.Light"> 
    <item name="android:textColorPrimary">@color/colorAccent</item> 
    <item name="android:windowActionModeOverlay">true</item> 

</style> 

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" /> 

<style name="MyMaterialTheme" parent="MyMaterialTheme.Base"> 

</style> 

<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar"> 
    <item name="windowNoTitle">true</item> 
    <item name="windowActionBar">false</item> 
    <item name="colorPrimary">@color/colorPrimary</item> 
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item> 
    <item name="colorAccent">@color/colorAccent</item> 



</style> 
<style name="CircularProgress" parent="Theme.AppCompat.Light"> 
    <item name="colorAccent">@color/buttonbackground</item> 
</style> 

<style name="MyDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert"> 
    <item name="colorPrimary">@color/colorPrimary</item> 
</style> 

実際の画像:

Actual Result

期待される結果: enter image description here

答えて

関連する問題