Использовать карту имени таблицы против массива данных
// Store
Map<String, String[]> storage = new HashMap<String, String[]>();
String[] items = {"one","two","three"}; // Your Data
storage.put("tableName", items); // Your table name
// Retrieve a specific table
String[] tableItems = storage.get("tableName");
for(String s : tableItems){
Log.i("TAG", "item name: "+s); // Will loop and print one , two then three
}
// Retrive all
Set<String> allTables = storage.keySet();
for (String table : allTables) {
for(String s : storage.get(table)){
Log.i("TAG", "table name: " + table + "item name: "+s); // Will loop through each table, (we only have one) and print one , two then three
}
}
EDIT
Ваш комментарий об отправке имен таблиц:
String[] items = {"tableOne","tableTwo","tableThree"}; // Your Data
Intent intent = new Intent(this, Activity2.class);
intent.putExtra("sendIntentTableName", items);
startActivity(intent);
... onCreate(){
String[] tableNames = getIntent().getStringArrayExtra("sendIntentTableName");
}