mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 05:57:57 +01:00
Android: show all documents from drawer
This commit is contained in:
parent
6a9a166670
commit
407564f28c
@ -20,10 +20,8 @@ public class MainApplication extends Application {
|
||||
JSONObject json = PreferenceUtil.getCachedJson(getApplicationContext(), PreferenceUtil.PREF_CACHED_USER_INFO_JSON);
|
||||
ApplicationContext.getInstance().setUserInfo(getApplicationContext(), json);
|
||||
|
||||
// TODO Tags in drawer & search on select
|
||||
// TODO Sharing
|
||||
// TODO Error feedback
|
||||
// TODO Printing
|
||||
// TODO Error feedback (all REST request, even login)
|
||||
// TODO Fullscreen preview
|
||||
// TODO Caching preferences
|
||||
|
||||
|
@ -100,6 +100,19 @@ public class MainActivity extends ActionBarActivity {
|
||||
}
|
||||
});
|
||||
|
||||
// Click on All documents
|
||||
View allDocumentsLayout = findViewById(R.id.allDocumentsLayout);
|
||||
allDocumentsLayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
SearchView searchView = (SearchView) searchItem.getActionView();
|
||||
searchView.setQuery(null, true);
|
||||
searchView.setIconified(true);
|
||||
drawerLayout.closeDrawers();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
handleIntent(getIntent());
|
||||
}
|
||||
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 306 B |
Binary file not shown.
After Width: | Height: | Size: 381 B |
@ -17,11 +17,12 @@
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:background="#fff"
|
||||
android:elevation="5dp">
|
||||
|
||||
<!-- Logged in user -->
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -47,6 +48,58 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- All documents -->
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/allDocumentsLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/allDocumentsImageView"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_marginRight="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_work_grey600_24dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@+id/allDocumentsImageView"
|
||||
android:layout_toEndOf="@+id/allDocumentsImageView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif"
|
||||
android:textColor="#212121"
|
||||
android:text="@string/all_documents"
|
||||
android:textSize="14sp"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- Separator -->
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#e5e5e5"/>
|
||||
|
||||
<!-- All tags -->
|
||||
|
||||
<TextView
|
||||
android:layout_margin="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#9f9f9f"
|
||||
android:fontFamily="sans-serif"
|
||||
android:textSize="14sp"
|
||||
android:text="@string/all_tags"/>
|
||||
|
||||
<ListView
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/tagListView"
|
||||
|
@ -19,6 +19,13 @@
|
||||
<string name="invalid_url">Please check the server URL and try again</string>
|
||||
<string name="crash_toast_text">A crash occurred, a report has been sent to resolve this problem</string>
|
||||
<string name="created_date">Created date</string>
|
||||
<string name="download_file">Download current file</string>
|
||||
<string name="downloading_file">Downloading file number %1s</string>
|
||||
<string name="download_document">Download all files</string>
|
||||
<string name="downloading_document">Downloading document</string>
|
||||
<string name="action_search">Search documents</string>
|
||||
<string name="all_documents">All documents</string>
|
||||
<string name="all_tags">All tags</string>
|
||||
|
||||
<!-- Validation -->
|
||||
<string name="validate_error_email">Invalid email</string>
|
||||
@ -26,10 +33,5 @@
|
||||
<string name="validate_error_length_max">Too long (max. %d)</string>
|
||||
<string name="validate_error_required">Required</string>
|
||||
<string name="validate_error_alphanumeric">Only letters and numbers</string>
|
||||
<string name="download_file">Download current file</string>
|
||||
<string name="downloading_file">Downloading file number %1s</string>
|
||||
<string name="download_document">Download all files</string>
|
||||
<string name="downloading_document">Downloading document</string>
|
||||
<string name="action_search">Search documents</string>
|
||||
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user