From 905b68b4ec886cff35799c0e0604383d9f1d245b Mon Sep 17 00:00:00 2001 From: masensio Date: Wed, 14 Oct 2015 12:58:07 +0200 Subject: [PATCH] Show the 'search' layout in phone and tablet --- AndroidManifest.xml | 116 ++++++++------- build.gradle | 9 +- res/layout/search_user_item.xml | 16 ++ res/layout/search_users_groups_layout.xml | 28 +++- res/layout/share_activity.xml | 44 ++++++ res/layout/share_file_dialog.xml | 110 -------------- res/layout/share_file_layout.xml | 108 ++++++++++++++ res/values-v21/styles.xml | 8 +- res/values-w820dp/dimens.xml | 6 + res/values/dimens.xml | 5 + res/values/styles.xml | 6 + .../android/files/FileOperationsHelper.java | 9 +- .../android/ui/activity/FileActivity.java | 1 - .../ui/activity/FileDisplayActivity.java | 9 +- .../android/ui/activity/ShareActivity.java | 138 ++++++++++++++++++ .../android/ui/fragment/SearchFragment.java | 138 ++++++++++++++++++ .../ShareFileFragment.java} | 96 +++++++----- .../ui/preview/PreviewImageActivity.java | 9 +- 18 files changed, 633 insertions(+), 223 deletions(-) create mode 100644 res/layout/share_activity.xml delete mode 100644 res/layout/share_file_dialog.xml create mode 100644 res/layout/share_file_layout.xml create mode 100644 res/values-w820dp/dimens.xml create mode 100644 res/values/dimens.xml create mode 100644 src/com/owncloud/android/ui/activity/ShareActivity.java create mode 100644 src/com/owncloud/android/ui/fragment/SearchFragment.java rename src/com/owncloud/android/ui/{dialog/ShareFileDialogFragment.java => fragment/ShareFileFragment.java} (60%) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index acb5f1d8a9..e758be2755 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,4 +1,5 @@ - - + + android:versionName="1.8.0" > + + @@ -31,64 +37,60 @@ - - - - + + + - + + + android:theme="@style/Theme.ownCloud" > + android:label="@string/app_name" > + - - + + - + - + - + - + - - - + + - - - + + android:theme="@style/Theme.ownCloud.Fullscreen" /> - + android:exported="true" > + @@ -98,7 +100,7 @@ + android:exported="true" > @@ -114,13 +116,13 @@ android:enabled="true" android:exported="false" android:label="@string/sync_string_files" - android:syncable="true"> + android:syncable="true" /> + android:launchMode="singleTask" + android:theme="@style/Theme.ownCloud.noActionBar" > @@ -131,6 +133,7 @@ + @@ -141,48 +144,53 @@ - - - - - - - + + + + + + + + + - + - - - + + - + android:name=".ui.activity.CopyToClipboardActivity" + android:icon="@drawable/copy_link" + android:label="@string/copy_link" /> - + android:name=".ui.activity.FolderPickerActivity" + android:label="@string/app_name" /> + + + diff --git a/build.gradle b/build.gradle index a0db0184c0..8eee84839e 100644 --- a/build.gradle +++ b/build.gradle @@ -20,10 +20,11 @@ repositories { dependencies { compile name: 'touch-image-view' - compile 'com.android.support:support-v4:22.2.1' compile project(':owncloud-android-library') + compile 'com.android.support:support-v4:22.2.1' compile 'com.jakewharton:disklrucache:2.0.2' compile 'com.android.support:appcompat-v7:22.2.1' + compile 'com.android.support:design:22.2.1' } android { @@ -58,7 +59,7 @@ android { abortOnError false } } - + productFlavors { } @@ -68,3 +69,7 @@ android { } + + + + diff --git a/res/layout/search_user_item.xml b/res/layout/search_user_item.xml index c7bf2b4055..ce236f5193 100644 --- a/res/layout/search_user_item.xml +++ b/res/layout/search_user_item.xml @@ -1,4 +1,20 @@ + + + + android:orientation="vertical" + android:id="@+id/search_layout" + android:minWidth="200dp"> + android:layout_width="match_parent" + android:layout_height="match_parent" + android:id="@+id/searchUsersListView" + android:scrollbars="vertical"/> diff --git a/res/layout/share_activity.xml b/res/layout/share_activity.xml new file mode 100644 index 0000000000..e9be9f6cd2 --- /dev/null +++ b/res/layout/share_activity.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + diff --git a/res/layout/share_file_dialog.xml b/res/layout/share_file_dialog.xml deleted file mode 100644 index 7998734452..0000000000 --- a/res/layout/share_file_dialog.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/res/layout/share_file_layout.xml b/res/layout/share_file_layout.xml new file mode 100644 index 0000000000..fc2832bd35 --- /dev/null +++ b/res/layout/share_file_layout.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/values-v21/styles.xml b/res/values-v21/styles.xml index c0174420df..13ab3168d6 100644 --- a/res/values-v21/styles.xml +++ b/res/values-v21/styles.xml @@ -18,5 +18,11 @@ --> + > + \ No newline at end of file diff --git a/res/values-w820dp/dimens.xml b/res/values-w820dp/dimens.xml new file mode 100644 index 0000000000..63fc816444 --- /dev/null +++ b/res/values-w820dp/dimens.xml @@ -0,0 +1,6 @@ + + + 64dp + diff --git a/res/values/dimens.xml b/res/values/dimens.xml new file mode 100644 index 0000000000..da62b5f393 --- /dev/null +++ b/res/values/dimens.xml @@ -0,0 +1,5 @@ + + 180dp + 16dp + 16dp + diff --git a/res/values/styles.xml b/res/values/styles.xml index 54e522578b..b7a64843c2 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -224,4 +224,10 @@ #777777 #000000 + +