Java 类org.androidannotations.annotations.AfterTextChange 实例源码

项目:love    文件:LoginActivity.java   
@AfterTextChange(R.id.phoneEdit)
public void dealPhoneChange(){
    String phone = phoneEdit.getText().toString();
    // 取出用户
    List<User> users = sqliteHelper.get(ModelFactory.getUserTableName(), null,
            SqlBuilder.geneWhere("=","phone"), new String[]{phone}
            , null,  null, null, null);
    if(null!=users&&users.size()>0) {
        String avatarPath = users.get(0).getAvatar();
        if(!CommonUtil.isEmpty(avatarPath)) {
            File file = new File(avatarPath);
            Uri uri = Uri.fromFile(file);
            Bitmap bitmap = DecodeUtil.decode(getApplicationContext(), uri, 400, 400);
            Drawable drawable = new BitmapDrawable(getResources(), bitmap);
            avatar.setImageDrawable(drawable);
        }
    } else {
        avatar.setImageResource(R.drawable.avatar_default);
    }
}
项目:wtshanxun    文件:MainActivity.java   
@AfterTextChange(R.id.sxAcountEdit)
void setSxEditChange(TextView editText) {
    if (CheckUtils.sxAcountIsValid(editText.getText().toString().toUpperCase())) {
        sxAcountValid = true;
        editText.setBackgroundResource(R.drawable.bg_view_frame_green);
    } else {
        sxAcountValid = false;
        editText.setBackgroundResource(R.drawable.bg_view_frame_red);

    }
}
项目:ShoppingMall    文件:BankSelectFragment.java   
/**
 * Search bank by input.
 * @param text
 * @param hello
 */
@AfterTextChange(R.id.search_bank_et)
void OnTextChangeListener(Editable text, TextView hello){
    String string = text.toString();
    if(string != null && string.length()>0){
        mClearLayout.setVisibility(View.VISIBLE);
        mBankList = BankListDBUtil.getInstance().getBankList(string);
    }else {
        mClearLayout.setVisibility(View.INVISIBLE);
        mBankList = BankListDBUtil.getInstance().getBankList("");
    }
    mAdapter = new ArrayAdapter<String>(getActivity(),R.layout.item_dialog_select, R.id.dialog_select_text, mBankList);
    mListView.setAdapter(mAdapter);
}
项目:DroidPlate    文件:DPLoginFragment.java   
@AfterTextChange(resName = {"txtEmail", "txtPassword"})
void afterTextChange(TextView txtView) {
    if (txtEmail.getText().length() != 0 && txtPassword.getText().length() != 0) {
        btnLogin.setEnabled(true);
    } else {
        btnLogin.setEnabled(false);
    }
}
项目:popa    文件:LoginActivity.java   
@AfterTextChange(R.id.userPhoneEditText) void afterTextChange(Editable s) {
  if (s.toString().trim().length() == 0) {
    btnLogin.setEnabled(false);
  } else {
    btnLogin.setEnabled(true);
  }
}
项目:wtshanxun    文件:MainActivity.java   
@AfterTextChange(R.id.sxPasswordEdit)
void setSxPassEditChange(TextView editText) {
    preference.putString(Preference.SX_PASS, editText.getText().toString());
}
项目:eshow-android    文件:SearchLocationActivity.java   
@AfterTextChange(R.id.etSearch)
void onSearchTextChange() {
    // Something Here
    String text = etSearch.getText().toString();
    NetworkInterface.searchPlace(mContext, text, "wuxi", searchPlaceListener);
}
项目:OSMBugs    文件:AddOsmNoteActivity.java   
@AfterTextChange(R.id.edttxtDescription)
void descriptionChanged()
{
    invalidateOptionsMenu();
}