com.beardedhen.androidbootstrap.BootstrapButton Java Examples

The following examples show how to use com.beardedhen.androidbootstrap.BootstrapButton. 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: UIUtils.java    From Android-FileBrowser-FilePicker with MIT License 6 votes vote down vote up
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();
	}
 
Example #2
Source File: ReminderEditActivity.java    From Task-Reminder-App with MIT License 6 votes vote down vote up
@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();
}
 
Example #3
Source File: BootstrapButtonGroupExample.java    From Android-Bootstrap with MIT License 5 votes vote down vote up
@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);
}