I need to put different lines in a Spinner I tried to put in the xml file android:singleLine="false"
and writing \n
as you can see in the example but nothing work. What I need exactly isn't just to adjust the text for see it correctly. I need to specify when I want to jump line.
Here is the format of each option in the Spinner I want:
TITLE: XXXXX "\n"
property1: xxxx property2: xxxx
Here is a resume of my code:
s2 = (Spinner) findViewById(R.id.spinner2);
adapter2 = new ArrayAdapter(Activity_introducir.this,android.R.layout.simple_spinner_item,nomactivitats(s.getSelectedItem().toString()));
s2.setAdapter(adapter2);
private ArrayList nomactivitats(String nomproj) {
...
array_activitats.add(cc.getString(3) + " \n Example Text in next line");
...
return array_activitats;
}