Skip to content
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

#1556 - Toolbar, new Drawer and new Account Manager #1559

Merged
merged 84 commits into from
Oct 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
877f790
initial rewrite to make use of the toolbar
AndyScherzinger Mar 23, 2016
271328e
navigation bug fix for previewing text files
AndyScherzinger Mar 23, 2016
07a3e35
initial bug fix for the uploader
AndyScherzinger Mar 23, 2016
25b52f1
initial (functionless) account switcher for the drawer header and dis…
AndyScherzinger Mar 23, 2016
adebaf9
initial account chooser toggle and further abstraction of the drawer …
AndyScherzinger Mar 23, 2016
4efcb5c
general menu/account list switch implemented (open: populate account …
AndyScherzinger Mar 23, 2016
ac9876f
initial account handling in drawer + initial icon generation (still b…
AndyScherzinger Mar 23, 2016
7df97af
circle icons for accounts with color coding
AndyScherzinger Mar 24, 2016
d3e1a9b
account switching implemented (mostly by moving account related metho…
AndyScherzinger Mar 24, 2016
4810094
preserve drawer state on screen rotation and resumes, move color calc…
AndyScherzinger Mar 24, 2016
13487e9
housekeeping removing old account switching code
AndyScherzinger Mar 24, 2016
d7dfb27
split toolbar content method
AndyScherzinger Mar 24, 2016
6711ff7
wip account management - account list changes aren't propagated back …
AndyScherzinger Mar 24, 2016
05b8580
trying to detect account additions and change the list view content (…
AndyScherzinger Mar 24, 2016
fab4661
minor changes for testing
AndyScherzinger Mar 24, 2016
a770714
next try
AndyScherzinger Mar 24, 2016
963fefb
proper list rendering upon account add/remove
AndyScherzinger Mar 24, 2016
1d7a36a
if new account is created via drawer menu item click, refresh drawer …
AndyScherzinger Mar 24, 2016
bab107c
missing license comment in class
AndyScherzinger Mar 25, 2016
afbc964
housekeeping Preferences, removed all accounts related code
AndyScherzinger Mar 25, 2016
099a63d
change detection for the drawer implementation
AndyScherzinger Mar 25, 2016
ae22568
added single top flag
AndyScherzinger Mar 25, 2016
65c8d24
larger hitbox for the account switcher
AndyScherzinger Mar 25, 2016
a75c853
fix: crash when opening upload dialog
tobiasKaminsky Mar 27, 2016
4e19a57
Streamlining moving account handling to a base class b/c it does not …
AndyScherzinger Mar 29, 2016
b482479
moved account handling to base activity since this is not file specif…
AndyScherzinger Mar 29, 2016
1c574ab
Streamlining moving account handling to a base class b/c it does not …
AndyScherzinger Mar 29, 2016
7dad981
cleanup after drawer-rewrite
AndyScherzinger Mar 29, 2016
4d34c47
Color of progress bar now aligned with action bar color via color.xml…
AndyScherzinger Mar 29, 2016
fc7f6c0
layout fix due to added toolbar + oC license added
AndyScherzinger Mar 30, 2016
7e4ff69
rebase fixes
AndyScherzinger Mar 30, 2016
03e6244
removed now unused drawer resource file due to new implementation
AndyScherzinger Apr 4, 2016
c6eb254
checked menu item state implementation
AndyScherzinger Apr 4, 2016
601771d
standard header layouting, flexible avatar radius, code cleanups, dyn…
AndyScherzinger Apr 4, 2016
a081179
NPE Fix
AndyScherzinger Apr 5, 2016
811c492
for null checks
AndyScherzinger Apr 5, 2016
14749c3
wip
tobiasKaminsky Mar 5, 2016
e599b7b
merged avatar branch + circular avatar in drawer header
AndyScherzinger Apr 5, 2016
812e889
JavaDoc
AndyScherzinger Apr 5, 2016
aea5471
rudimentary drawer header / avatar based account switching.
AndyScherzinger Apr 5, 2016
9951654
Fix for dynamic avatar sizing for generic letter/circle avatars
AndyScherzinger Apr 5, 2016
b7b80fc
color fix for EditText (due to wrong parent style)
AndyScherzinger Apr 5, 2016
eb58723
deactivating icon tinting for drawer menu icons on pre lollipop versions
AndyScherzinger Apr 5, 2016
f23a17d
move avatar helper method to TextDrawable, define everything in dp to…
AndyScherzinger Apr 5, 2016
75e35fe
resized text, style and alignment within TextDrawable + cleanups
AndyScherzinger Apr 6, 2016
8784cf8
aligned management screen with material design sizings
AndyScherzinger Apr 6, 2016
19968fc
ellipsized superlong username in the dropdown list
AndyScherzinger Apr 6, 2016
7488c71
set navigation view menu icon size for avatars according to Google's …
AndyScherzinger Apr 6, 2016
177f01e
drawer preparations for "On Device" menu item
AndyScherzinger Apr 6, 2016
272f83c
extend implementation to also set avatars in menu items
AndyScherzinger Apr 7, 2016
a4af5e9
fixing the thumbnail caching (user's name can be the same on two diff…
AndyScherzinger Apr 7, 2016
8dca95c
avatar loading for account manager too + house keeping
AndyScherzinger Apr 7, 2016
06a332a
fixed size differences of generated and image based avatars
AndyScherzinger Apr 7, 2016
2d2cc7d
add toolbar to log screen
AndyScherzinger Apr 8, 2016
49a6fbc
BugFix Log screen Toolbar
AndyScherzinger Apr 13, 2016
cedd715
List divider Fix
AndyScherzinger Apr 14, 2016
da65e70
Set .Toolbar.Drawer theme to UploadListActivity
davivel Sep 30, 2016
b639bd4
Minify v21/Theme.ownCloud.Tool thanks to implicit inherintance from T…
davivel Sep 30, 2016
d00571d
Minify Theme.ownCloud.Toolbar and remove legacy Theme.ownCloud.Widget…
davivel Oct 1, 2016
57191c3
Keep responsibility about top progress bar in content fragment instea…
davivel Oct 3, 2016
6e9a86a
Ease customizing color of app bar + top progress bar
davivel Oct 3, 2016
80a9edb
Fix action mode
davivel Oct 3, 2016
9a4269e
Fix crash when a file is shared with OC app from an external app
davivel Oct 3, 2016
6164510
Remove navigation drawer from PreviewImageActivity - awkward behaviou…
davivel Oct 4, 2016
41779aa
Improve style set to PreviewVideoActivity
davivel Oct 4, 2016
3ba849d
Fix transparent progress dialog in AuthActivity, and tidy up styles f…
davivel Oct 5, 2016
0e39811
Delete unused styles and broken layouts related
davivel Oct 5, 2016
2e29e0f
Fix Toolbar in LocalFolderPickerActivity (to select camera folder)
davivel Oct 5, 2016
83673db
Set style with old ActionBar to some less-used Activities to grant co…
davivel Oct 5, 2016
4aac26e
Flat layout for drawer header
davivel Oct 5, 2016
2937ce1
renamed TextDrawable-->DefaultAvatrTextDrawable, renamed inc-->GmbH
AndyScherzinger Oct 5, 2016
0b451d0
fix string
AndyScherzinger Oct 5, 2016
a0d3714
Minor changes from code review
davivel Oct 5, 2016
75a2243
Fix NPE and enforce log-in after remove all the accounts in ManageAcc…
davivel Oct 6, 2016
1064bba
Fix duplicate entry of account in drawer when avatar is not available
davivel Oct 6, 2016
dc54faa
don't show active account in account chooser/switcher
AndyScherzinger Oct 6, 2016
3188e1a
Show display name in accounts manager, and review layout
davivel Oct 6, 2016
4c9a38a
Add confirmation dialog to remove account
davivel Oct 7, 2016
5a131a2
Finish action mode when drawer starts to open, recover it when drawer…
davivel Oct 10, 2016
f435822
Fix exit of the app after not creating account from 'Add account' in …
davivel Oct 10, 2016
068d2a8
Switch current account on click in account manager
davivel Oct 11, 2016
7c8a2e9
Show a check mark on the current account in the account manager
davivel Oct 11, 2016
328f4de
Fix duplicated avatars for different accounts with same username, and…
davivel Oct 11, 2016
7748321
Avatars: update when changed in server, full load in background, sele…
davivel Oct 14, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,24 @@
android:name=".MainApp"
android:icon="@mipmap/icon"
android:label="@string/app_name"
android:theme="@style/Theme.ownCloud"
android:theme="@style/Theme.ownCloud.Toolbar"
android:manageSpaceActivity=".ui.activity.ManageSpaceActivity"
android:resizeableActivity="true"
android:supportsPictureInPicture="false" >
<activity android:name=".ui.activity.FileDisplayActivity" >
<activity
android:name=".ui.activity.FileDisplayActivity"
android:theme="@style/Theme.ownCloud.Toolbar.Drawer">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be added also to .ui.activity.UploadListActivity ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes :)

<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ui.activity.ManageAccountsActivity" />
<activity android:name=".ui.activity.UploadFilesActivity" />
<activity android:name=".ui.activity.ReceiveExternalFilesActivity"
android:taskAffinity=""
android:excludeFromRecents="true"
android:theme="@style/Theme.ownCloud">
android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.SEND" />

Expand Down Expand Up @@ -165,7 +167,7 @@
android:name=".authentication.AuthenticatorActivity"
android:exported="true"
android:launchMode="singleTask"
android:theme="@style/Theme.ownCloud.noActionBar" >
>
<intent-filter>
<action android:name="android.intent.action.VIEW" />

Expand All @@ -186,15 +188,19 @@
<service android:name=".files.services.FileUploader" />
<service android:name=".media.MediaService" />

<activity android:name=".ui.activity.PassCodeActivity" />
<activity android:name=".ui.activity.ConflictsResolveActivity"/>
<activity android:name=".ui.activity.PassCodeActivity"
android:theme="@style/Theme.ownCloud"/>
<activity android:name=".ui.activity.ConflictsResolveActivity"
android:theme="@style/Theme.ownCloud"/>
<activity android:name=".ui.activity.GenericExplanationActivity"/>
<activity android:name=".ui.activity.ErrorsWhileCopyingHandlerActivity"/>
<activity android:name=".ui.activity.ErrorsWhileCopyingHandlerActivity"
android:theme="@style/Theme.ownCloud"/>

<activity android:name=".ui.activity.LogHistoryActivity"/>

<activity android:name=".ui.errorhandling.ErrorShowActivity" />
<activity android:name=".ui.activity.UploadListActivity" />
<activity android:name=".ui.activity.UploadListActivity"
android:theme="@style/Theme.ownCloud.Toolbar.Drawer"/>

<receiver android:name=".broadcastreceivers.ConnectivityActionReceiver"
android:enabled="true" android:label="ConnectivityActionReceiver">
Expand Down Expand Up @@ -234,7 +240,7 @@
<activity
android:name=".ui.activity.ShareActivity"
android:label="@string/share_dialog_title"
android:theme="@style/Theme.ownCloud.Dialog.NoTitle"
android:theme="@style/Theme.ownCloud.AlertDialog.NoTitle"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustResize" >
<intent-filter>
Expand Down
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {
apply plugin: 'com.android.application'

ext {
supportLibraryVersion = '23.1.1'
supportLibraryVersion = '24.2.1'
}

repositories {
Expand Down Expand Up @@ -55,7 +55,10 @@ dependencies {
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'

// UIAutomator - for cross-app UI tests, and to grant screen is turned on in Espresso tests
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'

// fix conflict in dependencies; see http://g.co/androidstudio/app-test-app-conflict for details
androidTestCompile "com.android.support:support-annotations:${supportLibraryVersion}"

}

Expand Down
Binary file added res/drawable-hdpi/ic_account_plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_account_plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xhdpi/ic_account_plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xhdpi/ic_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xhdpi/ic_key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xhdpi/ic_up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xxhdpi/ic_account_plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xxhdpi/ic_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xxhdpi/ic_key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xxhdpi/ic_up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xxhdpi/owncloud_progressbar_indeterminate_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xxhdpi/owncloud_progressbar_indeterminate_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xxhdpi/owncloud_progressbar_indeterminate_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xxhdpi/owncloud_progressbar_indeterminate_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xxhdpi/owncloud_progressbar_indeterminate_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xxhdpi/owncloud_progressbar_indeterminate_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xxhdpi/owncloud_progressbar_indeterminate_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xxhdpi/owncloud_progressbar_indeterminate_8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ic_current.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable/ic_current_white.png
11 changes: 0 additions & 11 deletions res/drawable/process_dialog_background.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

<item
android:id="@android:id/background"
android:drawable="@color/transparent" />
android:drawable="@color/background_color" />
<item android:id="@android:id/secondaryProgress">
<scale
android:drawable="@color/owncloud_blue"
android:drawable="@color/actionbar_start_color"
android:scaleWidth="100%" />
</item>
<item android:id="@android:id/progress">
<scale
android:drawable="@color/owncloud_blue"
android:drawable="@color/actionbar_start_color"
android:scaleWidth="100%" />
</item>

Expand Down
60 changes: 0 additions & 60 deletions res/layout-v11/activity_row.xml

This file was deleted.

70 changes: 0 additions & 70 deletions res/layout-v11/notification_with_progress_bar.xml

This file was deleted.

69 changes: 0 additions & 69 deletions res/layout-v14/generic_explanation.xml

This file was deleted.

49 changes: 49 additions & 0 deletions res/layout/account_action.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
ownCloud Android client application

Copyright (C) 2016 ownCloud GmbH.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2,
as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="72dp"
android:orientation="horizontal"
android:weightSum="1">

<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="20dp"
android:layout_marginStart="20dp"
android:src="@drawable/ic_account_plus"/>

<TextView
android:id="@+id/name"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginLeft="28dp"
android:layout_marginStart="20dp"
android:layout_weight="1"
android:gravity="center_vertical"
android:paddingRight="@dimen/standard_padding"
android:paddingEnd="@dimen/standard_padding"
android:text="@string/placeholder_filename"
android:textColor="@color/primary"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use OC blue for text here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it's the button. OK, might work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should use "primary" as set here which is one of the oc blue colors.

android:textSize="@dimen/two_line_primary_text_size"/>

</LinearLayout>
Loading