org.androidannotations.annotations.Click Java Examples

The following examples show how to use org.androidannotations.annotations.Click. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Login.java    From iSCAU-Android with GNU General Public License v3.0 6 votes vote down vote up
@Click
void btn_save(){

    String userName       = edt_userName.getText().toString().trim();
    String eduSysPassword = edt_eduSysPassword.getText().toString().trim();
    String libPassword    = edt_libPassword.getText().toString().trim();
    String cardPassword   = edt_cardPassword.getText().toString().trim();

    if (userNameHasInput(userName) && onePasswordHasInput(eduSysPassword,libPassword,cardPassword)){
        saveAccount(userName,eduSysPassword,libPassword,cardPassword);
    }else if( !userNameHasInput(userName) ){
        Toast.makeText(this,R.string.save_input_tips_username,Toast.LENGTH_LONG).show();
    }else{
        Toast.makeText(this,R.string.save_input_tips_password,Toast.LENGTH_LONG).show();
    }
}
 
Example #2
Source File: InputActivity.java    From MultiItem with Apache License 2.0 6 votes vote down vote up
@Click(R.id.submit_btn)
public void submit() {
    //通过adapter.isValueChange()判断表单内容是否改变
    //通过adapter.isValueValid()判断表单内容是否有效
    //通过adapter.getInputJson()直接获取表单录入Json,还有获取录入Map的方法
    String tipTxt = "表单内容" + (adapter.isValueChange() ? " 已经 " : " 没有 ") +
            "被用户改变!\n表单  " + (adapter.isValueValid() ? " 已经 " : " 没有 ") +
            "通过验证!\n自动组装的表单内容为:\n";

    //表单内容json格式化后的字符串
    String valueTxt = null;
    try {
        valueTxt = adapter.getInputJson().toString(4);
    } catch (JSONException e) {
        //do nothing
    }
    new AlertDialog.Builder(this).setTitle("提交").setMessage(tipTxt + valueTxt)
            .setPositiveButton(R.string.confirm, null).show();
}
 
Example #3
Source File: RegisterFragment.java    From school_shop with MIT License 6 votes vote down vote up
@Click
void submit(){
    RequestParams params = new RequestParams();
    String username = editUsername.getText().toString();
    String password = editPassword.getText().toString();
    String repasswordstr = rePassword.getText().toString();
    if (TextUtils.isEmpty(username)){
        showMiddleToast("昵称不能为空");
    }else if (password.length()<6){
        showMiddleToast("密码不能少于6位");
    }else if(!repasswordstr.equals(password)){
        showMiddleToast("两次输入密码不一致");
    }else {
        loadingProgressDialog.show();
        params.put("username",username);
        params.put("userpass",password);
        params.put("phone",phone);
        postNetwork(URLs.REGIRSTER,params,URLs.REGIRSTER);
    }
}
 
Example #4
Source File: Menu.java    From iSCAU-Android with GNU General Public License v3.0 5 votes vote down vote up
@Click
void menu_busandtelphone(){
    Introduction_.intent(this)
                .target("Bus&Telphone")
                .title(R.string.menu_busandtelphone)
                .start();
}
 
Example #5
Source File: AmountInput.java    From financisto with GNU General Public License v2.0 5 votes vote down vote up
@Click(R.id.signSwitcher)
protected void onClickSignSwitcher() {
    if (isExpense) {
        isExpense = false;
        signSwitcher.setImageDrawable(plusDrawable);
        notifyAmountChangedListener();
    } else {
        isExpense = true;
        signSwitcher.setImageDrawable(minusDrawable);
        notifyAmountChangedListener();
    }
}
 
Example #6
Source File: MyActivity.java    From simiasque with Mozilla Public License 2.0 5 votes vote down vote up
@Click(R.id.link_to_licenses)
public void openLicenseDialog(){
    (new AlertDialog.Builder(this))
            .setTitle("Licences")
            .setView(LayoutInflater.from(this).inflate(R.layout.license_dialog, null))
            .setCancelable(false)
            .setPositiveButton(android.R.string.ok,null)
            .create().show();
}
 
Example #7
Source File: PhoneFragment.java    From school_shop with MIT License 5 votes vote down vote up
@Click
void codeBtn(){
    loadingProgressDialog.show();
    RequestParams params = new RequestParams();
    phone = phoneNum.getText().toString();
    params.put("userPhone", phone);
    postNetwork(URLs.CHECK_PHONE, params, URLs.CHECK_PHONE);
}
 
