Java Code Examples for android.app.assist.AssistStructure.ViewNode#getAutofillId()
The following examples show how to use
android.app.assist.AssistStructure.ViewNode#getAutofillId() .
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: MultiStepsService.java From input-samples with Apache License 2.0 | 6 votes |
private void addAutofillableFields(@NonNull Map<String, AutofillId> fields, @NonNull ViewNode node) { String[] hints = node.getAutofillHints(); if (hints != null) { // We're simple, we only care about the first hint String hint = hints[0]; AutofillId id = node.getAutofillId(); if (!fields.containsKey(hint)) { Log.v(TAG, "Setting hint '" + hint + "' on " + id); fields.put(hint, id); } else { Log.v(TAG, "Ignoring hint '" + hint + "' on " + id + " because it was already set"); } } int childrenSize = node.getChildCount(); for (int i = 0; i < childrenSize; i++) { addAutofillableFields(fields, node.getChildAt(i)); } }
Example 2
Source File: BasicService.java From input-samples with Apache License 2.0 | 6 votes |
/** * Adds any autofillable view from the {@link ViewNode} and its descendants to the map. */ private void addAutofillableFields(@NonNull Map<String, AutofillId> fields, @NonNull ViewNode node) { String[] hints = node.getAutofillHints(); if (hints != null) { // We're simple, we only care about the first hint String hint = hints[0].toLowerCase(); if (hint != null) { AutofillId id = node.getAutofillId(); if (!fields.containsKey(hint)) { Log.v(TAG, "Setting hint '" + hint + "' on " + id); fields.put(hint, id); } else { Log.v(TAG, "Ignoring hint '" + hint + "' on " + id + " because it was already set"); } } } int childrenSize = node.getChildCount(); for (int i = 0; i < childrenSize; i++) { addAutofillableFields(fields, node.getChildAt(i)); } }
Example 3
Source File: DebugService.java From input-samples with Apache License 2.0 | 6 votes |
/** * Adds any autofillable view from the {@link ViewNode} and its descendants to the map. */ private void addAutofillableFields(@NonNull Map<String, AutofillId> fields, @NonNull ViewNode node) { String hint = getHint(node); if (hint != null) { AutofillId id = node.getAutofillId(); if (!fields.containsKey(hint)) { Log.v(TAG, "Setting hint '" + hint + "' on " + id); fields.put(hint, id); } else { Log.v(TAG, "Ignoring hint '" + hint + "' on " + id + " because it was already set"); } } int childrenSize = node.getChildCount(); for (int i = 0; i < childrenSize; i++) { addAutofillableFields(fields, node.getChildAt(i)); } }
Example 4
Source File: MultiStepsService.java From android-AutofillFramework with Apache License 2.0 | 6 votes |
private void addAutofillableFields(@NonNull Map<String, AutofillId> fields, @NonNull ViewNode node) { String[] hints = node.getAutofillHints(); if (hints != null) { // We're simple, we only care about the first hint String hint = hints[0]; AutofillId id = node.getAutofillId(); if (!fields.containsKey(hint)) { Log.v(TAG, "Setting hint '" + hint + "' on " + id); fields.put(hint, id); } else { Log.v(TAG, "Ignoring hint '" + hint + "' on " + id + " because it was already set"); } } int childrenSize = node.getChildCount(); for (int i = 0; i < childrenSize; i++) { addAutofillableFields(fields, node.getChildAt(i)); } }
Example 5
Source File: BasicService.java From android-AutofillFramework with Apache License 2.0 | 6 votes |
/** * Adds any autofillable view from the {@link ViewNode} and its descendants to the map. */ private void addAutofillableFields(@NonNull Map<String, AutofillId> fields, @NonNull ViewNode node) { String[] hints = node.getAutofillHints(); if (hints != null) { // We're simple, we only care about the first hint String hint = hints[0].toLowerCase(); if (hint != null) { AutofillId id = node.getAutofillId(); if (!fields.containsKey(hint)) { Log.v(TAG, "Setting hint '" + hint + "' on " + id); fields.put(hint, id); } else { Log.v(TAG, "Ignoring hint '" + hint + "' on " + id + " because it was already set"); } } } int childrenSize = node.getChildCount(); for (int i = 0; i < childrenSize; i++) { addAutofillableFields(fields, node.getChildAt(i)); } }
Example 6
Source File: DebugService.java From android-AutofillFramework with Apache License 2.0 | 6 votes |
/** * Adds any autofillable view from the {@link ViewNode} and its descendants to the map. */ private void addAutofillableFields(@NonNull Map<String, AutofillId> fields, @NonNull ViewNode node) { String hint = getHint(node); if (hint != null) { AutofillId id = node.getAutofillId(); if (!fields.containsKey(hint)) { Log.v(TAG, "Setting hint '" + hint + "' on " + id); fields.put(hint, id); } else { Log.v(TAG, "Ignoring hint '" + hint + "' on " + id + " because it was already set"); } } int childrenSize = node.getChildCount(); for (int i = 0; i < childrenSize; i++) { addAutofillableFields(fields, node.getChildAt(i)); } }