Skip to content

Commit

Permalink
Merge pull request #358 from nextcloud/syncedFolders
Browse files Browse the repository at this point in the history
Auto Upload (Android 7+)
  • Loading branch information
tobiasKaminsky committed Nov 16, 2016
2 parents 7260f5b + 93e861c commit 088ea9f
Show file tree
Hide file tree
Showing 77 changed files with 3,320 additions and 139 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -31,4 +31,5 @@ tests/proguard-project.txt
.gradle
.idea
*.iml
build
build
/gradle.properties
7 changes: 7 additions & 0 deletions AndroidManifest.xml
Expand Up @@ -77,8 +77,10 @@
</activity>
<activity android:name=".ui.activity.ManageAccountsActivity" />
<activity android:name=".ui.activity.ParticipateActivity" />
<activity android:name=".ui.activity.FolderSyncActivity" />
<activity android:name=".ui.activity.UploadFilesActivity" />
<activity android:name=".ui.activity.ReceiveExternalFilesActivity"

android:taskAffinity=""
android:excludeFromRecents="true"
android:theme="@style/Theme.ownCloud.NoActionBar">
Expand Down Expand Up @@ -122,6 +124,7 @@
android:name="android.accounts.AccountAuthenticator"
android:resource="@xml/authenticator" />
</service>
<service android:name=".services.observer.SyncedFolderObserverService"/>
<service
android:name=".syncadapter.FileSyncService"
android:exported="true" >
Expand All @@ -133,6 +136,10 @@
android:name="android.content.SyncAdapter"
android:resource="@xml/syncadapter_files" />
</service>
<service
android:name=".services.SyncedFolderJobService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="true"/>

<provider
android:name=".providers.FileContentProvider"
Expand Down
Binary file added res/drawable-hdpi/ic_cellphone.png
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_cloud_check.png
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_cloud_outline.png
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_cloud_sync_off.png
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_cloud_sync_on.png
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_cloud_upload.png
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_dots_vertical.png
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_uploads.png
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_cellphone.png
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_cloud_check.png
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_cloud_outline.png
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_cloud_sync_off.png
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_cloud_sync_on.png
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_cloud_upload.png
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_dots_vertical.png
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_cellphone.png
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_cloud_check.png
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_cloud_outline.png
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_cloud_sync_off.png
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_cloud_sync_on.png
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_cloud_upload.png
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_dots_vertical.png
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_cellphone.png
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_cloud_check.png
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_cloud_outline.png
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_cloud_sync_off.png
Binary file added res/drawable-xxhdpi/ic_cloud_sync_on.png
Binary file added res/drawable-xxhdpi/ic_cloud_upload.png
Binary file added res/drawable-xxhdpi/ic_dots_vertical.png
Binary file added res/drawable-xxxhdpi/ic_cellphone.png
Binary file added res/drawable-xxxhdpi/ic_cloud_check.png
Binary file added res/drawable-xxxhdpi/ic_cloud_outline.png
Binary file added res/drawable-xxxhdpi/ic_cloud_sync_off.png
Binary file added res/drawable-xxxhdpi/ic_cloud_sync_on.png
Binary file added res/drawable-xxxhdpi/ic_cloud_upload.png
Binary file added res/drawable-xxxhdpi/ic_dots_vertical.png
5 changes: 2 additions & 3 deletions res/layout/drawer.xml
Expand Up @@ -2,9 +2,8 @@
<!--
Nextcloud Android client application
Copyright (C) 2015 Andy Scherzinger
Copyright (C) 2016 Nextcloud
Copyright (C) 2015 ownCloud
Copyright (C) 2016 Andy Scherzinger
Copyright (C) 2016 Nextcloud.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
Expand Down
5 changes: 2 additions & 3 deletions res/layout/drawer_header.xml
Expand Up @@ -2,9 +2,8 @@
<!--
Nextcloud Android client application
Copyright (C) 2015 Andy Scherzinger
Copyright (C) 2016 Nextcloud
Copyright (C) 2015 ownCloud
Copyright (C) 2016 Andy Scherzinger
Copyright (C) 2016 Nextcloud.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
Expand Down
70 changes: 70 additions & 0 deletions res/layout/folder_sync_item_header.xml
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Nextcloud Android client application
Copyright (C) 2016 Andy Scherzinger
Copyright (C) 2016 Nextcloud.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
License as published by the Free Software Foundation; either
version 3 of the License, or any later version.
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 AFFERO GENERAL PUBLIC LICENSE for more details.
You should have received a copy of the GNU Affero General Public
License along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/alternate_half_padding"
android:paddingBottom="@dimen/alternate_half_padding"
android:paddingLeft="@dimen/standard_padding">

<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/buttonBar"
android:layout_alignParentLeft="true"
android:layout_alignTop="@+id/buttonBar"
android:layout_toLeftOf="@+id/buttonBar"
android:ellipsize="middle"
android:gravity="start|center_vertical"
android:text="Header Text"
android:textColor="?android:textColorPrimary"
android:textStyle="bold"/>

<LinearLayout
android:id="@+id/buttonBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true">

<ImageButton
android:id="@+id/syncStatusButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:clickable="true"
android:padding="@dimen/standard_half_padding"
android:src="@drawable/ic_cloud_sync_off"/>

<ImageButton
android:id="@+id/settingsButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/transparent"
android:clickable="true"
android:paddingBottom="@dimen/standard_half_padding"
android:paddingLeft="@dimen/standard_half_padding"
android:paddingRight="@dimen/standard_padding"
android:paddingTop="@dimen/standard_half_padding"
android:src="@drawable/ic_dots_vertical"/>
</LinearLayout>

</RelativeLayout>
98 changes: 98 additions & 0 deletions res/layout/folder_sync_layout.xml
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Nextcloud Android client application
Copyright (C) 2016 Andy Scherzinger
Copyright (C) 2016 Nextcloud.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
License as published by the Free Software Foundation; either
version 3 of the License, or any later version.
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 AFFERO GENERAL PUBLIC LICENSE for more details.
You should have received a copy of the GNU Affero General Public
License along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<android.support.v4.widget.DrawerLayout android:id="@+id/drawer_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:fitsSystemWindows="true">

<!-- The main content view -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<include
layout="@layout/toolbar_standard"/>

<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<android.support.v7.widget.RecyclerView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:scrollbarStyle="outsideOverlay"
android:scrollbars="vertical"
android:visibility="visible"
android:layout_marginRight="-3dp"
android:layout_marginLeft="-3dp"
android:layout_marginBottom="-3dp"/>

<LinearLayout
android:id="@android:id/progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical"
android:visibility="gone">

<ProgressBar
android:id="@+id/folderSyncProgressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"/>

<TextView
android:id="@+id/progressText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_margin="@dimen/standard_half_margin"
android:text="@string/folder_sync_loading_folders"
android:textColor="@color/secondaryTextColor"
android:textStyle="italic"/>
</LinearLayout>

<TextView
android:id="@android:id/empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="@dimen/standard_margin"
android:gravity="center"
android:textColor="@color/secondaryTextColor"
android:text="@string/folder_sync_no_results"
android:visibility="gone" />
</FrameLayout>

</LinearLayout>

<include
layout="@layout/drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"/>

</android.support.v4.widget.DrawerLayout>

0 comments on commit 088ea9f

Please sign in to comment.