Example #8
Source File: MenuActivity.java    From AndroidVideoCache with Apache License 2.0 5 votes vote down vote up
@Click(R.id.cleanCacheButton)
void onClearCacheButtonClick() {
    try {

        Utils.cleanVideoCacheDir(this);
    } catch (IOException e) {
        Log.e(null, "Error cleaning cache", e);
        Toast.makeText(this, "Error cleaning cache", Toast.LENGTH_LONG).show();
    }
}
 
Example #9
Source File: MapFragment.java    From settlers-remake with MIT License 5 votes vote down vote up
@Click(R.id.button_goods_menu)
void showGoodsMenu() {
	showMenu();

	if (getChildFragmentManager().findFragmentByTag(TAG_FRAGMENT_GOODS_MENU) == null) {
		getChildFragmentManager().beginTransaction()
				.replace(R.id.container_menu, GoodsMenuFragment.newInstance(), TAG_FRAGMENT_GOODS_MENU)
				.commit();
	}
}
 
Example #10
Source File: MapSetupFragment.java    From settlers-remake with MIT License 5 votes vote down vote up
@Click(R.id.button_start_game)
protected void onStartGameClicked() {
	viewModel.startGame();
	// if (!presenter.startGame()) {
	// Toast.makeText(this.getContext(), R.string.multiplayer_not_all_players_ready, Toast.LENGTH_LONG).show();
	// }
}
 
Example #11
Source File: Configuration.java    From iSCAU-Android with GNU General Public License v3.0 5 votes vote down vote up
@Click
void btn_save(){
    int server = Integer.valueOf(param_server.getSelectedParam());
    boolean isFirstScreen = param_classTableAsFirstScreen.getYesOrNo();
    AppContext.server = server;
    config.eduServer().put(server);
    config.classTableAsFirstScreen().put(isFirstScreen);
    RingerMode[] modes = RingerMode.values();
    RingerMode duringMode = modes[param_ringer_mode_during_class.getWheel().getCurrentItem()];
    RingerMode afterMode = modes[param_ringer_mode_after_class.getWheel().getCurrentItem()];
    boolean needUpdateAlarm = false;
    if(RingerMode.isSet(config.duringClassRingerMode().get()) != RingerMode.isSet(duringMode.getValue())
            || RingerMode.isSet(config.afterClassRingerMode().get()) != RingerMode.isSet(afterMode.getValue())){
        needUpdateAlarm = true;
    }
    config.duringClassRingerMode().put(duringMode.getValue());
    config.afterClassRingerMode().put(afterMode.getValue());
    if(needUpdateAlarm){
        RingerMode.duringClassOn(getActivity(), duringMode, -1);
        RingerMode.afterClassOn(getActivity(), afterMode, 1);
    }
    if(RingerMode.isSet(duringMode.getValue()) || RingerMode.isSet(afterMode.getValue())){
        RingerMode.setDateChangedAlarm(getActivity());
    } else {
        RingerMode.cancelDateChangedAlarm(getActivity());
    }
    AudioManager audioManager = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE);
    if(ClassUtil.isDuringClassNow(getActivity())){
        audioManager.setRingerMode(duringMode.getValue());
    } else {
        audioManager.setRingerMode(afterMode.getValue());
    }
    AppMsg.makeText(parentActivity(),R.string.tips_save_successfully,AppMsg.STYLE_INFO).show();
}
 
Example #12
Source File: CardParam.java    From iSCAU-Android with GNU General Public License v3.0 5 votes vote down vote up
/**
 * 继续查询按钮点击事件;
 */
@Click
void btn_continue(){
    try {
        if(isRightStartAndEndDate())
            startDetailFragment();
        else
            AppMsg.makeText(getSherlockActivity(),R.string.tips_card_date_wrong,AppMsg.STYLE_ALERT).show();
    } catch (Exception e) {
        e.printStackTrace();
    }

}
 
Example #13
Source File: Menu.java    From iSCAU-Android with GNU General Public License v3.0 5 votes vote down vote up
@Click
void menu_goal(){
    Param_.intent(this)
          .target("goal")
          .targetActivity(Goal_.class.getName())
          .start();
}
 
Example #14
Source File: Menu.java    From iSCAU-Android with GNU General Public License v3.0 5 votes vote down vote up
@Click
void menu_emptyClassRoom(){
    Param_.intent(this)
          .target("emptyClassRoom")
          .targetActivity(EmptyClassRoom_.class.getName())
          .start();
}
 
