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


Java BootstrapButton类代码示例

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


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

示例1: onCreate

import com.beardedhen.androidbootstrap.BootstrapButton; //导入依赖的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.BootstrapButton; //导入依赖的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.BootstrapButton; //导入依赖的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.BootstrapButton; //导入依赖的package包/类
public void onActivityCreated(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	textDescription = (TextView) getActivity().findViewById(R.id.description);
	textDescription.setText(Slice_ListViev.slice.getDescription());
	btnSave = (BootstrapButton) getActivity().findViewById(R.id.save);
	
	btnSave.setOnClickListener(new OnClickListener() {

		@Override
		public void onClick(View v) {
			
			TableController tableController = new TableController();
			Slice_ListViev.slice.setDescription(textDescription.getText()
					.toString());
			Slice_ListViev.slice.setUpdatedat(new Date());
			tableController.update(Slice_ListViev.slice);
			setupFragment(new Slice_ListViev());
		}
	});
}
 
开发者ID:maxml,项目名称:AutoTimeHelper,代码行数:21,代码来源:Update_item_listView.java

示例5: onCreate

import com.beardedhen.androidbootstrap.BootstrapButton; //导入依赖的package包/类
@Override
public void onCreate(Bundle saved){
    super.onCreate(saved);
    setContentView(R.layout.activity_submit);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setTitle("Submit Incident");
    locTxt=(TextView)findViewById(R.id.loc_etxt);
    descTxt=(EditText)findViewById(R.id.desc_etxt);
    mapBtn = (BootstrapButton) findViewById(R.id.openMapBtn);

    viewImage = (ImageView) findViewById(R.id.imgView);
    btnImg = (ImageView) findViewById(R.id.img_btn);

    mapBtn.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent i = new Intent(act, SubmitMapActivity.class);
            startActivityForResult(i, 3);
        }
    });
}
 
开发者ID:lioutasb,项目名称:eme_road,代码行数:24,代码来源:SubmitActivity.java

示例6: onCreate

import com.beardedhen.androidbootstrap.BootstrapButton; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_account_addition);
    cmbChinaBtn = (BootstrapButton) findViewById(R.id.addCmbChinaBtn);
    bankCommBtn = (BootstrapButton) findViewById(R.id.addBankCommBtn);
    cmbChinaBtn.setOnClickListener(this);
    bankCommBtn.setOnClickListener(this);
    mContext = this;
}
 
开发者ID:MarcusMa,项目名称:MyCreditCardDemo,代码行数:11,代码来源:AccountAdditionActivity.java

示例7: onActivityCreated

import com.beardedhen.androidbootstrap.BootstrapButton; //导入依赖的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

示例8: onChildAddExampleClicked

import com.beardedhen.androidbootstrap.BootstrapButton; //导入依赖的package包/类
@OnClick(R.id.bbutton_group_child_add_btn) void onChildAddExampleClicked() {
    int count = childChange.getChildCount();

    BootstrapButton button = new BootstrapButton(this);
    button.setText(String.format("%d", count + 1));

    childChange.addView(button);
}
 
开发者ID:Bearded-Hen,项目名称:Android-Bootstrap,代码行数:9,代码来源:BootstrapButtonGroupExample.java

示例9: onCreate

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

    if (!readParameters()) {
        Toast.makeText(this, "Invalid Channel ID.", Toast.LENGTH_SHORT).show();
        finish(); // Close if id was not given
    }

    setContentView(R.layout.activity_channel);

    mLoadingView = findViewById(R.id.loadingView);

    mChannelContentView = findViewById(R.id.channelContentView);
    mCollapsingToolbar = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar);
    mToolbar = (Toolbar) findViewById(R.id.toolbar);
    mDescriptionTextView = (TextView) findViewById(R.id.description);
    mUsernameTextView = (TextView) findViewById(R.id.username);
    mTags = (TextView) findViewById(R.id.tags);

    mChart1 = (ChartView) findViewById(R.id.chart1);
    mChart2 = (ChartView) findViewById(R.id.chart2);
    mChart3 = (ChartView) findViewById(R.id.chart3);
    mChart4 = (ChartView) findViewById(R.id.chart4);
    mChart5 = (ChartView) findViewById(R.id.chart5);
    mChart6 = (ChartView) findViewById(R.id.chart6);
    mChart7 = (ChartView) findViewById(R.id.chart7);
    mChart8 = (ChartView) findViewById(R.id.chart8);

    mErrorView = findViewById(R.id.channelErrorView);
    mErrorMessage = (TextView) findViewById(R.id.channelErrorMessage);
    mInputChannelId = (EditText) findViewById(R.id.input_channelId);
    mInputChannelReadKey = (EditText) findViewById(R.id.input_channelReadKey);
    mRetryButton = (BootstrapButton) findViewById(R.id.channelRetryButton);

    mChannelExtrasView = findViewById(R.id.channel_more_info_content);
    mChannelExtrasProgressBar = (ProgressBar) findViewById(R.id.channel_more_info_progressbar);

    mRetryButton.setOnClickListener(this);
    mUsernameTextView.setOnClickListener(this);

    setSupportActionBar(mToolbar);

    // TODO: Check if channel has settings saved, use those settings to get a single feed. if not, use default (last 100 data points)
    ApiClient.getInstance().getChannelFeed(mChannelId, mChannelReadKey, null, onContentInfoCallback());
}
 
