I want to assign the values of the string t and string b to the two TextView declared in R.layout.news_01story
Can this be done? Help needed!
The bellow method takes us to a new Layout when we click an item in a ListView–>
@Override
public void onListItemClick(ListView parent, View v, int position, long id) {
CustomAdapter adapter = (CustomAdapter) parent.getAdapter();
RowData row = adapter.getItem(position);
String t = row.mTitle;
String b = row.mDescription;
AlertDialog.Builder builder=new AlertDialog.Builder(this);
LayoutInflater inflater = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.news_01story,null);
builder.setView(layout);
builder.show();
}
Regards!
1 Answer