Android: better flags, tags loading feedback
@ -20,12 +20,10 @@ public class MainApplication extends Application {
|
|||||||
JSONObject json = PreferenceUtil.getCachedJson(getApplicationContext(), PreferenceUtil.PREF_CACHED_USER_INFO_JSON);
|
JSONObject json = PreferenceUtil.getCachedJson(getApplicationContext(), PreferenceUtil.PREF_CACHED_USER_INFO_JSON);
|
||||||
ApplicationContext.getInstance().setUserInfo(getApplicationContext(), 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 Error feedback (all REST request, even login)
|
||||||
// TODO Fullscreen preview
|
// TODO Fullscreen preview
|
||||||
// TODO Caching preferences
|
// TODO Caching preferences
|
||||||
|
// TODO Edit sharing
|
||||||
|
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
}
|
}
|
||||||
|
@ -78,10 +78,14 @@ public class MainActivity extends ActionBarActivity {
|
|||||||
|
|
||||||
// Get tag list to fill the drawer
|
// Get tag list to fill the drawer
|
||||||
final ListView tagListView = (ListView) findViewById(R.id.tagListView);
|
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() {
|
TagResource.stats(this, new JsonHttpResponseHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
|
public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
|
||||||
tagListView.setAdapter(new TagListAdapter(response.optJSONArray("stats")));
|
tagListView.setAdapter(new TagListAdapter(response.optJSONArray("stats")));
|
||||||
|
tagListView.setEmptyView(tagEmptyView);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 599 B After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 352 B |
Before Width: | Height: | Size: 420 B After Width: | Height: | Size: 558 B |
BIN
docs-android/app/src/main/res/drawable-xxhdpi/eng.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
docs-android/app/src/main/res/drawable-xxhdpi/fra.png
Normal file
After Width: | Height: | Size: 505 B |
BIN
docs-android/app/src/main/res/drawable-xxhdpi/jpn.png
Normal file
After Width: | Height: | Size: 813 B |
@ -18,6 +18,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="start"
|
android:layout_gravity="start"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:clickable="true"
|
||||||
android:background="#fff"
|
android:background="#fff"
|
||||||
android:elevation="5dp">
|
android:elevation="5dp">
|
||||||
|
|
||||||
@ -141,7 +142,33 @@
|
|||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:choiceMode="singleChoice"
|
android:choiceMode="singleChoice"
|
||||||
android:divider="@android:color/transparent"
|
android:divider="@android:color/transparent"
|
||||||
android:dividerHeight="0dp" />
|
android:dividerHeight="0dp"/>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/tagProgressView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
style="?android:progressBarStyle"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:indeterminate="true"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tagEmptyView"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:padding="12dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="sans-serif-light"
|
||||||
|
android:text="@string/no_tags"
|
||||||
|
android:textSize="14sp"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -25,7 +25,9 @@
|
|||||||
<string name="downloading_document">Downloading document</string>
|
<string name="downloading_document">Downloading document</string>
|
||||||
<string name="action_search">Search documents</string>
|
<string name="action_search">Search documents</string>
|
||||||
<string name="all_documents">All documents</string>
|
<string name="all_documents">All documents</string>
|
||||||
|
<string name="shared_documents">Shared documents</string>
|
||||||
<string name="all_tags">All tags</string>
|
<string name="all_tags">All tags</string>
|
||||||
|
<string name="no_tags">No tags</string>
|
||||||
|
|
||||||
<!-- Validation -->
|
<!-- Validation -->
|
||||||
<string name="validate_error_email">Invalid email</string>
|
<string name="validate_error_email">Invalid email</string>
|
||||||
@ -33,6 +35,5 @@
|
|||||||
<string name="validate_error_length_max">Too long (max. %d)</string>
|
<string name="validate_error_length_max">Too long (max. %d)</string>
|
||||||
<string name="validate_error_required">Required</string>
|
<string name="validate_error_required">Required</string>
|
||||||
<string name="validate_error_alphanumeric">Only letters and numbers</string>
|
<string name="validate_error_alphanumeric">Only letters and numbers</string>
|
||||||
<string name="shared_documents">Shared documents</string>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|