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


Java BootstrapEditText类代码示例

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


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

示例1: onCreate

import com.beardedhen.androidbootstrap.BootstrapEditText; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_cmb_china_login);
    /** init view **/

    mMainContainer = (LinearLayout) findViewById(R.id.activity_cmb_china_login);
    mCardNum = (BootstrapEditText) findViewById(R.id.user_card_num);
    mPassword = (BootstrapEditText) findViewById(R.id.user_password);
    mValidCode = (BootstrapEditText) findViewById(R.id.user_valid_code);
    valideCodeImage = (ImageView) findViewById(R.id.image_valid_code);

    valideCodeImage.setOnClickListener(this);
    mContext = this;

    loginBtn = (BootstrapButton) findViewById(R.id.loginCmbChinaBtn);
    loginBtn.setOnClickListener(this);

    httpRequestManager = HttpRequestManager.getInstance();
    updateValidCodeAction();
}
 
开发者ID:MarcusMa,项目名称:MyCreditCardDemo,代码行数:22,代码来源:CmbChinaLoginActivity.java

示例2: showEditTextDialog

import com.beardedhen.androidbootstrap.BootstrapEditText; //导入依赖的package包/类
public static void showEditTextDialog(Context mContext, String title, String initialText, final IFuncPtr functionToBeRun) {

		LayoutInflater inflater = (LayoutInflater)mContext.getSystemService (Context.LAYOUT_INFLATER_SERVICE);
		View v = inflater.inflate(R.layout.dialog_with_text, null);

		// custom dialog
		final Dialog dialog = new AlertDialog.Builder(mContext)
				.setTitle(title)
				.setView(v)
				.create();

		BootstrapButton okButton = (BootstrapButton) v.findViewById(R.id.okbutton);
		final BootstrapEditText insertedText = (BootstrapEditText) v.findViewById(R.id.addedText);
		insertedText.setText(initialText);
		okButton.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View view) {
				functionToBeRun.execute(insertedText.getText().toString());
				dialog.dismiss();
			}
		});

		dialog.show();
	}
 
开发者ID:adityak368,项目名称:Android-FileBrowser-FilePicker,代码行数:25,代码来源:UIUtils.java

示例3: onCreate

import com.beardedhen.androidbootstrap.BootstrapEditText; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    
    mDbHelper = new RemindersDbAdapter(this);
    
    setContentView(R.layout.reminder_edit);
    
    mCalendar = Calendar.getInstance(); 
    mTitleText = (BootstrapEditText) findViewById(R.id.title);
    mBodyText = (BootstrapEditText) findViewById(R.id.body);
    mDateButton = (Button) findViewById(R.id.reminder_date);
    mTimeButton = (Button) findViewById(R.id.reminder_time);
  
    mConfirmButton = (BootstrapButton) findViewById(R.id.confirm);
   
    mRowId = savedInstanceState != null ? savedInstanceState.getLong(RemindersDbAdapter.KEY_ROWID) 
            							: null;
  
    registerButtonListenersAndSetDefaultText();
}
 
开发者ID:MobileAge,项目名称:Reminder_Android,代码行数:22,代码来源:ReminderEditActivity.java

示例4: onActivityCreated

import com.beardedhen.androidbootstrap.BootstrapEditText; //导入依赖的package包/类
@Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);

        firebaseRef = BaseApp.getApp().getFirebaseRef();

        menuButton = (ImageView) getView().findViewById(R.id.menu_button);
        menuButton.setOnClickListener(onMenuClick);
//        registerForContextMenu(menuButton);
        backButton = (RelativeLayout) getView().findViewById(R.id.layer_back);
        backButton.setOnClickListener(onPartnerNameClick);
        partnerName =(TextView)getView().findViewById(R.id.partner_name);
        partnerDistance = (TextView)getView().findViewById(R.id.distance);
        messageInput = (BootstrapEditText) getView().findViewById(R.id.message_input);
        messageInput.addTextChangedListener(onTextChanged);
        sendButton = (BootstrapButton) getView().findViewById(R.id.send_button);
        sendButton.setOnClickListener(onSendMessage);
        sendButton.setEnabled(false);
        mListView = (AsyncListView) getView().findViewById(R.id.messages_list);

        BitmapLruCache cache = BaseApp.getApp().getBitmapCache();
        MessagesListLoader loader = new MessagesListLoader(cache);

        ItemManager.Builder builder = new ItemManager.Builder(loader);
        builder.setPreloadItemsEnabled(true).setPreloadItemsCount(5);
        builder.setThreadPoolSize(4);

        mListView.setItemManager(builder.build());

        mListAdapter = new MessagesListAdapter(getActivity(), MessagesMgr.gi().getMessages());
        mListView.setAdapter(mListAdapter);

        setHasOptionsMenu(true);

        initialized = true;
    }
 
开发者ID:DobrinAlexandru,项目名称:Wabbit-Messenger---android-client,代码行数:37,代码来源:ChatFragment.java

示例5: onCreateView

import com.beardedhen.androidbootstrap.BootstrapEditText; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
    act = getActivity();
    rootView = inflater.inflate(R.layout.fragment_login, container, false);
    setHasOptionsMenu(true);

    final BootstrapEditText email = (BootstrapEditText) rootView.findViewById(R.id.email);
    final BootstrapEditText password = (BootstrapEditText) rootView.findViewById(R.id.password);
    final BootstrapButton btnLogin = (BootstrapButton) rootView.findViewById(R.id.btnLogin);
    CheckBox checkBox = (CheckBox) rootView.findViewById(R.id.showPass);

    InputFilter filter = new InputFilter() {
        public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
            for (int i = start; i < end; i++) {
                if (Character.isSpaceChar(source.charAt(i))) {
                    return "";
                }
            }
            return null;
        }
    };

    email.setFilters(new InputFilter[]{filter});
    password.setFilters(new InputFilter[]{filter});

    if(!act.getSharedPreferences("EroadPrefs", 0).getString("user_name", "").equals("")){
        email.setText(act.getSharedPreferences("EroadPrefs", 0).getString("user_email", ""));
    }

    checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
        @Override
        public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
            if (!isChecked) {
                password.setTransformationMethod(PasswordTransformationMethod.getInstance());
            } else {
                password.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
            }
        }
    });

    btnLogin.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            String string_email = email.getText().toString();
            String string_password = password.getText().toString();
            if (!string_password.trim().equals("")) {
                new CheckIfUserExists(string_email, encryptPassword(string_password)).execute();
            }else {
                Toast.makeText(act, "The password can not be empty", Toast.LENGTH_SHORT).show();
            }
        }
    });

    return rootView;
}
 
开发者ID:lioutasb,项目名称:eme_road,代码行数:56,代码来源:LoginFragment.java


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