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


Java Click类代码示例

本文整理汇总了Java中org.androidannotations.annotations.Click的典型用法代码示例。如果您正苦于以下问题:Java Click类的具体用法?Java Click怎么用?Java Click使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Click类属于org.androidannotations.annotations包,在下文中一共展示了Click类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createOBJ

import org.androidannotations.annotations.Click; //导入依赖的package包/类
@Click({R.id.btn_create_obj})
protected void createOBJ() {
    if (mCurrentImgPath == null) {
        Toast.makeText(BuildMaskActivity.this, "没有找到人脸图片", Toast.LENGTH_SHORT).show();
        return;
    }

    String objDir = OBJUtils.getModelDir();
    String objName = FileUtils.getMD5(mCurrentImgPath);
    String objPath = objDir + objName + "_obj";
    File file = new File(objPath);
    if (!file.exists()) {
        OBJUtils.createObjFile(BuildMaskActivity.this, mCurrentImgPath);
        Toast.makeText(BuildMaskActivity.this, "Done!", Toast.LENGTH_SHORT).show();
    } else {
        DialogUtils.showDialog(this, "该人脸OBJ文件已存在", "是否重新生成?", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {
                OBJUtils.createObjFile(BuildMaskActivity.this, mCurrentImgPath);
            }
        });
    }
}
 
开发者ID:SimonCherryGZ,项目名称:face-landmark-android,代码行数:24,代码来源:BuildMaskActivity.java

示例2: showDonateMeDialog

import org.androidannotations.annotations.Click; //导入依赖的package包/类
@Click(R.id.donate)
void showDonateMeDialog() {
    new ThemeColorMaterialDialogBuilder(this)
            .title(R.string.text_donate)
            .items("支付宝")
            .itemsCallback(new MaterialDialog.ListCallback() {
                @Override
                public void onSelection(MaterialDialog dialog, View itemView, int position, CharSequence text) {
                    if (position == 0) {
                        if (AlipayZeroSdk.hasInstalledAlipayClient(AboutActivity.this)) {
                            AlipayZeroSdk.startAlipayClient(AboutActivity.this, "aex04370fwjf8angrv1te9e");
                        } else {
                            Toast.makeText(AboutActivity.this, "未安装支付宝", Toast.LENGTH_SHORT).show();
                        }
                    }
                }
            })
            .show();
}
 
开发者ID:hyb1996,项目名称:Auto.js,代码行数:20,代码来源:AboutActivity.java

示例3: showDonateMeDialog

import org.androidannotations.annotations.Click; //导入依赖的package包/类
@Click(R.id.donate)
void showDonateMeDialog() {
    new ThemeColorMaterialDialogBuilder(this)
            .title(R.string.donate)
            .items("支付宝")
            .itemsCallback(new MaterialDialog.ListCallback() {
                @Override
                public void onSelection(MaterialDialog dialog, View itemView, int position, CharSequence text) {
                    if (position == 0) {
                        if (AlipayZeroSdk.hasInstalledAlipayClient(AboutActivity.this)) {
                            AlipayZeroSdk.startAlipayClient(AboutActivity.this, "aex04370fwjf8angrv1te9e");
                        } else {
                            Toast.makeText(AboutActivity.this, "未安装支付宝", Toast.LENGTH_SHORT).show();
                        }
                    }
                }
            })
            .show();
}
 
开发者ID:feifadaima,项目名称:https-github.com-hyb1996-NoRootScriptDroid,代码行数:20,代码来源:AboutActivity.java

示例4: login

import org.androidannotations.annotations.Click; //导入依赖的package包/类
@Click(R.id.login_btn)
void login() {
    if (!checkIsOK()) {
        return;
    }
    UserService.getInstance()
            .login(accountTextInputLayout.getEditText().getText().toString(),
                    passwordTextInputLayout.getEditText().getText().toString())
                .doOnError(error -> {
                    String message = error.getMessage();
                    if (message == null)
                        message = getString(R.string.login_fail);
                    Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();

                })
                .subscribe(tokenCommonResponse -> {
                    Toast.makeText(getApplicationContext(), R.string.login_success, Toast.LENGTH_SHORT).show();
                    finish();
                });

}
 
开发者ID:hyb1996,项目名称:NodeET,代码行数:22,代码来源:LoginActivity.java

示例5: checkUpdate

import org.androidannotations.annotations.Click; //导入依赖的package包/类
/**
 * 检查更新
 */