Example #15
Source File: Menu.java    From iSCAU-Android with GNU General Public License v3.0 5 votes vote down vote up
@Click
void menu_lifeinformation(){
    Introduction_.intent(this)
                 .target("LifeInformation")
                 .title(R.string.menu_lifeinformation)
                 .start();
}
 
Example #16
Source File: Menu.java    From iSCAU-Android with GNU General Public License v3.0 5 votes vote down vote up
@Click
void menu_communityinformation(){
    Introduction_.intent(this)
                .target("CommunityInformation")
                .title(R.string.menu_communityinformation)
                .start();
}
 
Example #17
Source File: Menu.java    From iSCAU-Android with GNU General Public License v3.0 5 votes vote down vote up
@Click
void menu_guardianserves(){
    Introduction_.intent(this)
                .target("GuardianServes")
                .title(R.string.menu_guardianserves)
                .start();
}
 
Example #18
Source File: Menu.java    From iSCAU-Android with GNU General Public License v3.0 5 votes vote down vote up
@Click
void menu_studyinformation(){
    Introduction_.intent(this)
                .target("StudyInformation")
                .title(R.string.menu_studyinformation)
                .start();
}
 
Example #19
Source File: HomeActivity.java    From lockit with Apache License 2.0 5 votes vote down vote up
@Click(R.id.lock)
void lockClicked() {
    if (lockSwitch.isChecked())
        AppLockService.start(this);
    else
        AppLockService.stop(this);
    setAppLocked(lockSwitch.isChecked());
}
 
Example #20
Source File: Configuration.java    From iSCAU-Android with GNU General Public License v3.0 5 votes vote down vote up
@Click
void btn_update(){
    AppMsg.makeText(getSherlockActivity(),
            app.getString(R.string.tips_checking_for_update)
            , AppMsg.STYLE_INFO).show();
    UmengUpdateAgent.setUpdateAutoPopup(false);
    UmengUpdateAgent.setUpdateListener(umengUpdateListener);
    UmengUpdateAgent.forceUpdate(getSherlockActivity());
}
 
Example #21
Source File: AreaView.java    From Local-GSM-Backend with Apache License 2.0 4 votes vote down vote up
@Click
protected void card() {
    performClick();
}
 
Example #22
Source File: CarriersSelectionFragment.java    From settlers-remake with MIT License 4 votes vote down vote up
@Click(R.id.button_convert_all_pioneer)
void convertAllPioneerClicked() {
	fireConvertAction(EMovableType.PIONEER, true);
}
 
Example #23
Source File: About.java    From iSCAU-Android with GNU General Public License v3.0 4 votes vote down vote up
@Click
void btn_advise(){
    FeedbackAgent agent = new FeedbackAgent(this);
    agent.startFeedbackActivity();
}
 
Example #24
Source File: PasswordView.java    From lockit with Apache License 2.0 4 votes vote down vote up
@Click(R.id.key8)
void key8() {
    keyPressed(8);
}
 
Example #25
Source File: UpdateDatabaseFragment.java    From Local-GSM-Backend with Apache License 2.0 4 votes vote down vote up
@Click
protected void details() {
    setShowLog(true);
}
 
Example #26
Source File: WifiDetailFragment.java    From wifi_backend with GNU General Public License v3.0 4 votes vote down vote up
@Click
protected void map() {
    startActivity(new Intent(android.content.Intent.ACTION_VIEW,
            Uri.parse("geo:" + lat + "," + lon + "?q=" + lat + "," + lon)
    ));
}
 
Example #27
Source File: Configuration.java    From iSCAU-Android with GNU General Public License v3.0 4 votes vote down vote up
@Click
void btn_notification_setting(){
    NotificationTiming_.intent(getSherlockActivity()).start();
}
 
Example #28
Source File: Configuration.java    From iSCAU-Android with GNU General Public License v3.0 4 votes vote down vote up
@Click
void btn_about(){
    About_.intent(getSherlockActivity()).start();
}
 
Example #29
Source File: PasswordView.java    From lockit with Apache License 2.0 4 votes vote down vote up
@Click(R.id.key7)
void key7() {
    keyPressed(7);
}
 
Example #30
Source File: SoldiersSelectionFragment.java    From settlers-remake with MIT License 4 votes vote down vote up
@Click(R.id.button_halt)
void haltClicked() {
	actionControls.fireAction(EActionType.STOP_WORKING);
}