I am having a problem with the spinner item colour.
I am fetching the Spinner items from database.
I changed the spinner item colour.
But when I select a Spinner item, the colour will change to white again.
Here is my code:
public class PersonalInformation extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.info)
mySpinner.setOnItemSelectedListener(new OnItemSelectedListener()
{
@Override
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id)
{
ArrayAdapter<CharSequence> adapter =ArrayAdapter.createFromResource(this,R.array.spinner_array,R.layout.spinner_text);
}
@Override
public void onNothingSelected(AdapterView<?> parent)
{
// TODO Auto-generated method stub
}
});
And Here is my Spinner xml file code:
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:textColor="#000000"
android:textColorHint="#000000"
android:textSize="20dp">
</TextView>