@Click(R.id.rl_checkUpdate)
void checkUpdate() {
    UmengUpdateAgent.forceUpdate(getActivity());
    UmengUpdateAgent.setUpdateListener(new UmengUpdateListener() {
        @Override
        public void onUpdateReturned(int updateStatus, UpdateResponse updateInfo) {
            switch (updateStatus) {
                case UpdateStatus.Yes: // has update
                    UmengUpdateAgent.showUpdateDialog(getActivity(), updateInfo);
                    break;
                case UpdateStatus.No: // has no update
                    ToastUtil.showToast(getActivity(), "当前已是最新版本");
                    break;
                case UpdateStatus.NoneWifi: // none wifi
                    // 注意:我已经在MainActivity中设置,更新时忽略只在WIFE下更新,所以这个状态暂时没用
                    ToastUtil.showToast(getActivity(), "没有wifi连接,只在wifi下更新");
                    break;
                case UpdateStatus.Timeout: // time out
                    ToastUtil.showToast(getActivity(), "请求超时,请检查网络");
                    break;
            }
        }
    });

}
 
开发者ID:jpaijh,项目名称:TYT,代码行数:29,代码来源:MineFragment.java

示例6: prePayment

import org.androidannotations.annotations.Click; //导入依赖的package包/类
/**
 * 提款
 */
@Click(R.id.btn_payment)
void prePayment() {
    String payee = tv_payee.getText().toString();
    String receive_bank = tv_receive_bank.getText().toString().trim();
    String bankAccount = tv_bankAccount.getText().toString().trim();
    String pay_amount = tv_pay_amount.getText().toString().trim();

    if (TextUtils.isEmpty(payee)) {
        ToastUtil.showToast(this, "请输入收款单位");
    } else if (TextUtils.isEmpty(receive_bank)) {
        ToastUtil.showToast(this, "请输入收款银行");
    } else if (TextUtils.isEmpty(bankAccount)) {
        ToastUtil.showToast(this, "请输入银行账号");
    } else if (TextUtils.isEmpty(pay_amount)) {
        ToastUtil.showToast(this, "请输入支付金额");
    } else if (Double.valueOf(pay_amount) > generalAccount) {
        ToastUtil.showToast(this, "支付金额超过普通账户余额");
    } else {
        pDialog = new SweetAlertDialog(T_PaymentActivity.this, SweetAlertDialog.PROGRESS_TYPE).setTitleText("正在提款...");
        pDialog.setCancelable(false);
        pDialog.show();
        payment(payee, receive_bank, bankAccount, pay_amount);
    }

}
 
开发者ID:jpaijh,项目名称:TYT,代码行数:29,代码来源:T_PaymentActivity.java

示例7: OnFloatButtonClick

import org.androidannotations.annotations.Click; //导入依赖的package包/类
@Click(R.id.floatingMenuButton)
void OnFloatButtonClick() {
    final AlertDialog.Builder builder2 = new AlertDialog.Builder(this.getContext());
    builder2.setTitle("Main menu")
            .setItems(new String[] {"Paste", "Disconnect"}, new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    switch (which) {
                        case 0:
                            moveCopyRemote();
                            break;
                        case 1:
                            actionListener.OnWaitStart();
                            ssh.setConnectDisabled(true);
                            break;
                    }
                    dialog.dismiss();
                }
            });
    builder2.create().show();
}
 
开发者ID:konachan700,项目名称:SSHFileManager,代码行数:21,代码来源:FileManagerFragment.java

示例8: clickNotice

import org.androidannotations.annotations.Click; //导入依赖的package包/类
@Click(R.id.btn_notice)
void clickNotice() {
    String receiptDate = tv_receiptDate.getText().toString().trim();
    String foreignName = tv_foreignName.getText().toString().trim();

    if (TextUtils.isEmpty(receiptDate)) {
        ToastUtil.showToast(this, "请选择付汇日期");
    } else if (TextUtils.isEmpty(receiptTypeValue)) {
        ToastUtil.showToast(this, "请选择付汇类型");
    } else if (TextUtils.isEmpty(foreignName)) {
        ToastUtil.showToast(this, "请选择外商");
    } else {
        String saleOrder = tv_saleOrder.getText().toString().trim();
        String receiptBank = et_receiptBank.getText().toString().trim();
        String currency = tv_currency.getText().toString().trim();
        String amount = et_amount.getText().toString().trim();
        String customerRemark = et_customerRemark.getText().toString().trim();

        pDialog = new SweetAlertDialog(T_NewNoticeForeignExchangeActivity.this, SweetAlertDialog.PROGRESS_TYPE).setTitleText("正在创建水单通知...");
        pDialog.setCancelable(false);
        pDialog.show();
        notice(receiptDate, foreignName, receiptTypeValue, saleOrder, receiptBank, currency, amount, customerRemark);
    }

}
 
开发者ID:jpaijh,项目名称:TYT,代码行数:26,代码来源:T_NewNoticeForeignExchangeActivity.java

示例9: clickRec

