Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Annotation for AutocompleteTextView (feature request) #1791

Description

@cutiko

Greetings

I would like to ask for an annotation for the AutocompleteTextView.

The purpose of the annotation is to make more straightforward the use of a AutocompleteTextview. Could be something like the current @Click annotation. Using the id of the view as name of the method, one parameter for the View and another for the position of the item clicked, and passing the String collection List<String> with the resource next to the annotation.

@AutoComplete(collection = myStringCollection, resource = R.layout.list_item_green_bg)
void asUsualTheId(View view, int position) {
    //Do something when the item is clicked, like setting it as text to the view
    view.setTextColor(ContextCompat.getColor(getApplicationContext, R.color.colorPrimary));
    if (myStringCollection.get(position).equals(MY_CONSTANT)) {
         //DO something with the position
    }
}

Above, the params pass next to the annotations are based in the @Receiver.

Thanks.

Activity

  1. WonderCsabo commented on Jun 8, 2016

    @WonderCsabo
    Member

    I like the idea of an event annotation for AutocompleteTextView. Feel free to contribute it.

    However i think it is not a good thing to define the adapter elements this way, especially on a method annotation.

  2. cutiko commented on Jun 9, 2016

    @cutiko
    Author

    I was very excited about doing it so. I start watching how the annotations was made an try to understand what AA does in the background to make or life easier. Sadly, Im not skilled enough yet to endeavour in such a task. Couldnt figure it out my way arround. Sorry I wont be able to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions