1
0
mirror of https://github.com/sismics/docs.git synced 2025-12-26 16:11:42 +00:00

Android: better flags, tags loading feedback

This commit is contained in:
jendib
2014-11-25 00:09:12 +01:00
parent a6c123ad03
commit a84748f075
10 changed files with 35 additions and 5 deletions

View File

@@ -20,12 +20,10 @@ public class MainApplication extends Application {
JSONObject json = PreferenceUtil.getCachedJson(getApplicationContext(), PreferenceUtil.PREF_CACHED_USER_INFO_JSON);
ApplicationContext.getInstance().setUserInfo(getApplicationContext(), json);
// TODO Edit sharing
// TODO Tags loading feedback
// TODO Redraw flags
// TODO Error feedback (all REST request, even login)
// TODO Fullscreen preview
// TODO Caching preferences
// TODO Edit sharing
super.onCreate();
}

View File

@@ -78,10 +78,14 @@ public class MainActivity extends ActionBarActivity {
// Get tag list to fill the drawer
final ListView tagListView = (ListView) findViewById(R.id.tagListView);
final View tagProgressView = findViewById(R.id.tagProgressView);
final View tagEmptyView = findViewById(R.id.tagEmptyView);
tagListView.setEmptyView(tagProgressView);
TagResource.stats(this, new JsonHttpResponseHandler() {
@Override
public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
tagListView.setAdapter(new TagListAdapter(response.optJSONArray("stats")));
tagListView.setEmptyView(tagEmptyView);
}
});