Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.mkyong.android;
- import android.view.View;
- import android.widget.AdapterView;
- import android.widget.AdapterView.OnItemSelectedListener;
- import android.widget.Toast;
- public class CustomOnItemSelectedListener implements OnItemSelectedListener {
- public void onItemSelected(AdapterView<?> parent, View view, int pos,long id) {
- Toast.makeText(parent.getContext(),
- "OnItemSelectedListener : " + parent.getItemAtPosition(pos).toString(),
- Toast.LENGTH_SHORT).show();
- }
- @Override
- public void onNothingSelected(AdapterView<?> arg0) {
- // TODO Auto-generated method stub
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement