Like i say. I don't know how to set everything in my spinner
to white.
Problem is in this image
Like You see i have white and always black, with black background this button is not good visible.
Here is some code:
<Spinner
android:id="@+id/spinner_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:text="50$"
android:textColor="@color/white"
android:textSize="20sp" />
whats wrong guys?
Here i confgure spinner
private void configureSpinnerDataAndLogic() {
String[] arraySpinner = new String[]{
"50", "100", "150", "200", "250", "300", "400", "500"};
ArrayAdapter<String> adapter = new ArrayAdapter<>(getContext(),
android.R.layout.simple_list_item_1, arraySpinner);
spinnerData.setAdapter(adapter);
spinnerData.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
((TextView) parent.getChildAt(0)).setTextColor(Color.WHITE);
String text = spinnerData.getSelectedItem().toString();
int temp = Integer.parseInt(text);
text_profit.setText((temp * 2) + " $ " + "100%");
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
}
Edited:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:width="20dp"
android:gravity="right"
android:layout_centerVertical="true"
android:height="20dp">
<rotate
android:fromDegrees="45"
android:pivotX="135%"
android:pivotY="15%"
android:toDegrees="45">
<shape android:shape="rectangle">
<solid
android:color="@color/white" />
</shape>
</rotate>
</item>
</layer-list>