I am using ListView to collect and show History of where people have been to in my WebView. I have tried to find some answers but many of the answers involve extending ListView, which I can't do as I already have an extension. I am starting to get lost and confused. I would appreciate some direction to head towards next.
the getListView cannot be resolved.
Button btn5 = (Button) findViewById(R.id.historyBtn); btn5.setOnClickListener(new View.OnClickListener()
{
WebView webView = (WebView) findViewById(R.id.WebviewScreen);
public void onClick(View v) {
setContentView(R.layout.histlist);
WebBackForwardList currentList = webView.copyBackForwardList();
int currentSize = currentList.getSize();
for(int i = 0; i < currentSize; ++i)
{
WebHistoryItem item = currentList.getItemAtIndex(i);
String url = item.getUrl();
String[] newlist = {url};
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getListView().getContext, android.R.layout.simple_list_item_1, currentList);
getListView().setAdapter(adapter);