Thursday, 3 October 2013

How to set ActionMode LayoutParams to make custom view match_parent?

How to set ActionMode LayoutParams to make custom view match_parent?

I'm trying to set a custom view into an ActionMode, but it doesn't match
ActionMode as parent. In comparison with the standard ActionBar, when you
are setting a custom view you can specifiy layout params, while is not
provided in ActionMode.
There´s any solution?
mode.setCustomView(mModeActionBarView);
getSupportActionBar().setCustomView(customActionBarView, new
ActionBar.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
Thanks a lot!