I have successfully created a listview that contains all the options (text). However I would like to add unique icons next to each of the options. How can I go about doing this, with my excising code?
Here is what I am trying to achieve:
Here is my code: AccountSettingsActivity.java
//All Options in Account Settings
private void setupSettingsList(){
ListView listView = findViewById(R.id.lvAccountSettings);
ArrayList<String> options = new ArrayList<>();
options.add(getString((R.string.editProfile)));
options.add(getString(R.string.notifications));
options.add(getString(R.string.privacy_settings));
options.add(getString(R.string.security));
options.add(getString(R.string.ads));
options.add(getString(R.string.help));
options.add(getString(R.string.about));
options.add(getString(R.string.logout));
ArrayAdapter adapter = new ArrayAdapter(mContext, R.layout.listview_row_adjustment, options);
listView.setAdapter((adapter));
}
listview_row_adjustmnet.xml (This simply changes the text color and size of the options in the listview)
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/listViewAdjustment"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:textSize="17sp"
android:gravity="fill"
android:textColor="@color/white"/>