开发者ID:vetoketju,项目名称:ThingSpeak-client-android,代码行数:47,代码来源:ChannelActivity.java

示例10: onActivityCreated

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

        btnChangeEmail = (BootstrapButton) getActivity().findViewById(R.id.btnEmail);
        btnChangeName = buttonsAutorisation(R.id.btnName);
        btnChangePicture = buttonsAutorisation(R.id.btnChangePicture);
        btnChangeOk = buttonsAutorisation(R.id.btnOk);

        etSetName = editTextAutorisation(R.id.tvName);
        etSetEmail = editTextAutorisation(R.id.tvEmail);
        etSetEmail.setText(us.getCurrentUser().getEmail());
        etSetName.setText(us.getCurrentUser().getUsername());
        etSetName.setEnabled(false);
        etSetEmail.setEnabled(false);


//		btnChangeEmail.setOnClickListener(new OnClickListener() {
//			
//			@Override
//			public void onClick(View v) {
////				etSetEmail.setEnabled(true);
////				btnChangeOk.setVisibility(View.VISIBLE);
//				btnChangeOk.setOnClickListener(new OnClickListener() {
//					
//					@Override
//					public void onClick(View v) {
////						etSetEmail.setEnabled(false);
////						btnChangeOk.setVisibility(View.INVISIBLE);
//						us.updateEmail(etSetEmail.getText().toString(), ParseUser.getCurrentUser()
//								.getObjectId());
//					}
//				});
//			}
//		});
//		
//		btnChangeName.setOnClickListener(new OnClickListener() {
//			
//			@Override
//			public void onClick(View v) {
//				etSetName.setEnabled(true);
//				btnChangeOk.setVisibility(View.VISIBLE);
//				btnChangeOk.setOnClickListener(new OnClickListener() {
//					
//					@Override
//					public void onClick(View v) {
//						etSetName.setEnabled(false);
//						btnChangeOk.setVisibility(View.INVISIBLE);
//						us.updateName(etSetName.getText().toString(), ParseUser.getCurrentUser().getObjectId());
//					}
//				});
//			}
//		});
//		
    }
 
开发者ID:maxml,项目名称:AutoTimeHelper,代码行数:56,代码来源:MainUserPageFragment.java

示例11: buttonsAutorisation

import com.beardedhen.androidbootstrap.BootstrapButton; //导入依赖的package包/类
private BootstrapButton buttonsAutorisation(int idintification) {
    BootstrapButton btn = (BootstrapButton) getActivity().findViewById(idintification);
    return btn;
}
 
开发者ID:maxml,项目名称:AutoTimeHelper,代码行数:5,代码来源:MainUserPageFragment.java

示例12: onActivityCreated

import com.beardedhen.androidbootstrap.BootstrapButton; //导入依赖的package包/类
@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		btnChangeEmail = (BootstrapButton) getActivity().findViewById(R.id.btnEmail);
		btnChangeName = buttonsAutorisation(R.id.btnName);
		btnChangePicture = buttonsAutorisation(R.id.btnChangePicture);
		btnChangeOk = buttonsAutorisation(R.id.btnOk);
		btnChangeOk.setBootstrapButtonEnabled(true);
		
		etSetName = editTextAutorisation(R.id.tvName);
		etSetEmail = editTextAutorisation(R.id.tvEmail);
		etSetEmail.setText(us.getCurrentUser().getEmail());
		etSetName.setText(us.getCurrentUser().getUsername());
		etSetName.setEnabled(false);
		etSetEmail.setEnabled(false);
		
		
		
//		btnChangeEmail.setOnClickListener(new OnClickListener() {
//			
//			@Override
//			public void onClick(View v) {
////				etSetEmail.setEnabled(true);
////				btnChangeOk.setVisibility(View.VISIBLE);
//				btnChangeOk.setOnClickListener(new OnClickListener() {
//					
//					@Override
//					public void onClick(View v) {
////						etSetEmail.setEnabled(false);
////						btnChangeOk.setVisibility(View.INVISIBLE);
//						us.updateEmail(etSetEmail.getText().toString(), ParseUser.getCurrentUser()
//								.getObjectId());
//					}
//				});
//			}
//		});
//		
//		btnChangeName.setOnClickListener(new OnClickListener() {
//			
//			@Override
//			public void onClick(View v) {
//				etSetName.setEnabled(true);
//				btnChangeOk.setVisibility(View.VISIBLE);
//				btnChangeOk.setOnClickListener(new OnClickListener() {
//					
//					@Override
//					public void onClick(View v) {
//						etSetName.setEnabled(false);
//						btnChangeOk.setVisibility(View.INVISIBLE);
//						us.updateName(etSetName.getText().toString(), ParseUser.getCurrentUser().getObjectId());
//					}
//				});
//			}
//		});
//		
	}
 
开发者ID:maxml,项目名称:AutoTimeHelper,代码行数:58,代码来源:MainUserPageFragment.java

示例13: buttonsAutorisation

import com.beardedhen.androidbootstrap.BootstrapButton; //导入依赖的package包/类
private BootstrapButton buttonsAutorisation(int idintification) {
	BootstrapButton btn = (BootstrapButton) getActivity().findViewById(idintification);
	return btn;
}
 
开发者ID:maxml,项目名称:AutoTimeHelper,代码行数:5,代码来源:MainUserPageFragment.java

示例14: onCreateView

import com.beardedhen.androidbootstrap.BootstrapButton; //导入依赖的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.BootstrapButton类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。