use of com.actionbarsherlock.view.MenuItem.OnMenuItemClickListener in project ActionBarSherlock by JakeWharton.
the class MainActivity method onCreateOptionsMenu.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getSupportMenuInflater().inflate(R.menu.main_menu, menu);
// set up a listener for the refresh item
final MenuItem refresh = (MenuItem) menu.findItem(R.id.menu_refresh);
refresh.setOnMenuItemClickListener(new OnMenuItemClickListener() {
// on selecting show progress spinner for 1s
public boolean onMenuItemClick(MenuItem item) {
// item.setActionView(R.layout.progress_action);
handler.postDelayed(new Runnable() {
public void run() {
refresh.setActionView(null);
}
}, 1000);
return false;
}
});
return super.onCreateOptionsMenu(menu);
}
use of com.actionbarsherlock.view.MenuItem.OnMenuItemClickListener in project httpclient by pixmob.
the class MainActivity method onCreateOptionsMenu.
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getSupportMenuInflater().inflate(R.menu.main_menu, menu);
// set up a listener for the refresh item
final MenuItem refresh = (MenuItem) menu.findItem(R.id.menu_refresh);
refresh.setOnMenuItemClickListener(new OnMenuItemClickListener() {
// on selecting show progress spinner for 1s
public boolean onMenuItemClick(MenuItem item) {
// item.setActionView(R.layout.progress_action);
handler.postDelayed(new Runnable() {
public void run() {
refresh.setActionView(null);
}
}, 1000);
return false;
}
});
return super.onCreateOptionsMenu(menu);
}
Aggregations