What\'s the little widget with three dots? How can I add it to my app?
The "original" three dot widget is the android.widget.ActionMenuPresenter.OverflowMenuButton
(ActionMenuPresenter.java). Sadly it is a private class. Here a working shorter version:
public class OverflowMenuButton extends AppCompatImageView
{
public OverflowMenuButton(Context context)
{
this(context, null);
}
public OverflowMenuButton(Context context, AttributeSet attrs)
{
this(context, attrs, 0);
}
public OverflowMenuButton(Context context, AttributeSet attrs, int defStyleAttr)
{
super(new ContextThemeWrapper(context, R.style.OverflowButtonTheme), attrs, R.attr.actionOverflowButtonStyle);
setClickable(true);
setFocusable(true);
setVisibility(VISIBLE);
setEnabled(true);
}
}
Themes of the ContextThemeWrapper
to get a dark and light version: