Java Code Examples for android.view.autofill.AutofillManager#commit()

The following examples show how to use android.view.autofill.AutofillManager#commit() . 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: AbstractMultipleStepsActivity.java    From input-samples with Apache License 2.0 6 votes vote down vote up
private void finishIt() {
    StringBuilder message = new StringBuilder(getString(R.string.message_finished))
            .append("\n\n");
    for (int i = 0; i < mSteps.length; i++) {
        TextView label = (TextView) mSteps[i].getChildAt(0);
        EditText input = (EditText) mSteps[i].getChildAt(1);
        message.append(getString(R.string.message_step_description, label.getText(), input.getText()))
                .append('\n');
    }
    mStatus.setText(message.toString());
    mContainer.removeAllViews();
    mFinished = true;
    AutofillManager afm = getSystemService(AutofillManager.class);
    if (afm != null) {
        afm.commit();
    }
    updateButtons();
}
 
Example 2
Source File: AbstractMultipleStepsActivity.java    From android-AutofillFramework with Apache License 2.0 6 votes vote down vote up
private void finishIt() {
    StringBuilder message = new StringBuilder(getString(R.string.message_finished))
            .append("\n\n");
    for (int i = 0; i < mSteps.length; i++) {
        TextView label = (TextView) mSteps[i].getChildAt(0);
        EditText input = (EditText) mSteps[i].getChildAt(1);
        message.append(getString(R.string.message_step_description, label.getText(), input.getText()))
                .append('\n');
    }
    mStatus.setText(message.toString());
    mContainer.removeAllViews();
    mFinished = true;
    AutofillManager afm = getSystemService(AutofillManager.class);
    if (afm != null) {
        afm.commit();
    }
    updateButtons();
}