Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final ViewHolder holder;
- if (view == null){
- LayoutInflater layoutInflater = LayoutInflater.from(context);
- view = layoutInflater.inflate(R.layout.lst_autocomplete, parent, false);
- holder = new ViewHolder();
- holder.direction = (AutoCompleteTextView) view.findViewById(R.id.autoComplete);
- holder.information= (TextView) view.findViewById(R.id.txtInformation);
- holder.tag = (EditText) view.findViewById(R.id.txtTag);
- holder.check= (CheckBox) view.findViewById(R.id.chkCheck);
- holder.product = (EditText) view.findViewById(R.id.txtProduct);
- view.setTag(holder);
- }else{
- holder = (ViewHolder) view.getTag();
- }
- CustomAdapter adapter = new CustomAdapter(context, cutom_list.lst_product);
- holder.direction.setAdapter(adapter);
- holder.direction.setThreshold(1);
- holder.direction.setOnItemClickListener(new AdapterView.OnItemClickListener() {
- @Override
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- Global list= (Global) parent.getItemAtPosition(position);
- holder.direction.setText(custom_list.getDescripcion_corta());
- holder.information.setText(custom_list.getUbicacion());
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement