Here are the examples of the java api class taken from open source projects.

1. PlaceAutocompleteAdapter#getView()

View license
public View getView(int position, View convertView, ViewGroup parent) {
    View row = super.getView(position, convertView, parent);
    // Sets the primary and secondary text for a row.
    // Note that getPrimaryText() and getSecondaryText() return a CharSequence that may contain
    // styling based on the given CharacterStyle.
    AutocompletePrediction item = getItem(position);
    TextView textView1 = (TextView) row.findViewById(;
    TextView textView2 = (TextView) row.findViewById(;
    return row;