Android Open Source - VoiceCart Custom On Item Selected Listener

From Project

Back to project page VoiceCart.


The source code is released under:

MIT License

If you think the Android project VoiceCart listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.example.VoiceCart;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.Toast;
/*from  w  ww  .ja  va2 s  .  co m*/
public class CustomOnItemSelectedListener implements OnItemSelectedListener {
    public void onItemSelected(AdapterView<?> parent, View view, int pos,
            long id) {
      Log.d("relevant item ",parent.getItemAtPosition(pos).toString() );
      if (parent.getItemAtPosition(pos).toString() == "Save") {

                "On Item Select : \n" + parent.getItemAtPosition(pos).toString(),
    public void onNothingSelected(AdapterView<?> arg0) {
        // TODO Auto-generated method stub

Java Source Code List