Tabnine Logo
AutofillManager
Code IndexAdd Tabnine to your IDE (free)

How to use
AutofillManager
in
android.view.autofill

Best Java code snippets using android.view.autofill.AutofillManager (Showing top 20 results out of 315)

origin: commonsguy/cw-omnibus

@Override
protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 AutofillManager af=getSystemService(AutofillManager.class);
 if (af.isAutofillSupported()) {
  if (af.hasEnabledAutofillServices()) {
   Toast.makeText(this, R.string.msg_ready, Toast.LENGTH_LONG).show();
   finish();
  }
  else {
   Uri uri=Uri.parse("package:"+getPackageName());
   Intent i=new Intent(Settings.ACTION_REQUEST_SET_AUTOFILL_SERVICE, uri);
   startActivityForResult(i, REQUEST_ID);
  }
 }
 else {
  Toast.makeText(this, R.string.msg_not_supported, Toast.LENGTH_LONG).show();
  finish();
 }
}
origin: facebook/facebook-android-sdk

public static boolean isAutofillAvailable(Context context) {
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
    // Autofill Framework is only available on Android O and higher
    return false;
  }
  AutofillManager afm = context.getSystemService(AutofillManager.class);
  // Returns whether autofill is supported by device or and enabled for current user.
  return afm != null && afm.isAutofillSupported() && afm.isEnabled();
}
origin: googlesamples/android-AutofillFramework

  @Override
  public void onClick(View view) {
    resetFields();
    mAutofillManager.cancel();
  }
});
origin: googlesamples/android-AutofillFramework

private void disableService() {
  if (mAutofillManager != null && mAutofillManager.hasEnabledAutofillServices()) {
    mAutofillManager.disableAutofillServices();
    Snackbar.make(findViewById(R.id.settings_layout),
        R.string.settings_autofill_disabled_message, Snackbar.LENGTH_SHORT).show();
  } else {
    logd("Sample service already disabled.");
  }
}
origin: TUM-Dev/Campus-Android

@RequiresApi(api = Build.VERSION_CODES.O)
private void requestAutofillIfEmptyCardholder() {
  if (cardholderEditText.getText().toString().isEmpty()) {
    cardholderEditText.setAutofillHints(View.AUTOFILL_HINT_NAME);
    AutofillManager autofillManager = getSystemService(AutofillManager.class);
    if (autofillManager != null && autofillManager.isEnabled()) {
      autofillManager.requestAutofill(cardholderEditText);
    }
  }
}
origin: googlesamples/android-AutofillFramework

private void startEnableService() {
  if (mAutofillManager != null && !mAutofillManager.hasEnabledAutofillServices()) {
    Intent intent = new Intent(Settings.ACTION_REQUEST_SET_AUTOFILL_SERVICE);
    intent.setData(Uri.parse("package:com.example.android.autofill.service"));
    logd(TAG, "enableService(): intent=%s", intent);
    startActivityForResult(intent, REQUEST_CODE_SET_DEFAULT);
  } else {
    logd("Sample service already enabled.");
  }
}
origin: googlesamples/android-AutofillFramework

@Override
protected void notifyFocusLost(int virtualId) {
  mAutofillManager.notifyViewExited(this, virtualId);
}
origin: googlesamples/android-AutofillFramework

@Override
protected void notifyFocusGained(int virtualId, Rect bounds) {
  mAutofillManager.notifyViewEntered(this, virtualId, bounds);
}
origin: googlesamples/android-AutofillFramework

@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
  context.getSystemService(AutofillManager.class)
      .notifyValueChanged(CreditCardExpirationDateCompoundView.this);
}
origin: googlesamples/android-AutofillFramework

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();
}
origin: googlesamples/android-AutofillFramework

public List<FieldMetadata> initList() {
  return Arrays.asList(
      new FieldMetadata(
          mAfm.getNextAutofillId(),
          View.AUTOFILL_HINT_NAME,
          R.string.recycler_view_label_name,
      ),
      new FieldMetadata(
          mAfm.getNextAutofillId(),
          "bday-month",
          R.string.recycler_view_label_birthday_month,
      ),
      new FieldMetadata(
          mAfm.getNextAutofillId(),
          View.AUTOFILL_HINT_EMAIL_ADDRESS,
          R.string.recycler_view_label_email,
      ),
      new FieldMetadata(
          mAfm.getNextAutofillId(),
          View.AUTOFILL_HINT_PHONE,
          R.string.recycler_view_label_phone,
      ),
      new FieldMetadata(
          mAfm.getNextAutofillId(),
          "tel_extension",
          R.string.recycler_view_label_tel_extension,
origin: googlesamples/android-AutofillFramework

  @Override
  public void onClick(View view) {
    resetFields();
    mAutofillManager.cancel();
  }
});
origin: googlesamples/android-AutofillFramework

    R.id.settingsSetServiceLabel,
    R.id.settingsSetServiceSwitch,
    mAutofillManager.hasEnabledAutofillServices(),
    (compoundButton, serviceSet) -> setService(serviceSet));
RadioGroup loggingLevelContainer = findViewById(R.id.loggingLevelContainer);
origin: googlesamples/android-AutofillFramework

@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
  if (VERBOSE) Log.v(TAG, "onScroll(): " + distanceX + " - " + distanceY);
  if (mFocusedLine != null) {
    mAutofillManager.notifyViewExited(this, mFocusedLine.mFieldTextItem.id);
  }
  mTopMargin -= distanceY;
  mLeftMargin -= distanceX;
  invalidate();
  return true;
}
origin: googlesamples/android-AutofillFramework

  @Override
  public void onClick(View v) {
    AutofillManager afm = getSystemService(AutofillManager.class);
    if (afm != null) {
      afm.cancel();
    }
    resetFields();
  }
});
origin: googlesamples/android-AutofillFramework

  @Override
  public void onClick(View v) {
    AutofillManager afm = getSystemService(AutofillManager.class);
    if (afm != null) {
      afm.cancel();
    }
    resetFields();
  }
});
origin: googlesamples/android-AutofillFramework

  @Override
  public void onClick(View v) {
    AutofillManager afm = getSystemService(AutofillManager.class);
    if (afm != null) {
      afm.cancel();
    }
    resetFields();
  }
});
origin: googlesamples/android-AutofillFramework

  @Override
  public void onClick(View v) {
    AutofillManager afm = getSystemService(AutofillManager.class);
    if (afm != null) {
      afm.cancel();
    }
    resetFields();
  }
});
origin: googlesamples/android-AutofillFramework

  @Override
  public void onClick(View v) {
    AutofillManager afm = getSystemService(AutofillManager.class);
    if (afm != null) {
      afm.cancel();
    }
    resetFields();
  }
});
origin: googlesamples/android-AutofillFramework

  @Override
  public void onClick(View v) {
    AutofillManager afm = getSystemService(AutofillManager.class);
    if (afm != null) {
      afm.cancel();
    }
    resetFields();
  }
});
android.view.autofillAutofillManager

Most used methods

  • hasEnabledAutofillServices
  • isAutofillSupported
  • isEnabled
  • cancel
  • commit
  • disableAutofillServices
  • getNextAutofillId
  • notifyValueChanged
  • notifyViewEntered
  • notifyViewExited
  • registerCallback
  • requestAutofill
  • registerCallback,
  • requestAutofill,
  • unregisterCallback

Popular in Java

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • String (java.lang)
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now