I created an action and set the toolbar as the action bar that I installed at the bottom.
Inside this activity, I have a list containing some data.
The problem is that when I click on the list item for a long time, the contextual action bar appears at the top, and does not overlap my toolbar at the bottom.
topic of my work
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="myActivityTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="windowActionBar">false</item> <item name="android:windowActionModeOverlay">true</item> </style>
my toolbar
<android.support.v7.widget.Toolbar android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="?attr/actionBarSize" android:id="@+id/toorbar" android:background="@android:color/white" android:layout_gravity="bottom"> </android.support.v7.widget.Toolbar>
my activity
protected void onCreate(Bundle savedInstanceState){ ToolBar toolbar =(ToolBar) findViewById(R.id.toolbar) setSupportActionBar(toolbar) }
What should I do for the CAB to overlay my toolbar?
EDIT
This is the onCreateActionMode method in my class that handles long clicks
private class Selector implements AbsListView.MultiChoiceModeListener{ @Override public boolean onCreateActionMode(android.view.ActionMode mode, Menu menu) { mode.getMenuInflater().inflate(R.menu.my_activity_menu,menu); toolbar.setVisibility(View.VISIBLE); return true; }
android android-listview android-actionbar android-toolbar
Edijae crusar
source share