ArrayAdapter
will use .toString()
method to show the text.
Override it and use getString(title_id)
to get the string (You will need the context).
You could:
- Create a private field
String stringRapp
- Edit constructor to take a Context
- Use this context and do
stringRapp = context.getString(title_id);
If you are are sure resource ID never changes and will reference to the same string always.
If not:
- Take Context from constructor
- Save it in a field
Context context
- In
.toString()
method,return context.getString(title_id)