add list in popupwindow
I have to make an application where I have to show a list of names in popup.
I have used array-list to fetch the values from database, but I cannot put
it in array-adapter. here is my code:
public class Calculator_new_Pop extends Dialog implements
View.OnClickListener{
.............
.............
.............
ArrayList<String> wallAreas=new ArrayList<String>();
wallAreas=GenericDAO.getWallAreas(room_id);//to fetch the values from
databases
ArrayAdapter<String> new_adapter = new
ArrayAdapter<String>(Calculator_new_Pop.this,android.R.layout.simple_list_item_1,wallAreas);
_ltvw.setAdapter(new_adapter);
.......
}
the error is
"The constructor ArrayAdapter(Calculator_new_Pop, int, ArrayList) is
undefined"
Can anyone help me out?
No comments:
Post a Comment