I have a spinner which is already made and working, what i need to do is "know" when the user clicks on the spinner to choose an item (when its expanded) and when the user clicks on an item inside the spinner (whatever that item is).
I'm asking this because i need to un-display two EditText box on first click and then after he/she choose an item i will redisplay them.
any help is appreciated! thank you
public class MyAdapter extends ArrayAdapter<String>
{
Typeface font = Typeface.createFromAsset(getAssets(), "fonts/hatten.ttf");
public MyAdapter(Context context, int textViewResourceId, String[] objects) {
super(context, textViewResourceId, objects);
}
@Override
public View getDropDownView(int position, View convertView,ViewGroup parent) {
return getCustomView(position, convertView, parent);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
return getCustomView(position, convertView, parent);
}
public View getCustomView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater =getLayoutInflater();
View test=inflater.inflate(R.layout.row, parent, false);
TextView label=(TextView)test.findViewById(R.id.company);
label.setText(beverage[position]);
label.setTypeface(font);
return test;
}
}