Update sample app to listen to clicks on chip
Test: manual Bug: 151185482 Change-Id: I85c706c896dacfd499c9e0aa1782f23a3f65e569
This commit is contained in:
@@ -172,10 +172,12 @@ public class AutofillImeService extends InputMethodService {
|
|||||||
if(suggestionView != null) {
|
if(suggestionView != null) {
|
||||||
suggestionViews[index] = suggestionView;
|
suggestionViews[index] = suggestionView;
|
||||||
sizes[index] = size;
|
sizes[index] = size;
|
||||||
suggestionView.setOnTouchListener((v, event) -> {
|
suggestionView.setOnClickListener((v) -> {
|
||||||
Toast.makeText(AutofillImeService.this, "hello",
|
Log.d(TAG, "Received click on the suggestion");
|
||||||
Toast.LENGTH_LONG).show();
|
});
|
||||||
return false;
|
suggestionView.setOnLongClickListener((v) -> {
|
||||||
|
Log.d(TAG, "Received long click on the suggestion");
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (suggestionsCount.decrementAndGet() == 0) {
|
if (suggestionsCount.decrementAndGet() == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user