本文整理汇总了Java中com.mob.tools.utils.ResHelper.getIdRes方法的典型用法代码示例。如果您正苦于以下问题:Java ResHelper.getIdRes方法的具体用法?Java ResHelper.getIdRes怎么用?Java ResHelper.getIdRes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.mob.tools.utils.ResHelper
的用法示例。
在下文中一共展示了ResHelper.getIdRes方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onKeyEvent
import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public boolean onKeyEvent(int keyCode, KeyEvent event) {
try {
int resId = ResHelper.getIdRes(activity, "llSearch");
if (keyCode == KeyEvent.KEYCODE_BACK
&& event.getAction() == KeyEvent.ACTION_DOWN
&& activity.findViewById(resId).getVisibility() == View.VISIBLE) {
activity.findViewById(resId).setVisibility(View.GONE);
resId = ResHelper.getIdRes(activity, "llTitle");
activity.findViewById(resId).setVisibility(View.VISIBLE);
etSearch.setText("");
return true;
}
} catch (Throwable e) {
SMSLog.getInstance().w(e);
}
return super.onKeyEvent(keyCode, event);
}
示例2: onClick
import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
int id = v.getId();
int idLlBack = ResHelper.getIdRes(activity, "ll_back");
int idBtnInvite = ResHelper.getIdRes(activity, "btn_invite");
if (id == idLlBack) {
finish();
} else if (id == idBtnInvite) {
// 发送短信,如果有多个号码,就弹出对话框,让用户自己选择
if(phoneList.size() > 1){
showDialog();
return;
} else{
String phone = phoneList.size() > 0 ? phoneList.get(0) : "";
sendMsg(phone);
}
}
}
示例3: onClick
import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public void onClick(View v) {
int id = v.getId();
int idLlBack = ResHelper.getIdRes(activity, "ll_back");
int idRlCountry = ResHelper.getIdRes(activity, "rl_country");
int idBtnNext = ResHelper.getIdRes(activity, "btn_next");
int idIvClear = ResHelper.getIdRes(activity, "iv_clear");
if (id == idLlBack) {
finish();
} else if (id == idRlCountry) {
// 国家列表
CountryPage countryPage = new CountryPage();
countryPage.setCountryId(currentId);
countryPage.showForResult(activity, null, this);
} else if (id == idBtnNext) {
// 请求发送短信验证码
String phone = etPhoneNum.getText().toString().trim().replaceAll("\\s*", "");
String code = tvCountryNum.getText().toString().trim();
showDialog(phone, code);
} else if (id == idIvClear) {
// 清除电话号码输入框
etPhoneNum.getText().clear();
}
}
示例4: onClick
import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public void onClick(View v) {
int id = v.getId();
int idLlBack = ResHelper.getIdRes(activity, "ll_back");
int idIvSearch = ResHelper.getIdRes(activity, "ivSearch");
int idIvClear = ResHelper.getIdRes(activity, "iv_clear");
if (id == idLlBack) {
finish();
} else if (id == idIvSearch) {
// 搜索
int idLlTitle = ResHelper.getIdRes(activity, "llTitle");
activity.findViewById(idLlTitle).setVisibility(View.GONE);
int idLlSearch = ResHelper.getIdRes(activity, "llSearch");
activity.findViewById(idLlSearch).setVisibility(View.VISIBLE);
etSearch.getText().clear();
etSearch.requestFocus();
} else if (id == idIvClear) {
etSearch.getText().clear();
}
}
示例5: onKeyEvent
import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public boolean onKeyEvent(int keyCode, KeyEvent event) {
try {
int resId = ResHelper.getIdRes(activity, "llSearch");
if (keyCode == KeyEvent.KEYCODE_BACK
&& event.getAction() == KeyEvent.ACTION_DOWN
&& activity.findViewById(resId).getVisibility() == View.VISIBLE) {
activity.findViewById(resId).setVisibility(View.GONE);
resId = ResHelper.getIdRes(activity, "llTitle");
activity.findViewById(resId).setVisibility(View.VISIBLE);
etSearch.setText("");
return true;
}
} catch (Exception e) {
SMSLog.getInstance().w(e);
}
return super.onKeyEvent(keyCode, event);
}
示例6: onClick
import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
@Override
public void onClick(View v) {
int id = v.getId();
int idLlBack = ResHelper.getIdRes(activity, "ll_back");
int idIvSearch = ResHelper.getIdRes(activity, "ivSearch");
int idIvClear = ResHelper.getIdRes(activity, "iv_clear");
if (id == idLlBack) {
finish();
} else if (id == idIvSearch) {
int idLlTitle = ResHelper.getIdRes(activity, "llTitle");
activity.findViewById(idLlTitle).setVisibility(View.GONE);
int idLlSearch = ResHelper.getIdRes(activity, "llSearch");
activity.findViewById(idLlSearch).setVisibility(View.VISIBLE);
etSearch.requestFocus();
etSearch.getText().clear();
} else if (id == idIvClear) {
etSearch.getText().clear();
}
}
示例7: initPage
import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
private void initPage() {
activity.findViewById(ResHelper.getIdRes(activity, "ll_back")).setOnClickListener(this);
activity.findViewById(ResHelper.getIdRes(activity, "ivSearch")).setOnClickListener(this);
activity.findViewById(ResHelper.getIdRes(activity, "iv_clear")).setOnClickListener(this);
int resId = ResHelper.getIdRes(activity, "clCountry");
listView = (CountryListView) activity.findViewById(resId);
listView.setOnItemClickListener(this);
resId = ResHelper.getIdRes(activity, "et_put_identify");
etSearch = (EditText) activity.findViewById(resId);
etSearch.addTextChangedListener(this);
}
示例8: onClick
import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public void onClick(View v) {
int id = v.getId();
int idLlBack = ResHelper.getIdRes(activity, "ll_back");
int idBtnSubmit = ResHelper.getIdRes(activity, "btn_submit");
int idIvClear = ResHelper.getIdRes(activity, "iv_clear");
if (id == idLlBack) {
if(showSmart) {
finish();
return;
}
runOnUIThread(new Runnable() {
public void run() {
showNotifyDialog();
}
});
} else if (id == idBtnSubmit) {
// 提交验证码
HashMap<String, Object> resp = new HashMap<String, Object>();
resp.put("country", code);
resp.put("phone", phone);
afterSubmit(resp);
} else if (id == idIvClear) {
etIdentifyNum.getText().clear();
}
}
示例9: onClick
import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public void onClick(View v) {
int id = v.getId();
int idLlBack = ResHelper.getIdRes(activity, "ll_back");
int idBtnSubmit = ResHelper.getIdRes(activity, "btn_submit");
int idTvUnreceiveIdentify = ResHelper.getIdRes(activity, "tv_unreceive_identify");
int idIvClear = ResHelper.getIdRes(activity, "iv_clear");
int idBtnSounds = ResHelper.getIdRes(activity, "btn_sounds");
if (id == idLlBack) {
runOnUIThread(new Runnable() {
public void run() {
showNotifyDialog();
}
});
} else if (id == idBtnSubmit) {
// 提交验证码
String verificationCode = etIdentifyNum.getText().toString().trim();
if (!TextUtils.isEmpty(code)) {
if (pd != null && pd.isShowing()) {
pd.dismiss();
}
pd = CommonDialog.ProgressDialog(activity);
if (pd != null) {
pd.show();
}
SMSSDK.submitVerificationCode(code, phone, verificationCode);
} else {
int resId = ResHelper.getStringRes(activity, "smssdk_write_identify_code");
if (resId > 0) {
Toast.makeText(getContext(), resId, Toast.LENGTH_SHORT).show();
}
}
} else if (id == idTvUnreceiveIdentify) {
showDialogType = 1;
// 没有接收到短信
showDialog(showDialogType);
} else if (id == idIvClear) {
etIdentifyNum.getText().clear();
} else if (id == idBtnSounds) {
long time = System.currentTimeMillis();
if (time - lastRequestVVTime > MIN_REQUEST_VOICE_VERIFY_INTERVAL) {
lastRequestVVTime = time;
showDialogType = 2;
// 发送语音验证码
showDialog(showDialogType);
}
}
}
示例10: getIdRes
import com.mob.tools.utils.ResHelper; //导入方法依赖的package包/类
public int getIdRes(String name) {
return ResHelper.getIdRes(getContext(), name);
}