ListView listView = findViewById(R.id.list_view); Context context = listView.getContext(); String text = context.getString(R.string.my_text);
public class MyAdapter extends ArrayAdapterIn this example, we create a custom adapter called MyAdapter that extends ArrayAdapter{ public MyAdapter(Context context, List data) { super(context, android.R.layout.simple_list_item_1, data); } }