Android string-array from xml file to ListView

Change to

String [] fiilliste;
ArrayAdapter<String> adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.verbs);
    fiilliste = getResources().getStringArray(R.array.fi); 
    // move this in onCreate

I assume you have the string array fi in strings.xml.

You probably got NullPointerException. You require activity context for getResources(). So move it inside onCreate.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)