本文整理汇总了Java中com.actionbarsherlock.view.MenuItem.getItemId方法的典型用法代码示例。如果您正苦于以下问题:Java MenuItem.getItemId方法的具体用法?Java MenuItem.getItemId怎么用?Java MenuItem.getItemId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.actionbarsherlock.view.MenuItem
的用法示例。
在下文中一共展示了MenuItem.getItemId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onOptionsItemSelected
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
startActivity(new Intent(this, MoreAty.class));
break;
}
return super.onOptionsItemSelected(item);
}
示例2: onOptionsItemSelected
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
this.getSherlockActivity().finish();
break;
}
return super.onOptionsItemSelected(item);
}
示例3: onMainActivityOptionsItemSelected
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
public static boolean onMainActivityOptionsItemSelected(MenuItem item, Context ctxt, PreferencesWrapper prefsWrapper) {
int id = item.getItemId();
if (id == R.id.audio_test) {
ctxt.startActivity(new Intent(ctxt, AudioTester.class));
return true;
} else if (id == R.id.reset_settings) {
prefsWrapper.resetAllDefaultValues();
return true;
} else if (id == R.id.expert) {
prefsWrapper.toogleExpertMode();
return true;
}
return false;
}
示例4: onOptionsItemSelected
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()){
case android.R.id.home:
startActivity(new Intent(this, LoginAty.class));
break;
}
return super.onOptionsItemSelected(item);
}
示例5: onOptionsItemSelected
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == Compatibility.getHomeMenuId()) {
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
示例6: onOptionsItemSelected
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()){
case android.R.id.home:
startActivity(new Intent(this, MainActivity.class));
this.finish();
break;
}
return super.onOptionsItemSelected(item);
}
示例7: onActionItemClicked
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
@Override
public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
int itemId = item.getItemId();
if(itemId == R.id.delete) {
actionModeDelete();
return true;
}else if(itemId == R.id.invert_selection) {
actionModeInvertSelection();
return true;
}else if(itemId == R.id.dialpad) {
actionModeDialpad();
return true;
}
return false;
}
示例8: onOptionsItemSelected
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if(item.getItemId() == Compatibility.getHomeMenuId()) {
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
示例9: onOptionsItemSelected
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
finish();
break;
}
return super.onOptionsItemSelected(item);
}
示例10: onOptionsItemSelected
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()){
case android.R.id.home:
this.finish();
break;
}
return super.onOptionsItemSelected(item);
}
示例11: onOptionsItemSelected
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
startActivity(new Intent(ReminderSetupAty.this, MoreAty.class));
break;
}
return super.onOptionsItemSelected(item);
}
示例12: onMenuItemClick
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
@Override
public boolean onMenuItemClick(MenuItem item) {
ActivityChooserModel dataModel = ActivityChooserModel.get(mContext,
mShareHistoryFileName);
final int itemId = item.getItemId();
Intent launchIntent = dataModel.chooseActivity(itemId);
if (launchIntent != null) {
mContext.startActivity(launchIntent);
}
return true;
}
示例13: onOptionsItemSelected
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
this.finish();
break;
}
return super.onOptionsItemSelected(item);
}
示例14: onOptionsItemSelected
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
startActivity(new Intent(this, MainActivity.class));
this.finish();
break;
}
return super.onOptionsItemSelected(item);
}
示例15: onOptionsItemSelected
import com.actionbarsherlock.view.MenuItem; //导入方法依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
startActivity(new Intent(AddInfoAty.this, MainActivity.class));
break;
}
return super.onOptionsItemSelected(item);
}