Search code examples
javaandroidandroid-spinnerandroid-4.0-ice-cream-sandwich

Spinner issue on samsung galaxy s3


Im using samsung galaxy s3 to test my application, I have three edittext and one spinner. whenever i click the spinner, it clears the edittext value of three edittext, and after clicking item from the spinner, i get the valuo of edit text. For below version of android, spinner will display like dialog, covers maximum screen. But in the Android 4.0, its like drop down, and its also clears the edittext data.

How to fix this issue?

    spRejectionCode = (Spinner) findViewById(R.id.spRejection);     
    ArrayAdapter<String> adapterNo = new ArrayAdapter<String>(this,
            android.R.layout.simple_spinner_item,Constants.rejectioncode);
    adapterNo.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    spRejectionCode.setAdapter(adapterNo);

Solution

  • It is not the issue , in earlier version the spinner looks like dialog and now in android 4.0 onwards it looks like drop down , so don't worry about the look and feel of spinner.