-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1193 - optimizing the uploader layout & taking user configured sorting into account #1277
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d74f5fd
implementation of #1193 - optimizing the uploader layout and taking u…
AndyScherzinger ef0b503
fix background color
AndyScherzinger 8d47b77
implementation of #1193 - optimizing the uploader layout and taking u…
AndyScherzinger 7c8fbf1
Fixes after rebase
AndyScherzinger 9bbd7ee
proper padding for the choose upload folder buttons
AndyScherzinger ee7873d
fixed menu, since grid view hasn't been part of the uploader screen
AndyScherzinger 8b04d61
removed duplicate method call
AndyScherzinger 1f4e9aa
fix after rebase
AndyScherzinger 94a6beb
moved the preference accessing to the oC Preference Manager
AndyScherzinger 19c7885
moved the preference accessing to the oC Preference Manager
AndyScherzinger 5c72090
removed now unused code
AndyScherzinger 26ef68a
streamlined PrefManager API for simpler usage
AndyScherzinger 89dded1
fix preference manager call after rebase
AndyScherzinger 68849c7
code review: fixed minor layout optimizations, set generic preference…
AndyScherzinger 53a0da7
revert filtering out files in the external file upload view
AndyScherzinger 8c863a6
revert, to show app name for upload from other app
AndyScherzinger 0db0ab1
layouting changes so file list, local list and uploader list look the…
AndyScherzinger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule owncloud-android-library
updated
0 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,15 +33,13 @@ | |
import android.content.Intent; | ||
import android.content.IntentFilter; | ||
import android.content.ServiceConnection; | ||
import android.content.SharedPreferences; | ||
import android.content.SyncRequest; | ||
import android.content.pm.PackageManager; | ||
import android.content.res.Resources.NotFoundException; | ||
import android.os.Build; | ||
import android.os.Bundle; | ||
import android.os.IBinder; | ||
import android.os.Parcelable; | ||
import android.preference.PreferenceManager; | ||
import android.support.design.widget.Snackbar; | ||
import android.support.v4.app.Fragment; | ||
import android.support.v4.app.FragmentManager; | ||
|
@@ -60,6 +58,7 @@ | |
import com.owncloud.android.R; | ||
import com.owncloud.android.datamodel.FileDataStorageManager; | ||
import com.owncloud.android.datamodel.OCFile; | ||
import com.owncloud.android.db.PreferenceManager; | ||
import com.owncloud.android.files.services.FileDownloader; | ||
import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder; | ||
import com.owncloud.android.files.services.FileUploader; | ||
|
@@ -90,12 +89,13 @@ | |
import com.owncloud.android.ui.preview.PreviewVideoActivity; | ||
import com.owncloud.android.utils.DisplayUtils; | ||
import com.owncloud.android.utils.ErrorMessageAdapter; | ||
import com.owncloud.android.utils.FileStorageUtils; | ||
import com.owncloud.android.utils.PermissionUtil; | ||
|
||
import java.io.File; | ||
import java.util.ArrayList; | ||
|
||
import static com.owncloud.android.db.PreferenceManager.*; | ||
|
||
/** | ||
* Displays, what files the user has available in his ownCloud. This is the main view. | ||
*/ | ||
|
@@ -564,12 +564,7 @@ public boolean onOptionsItemSelected(MenuItem item) { | |
break; | ||
} | ||
case R.id.action_sort: { | ||
SharedPreferences appPreferences = PreferenceManager | ||
.getDefaultSharedPreferences(this); | ||
|
||
// Read sorting order, default to sort by name ascending | ||
Integer sortOrder = appPreferences | ||
.getInt("sortOrder", FileStorageUtils.SORT_NAME); | ||
Integer sortOrder = getSortOrder(this); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a really nice catch. Thanks a lot. |
||
|
||
AlertDialog.Builder builder = new AlertDialog.Builder(this); | ||
builder.setTitle(R.string.actionbar_sort_title) | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
abstract
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because all it is is a helper class with all methods being static so nobody should create instances but simply call the helper methods thus I made it abstract :)