Expand and give focus to SearchView automatically

You can also call to expandActionView() method in order to force it: @Override public boolean onCreateOptionsMenu( Menu menu ) { super.onCreateOptionsMenu( menu ); MenuItem searchMenuItem = menu.findItem( R.id.mi_search ); // get my MenuItem with placeholder submenu searchMenuItem.expandActionView(); // Expand the search menu item in order to show by default the query return true; } Search … Read more

RecyclerView expand/collapse items

Please don’t use any library for this effect instead use the recommended way of doing it according to Google I/O. In your recyclerView’s onBindViewHolder method do this: final boolean isExpanded = position==mExpandedPosition; holder.details.setVisibility(isExpanded?View.VISIBLE:View.GONE); holder.itemView.setActivated(isExpanded); holder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mExpandedPosition = isExpanded ? -1:position; TransitionManager.beginDelayedTransition(recyclerView); notifyDataSetChanged(); } }); Where details is … Read more