当前位置: 首页>>代码示例>>Java>>正文


Java MenuItem.getItemId方法代码示例

本文整理汇总了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);
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:10,代码来源:ChatSetupAty.java

示例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);
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:10,代码来源:TrainNumQueryFragment.java

示例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;
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:16,代码来源:PrefsLogic.java

示例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);
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:10,代码来源:ResetPwdAty.java

示例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);
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:10,代码来源:MessageActivity.java

示例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);
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:11,代码来源:TrainSchAty.java

示例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;
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:16,代码来源:CallLogListFragment.java

示例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);
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:10,代码来源:CallLogDetailsActivity.java

示例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);
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:10,代码来源:StationDetailAty.java

示例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);
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:10,代码来源:EditTextAty.java

示例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);
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:10,代码来源:ReminderSetupAty.java

示例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;
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:12,代码来源:ShareActionProvider.java

示例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);
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:10,代码来源:LateAty.java

示例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);
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:11,代码来源:OrderAty.java

示例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);
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:10,代码来源:AddInfoAty.java


注:本文中的com.actionbarsherlock.view.MenuItem.getItemId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。