mirror of
https://github.com/nerzhul/ownCloud-SMS-App.git
synced 2026-08-22 13:52:58 +00:00
Add a basic listview as a PoC to choose accounts (this doesn't use accounts atm)
This commit is contained in:
@@ -181,6 +181,10 @@ public class MainActivity extends Activity {
|
||||
}
|
||||
}
|
||||
|
||||
public void selectAccountForRestauration(final View view) {
|
||||
startActivity(new Intent(this, RestoreSMSAccountListActivity.class));
|
||||
}
|
||||
|
||||
public void openGooglePlayStore(final View view) {
|
||||
Intent intent;
|
||||
try {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package fr.unix_experience.owncloud_sms.activities;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import android.app.ListActivity;
|
||||
import android.os.Bundle;
|
||||
import android.widget.ArrayAdapter;
|
||||
import fr.unix_experience.owncloud_sms.R;
|
||||
|
||||
public class RestoreSMSAccountListActivity extends ListActivity {
|
||||
ArrayList<String> listItems = new ArrayList<String>();
|
||||
ArrayAdapter<String> adapter;
|
||||
|
||||
@Override
|
||||
public void onCreate(final Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
setContentView(R.layout.restore_activity_accountlist);
|
||||
adapter = new ArrayAdapter<String>(this,
|
||||
android.R.layout.simple_list_item_1,
|
||||
listItems);
|
||||
setListAdapter(adapter);
|
||||
|
||||
listItems.add("test");
|
||||
listItems.add("test2");
|
||||
listItems.add("test3");
|
||||
listItems.add("test4s");
|
||||
adapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user