I have this spinner with a perzonalized adapter, but the issue is that I'm not getting the expected result, at this moment it looks like this,
As you can see I have 2 arrows, one is from my custom layout, and the other one is the one that brings the spinner,
This is my Layout
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/text1"
style="?android:attr/spinnerItemStyle"
android:singleLine="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:textAlignment="textStart"
android:background="@drawable/redondo"
android:drawableEnd="@mipmap/flechaabajooo"/>
And so I set it
Spinner tipodePerfilSpinner = (Spinner) findViewById(R.id.SprTipoPerfil);
ArrayList<String> Tipos = new ArrayList<>();
Tipos.add("Persona");
final ArrayAdapter<String> dataAdapter2 = new ArrayAdapter<String>(InformationsPersonal.this,R.layout.spinner_custom,R.id.text1,Tipos);
dataAdapter2.setDropDownViewResource(R.layout.spinner_custom);
tipodePerfilSpinner.setAdapter(dataAdapter2);
tipodePerfilSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
Object tipo = dataAdapter2.getItem(position);
TipoSeleccionado = tipo.toString();
}
@Override
public void onNothingSelected(AdapterView<?> adapter) {
//TODO implementar
}
});
The truth I was left without ideas because it does not occupy the whole width if it has android:layout_width="match_parent"
Apart from that it does not focus on what it should be.
or how to remove the arrow that brings the spinner by default, any help will be welcome, thank you already