public void onCreate(Bundle savedInstanceState)
{
Button reloadBtn = (Button)findViewById(R.id.reloadBtn);
// register button for context menu
// just call this method, you must be long press button to show context menu
registerForContextMenu(reloadBtn);
}
public void reloadBtnPress(View view)
{
// register menu and call open context menu
// you can custom to show menu
this.openContextMenu(view);
}
{
// register button for context menu
// just call this method, you must be long press button to show context menu
registerForContextMenu(reloadBtn);
}
public void reloadBtnPress(View view)
{
// register menu and call open context menu
// you can custom to show menu
this.openContextMenu(view);
}
沒有留言:
張貼留言