import android.widget.ListAdapter; @SimpleFunction(description = "Add image, title, subtitle in List with image and text")
public void Add(List title, List subtitle, List image){
ListAdapter listAdapter = new ListAdapter(title, subtitle, image);
listView.setAdapter(listAdapter);
}
Compiling Java files
│ warning: The following options were not recognized by any processor: '[output, org, root, version, extName]'
│
│ ERR src\com\faraz\ListWithImageAndText\ListWithImageAndText.java:39: error: ListAdapter is abstract; cannot be instantiated
│ ListAdapter listAdapter = new ListAdapter(title, subtitle, image);
│ ^
│
│ Total error(s): 1
└ Failed
public void Add(List list) {
ListView lv = new ListView(this.container.$context());
List myRowItems = new ArrayList(list);
ArrayAdapter myAdapter = new ArrayAdapter(this.container.$context(), myRowItems);
lv.setAdapter(myAdapter);
}
┌ Compiling Java files
│ warning: The following options were not recognized by any processor: '[output, org, root, version, extName]'
│
│ ERR src\com\faraz\CustomAdapter\CustomAdapter.java:27: error: incompatible types: List cannot be converted to int
│ ArrayAdapter myAdapter = new ArrayAdapter(this.container.$context(), myRowItems);
│ ^
│ Note: C:\Users\Afroz Ahmad\Desktop\Coding\MyExtensions\custom-adapter\src\com\faraz\CustomAdapter\CustomAdapter.java uses unchecked or unsafe operations.
│ Note: Recompile with -Xlint:unchecked for details.
│ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
│
│ Total error(s): 1
└ Failed