本文整理汇总了Java中org.xutils.view.annotation.Event类的典型用法代码示例。如果您正苦于以下问题:Java Event类的具体用法?Java Event怎么用?Java Event使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Event类属于org.xutils.view.annotation包,在下文中一共展示了Event类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: importAddress
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.importAddress)
private void importAddress(View view) {
if (Build.VERSION.SDK_INT >= 23) {
//获取权限
if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_CONTACTS) == PackageManager.PERMISSION_GRANTED) {
startActivityForResult(new Intent(
Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI), 0);
} else {
ToastUtils.showLongToast("您已拒绝读取联系人权限,请前往设置开通或者重新安装!");
}
} else {
startActivityForResult(new Intent(
Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI), 0);
}
}
开发者ID:MedicationReminder,项目名称:MedicationReminder,代码行数:21,代码来源:AddContactActivity.java
示例2: editText5
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.editText5)
private void editText5(View view){
/* TipDialog tipDialog=new TipDialog(RemarksActivity.this);
tipDialog.show();
WindowManager windowManager = getWindowManager();
Display display = windowManager.getDefaultDisplay();
WindowManager.LayoutParams lp = tipDialog.getWindow().getAttributes();
lp.width = (int)(display.getWidth()); //设置宽度
lp.height=(int)(display.getHeight());//设置高度
tipDialog.getWindow().setAttributes(lp);
tipDialog.setCancelable(false);
//点击dialog以外的地方dialog不消失*/
Intent intent=new Intent(RemarksActivity.this,RemakesRecyclerViewActivity.class);
intent.putExtra("type","drugbests");
startActivityForResult(intent,1);
if(TakeMedicinApplication.isFirstApp_drugbests==1){
BaseEvents.myEvent event = BaseEvents.myEvent.SENDREMARKSDRUGBESTS;
event.setObject(remarksDrugbestsList);
EventBus.getDefault().postSticky(event);
}
}
开发者ID:MedicationReminder,项目名称:MedicationReminder,代码行数:24,代码来源:RemarksActivity.java
示例3: iption
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.iption)
private void iption(View view)
{
BaseEvents.sendRemarks event = BaseEvents.sendRemarks.SEND_REMARKS;
event.setObject(textRemarks.getText().toString().trim());
EventBus.getDefault().postSticky(event);
TakeMedicinApplication.isFirstSpecial=0;
TakeMedicinApplication.isFirstWater=0;
TakeMedicinApplication.isFisterFood=0;
TakeMedicinApplication.isFirstTiem=0;
TakeMedicinApplication.isFirstApp_drugbests=0;
// moveTaskToBack(true);
finish();
}
开发者ID:MedicationReminder,项目名称:MedicationReminder,代码行数:17,代码来源:RemarksActivity.java
示例4: getEvent
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(value = {R.id.iv_left, R.id.tv_clear})
private void getEvent(View v) {
switch (v.getId()) {
case R.id.iv_left:
finish();
break;
case R.id.tv_clear:
DialogUtils.showDefaultYNTipDialog(this, getString(R.string.clear_records_tip), new Runnable() {
@Override
public void run() {
clearRecord();
}
});
break;
default:
break;
}
}
开发者ID:CassiaNetworks,项目名称:CassiaHubSDKSamples,代码行数:19,代码来源:RecordActivity.java
示例5: register
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(value = {R.id.realregister},type = View.OnClickListener.class)
private void register(View v){
if (phone.getText().toString().length()!=11){
AlertDialogHelper.showAlertDialog(LRegisterActivity.this,"善意的提醒","请填写正确的手机号码");
}else if (username.getText().length()<=0){
AlertDialogHelper.showAlertDialog(LRegisterActivity.this,"善意的提醒","用户名不能为空");
}else if (pwd.getText().toString().length()<6){
AlertDialogHelper.showAlertDialog(LRegisterActivity.this,"善意的提醒","密码必须六位及以上");
}else {
ProgressDialogHelper.showProgressDialog(LRegisterActivity.this,"请稍候,正在提交......");
User user =new User();
user.setType("learner");
user.setPhnum(phone.getText().toString());
user.setName(username.getText().toString());
user.setPwd(pwd.getText().toString());
if (man.isChecked())
user.setSex("男");
else
user.setType("女");
tryRegister(user);
}
}
开发者ID:yongjianzheng,项目名称:English_Tranning_Talk,代码行数:23,代码来源:LRegisterActivity.java
示例6: commit
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(value = {R.id.commit})
private void commit(View v){
if (TextUtils.isEmpty(content.getText().toString()))
AlertDialogHelper.showAlertDialog(CommitAssesActivity.this,"善意的提醒","请输入评价内容");
else {
asses.setContent(content.getText().toString());
try {
RequestUtil.sendAssProduce(asses);
} catch (IOException e) {
e.printStackTrace();
}
Toast.makeText(CommitAssesActivity.this,"您的评价已经提交",Toast.LENGTH_SHORT).show();
Intent i = new Intent(CommitAssesActivity.this,LDrawerActivity.class);
startActivity(i);
CommitAssesActivity.this.finish();
}
}
开发者ID:yongjianzheng,项目名称:English_Tranning_Talk,代码行数:18,代码来源:CommitAssesActivity.java
示例7: onTest3Click
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(value = R.id.btn_test3)
private void onTest3Click(View view) throws DbException {
for (int i = 0; i < 5; i++) {
String url = et_url.getText().toString();
String label = i + "xUtils_" + System.nanoTime();
DownloadManager.getInstance().startDownload(
url, label,
"/sdcard/xUtils/" + label + ".aar", true, false, null);
}
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:11,代码来源:HttpFragment.java
示例8: toggleEvent
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.download_stop_btn)
private void toggleEvent(View view) {
DownloadState state = downloadInfo.getState();
switch (state) {
case WAITING:
case STARTED:
downloadManager.stopDownload(downloadInfo);
break;
case ERROR:
case STOPPED:
try {
downloadManager.startDownload(
downloadInfo.getUrl(),
downloadInfo.getLabel(),
downloadInfo.getFileSavePath(),
downloadInfo.isAutoResume(),
downloadInfo.isAutoRename(),
this);
} catch (DbException ex) {
Toast.makeText(x.app(), "添加下载失败", Toast.LENGTH_LONG).show();
}
break;
case FINISHED:
Toast.makeText(x.app(), "已经下载完成", Toast.LENGTH_LONG).show();
break;
default:
break;
}
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:30,代码来源:DownloadActivity.java
示例9: removeEvent
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.download_remove_btn)
private void removeEvent(View view) {
try {
downloadManager.removeDownload(downloadInfo);
downloadListAdapter.notifyDataSetChanged();
} catch (DbException e) {
Toast.makeText(x.app(), "移除任务失败", Toast.LENGTH_LONG).show();
}
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:10,代码来源:DownloadActivity.java
示例10: registerd_reminder_reminder
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(registerd_reminder_reminder)
private void registerd_reminder_reminder(View view) {
if (pvCustomOptions != null) {
pvCustomOptions.setPicker(cardItem4);//添加数据
cardItem4.get(0).setSetPicker(true);
pvCustomOptions.show();
MedicationHelper.hideInputMethod(view);
} else {
ToastUtils.showShortToast("选择框尚未初始化");
}
}
开发者ID:MedicationReminder,项目名称:MedicationReminder,代码行数:14,代码来源:RegisteredReminderActivity.java
示例11: reg_type
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.reg_type)
private void reg_type(View view) {
if (pvCustomOptions != null) {
pvCustomOptions.setPicker(cardItem5);//添加数据
cardItem5.get(0).setSetPicker(true);
pvCustomOptions.show();
MedicationHelper.hideInputMethod(view);
} else {
ToastUtils.showShortToast("选择框尚未初始化");
}
}
开发者ID:MedicationReminder,项目名称:MedicationReminder,代码行数:14,代码来源:RegisteredReminderActivity.java
示例12: reg_department_name
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.reg_department_name)
private void reg_department_name(View view) {
if (pvCustomOptions != null) {
pvCustomOptions.setPicker(cardItem6);//添加数据
cardItem6.get(0).setSetPicker(true);
pvCustomOptions.show();
MedicationHelper.hideInputMethod(view);
} else {
ToastUtils.showShortToast("选择框尚未初始化");
}
}
开发者ID:MedicationReminder,项目名称:MedicationReminder,代码行数:14,代码来源:RegisteredReminderActivity.java
示例13: editText3
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.editText3)
private void editText3(View view)
{
if (pvCustomOptions != null) {
pvCustomOptions.setPicker(cardItem);//添加数据
cardItem.get(0).setSetPicker(true);
pvCustomOptions.show();
MedicationHelper.hideInputMethod(view);
}else {
ToastUtils.showShortToast("选择框尚未初始化");
}
}
开发者ID:MedicationReminder,项目名称:MedicationReminder,代码行数:15,代码来源:MedicationReminderActivity.java
示例14: editText5
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.editText5)
private void editText5(View view)
{
if (pvCustomOptions != null) {
pvCustomOptions.setPicker(cardItem);//添加数据
cardItem.get(0).setSetPicker(true);
pvCustomOptions.show();
MedicationHelper.hideInputMethod(view);
}else {
ToastUtils.showShortToast("选择框尚未初始化");
}
}
开发者ID:MedicationReminder,项目名称:MedicationReminder,代码行数:15,代码来源:MedicationReminderActivity.java
示例15: editText41
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.editText41)
private void editText41(View view)
{
if (pvCustomOptions != null) {
pvCustomOptions.setPicker(cardItem2);//添加数据
cardItem2.get(0).setSetPicker(true);
pvCustomOptions.show();
MedicationHelper.hideInputMethod(view);
}else {
ToastUtils.showShortToast("选择框尚未初始化");
}
}
开发者ID:MedicationReminder,项目名称:MedicationReminder,代码行数:14,代码来源:MedicationReminderActivity.java
示例16: editText4
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.editText4)
private void editText4(View v)
{
if (pvCustomOptions != null) {
pvCustomOptions.setPicker(cardItem3);//添加数据
cardItem3.get(0).setSetPicker(true);
pvCustomOptions.show();
MedicationHelper.hideInputMethod(v);
}else {
ToastUtils.showShortToast("选择框尚未初始化");
}
}
开发者ID:MedicationReminder,项目名称:MedicationReminder,代码行数:15,代码来源:MedicationReminderActivity.java
示例17: Reminder
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.Reminder)
private void Reminder(View v)
{
if (pvCustomOptions != null) {
pvCustomOptions.setPicker(cardItem4);//添加数据
cardItem4.get(0).setSetPicker(true);
pvCustomOptions.show();
MedicationHelper.hideInputMethod(v);
}else {
ToastUtils.showShortToast("选择框尚未初始化");
}
}
开发者ID:MedicationReminder,项目名称:MedicationReminder,代码行数:14,代码来源:MedicationReminderActivity.java
示例18: reduce
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.reduce)
private void reduce(View v)
{
int num=Integer.parseInt(textView4.getText().toString().trim());
if(num==1)
return;
else if(num>1)
textView4.setText(( num-1)+"");
}
开发者ID:MedicationReminder,项目名称:MedicationReminder,代码行数:10,代码来源:MedicationReminderActivity.java
示例19: reminderMode
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.reminderMode)
private void reminderMode(View v)
{
if (pvCustomOptions != null) {
pvCustomOptions.setPicker(cardItem5);//添加数据
cardItem5.get(0).setSetPicker(true);
pvCustomOptions.show();
MedicationHelper.hideInputMethod(v);
}else {
ToastUtils.showShortToast("选择框尚未初始化");
}
}
开发者ID:MedicationReminder,项目名称:MedicationReminder,代码行数:14,代码来源:MedicationReminderActivity.java
示例20: home
import org.xutils.view.annotation.Event; //导入依赖的package包/类
@Event(R.id.home)
private void home(View view){
Intent intent=new Intent();
intent.putExtra("1","");
setResult(1,intent);
finish();
}
开发者ID:MedicationReminder,项目名称:MedicationReminder,代码行数:8,代码来源:ContactActivity.java
注:本文中的org.xutils.view.annotation.Event类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论