import org.androidannotations.annotations.Click; //导入依赖的package包/类
@Click(R.id.fabRec)
void clickRec() {
    if(!isInitRecorder) {
        isInitRecorder = true;
        mAudioFile = new File(
                Environment.getExternalStorageDirectory().getAbsolutePath() +
                        File.separator + "lecrec" + File.separator + System.nanoTime() + ".file.m4a");
        mAudioRecorder.prepareRecord(MediaRecorder.AudioSource.MIC,
                MediaRecorder.OutputFormat.MPEG_4, MediaRecorder.AudioEncoder.AAC,
                mAudioFile);
    }

    if(!isRecording) {
        isRecording = true;
        startTimer();
        mAudioRecorder.startRecord();
        fabRec.setBackgroundTintList(ColorStateList.valueOf(getResources().getColor(R.color.colorPrimary)));
        fabRec.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_stop_white_24dp));
    } else {
        isRecording = false;
        stopTimer();
        fabRec.setVisibility(View.INVISIBLE);
        mAudioRecorder.stopRecord();
        convertToWav();
    }
}
 
开发者ID:lecrec,项目名称:lecrec-android,代码行数:27,代码来源:ActivityRecordVoice.java

示例10: login

import org.androidannotations.annotations.Click; //导入依赖的package包/类
@Click(R.id.register)
void login() {
    String email = mEmail.getText().toString();
    String userName = mUserName.getText().toString();
    String password = mPassword.getText().toString();
    if (!validateInput(email, userName, password)) {
        return;
    }
    MaterialDialog dialog = new MaterialDialog.Builder(this)
            .progress(true, 0)
            .content(R.string.text_registering)
            .cancelable(false)
            .show();
    UserService.getInstance().register(email, userName, password)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(response -> {
                        dialog.dismiss();
                        onRegisterResponse(response.string());
                    }
                    , error -> {
                        dialog.dismiss();
                        mPassword.setError(NodeBB.getErrorMessage(error, RegisterActivity.this, R.string.text_register_fail));
                    });

}
 
开发者ID:hyb1996,项目名称:Auto.js,代码行数:27,代码来源:RegisterActivity.java

示例11: login

import org.androidannotations.annotations.Click; //导入依赖的package包/类
@Click(R.id.login)
void login() {
    String userName = mUserName.getText().toString();
    String password = mPassword.getText().toString();
    if (!checkNotEmpty(userName, password)) {
        return;
    }
    MaterialDialog dialog = new MaterialDialog.Builder(this)
            .progress(true, 0)
            .content(R.string.text_logining)
            .cancelable(false)
            .show();
    UserService.getInstance().login(userName, password)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(response -> {
                        dialog.dismiss();
                        Toast.makeText(getApplicationContext(), R.string.text_login_succeed, Toast.LENGTH_SHORT).show();
                        finish();
                    }
                    , error -> {
                        dialog.dismiss();
                        mPassword.setError(NodeBB.getErrorMessage(error, LoginActivity.this, R.string.text_login_fail));
                    });

}
 
开发者ID:hyb1996,项目名称:Auto.js,代码行数:27,代码来源:LoginActivity.java

示例12: lol

import org.androidannotations.annotations.Click; //导入依赖的package包/类
@Click(R.id.icon)
void lol() {
    mLolClickCount++;
    Toast.makeText(this, R.string.text_lll, Toast.LENGTH_LONG).show();
    if (mLolClickCount >= 5) {
        crashTest();
    }
}
 
开发者ID:hyb1996,项目名称:Auto.js,代码行数:9,代码来源:AboutActivity.java

示例13: stopAllRunningScripts

import org.androidannotations.annotations.Click; //导入依赖的package包/类
@Click(R.id.stop_all_running_scripts)
void stopAllRunningScripts() {
    int n = AutoJs.getInstance().getScriptEngineService().stopAll();
    if (n > 0)
        Snackbar.make(getView(), String.format(getString(R.string.text_already_stop_n_scripts), n), Snackbar.LENGTH_SHORT).show();
    else
        Snackbar.make(getView(), R.string.text_no_running_script, Snackbar.LENGTH_SHORT).show();
}
 
开发者ID:feifadaima,项目名称:https-github.com-hyb1996-NoRootScriptDroid,代码行数:9,代码来源:SideMenuFragment.java

示例14: exitCompletely

import org.androidannotations.annotations.Click; //导入依赖的package包/类
@Click(R.id.exit)
public void exitCompletely() {
    HoverMenuManger.hideHoverMenu();
    stopService(new Intent(this, FloatyService.class));
    AutoJs.getInstance().getScriptEngineService().stopAll();
    finish();
}
 
开发者ID:feifadaima,项目名称:https-github.com-hyb1996-NoRootScriptDroid,代码行数:8,代码来源:MainActivity.java

示例15: launchGallery

import org.androidannotations.annotations.Click; //导入依赖的package包/类
@Click({R.id.btn_load_face})
protected void launchGallery() {
    Toast.makeText(BuildMaskActivity.this, "选择一张人脸图片", Toast.LENGTH_SHORT).show();
    Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
    startActivityForResult(galleryIntent, RESULT_LOAD_IMG);
}
 
开发者ID:SimonCherryGZ,项目名称:face-landmark-android,代码行数:7,代码来源:BuildMaskActivity.java


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