In my android app I created a table where the user can add rows by clicking on the button "add", I managed to do that but I would like to know if there is a way to save the tableLayout the user generated dynamically in order for him to close the app and then if he opens it again he will get the same table with the rows he created so he can keep adding rows to the table.
This is the code i used fot the button add onClick property
public void onClickAdd(View view) {
TableLayout table_layout = (TableLayout) findViewById(R.id.table_layout);
TableRow row = new TableRow(this);
//add properties to row
tabla.addView(row);
}
My first thought was using sharedPreferences but I am new in apps developing and i don`t know if there is a simpler method.
Thank you in advanced and sorry for my english it's not my first language.