For now, I have a database with a single table having a single column of type TEXT. I want to be able to retrieve the data from that table and for each string from the table I w
try this
Fetch data from Database
in Cursor
and pass this cursor in below method it will return
a view
which you can pass in setContentView(view)
public LinearLayoutCompat defaultPage(Cursor mCursor) {
LinearLayoutCompat layout = new LinearLayoutCompat(this);
layout.setLayoutParams(new LinearLayoutCompat.LayoutParams(LinearLayoutCompat.LayoutParams.MATCH_PARENT, LinearLayoutCompat.LayoutParams.MATCH_PARENT));
layout.setGravity(Gravity.CENTER);
layout.setOrientation(LinearLayoutCompat.VERTICAL);
for(int i=0;i