Эх сурвалжийг харах

Merge branch 'master' of https://github.com/nextcloud/android into contactBackupRestore

# Conflicts:
#	src/main/res/values/setup.xml
#	src/modified/res/values/setup.xml
AndyScherzinger 8 жил өмнө
parent
commit
8187a2582f
26 өөрчлөгдсөн 502 нэмэгдсэн , 272 устгасан
  1. 23 11
      THIRD_PARTY.txt
  2. 6 3
      src/main/AndroidManifest.xml
  3. 2 1
      src/main/java/com/owncloud/android/services/observer/SyncedFolderObserverService.java
  4. 30 12
      src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java
  5. 25 4
      src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java
  6. 69 4
      src/main/java/com/owncloud/android/ui/activity/WhatsNewActivity.java
  7. 24 10
      src/main/java/com/owncloud/android/ui/adapter/FileListListAdapter.java
  8. 11 4
      src/main/java/com/owncloud/android/ui/events/SearchEvent.java
  9. 105 93
      src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java
  10. 112 60
      src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java
  11. 1 1
      src/main/res/drawable/indicator_dot_not_selected.xml
  12. 2 2
      src/main/res/drawable/main_header_bg.xml
  13. 1 1
      src/main/res/drawable/round_button.xml
  14. 1 1
      src/main/res/layout/account_item.xml
  15. 1 1
      src/main/res/layout/edit_share_layout.xml
  16. 4 4
      src/main/res/layout/list_fragment.xml
  17. 1 1
      src/main/res/layout/share_file_layout.xml
  18. 8 8
      src/main/res/layout/whats_new_activity.xml
  19. 13 0
      src/main/res/layout/whats_new_webview_element.xml
  20. 3 3
      src/main/res/values-es-rMX/strings.xml
  21. 16 16
      src/main/res/values-ru/strings.xml
  22. 2 9
      src/main/res/values/colors.xml
  23. 16 7
      src/main/res/values/setup.xml
  24. 9 9
      src/main/res/values/styles.xml
  25. 3 2
      src/main/res/xml/exposed_filepaths.xml
  26. 14 5
      src/modified/res/values/setup.xml

+ 23 - 11
THIRD_PARTY.txt

@@ -2,7 +2,7 @@
   Nextcloud Android client                                       
 
   Copyright (C) 2016      Nextcloud Project
-  Copyright (C) 2012-2016 ownCloud Inc.
+  Copyright (C) 2012-2016 ownCloud GmbH
   Copyright (C) 2012      Bartek Przybylski
 ###################################################################
 
@@ -37,24 +37,22 @@ that govern this software, for the purposes they are being used.
 
 The third party software included and used by this project is:
 
- * Apache JackRabbit, version 2.2.5.
-   Copyright (C) 2004-2010 The Apache Software Foundation.
+ * Apache JackRabbit 2.12.4.
+   Copyright (C) 2004-2016 The Apache Software Foundation.
    Licensed under Apache License, Version 2.0.
-   Placed at libs/jackrabbit-webdav-2.2.5-jar-with-dependencies.jar
-   The jar file must be included in the ownCloud client APK.
-   Original license document included at libs/LICENSE.txt
+   The jar file must be included in the Nextcloud client APK.
    See http://jackrabbit.apache.org/
  
  * Transifex client.
    Copyright (C) Transifex.
    Licensed under GNU General Public License.
    Placed at third_party/transifex-client.
-   Used as a helper tool, not included in the ownCloud client APK.
+   Used as a helper tool, not included in the Nextcloud client APK.
    Original license document included at third_party/transifex-client/LICENSE.
    See http://help.transifex.com/features/client/
    
- * TouchImageView, commit 6dbeac4f11936185ba374c73144ac431c23c9aab
-   Copyright (c) 2012 Michael Ortiz
+ * TouchImageView, 1.2.0. commit 6dbeac4f11936185ba374c73144ac431c23c9aab
+   Copyright (c) 2014 Michael Ortiz
    Licensed under MIT License
    JAR file libs/touch-image-view.jar has been generated by ownCloud Inc., including without 
    modifications com.ortiz.touch.ExtendedViewPager and com.ortiz.touch.TouchImageView classes. 
@@ -63,5 +61,19 @@ The third party software included and used by this project is:
  * floatingactionbutton 1.10.1.
    Copyright (c) 2014 Jerzy Chalupski
    Licensed under Apache License, Version 2.0.
-   placed at libs/com-getbase-floatingactionbutton-1-10-0-exploded-aar has been exploded by ownCloud Inc.
-   See https://github.com/futuresimple/android-floating-action-button 
+   The jar file must be included in the Nextcloud client APK.
+   See https://github.com/futuresimple/android-floating-action-button 
+ 
+ * AndroidSVG 1.2.1.
+   Copyright (c) 2014 Paul LeBeau
+   Licensed under Apache License, Version 2.0.
+   placed at libs/androidsvg-1.2.1.jar
+   The jar file must be included in the Nextcloud client APK.
+   See https://github.com/BigBadaboom/androidsvg
+   
+ * Disk LRU Cache 2.0.2.
+   Copyright (c) 2013 Jake Wharton 
+   Licensed under Apache License, Version 2.0.
+   placed at libs/disklrucache-2.0.2.jar
+   The jar file must be included in the Nextcloud client APK.
+   See https://github.com/JakeWharton/DiskLruCache

+ 6 - 3
src/main/AndroidManifest.xml

@@ -19,9 +19,10 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.owncloud.android"
-    android:versionCode="10040299"
-    android:versionName="1.4.2">
+          xmlns:tools="http://schemas.android.com/tools"
+          package="com.owncloud.android"
+          android:versionCode="10040299"
+          android:versionName="1.4.2">
 
     <uses-sdk
         android:minSdkVersion="14"
@@ -257,6 +258,8 @@
 
         <service android:name=".services.observer.FileObserverService" />
 
+        <service android:name="com.evernote.android.job.gcm.PlatformGcmService" tools:node="remove"/>
+
         <activity
             android:name=".ui.activity.CopyToClipboardActivity"
             android:icon="@drawable/copy_link"

+ 2 - 1
src/main/java/com/owncloud/android/services/observer/SyncedFolderObserverService.java

@@ -57,7 +57,8 @@ public class SyncedFolderObserverService extends Service {
         fileFilter = new FileFilter() {
             @Override
             public boolean accept(File pathname) {
-                return !pathname.getName().startsWith(".") && !pathname.getName().endsWith(".tmp");
+                return !pathname.getName().startsWith(".") && !pathname.getName().endsWith(".tmp") &&
+                        !pathname.getName().endsWith(".temp") && !pathname.getName().endsWith(".thumbnail");
             }
         };
 

+ 30 - 12
src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java

@@ -60,11 +60,13 @@ import com.owncloud.android.ui.events.ChangeMenuEvent;
 import com.owncloud.android.ui.events.DummyDrawerEvent;
 import com.owncloud.android.ui.events.MenuItemClickEvent;
 import com.owncloud.android.ui.events.SearchEvent;
+import com.owncloud.android.ui.fragment.OCFileListFragment;
 import com.owncloud.android.utils.DisplayUtils;
 
 import org.greenrobot.eventbus.EventBus;
 import org.greenrobot.eventbus.Subscribe;
 import org.greenrobot.eventbus.ThreadMode;
+import org.parceler.Parcels;
 
 /**
  * Base class to handle setup of the drawer implementation including user switching and avatar fetching and fallback
@@ -386,12 +388,16 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
             case R.id.nav_favorites:
                 menuItem.setChecked(true);
                 mCheckedMenuItem = menuItem.getItemId();
-                EventBus.getDefault().post(new SearchEvent("", SearchOperation.SearchType.FAVORITE_SEARCH,
-                        SearchEvent.UnsetType.NO_UNSET));
+
+                switchToSearchFragment(new SearchEvent("", SearchOperation.SearchType.FAVORITE_SEARCH,
+                        SearchEvent.UnsetType.NO_UNSET), menuItem);
                 break;
             case R.id.nav_photos:
-                EventBus.getDefault().post(new SearchEvent("image/%",
-                        SearchOperation.SearchType.CONTENT_TYPE_SEARCH, SearchEvent.UnsetType.NO_UNSET));
+                menuItem.setChecked(true);
+                mCheckedMenuItem = menuItem.getItemId();
+
+                switchToSearchFragment(new SearchEvent("image/%", SearchOperation.SearchType.CONTENT_TYPE_SEARCH,
+                        SearchEvent.UnsetType.NO_UNSET), menuItem);
                 break;
             case R.id.nav_on_device:
                 menuItem.setChecked(true);
@@ -437,26 +443,30 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
             case R.id.nav_recently_added:
                 menuItem.setChecked(true);
                 mCheckedMenuItem = menuItem.getItemId();
-                EventBus.getDefault().post(new SearchEvent("%", SearchOperation.SearchType.CONTENT_TYPE_SEARCH,
-                        SearchEvent.UnsetType.UNSET_BOTTOM_NAV_BAR));
+
+                switchToSearchFragment(new SearchEvent("%",SearchOperation.SearchType.CONTENT_TYPE_SEARCH,
+                        SearchEvent.UnsetType.UNSET_BOTTOM_NAV_BAR), menuItem);
                 break;
             case R.id.nav_recently_modified:
                 menuItem.setChecked(true);
                 mCheckedMenuItem = menuItem.getItemId();
-                EventBus.getDefault().post(new SearchEvent("", SearchOperation.SearchType.RECENTLY_MODIFIED_SEARCH,
-                        SearchEvent.UnsetType.UNSET_BOTTOM_NAV_BAR));
+
+                switchToSearchFragment(new SearchEvent("", SearchOperation.SearchType.RECENTLY_MODIFIED_SEARCH,
+                        SearchEvent.UnsetType.UNSET_BOTTOM_NAV_BAR), menuItem);
                 break;
             case R.id.nav_shared:
                 menuItem.setChecked(true);
                 mCheckedMenuItem = menuItem.getItemId();
-                EventBus.getDefault().post(new SearchEvent("", SearchOperation.SearchType.SHARED_SEARCH,
-                        SearchEvent.UnsetType.UNSET_BOTTOM_NAV_BAR));
+
+                switchToSearchFragment(new SearchEvent("", SearchOperation.SearchType.SHARED_SEARCH,
+                        SearchEvent.UnsetType.UNSET_BOTTOM_NAV_BAR), menuItem);
                 break;
             case R.id.nav_videos:
                 menuItem.setChecked(true);
                 mCheckedMenuItem = menuItem.getItemId();
-                EventBus.getDefault().post(new SearchEvent("video/%", SearchOperation.SearchType.CONTENT_TYPE_SEARCH,
-                        SearchEvent.UnsetType.UNSET_BOTTOM_NAV_BAR));
+
+                switchToSearchFragment(new SearchEvent("video/%", SearchOperation.SearchType.CONTENT_TYPE_SEARCH,
+                        SearchEvent.UnsetType.UNSET_BOTTOM_NAV_BAR), menuItem);
                 break;
             case Menu.NONE:
                 // account clicked
@@ -466,6 +476,14 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
         }
     }
 
+    private void switchToSearchFragment(SearchEvent event, MenuItem menuItem) {
+        Intent recentlyAddedIntent = new Intent(getBaseContext(), FileDisplayActivity.class);
+        recentlyAddedIntent.putExtra(OCFileListFragment.SEARCH_EVENT, Parcels.wrap(event));
+        recentlyAddedIntent.putExtra(FileDisplayActivity.DRAWER_MENU_ID, menuItem.getItemId());
+        recentlyAddedIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+        startActivity(recentlyAddedIntent);
+    }
+
     /**
      * show the file list to the user.
      *

+ 25 - 4
src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java

@@ -132,6 +132,8 @@ public class FileDisplayActivity extends HookActivity
 
     public static final String ACTION_DETAILS = "com.owncloud.android.ui.activity.action.DETAILS";
 
+    public static final String DRAWER_MENU_ID = "DRAWER_MENU_ID";
+
     public static final int REQUEST_CODE__SELECT_CONTENT_FROM_APPS = REQUEST_CODE__LAST_SHARED + 1;
     public static final int REQUEST_CODE__SELECT_FILES_FROM_FILE_SYSTEM = REQUEST_CODE__LAST_SHARED + 2;
     public static final int REQUEST_CODE__MOVE_FILES = REQUEST_CODE__LAST_SHARED + 3;
@@ -246,12 +248,18 @@ public class FileDisplayActivity extends HookActivity
             }
         }
 
-        if (savedInstanceState == null) {
+        if (getIntent().getParcelableExtra(OCFileListFragment.SEARCH_EVENT) != null){
+            switchToSearchFragment();
+
+            int menuId = getIntent().getIntExtra(DRAWER_MENU_ID, -1);
+            if (menuId != -1){
+                setupDrawer(menuId);
+            }
+        } else if (savedInstanceState == null) {
             createMinFragments();
+            refreshList(true);
         }
 
-        refreshList(true);
-
         setIndeterminate(mSyncInProgress);
         // always AFTER setContentView(...) in onCreate(); to work around bug in its implementation
 
@@ -316,7 +324,7 @@ public class FileDisplayActivity extends HookActivity
                 if (grantResults.length > 0
                         && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                     // permission was granted
-                    startSynchronization();
+                    refreshList(true);
                     // toggle on is save since this is the only scenario this code gets accessed
                 } else {
                     // permission denied --> do nothing
@@ -380,6 +388,19 @@ public class FileDisplayActivity extends HookActivity
         }
     }
 
+    private void switchToSearchFragment() {
+        OCFileListFragment listOfFiles = new OCFileListFragment();
+        Bundle args = new Bundle();
+
+        args.putParcelable(OCFileListFragment.SEARCH_EVENT,
+                getIntent().getParcelableExtra(OCFileListFragment.SEARCH_EVENT));
+
+        listOfFiles.setArguments(args);
+        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
+        transaction.add(R.id.left_fragment_container, listOfFiles, TAG_LIST_OF_FILES);
+        transaction.commit();
+    }
+
     private void createMinFragments() {
         OCFileListFragment listOfFiles = new OCFileListFragment();
         Bundle args = new Bundle();

+ 69 - 4
src/main/java/com/owncloud/android/ui/activity/WhatsNewActivity.java

@@ -37,6 +37,8 @@ import android.support.v4.view.ViewPager;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.webkit.WebView;
+import android.webkit.WebViewClient;
 import android.widget.Button;
 import android.widget.ImageButton;
 import android.widget.ImageView;
@@ -74,11 +76,20 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
         mProgress = (ProgressIndicator) findViewById(R.id.progressIndicator);
         mPager = (ViewPager)findViewById(R.id.contentPanel);
         final boolean isBeta = getResources().getBoolean(R.bool.is_beta);
-        FeaturesViewAdapter adapter = new FeaturesViewAdapter(getSupportFragmentManager(),
-                FeatureList.getFiltered(getLastSeenVersionCode(), isFirstRun(), isBeta));
+        String[] urls = getResources().getStringArray(R.array.whatsnew_urls);
+
+        if (urls.length > 0) {
+            FeaturesWebViewAdapter featuresWebViewAdapter = new FeaturesWebViewAdapter(getSupportFragmentManager(),
+                    urls);
+            mProgress.setNumberOfSteps(featuresWebViewAdapter.getCount());
+            mPager.setAdapter(featuresWebViewAdapter);
+        } else {
+            FeaturesViewAdapter featuresViewAdapter = new FeaturesViewAdapter(getSupportFragmentManager(),
+                    FeatureList.getFiltered(getLastSeenVersionCode(), isFirstRun(), isBeta));
+            mProgress.setNumberOfSteps(featuresViewAdapter.getCount());
+            mPager.setAdapter(featuresViewAdapter);
+        }
 
-        mProgress.setNumberOfSteps(adapter.getCount());
-        mPager.setAdapter(adapter);
         mPager.addOnPageChangeListener(this);
 
 
@@ -191,6 +202,60 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
         // unused but to be implemented due to abstract parent
     }
 
+    private final class FeaturesWebViewAdapter extends FragmentPagerAdapter {
+        private String[] mWebUrls;
+
+        public FeaturesWebViewAdapter(FragmentManager fm, String[] webUrls) {
+            super(fm);
+            mWebUrls = webUrls;
+        }
+
+        @Override
+        public Fragment getItem(int position) {
+            return FeatureWebFragment.newInstance(mWebUrls[position]);
+        }
+
+        @Override
+        public int getCount() {
+            return mWebUrls.length;
+        }
+    }
+
+    public static class FeatureWebFragment extends Fragment {
+        private String mWebUrl;
+
+        static public FeatureWebFragment newInstance(String webUrl) {
+            FeatureWebFragment f = new FeatureWebFragment();
+            Bundle args = new Bundle();
+            args.putString("url", webUrl);
+            f.setArguments(args);
+            return f;
+        }
+
+        @Override
+        public void onCreate(@Nullable Bundle savedInstanceState) {
+            super.onCreate(savedInstanceState);
+            mWebUrl = getArguments() != null ? (String)getArguments().getString("url") : null;
+        }
+
+        @Nullable
+        @Override
+        public View onCreateView(LayoutInflater inflater,
+                                 @Nullable ViewGroup container,
+                                 @Nullable Bundle savedInstanceState) {
+            View v = inflater.inflate(R.layout.whats_new_webview_element, container, false);
+
+            WebView webView = (WebView) v.findViewById(R.id.whatsNewWebView);
+            webView.getSettings().setJavaScriptEnabled(true);
+            webView.getSettings().setAllowFileAccess(false);
+            webView.setWebViewClient(new WebViewClient());
+            webView.loadUrl(mWebUrl);
+
+            return v;
+        }
+
+
+    }
     private final class FeaturesViewAdapter extends FragmentPagerAdapter {
 
         private FeatureItem[] mFeatures;

+ 24 - 10
src/main/java/com/owncloud/android/ui/adapter/FileListListAdapter.java

@@ -109,6 +109,17 @@ public class FileListListAdapter extends BaseAdapter {
         new ThumbnailsCacheManager.InitDiskCacheTask().execute();
     }
 
+    public FileListListAdapter(
+            boolean justFolders,
+            Context context,
+            ComponentsGetter transferServiceGetter,
+            OCFileListFragmentInterface OCFileListFragmentInterface,
+            FileDataStorageManager fileDataStorageManager
+    ) {
+    this(justFolders, context, transferServiceGetter, OCFileListFragmentInterface);
+        mStorageManager = fileDataStorageManager;
+    }
+
     @Override
     public boolean areAllItemsEnabled() {
         return true;
@@ -467,21 +478,24 @@ public class FileListListAdapter extends BaseAdapter {
         if (searchType.equals(ExtendedListFragment.SearchType.SHARED_FILTER)) {
             ArrayList<OCShare> shares = new ArrayList<>();
             for (int i = 0; i < objects.size(); i++) {
-                shares.add((OCShare) objects.get(i));
+                // check type before cast as of long running data fetch it is possible that old result is filled
+                if (objects.get(i) instanceof OCShare) {
+                    OCShare ocShare = (OCShare) objects.get(i);
+
+                    shares.add(ocShare);
+
+                    OCFile ocFile = mStorageManager.getFileByPath(ocShare.getPath());
+                    if (!mFiles.contains(ocFile)) {
+                        mFiles.add(ocFile);
+                    }
+                }
             }
             mStorageManager.saveShares(shares);
-        }
-        for (int i = 0; i < objects.size(); i++) {
-            if (!searchType.equals(ExtendedListFragment.SearchType.SHARED_FILTER)) {
+        } else {
+            for (int i = 0; i < objects.size(); i++) {
                 OCFile ocFile = FileStorageUtils.fillOCFile((RemoteFile) objects.get(i));
                 searchForLocalFileInDefaultPath(ocFile);
                 mFiles.add(ocFile);
-            } else {
-                OCShare ocShare = (OCShare) objects.get(i);
-                OCFile ocFile = mStorageManager.getFileByPath(ocShare.getPath());
-                if (!mFiles.contains(ocFile)) {
-                    mFiles.add(ocFile);
-                }
             }
         }
 

+ 11 - 4
src/main/java/com/owncloud/android/ui/events/SearchEvent.java

@@ -21,20 +21,27 @@ package com.owncloud.android.ui.events;
 
 import com.owncloud.android.lib.resources.files.SearchOperation;
 
+import org.parceler.Parcel;
+
 /**
  * Search event
  */
+@Parcel
 public class SearchEvent {
-    public final String searchQuery;
+    public String searchQuery;
 
-    public final SearchOperation.SearchType searchType;
+    public SearchOperation.SearchType searchType;
 
-    public final UnsetType unsetType;
+    public UnsetType unsetType;
 
     public enum UnsetType {
         NO_UNSET,
         UNSET_DRAWER,
-        UNSET_BOTTOM_NAV_BAR;
+        UNSET_BOTTOM_NAV_BAR
+    }
+
+    public SearchEvent() {
+
     }
 
     public SearchEvent(String searchQuery, SearchOperation.SearchType searchType, UnsetType unsetType) {

+ 105 - 93
src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java

@@ -28,6 +28,7 @@ import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
+import android.os.AsyncTask;
 import android.os.Build;
 import android.os.Bundle;
 import android.os.Handler;
@@ -61,6 +62,7 @@ import com.owncloud.android.files.FileMenuFilter;
 import com.owncloud.android.lib.common.OwnCloudAccount;
 import com.owncloud.android.lib.common.OwnCloudClient;
 import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
+import com.owncloud.android.lib.common.operations.RemoteOperation;
 import com.owncloud.android.lib.common.operations.RemoteOperationResult;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.lib.resources.files.SearchOperation;
@@ -117,6 +119,8 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
     public final static String ARG_ALLOW_CONTEXTUAL_ACTIONS = MY_PACKAGE + ".ALLOW_CONTEXTUAL";
     public final static String ARG_HIDE_FAB = MY_PACKAGE + ".HIDE_FAB";
 
+    public static final String SEARCH_EVENT = "SEARCH_EVENT";
+
     private static final String KEY_FILE = MY_PACKAGE + ".extra.FILE";
     private static final String KEY_FAB_EVER_CLICKED = "FAB_EVER_CLICKED";
 
@@ -147,6 +151,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
     private BottomNavigationView bottomNavigationView;
 
     private SearchType currentSearchType;
+    private boolean searchFragment = false;
 
     private enum MenuItemAddRemove {
         DO_NOTHING, REMOVE_SORT, REMOVE_GRID_AND_SORT, ADD_SORT, ADD_GRID_AND_SORT, ADD_GRID_AND_SORT_WITH_SEARCH,
@@ -311,7 +316,8 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
                 mJustFolders,
                 getActivity(),
                 mContainerActivity,
-                this
+                this,
+                mContainerActivity.getStorageManager()
         );
         setListAdapter(mAdapter);
 
@@ -335,6 +341,11 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
                 removeFabLabels();
             }
         }
+
+        SearchEvent searchEvent = Parcels.unwrap(getArguments().getParcelable(OCFileListFragment.SEARCH_EVENT));
+        if (searchEvent != null){
+            onMessageEvent(searchEvent);
+        }
     }
 
     /**
@@ -943,6 +954,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
     }
 
     public void refreshDirectory() {
+        searchFragment = false;
         listDirectory(getCurrentFile(), MainApp.isOnlyOnDevice(), false);
     }
 
@@ -954,56 +966,58 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
      * @param directory File to be listed
      */
     public void listDirectory(OCFile directory, boolean onlyOnDevice, boolean fromSearch) {
-        FileDataStorageManager storageManager = mContainerActivity.getStorageManager();
-        if (storageManager != null) {
+        if (!searchFragment) {
+            FileDataStorageManager storageManager = mContainerActivity.getStorageManager();
+            if (storageManager != null) {
 
-            // Check input parameters for null
-            if (directory == null) {
-                if (mFile != null) {
-                    directory = mFile;
-                } else {
-                    directory = storageManager.getFileByPath("/");
-                    if (directory == null) {
-                        return; // no files, wait for sync
+                // Check input parameters for null
+                if (directory == null) {
+                    if (mFile != null) {
+                        directory = mFile;
+                    } else {
+                        directory = storageManager.getFileByPath("/");
+                        if (directory == null) {
+                            return; // no files, wait for sync
+                        }
                     }
                 }
-            }
 
 
-            // If that's not a directory -> List its parent
-            if (!directory.isFolder()) {
-                Log_OC.w(TAG, "You see, that is not a directory -> " + directory.toString());
-                directory = storageManager.getFileById(directory.getParentId());
-            }
+                // If that's not a directory -> List its parent
+                if (!directory.isFolder()) {
+                    Log_OC.w(TAG, "You see, that is not a directory -> " + directory.toString());
+                    directory = storageManager.getFileById(directory.getParentId());
+                }
 
 
-            if (searchView != null && !searchView.isIconified() && !fromSearch) {
+                if (searchView != null && !searchView.isIconified() && !fromSearch) {
 
-                searchView.post(new Runnable() {
-                    @Override
-                    public void run() {
-                        searchView.setQuery("", false);
-                        searchView.onActionViewCollapsed();
-                        Activity activity;
-                        if ((activity = getActivity()) != null && activity instanceof FileDisplayActivity) {
-                            FileDisplayActivity fileDisplayActivity = (FileDisplayActivity) activity;
-                            if (getCurrentFile() != null) {
-                                fileDisplayActivity.setDrawerIndicatorEnabled(fileDisplayActivity.isRoot(getCurrentFile()));
+                    searchView.post(new Runnable() {
+                        @Override
+                        public void run() {
+                            searchView.setQuery("", false);
+                            searchView.onActionViewCollapsed();
+                            Activity activity;
+                            if ((activity = getActivity()) != null && activity instanceof FileDisplayActivity) {
+                                FileDisplayActivity fileDisplayActivity = (FileDisplayActivity) activity;
+                                if (getCurrentFile() != null) {
+                                    fileDisplayActivity.setDrawerIndicatorEnabled(fileDisplayActivity.isRoot(getCurrentFile()));
+                                }
                             }
-                        }
 
-                    }
-                });
-            }
+                        }
+                    });
+                }
 
-            mAdapter.swapDirectory(directory, storageManager, onlyOnDevice);
-            if (mFile == null || !mFile.equals(directory)) {
-                mCurrentListView.setSelection(0);
-            }
-            mFile = directory;
+                mAdapter.swapDirectory(directory, storageManager, onlyOnDevice);
+                if (mFile == null || !mFile.equals(directory)) {
+                    mCurrentListView.setSelection(0);
+                }
+                mFile = directory;
 
-            updateLayout();
+                updateLayout();
 
+            }
         }
     }
 
@@ -1050,42 +1064,46 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
     }
 
     private String generateFooterText(int filesCount, int foldersCount) {
-        String output;
-        if (filesCount <= 0) {
-            if (foldersCount <= 0) {
-                output = "";
+        String output = "";
+
+        if (getActivity() != null) {
+            if (filesCount <= 0) {
+                if (foldersCount <= 0) {
+                    output = "";
 
-            } else if (foldersCount == 1) {
-                output = getResources().getString(R.string.file_list__footer__folder);
+                } else if (foldersCount == 1) {
+                    output = getResources().getString(R.string.file_list__footer__folder);
 
-            } else { // foldersCount > 1
-                output = getResources().getString(R.string.file_list__footer__folders, foldersCount);
-            }
+                } else { // foldersCount > 1
+                    output = getResources().getString(R.string.file_list__footer__folders, foldersCount);
+                }
 
-        } else if (filesCount == 1) {
-            if (foldersCount <= 0) {
-                output = getResources().getString(R.string.file_list__footer__file);
+            } else if (filesCount == 1) {
+                if (foldersCount <= 0) {
+                    output = getResources().getString(R.string.file_list__footer__file);
 
-            } else if (foldersCount == 1) {
-                output = getResources().getString(R.string.file_list__footer__file_and_folder);
+                } else if (foldersCount == 1) {
+                    output = getResources().getString(R.string.file_list__footer__file_and_folder);
 
-            } else { // foldersCount > 1
-                output = getResources().getString(R.string.file_list__footer__file_and_folders, foldersCount);
-            }
-        } else {    // filesCount > 1
-            if (foldersCount <= 0) {
-                output = getResources().getString(R.string.file_list__footer__files, filesCount);
+                } else { // foldersCount > 1
+                    output = getResources().getString(R.string.file_list__footer__file_and_folders, foldersCount);
+                }
+            } else {    // filesCount > 1
+                if (foldersCount <= 0) {
+                    output = getResources().getString(R.string.file_list__footer__files, filesCount);
 
-            } else if (foldersCount == 1) {
-                output = getResources().getString(R.string.file_list__footer__files_and_folder, filesCount);
+                } else if (foldersCount == 1) {
+                    output = getResources().getString(R.string.file_list__footer__files_and_folder, filesCount);
 
-            } else { // foldersCount > 1
-                output = getResources().getString(
-                        R.string.file_list__footer__files_and_folders, filesCount, foldersCount
-                );
+                } else { // foldersCount > 1
+                    output = getResources().getString(
+                            R.string.file_list__footer__files_and_folders, filesCount, foldersCount
+                    );
 
+                }
             }
         }
+
         return output;
     }
 
@@ -1248,6 +1266,7 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
 
     @Subscribe(threadMode = ThreadMode.BACKGROUND)
     public void onMessageEvent(SearchEvent event) {
+        searchFragment = true;
         setEmptyListLoadingMessage();
         mAdapter.setData(new ArrayList<>(), SearchType.NO_SEARCH);
 
@@ -1287,29 +1306,34 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
             }
         };
 
-        Account currentAccount = AccountUtils.getCurrentOwnCloudAccount(MainApp.getAppContext());
+        final RemoteOperation remoteOperation;
+        if (!currentSearchType.equals(SearchType.SHARED_FILTER)) {
+            remoteOperation = new SearchOperation(event.getSearchQuery(), event.getSearchType());
+        } else {
+            remoteOperation = new GetRemoteSharesOperation();
+        }
 
-        try {
-            OwnCloudAccount ocAccount = new OwnCloudAccount(
-                    currentAccount,
-                    MainApp.getAppContext()
-            );
+        final Account currentAccount = AccountUtils.getCurrentOwnCloudAccount(MainApp.getAppContext());
+
+        AsyncTask task = new AsyncTask() {
+            @Override
+            protected Object doInBackground(Object[] params) {
+                RemoteOperationResult remoteOperationResult = remoteOperation.execute(currentAccount, getContext());
 
-            OwnCloudClient mClient = OwnCloudClientManagerFactory.getDefaultSingleton().
-                    getClientFor(ocAccount, MainApp.getAppContext());
-            if (!currentSearchType.equals(SearchType.SHARED_FILTER)) {
-                SearchOperation operation = new SearchOperation(event.getSearchQuery(), event.getSearchType());
-                RemoteOperationResult remoteOperationResult = operation.execute(mClient);
-                if (remoteOperationResult.isSuccess() && remoteOperationResult.getData() != null) {
-                    mAdapter.setData(remoteOperationResult.getData(), currentSearchType);
-                }
-            } else {
-                GetRemoteSharesOperation operation = new GetRemoteSharesOperation();
-                RemoteOperationResult remoteOperationResult = operation.execute(mClient);
                 if (remoteOperationResult.isSuccess() && remoteOperationResult.getData() != null) {
                     mAdapter.setData(remoteOperationResult.getData(), currentSearchType);
                 }
+
+                return remoteOperationResult.isSuccess();
+            }
+
+            @Override
+            protected void onPostExecute(Object o) {
+                mAdapter.notifyDataSetChanged();
             }
+        };
+
+        task.execute(true);
 
             if (event.getSearchType().equals(SearchOperation.SearchType.FILE_SEARCH)) {
                 setEmptyListMessage(SearchType.FILE_SEARCH);
@@ -1353,18 +1377,6 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
             } else {
                 new Handler(Looper.getMainLooper()).post(switchViewsRunnable);
             }
-
-        } catch (com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException e) {
-            Log_OC.e(TAG, "Account not found", e);
-        } catch (AuthenticatorException e) {
-            Log_OC.e(TAG, "Authentication failed", e);
-        } catch (IOException e) {
-            Log_OC.e(TAG, "IO error", e);
-        } catch (OperationCanceledException e) {
-            Log_OC.e(TAG, "Operation has been canceled", e);
-        }
-
-
     }
 
     @Override

+ 112 - 60
src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java

@@ -29,6 +29,7 @@ import android.graphics.Point;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.LayerDrawable;
+import android.graphics.drawable.PictureDrawable;
 import android.os.AsyncTask;
 import android.os.Bundle;
 import android.support.annotation.DrawableRes;
@@ -48,6 +49,8 @@ import android.widget.ProgressBar;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
+import com.caverock.androidsvg.SVG;
+import com.caverock.androidsvg.SVGParseException;
 import com.owncloud.android.R;
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.files.FileMenuFilter;
@@ -59,6 +62,8 @@ import com.owncloud.android.utils.BitmapUtils;
 import com.owncloud.android.utils.DisplayUtils;
 import com.owncloud.android.utils.MimeTypeUtil;
 
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.lang.ref.WeakReference;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -109,10 +114,10 @@ public class PreviewImageFragment extends FileFragment {
      *
      * This method hides to client objects the need of doing the construction in two steps.
      *
-     * @param imageFile                 An {@link OCFile} to preview as an image in the fragment
-     * @param ignoreFirstSavedState     Flag to work around an unexpected behaviour of
-     *                                  {@link FragmentStatePagerAdapter}
-     *                                  ; TODO better solution
+     * @param imageFile             An {@link OCFile} to preview as an image in the fragment
+     * @param ignoreFirstSavedState Flag to work around an unexpected behaviour of
+     *                              {@link FragmentStatePagerAdapter}
+     *                              ; TODO better solution
      */
     public static PreviewImageFragment newInstance(OCFile imageFile, boolean ignoreFirstSavedState) {
         PreviewImageFragment frag = new PreviewImageFragment();
@@ -125,13 +130,13 @@ public class PreviewImageFragment extends FileFragment {
 
 
     /**
-     *  Creates an empty fragment for image previews.
+     * Creates an empty fragment for image previews.
      *
-     *  MUST BE KEPT: the system uses it when tries to reinstantiate a fragment automatically
-     *  (for instance, when the device is turned a aside).
+     * MUST BE KEPT: the system uses it when tries to reinstantiate a fragment automatically
+     * (for instance, when the device is turned a aside).
      *
-     *  DO NOT CALL IT: an {@link OCFile} and {@link Account} must be provided for a successful
-     *  construction
+     * DO NOT CALL IT: an {@link OCFile} and {@link Account} must be provided for a successful
+     * construction
      */
     public PreviewImageFragment() {
         mIgnoreFirstSavedState = false;
@@ -180,7 +185,7 @@ public class PreviewImageFragment extends FileFragment {
                 toggleImageBackground();
             }
         });
-        
+
         mMultiView = (RelativeLayout) view.findViewById(R.id.multi_view);
 
         setupMultiView(view);
@@ -337,7 +342,7 @@ public class PreviewImageFragment extends FileFragment {
             case R.id.action_share_file:
                 mContainerActivity.getFileOperationsHelper().showShareFile(getFile());
                 return true;
-            
+
             case R.id.action_open_file_with:
                 openFile();
                 return true;
@@ -419,12 +424,14 @@ public class PreviewImageFragment extends FileFragment {
          * @param imageView Target {@link ImageView} where the bitmap will be loaded into.
          */
         public LoadBitmapTask(ImageViewCustom imageView) {
-            mImageViewRef = new WeakReference<ImageViewCustom>(imageView);
+            mImageViewRef = new WeakReference<>(imageView);
         }
 
         @Override
         protected LoadImage doInBackground(OCFile... params) {
-            Bitmap result = null;
+            Bitmap bitmapResult = null;
+            Drawable drawableResult = null;
+
             if (params.length != 1) {
                 return null;
             }
@@ -436,51 +443,72 @@ public class PreviewImageFragment extends FileFragment {
                 Point screenSize = DisplayUtils.getScreenSize(getActivity());
                 int minWidth = screenSize.x;
                 int minHeight = screenSize.y;
-                for (int i = 0; i < maxDownScale && result == null; i++) {
-                    if (isCancelled()) {
-                        return null;
-                    }
-                    try {
-                        result = BitmapUtils.decodeSampledBitmapFromFile(storagePath, minWidth,
-                                minHeight);
+                for (int i = 0; i < maxDownScale && bitmapResult == null && drawableResult == null; i++) {
 
+                    if (ocFile.getMimetype().equalsIgnoreCase("image/svg+xml")) {
                         if (isCancelled()) {
-                            return new LoadImage(result, ocFile);
+                            return null;
                         }
 
-                        if (result == null) {
-                            mErrorMessageId = R.string.preview_image_error_unknown_format;
-                            Log_OC.e(TAG, "File could not be loaded as a bitmap: " + storagePath);
-                            break;
-                        } else {
-                            if (ocFile.getMimetype().equalsIgnoreCase("image/jpeg")) {
-                                // Rotate image, obeying exif tag.
-                                result = BitmapUtils.rotateImage(result, storagePath);
+                        try {
+                            SVG svg = SVG.getFromInputStream(new FileInputStream(storagePath));
+                            drawableResult = new PictureDrawable(svg.renderToPicture());
+
+                            if (isCancelled()) {
+                                return new LoadImage(null, drawableResult, ocFile);
                             }
+                        } catch (FileNotFoundException e) {
+                            mErrorMessageId = R.string.common_error_unknown;
+                            Log_OC.e(TAG, "File not found trying to load " + getFile().getStoragePath(), e);
+                        } catch (SVGParseException e) {
+                            mErrorMessageId = R.string.common_error_unknown;
+                            Log_OC.e(TAG, "Couldn't parse SVG " + getFile().getStoragePath(), e);
+                        }
+                    } else {
+                        if (isCancelled()) {
+                            return null;
                         }
 
-                    } catch (OutOfMemoryError e) {
-                        mErrorMessageId = R.string.common_error_out_memory;
-                        if (i < maxDownScale - 1) {
-                            Log_OC.w(TAG, "Out of memory rendering file " + storagePath +
-                                    " ; scaling down");
-                            minWidth = minWidth / 2;
-                            minHeight = minHeight / 2;
+                        try {
+                            bitmapResult = BitmapUtils.decodeSampledBitmapFromFile(storagePath, minWidth,
+                                    minHeight);
 
-                        } else {
-                            Log_OC.w(TAG, "Out of memory rendering file " + storagePath +
-                                    " ; failing");
-                        }
-                        if (result != null) {
-                            result.recycle();
+                            if (isCancelled()) {
+                                return new LoadImage(bitmapResult, null, ocFile);
+                            }
+
+                            if (bitmapResult == null) {
+                                mErrorMessageId = R.string.preview_image_error_unknown_format;
+                                Log_OC.e(TAG, "File could not be loaded as a bitmap: " + storagePath);
+                                break;
+                            } else {
+                                if (ocFile.getMimetype().equalsIgnoreCase("image/jpeg")) {
+                                    // Rotate image, obeying exif tag.
+                                    bitmapResult = BitmapUtils.rotateImage(bitmapResult, storagePath);
+                                }
+                            }
+
+                        } catch (OutOfMemoryError e) {
+                            mErrorMessageId = R.string.common_error_out_memory;
+                            if (i < maxDownScale - 1) {
+                                Log_OC.w(TAG, "Out of memory rendering file " + storagePath + " ; scaling down");
+                                minWidth = minWidth / 2;
+                                minHeight = minHeight / 2;
+
+                            } else {
+                                Log_OC.w(TAG, "Out of memory rendering file " + storagePath + " ; failing");
+                            }
+                            if (bitmapResult != null) {
+                                bitmapResult.recycle();
+                            }
+                            bitmapResult = null;
                         }
-                        result = null;
                     }
                 }
 
             } catch (NoSuchFieldError e) {
                 mErrorMessageId = R.string.common_error_unknown;
-                Log_OC.e(TAG, "Error from access to unexisting field despite protection; file "
+                Log_OC.e(TAG, "Error from access to non-existing field despite protection; file "
                         + storagePath, e);
 
             } catch (Throwable t) {
@@ -489,7 +517,7 @@ public class PreviewImageFragment extends FileFragment {
 
             }
 
-            return new LoadImage(result, ocFile);
+            return new LoadImage(bitmapResult, drawableResult, ocFile);
         }
 
         @Override
@@ -501,7 +529,7 @@ public class PreviewImageFragment extends FileFragment {
 
         @Override
         protected void onPostExecute(LoadImage result) {
-            if (result.bitmap != null) {
+            if (result.bitmap != null || result.drawable != null) {
                 showLoadedImage(result);
             } else {
                 showErrorMessage();
@@ -516,23 +544,43 @@ public class PreviewImageFragment extends FileFragment {
         private void showLoadedImage(LoadImage result) {
             final ImageViewCustom imageView = mImageViewRef.get();
             Bitmap bitmap = result.bitmap;
-            if (imageView != null) {
-                Log_OC.d(TAG, "Showing image with resolution " + bitmap.getWidth() + "x" +
-                        bitmap.getHeight());
 
 
-                if (result.ocFile.getMimetype().equalsIgnoreCase("image/png")) {
+            if (imageView != null) {
+                if (bitmap != null) {
+                    Log_OC.d(TAG, "Showing image with resolution " + bitmap.getWidth() + "x" +
+                            bitmap.getHeight());
+                }
+
+                if (result.ocFile.getMimetype().equalsIgnoreCase("image/png") ||
+                        result.ocFile.getMimetype().equals("image/svg+xml")) {
                     if (getResources() != null) {
                         Resources r = getResources();
                         Drawable[] layers = new Drawable[2];
                         layers[0] = r.getDrawable(R.color.white);
-                        Drawable bitmapDrawable = new BitmapDrawable(getResources(), bitmap);
+                        Drawable bitmapDrawable;
+                        if (result.ocFile.getMimetype().equalsIgnoreCase("image/png") ) {
+                            bitmapDrawable = new BitmapDrawable(getResources(), bitmap);
+                        } else {
+                            bitmapDrawable = result.drawable;
+                        }
                         layers[1] = bitmapDrawable;
                         LayerDrawable layerDrawable = new LayerDrawable(layers);
-                        layerDrawable.setLayerHeight(0, convertDpToPixel(bitmap.getHeight(), getActivity()));
-                        layerDrawable.setLayerHeight(1, convertDpToPixel(bitmap.getHeight(), getActivity()));
-                        layerDrawable.setLayerWidth(0, convertDpToPixel(bitmap.getWidth(), getActivity()));
-                        layerDrawable.setLayerWidth(1, convertDpToPixel(bitmap.getWidth(), getActivity()));
+                        if (result.ocFile.getMimetype().equalsIgnoreCase("image/png") ) {
+                            layerDrawable.setLayerHeight(0, convertDpToPixel(bitmap.getHeight(), getActivity()));
+                            layerDrawable.setLayerHeight(1, convertDpToPixel(bitmap.getHeight(), getActivity()));
+                            layerDrawable.setLayerWidth(0, convertDpToPixel(bitmap.getWidth(), getActivity()));
+                            layerDrawable.setLayerWidth(1, convertDpToPixel(bitmap.getWidth(), getActivity()));
+                        } else {
+                            layerDrawable.setLayerHeight(0, convertDpToPixel(bitmapDrawable.getIntrinsicHeight(),
+                                    getActivity()));
+                            layerDrawable.setLayerHeight(1, convertDpToPixel(bitmapDrawable.getIntrinsicHeight(),
+                                    getActivity()));
+                            layerDrawable.setLayerWidth(0, convertDpToPixel(bitmapDrawable.getIntrinsicWidth(),
+                                    getActivity()));
+                            layerDrawable.setLayerWidth(1, convertDpToPixel(bitmapDrawable.getIntrinsicWidth(),
+                                    getActivity()));
+                        }
                         imageView.setImageDrawable(layerDrawable);
                     } else {
                         imageView.setImageBitmap(bitmap);
@@ -541,7 +589,8 @@ public class PreviewImageFragment extends FileFragment {
 
                 if (result.ocFile.getMimetype().equalsIgnoreCase("image/gif")) {
                     imageView.setGIFImageFromStoragePath(result.ocFile.getStoragePath());
-                } else if (!result.ocFile.getMimetype().equalsIgnoreCase("image/png")) {
+                } else if (!result.ocFile.getMimetype().equalsIgnoreCase("image/png") &&
+                        !result.ocFile.getMimetype().equals("image/svg+xml")) {
                     imageView.setImageBitmap(bitmap);
                 }
 
@@ -589,8 +638,8 @@ public class PreviewImageFragment extends FileFragment {
      * Helper method to test if an {@link OCFile} can be passed to a {@link PreviewImageFragment}
      * to be previewed.
      *
-     * @param file      File to test if can be previewed.
-     * @return          'True' if the file can be handled by the fragment.
+     * @param file File to test if can be previewed.
+     * @return 'True' if the file can be handled by the fragment.
      */
     public static boolean canBePreviewed(OCFile file) {
         return (file != null && MimeTypeUtil.isImage(file));
@@ -606,7 +655,8 @@ public class PreviewImageFragment extends FileFragment {
     }
 
     private void toggleImageBackground() {
-        if (getFile() != null && getFile().getMimetype().equalsIgnoreCase("image/png") && getActivity() != null
+        if (getFile() != null && (getFile().getMimetype().equalsIgnoreCase("image/png") ||
+                getFile().getMimetype().equalsIgnoreCase("image/svg+xml")) && getActivity() != null
                 && getActivity() instanceof PreviewImageActivity && getResources() != null) {
             PreviewImageActivity previewImageActivity = (PreviewImageActivity) getActivity();
             LayerDrawable layerDrawable = (LayerDrawable) mImageView.getDrawable();
@@ -640,10 +690,12 @@ public class PreviewImageFragment extends FileFragment {
 
     private class LoadImage {
         private Bitmap bitmap;
+        private Drawable drawable;
         private OCFile ocFile;
 
-        public LoadImage(Bitmap bitmap, OCFile ocFile) {
+        public LoadImage(Bitmap bitmap, Drawable drawable, OCFile ocFile) {
             this.bitmap = bitmap;
+            this.drawable = drawable;
             this.ocFile = ocFile;
         }
 

+ 1 - 1
src/main/res/drawable/indicator_dot_not_selected.xml

@@ -24,7 +24,7 @@
 
         <shape
             android:shape="oval">
-            <solid android:color="@color/owncloud_blue_dark_transparent"/>
+            <solid android:color="@color/color_dark_transparent"/>
             <size android:width="8dp" android:height="8dp" />
         </shape>
     </item>

+ 2 - 2
src/main/res/drawable/main_header_bg.xml

@@ -19,8 +19,8 @@
 -->
 <shape xmlns:android="http://schemas.android.com/apk/res/android">
     <gradient
-        android:startColor="@color/actionbar_start_color" 
-        android:endColor="@color/actionbar_end_color"
+        android:startColor="@color/navigation_bar_start_color"
+        android:endColor="@color/navigation_bar_end_color"
         android:angle="270"
      />
     <corners android:radius="0dp" />

+ 1 - 1
src/main/res/drawable/round_button.xml

@@ -21,5 +21,5 @@
 -->
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
     android:shape="oval">
-    <solid android:color="@color/owncloud_blue_accent"/>
+    <solid android:color="@color/nc_blue_accent"/>
 </shape>

+ 1 - 1
src/main/res/layout/account_item.xml

@@ -52,7 +52,7 @@
             android:layout_gravity="bottom|right"
             android:background="@drawable/round_bgnd"
             android:src="@drawable/ic_account_circle_white_18dp"
-            android:tint="@color/actionbar_start_color"/>
+            android:tint="@color/navigation_bar_start_color"/>
     </FrameLayout>
 
     <LinearLayout

+ 1 - 1
src/main/res/layout/edit_share_layout.xml

@@ -42,7 +42,7 @@
             android:id="@+id/share_header_divider"
             android:layout_width="match_parent"
             android:layout_height="@dimen/edit_share_layout_view_height"
-            android:background="@color/owncloud_blue"
+            android:background="@color/nc_blue"
             />
     <LinearLayout
         android:orientation="vertical"

+ 4 - 4
src/main/res/layout/list_fragment.xml

@@ -89,7 +89,7 @@
         android:layout_height="wrap_content"
         android:layout_alignParentRight="true"
         app:fab_addButtonColorNormal="@color/primary_button_background_color"
-        app:fab_addButtonColorPressed="@color/owncloud_blue"
+        app:fab_addButtonColorPressed="@color/nc_blue"
         app:fab_addButtonPlusIconColor="@color/white"
         app:fab_labelStyle="@style/menu_labels_style"
         android:layout_marginBottom="@dimen/standard_margin"
@@ -105,7 +105,7 @@
             app:fab_size="mini"
             app:fab_icon="@drawable/ic_action_upload"
             app:fab_colorNormal="@color/primary_button_background_color"
-            app:fab_colorPressed="@color/owncloud_blue"
+            app:fab_colorPressed="@color/nc_blue"
             app:fab_title=""/>
 
         <com.getbase.floatingactionbutton.FloatingActionButton
@@ -115,7 +115,7 @@
             app:fab_size="mini"
             app:fab_icon="@drawable/ic_import"
             app:fab_colorNormal="@color/primary_button_background_color"
-            app:fab_colorPressed="@color/owncloud_blue"
+            app:fab_colorPressed="@color/nc_blue"
             app:fab_title=""/>
 
         <com.getbase.floatingactionbutton.FloatingActionButton
@@ -125,7 +125,7 @@
             app:fab_size="mini"
             app:fab_icon="@drawable/ic_action_create_dir"
             app:fab_colorNormal="@color/primary_button_background_color"
-            app:fab_colorPressed="@color/owncloud_blue"
+            app:fab_colorPressed="@color/nc_blue"
             app:fab_title=""/>
 
     </com.getbase.floatingactionbutton.FloatingActionsMenu>

+ 1 - 1
src/main/res/layout/share_file_layout.xml

@@ -77,7 +77,7 @@
             android:id="@+id/share_header_divider"
             android:layout_width="match_parent"
             android:layout_height="@dimen/standard_eighth_margin"
-            android:background="@color/owncloud_blue"
+            android:background="@color/nc_blue"
             />
 
         <LinearLayout

+ 8 - 8
src/main/res/layout/whats_new_activity.xml

@@ -30,7 +30,7 @@
         android:layout_width="match_parent"
         android:layout_height="0dp"
         android:layout_margin="5dp"
-        android:layout_weight="10"
+        android:layout_weight="6"
         android:gravity="center"
         android:text="@string/placeholder_sentence"
         android:textAppearance="?android:attr/textAppearanceLarge"
@@ -40,16 +40,15 @@
         android:id="@+id/contentPanel"
         android:layout_width="match_parent"
         android:layout_height="0dp"
-        android:layout_weight="80">
+        android:layout_weight="86">
     </android.support.v4.view.ViewPager>
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="0dp"
-        android:layout_marginBottom="@dimen/standard_margin"
         android:layout_marginLeft="@dimen/standard_margin"
         android:layout_marginRight="@dimen/standard_margin"
-        android:layout_weight="10"
+        android:layout_weight="8"
         android:orientation="horizontal"
         android:weightSum="3">
 
@@ -57,11 +56,12 @@
             android:id="@+id/skip"
             style="@style/Button.Borderless.Login"
             android:layout_width="0dp"
-            android:layout_height="wrap_content"
+            android:layout_height="match_parent"
             android:layout_gravity="center_vertical|center_horizontal"
             android:layout_weight="1"
-            android:paddingRight="0dp"
+            android:gravity="center"
             android:paddingLeft="0dp"
+            android:paddingRight="0dp"
             android:text="@string/whats_new_skip"/>
 
         <com.owncloud.android.ui.whatsnew.ProgressIndicator
@@ -74,9 +74,10 @@
 
         <LinearLayout
             android:layout_width="0dp"
-            android:layout_height="wrap_content"
+            android:layout_height="match_parent"
             android:layout_gravity="center"
             android:layout_weight="1"
+            android:gravity="center"
             android:orientation="vertical">
 
             <ImageButton
@@ -84,7 +85,6 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
-                android:padding="@dimen/standard_padding"
                 android:src="@drawable/arrow_right"/>
         </LinearLayout>
     </LinearLayout>

+ 13 - 0
src/main/res/layout/whats_new_webview_element.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+              android:orientation="vertical"
+              android:layout_width="match_parent"
+              android:layout_height="match_parent">
+
+    <WebView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:id="@+id/whatsNewWebView">
+    </WebView>
+
+</LinearLayout>

+ 3 - 3
src/main/res/values-es-rMX/strings.xml

@@ -60,7 +60,7 @@
     <string name="prefs_help">Ayuda</string>
     <string name="prefs_recommend">Recomendar a un amigo</string>
     <string name="prefs_feedback">Retroalimentación</string>
-    <string name="prefs_imprint">Imprint</string>
+    <string name="prefs_imprint">Exención de responsabilidad </string>
     <string name="prefs_remember_last_share_location">Recordar la ubicación del elemento compartido</string>
     <string name="prefs_remember_last_upload_location_summary">Recordar la última ubicación del elemento compartido cargado.</string>
 
@@ -232,7 +232,7 @@ en los últimos 7 días!</string>
     <string name="media_err_malformed">El archivo no ha sido codificado correctamente</string>
     <string name="media_err_timeout">Tiempo de espera expirado al intentar reproducir</string>
     <string name="media_err_invalid_progressive_playback">Archivo de medio no puede ser transmitido como flujo</string>
-    <string name="media_err_unknown">El archivo de medios no se puede reproducir con el reproductor de medios por defecto </string>
+    <string name="media_err_unknown">El archivo de medios no se puede reproducir con el reproductor predeterminado</string>
     <string name="media_err_security_ex">Se presentó un error de seguridad al intentar reproducir %1$s</string>
     <string name="media_err_io_ex">Se presentó un error en la entrada de datos al intentar reproducir %1$s</string>
     <string name="media_err_unexpected">Se presentó un error inesperado al intentar reproducir %1$s</string>
@@ -521,7 +521,7 @@ en los últimos 7 días!</string>
     <string name="action_retry_uploads">Falla en el reintento</string>
     <string name="action_clear_failed_uploads">Borrar fallidos</string>
     <string name="action_clear_successful_uploads">Borrar exitosos</string>
-    <string name="action_clear_finished_uploads">Borrar todos los completados</string>
+    <string name="action_clear_finished_uploads">Borrar todos</string>
 
     <string name="action_switch_grid_view">Vista de cuadrícula</string>
     <string name="action_switch_list_view">Vista de lista</string>

+ 16 - 16
src/main/res/values-ru/strings.xml

@@ -43,10 +43,10 @@
     <string name="prefs_manage_accounts">Управление аккаунтами</string>
     <string name="prefs_passcode">Блокировка кодом</string>
     <string name="prefs_show_hidden_files">Показать скрытые файлы</string>
-    <string name="prefs_instant_upload">Автозагрузка изображений</string>
-    <string name="prefs_instant_upload_summary">Автоматически загружать изображения, сделанные камерой</string>
-    <string name="prefs_instant_video_upload">Автозагрузка видео</string>
-    <string name="prefs_instant_video_upload_summary">Автоматически загружать видео, сделанные камерой</string>
+    <string name="prefs_instant_upload">Моментальная загрузка изображений</string>
+    <string name="prefs_instant_upload_summary">Немедленно загружать изображения, сделанные камерой</string>
+    <string name="prefs_instant_video_upload">Моментальная загрузка видео</string>
+    <string name="prefs_instant_video_upload_summary">Немедленно загружать видео, сделанные камерой</string>
     <string name="prefs_log_title">Включить журналирование</string>
     <string name="prefs_log_summary">Используется для регистрации ошибок</string>
     <string name="prefs_log_title_history">История журналирования</string>
@@ -72,8 +72,8 @@
     <string name="auth_host_url">Адрес сервера https://...</string>
     <string name="auth_username">Имя пользователя</string>
     <string name="auth_password">Пароль</string>
-    <string name="auth_register">Ещё нет сервера?
-Щёлкните здесь чтобы получить от провайдера</string>
+    <string name="auth_register">Нет сервера?
+Нажмите здесь чтобы получить от провайдера</string>
     <string name="sync_string_files">Файлы</string>
     <string name="setup_btn_connect">Подключиться</string>
     <string name="uploader_btn_upload_text">Загрузить</string>
@@ -90,9 +90,9 @@
     <string name="uploader_error_message_source_file_not_found">Файл для загрузки не был найден в положенном месте. Пожалуйста проверьте, существует ли файл.</string>
     <string name="uploader_error_message_source_file_not_copied">Произошла ошибка во время копирования этого файла во временный каталог. Пожалуйста попробуйте отправить его заново.</string>
     <string name="uploader_upload_files_behaviour">Настройка загрузки:</string>
-    <string name="uploader_upload_files_behaviour_move_to_nextcloud_folder">Переместить файл в папку Nextcloud</string>
-    <string name="uploader_upload_files_behaviour_only_upload">Хранить файл в исходном каталоге</string>
-    <string name="uploader_upload_files_behaviour_upload_and_delete_from_source">Удалить файл из исходного каталога</string>
+    <string name="uploader_upload_files_behaviour_move_to_nextcloud_folder">Перемещать файл в папку Nextcloud</string>
+    <string name="uploader_upload_files_behaviour_only_upload">Сохранять файл в исходном каталоге</string>
+    <string name="uploader_upload_files_behaviour_upload_and_delete_from_source">Удалять файл из исходного каталога</string>
     <string name="file_list_seconds_ago">несколько секунд назад</string>
     <string name="file_list_empty_headline">Здесь нет файлов</string>
     <string name="file_list_empty">Загрузите что-нибудь или синхронизируйте со своими устройствами!</string>
@@ -105,7 +105,7 @@
     <string name="file_list_empty_headline_search">В этой папке результатов не найдено</string>
     <string name="file_list_empty_headline_server_search">Результаты отсутствуют</string>
     <string name="file_list_empty_favorite_headline">Избранное отсутствует</string>
-    <string name="file_list_empty_shared_headline">Вы еще ничем не поделились</string>
+    <string name="file_list_empty_shared_headline">Вы ещё ничем не поделились</string>
     <string name="file_list_empty_shared">Здесь появятся файлы и каталоги, которыми вы поделитесь</string>
     <string name="file_list_empty_headline_server_search_videos">Видео отсуствуют</string>
     <string name="file_list_empty_headline_server_search_photos">Фотографии отсутствуют</string>
@@ -120,7 +120,7 @@
     <string name="file_list_empty_text_videos">Загрузите видео или включите автоматическую загрузку!</string>
     <string name="file_list_empty_text_videos_filter">По запросу видео–файлов не найдено!</string>
     <string name="upload_list_empty_headline">Нет доступных загрузок</string>
-    <string name="upload_list_empty_text">Загрузите что-нибудь или включите автоматическую загрузку!</string>
+    <string name="upload_list_empty_text">Загрузите что-нибудь или включите моментальную загрузку!</string>
     <string name="upload_list_empty_text_auto_upload">Загрузите что-нибудь или включите автоматическую загрузку!</string>
     <string name="file_list_folder">каталог</string>
     <string name="file_list_folders">каталоги</string>
@@ -357,7 +357,7 @@
     <string name="preview_image_error_unknown_format">Это изображение не может быть отображено</string>
 
     <string name="error__upload__local_file_not_copied">%1$s невозможно скопировать в локальный каталог %2$s </string>
-    <string name="prefs_instant_upload_path_title">Каталог для автоматической загрузки</string>
+    <string name="prefs_instant_upload_path_title">Каталог для немедленной загрузки</string>
     <string name="prefs_folder_sync_local_path_title">Локальный каталог</string>
     <string name="prefs_folder_sync_remote_path_title">Удалённый каталог</string>
     <string name="prefs_instant_upload_path_use_subfolders_title">Использовать подкаталоги</string>
@@ -450,10 +450,10 @@
     <string name="copy_file_error">Произошла ошибка при попытке копирования этого файла или каталога</string>
     <string name="forbidden_permissions_copy">для копирования этого файла</string>
 
-    <string name="prefs_category_instant_uploading">Автоматическая загрузка</string>
+    <string name="prefs_category_instant_uploading">Немедленная загрузка</string>
     <string name="prefs_category_details">Подробно</string>
 
-	<string name="prefs_instant_video_upload_path_title">Каталог для автоматической загрузки видео</string>
+	<string name="prefs_instant_video_upload_path_title">Каталог для немедленной загрузки видео</string>
     <string name="sync_folder_failed_content">Синхронизация каталога %1$s не может быть завершена</string>
 
 	<string name="shared_subject_header">поделился</string>
@@ -563,7 +563,7 @@
     <string name="folder_sync_no_results">Не найдены каталоги с медиа(файлами).</string>
     <string name="folder_sync_preferences">Настройки автозагрузки</string>
     <string name="folder_sync_settings">Настройки</string>
-    <string name="folder_sync_new_info">Автоматическая загрузка была полностью переделана. Используйте главное меню для перенастройки автоматической загрузки. Извините за неудобства.\n\nВам понравятся новые расширенные возможности автоматической загрузки!</string>
+    <string name="folder_sync_new_info">Моментальная загрузка была полностью переделана. Используйте главное меню для перенастройки автоматической загрузки. Извините за неудобства.\n\nВам понравятся новые расширенные возможности автоматической загрузки!</string>
     <string name="folder_sync_preferences_folder_path">Для %1$s</string>
     <plurals name="items_selected_count">
         <item quantity="one">%d выбран</item>
@@ -596,7 +596,7 @@
     <string name="welcome_feature_2_title">Работа с несколькими аккаунтами</string>
     <string name="welcome_feature_2_text">Доступ ко всем вашим облакам</string>
 
-    <string name="welcome_feature_3_title">Автозагрузка</string>
+    <string name="welcome_feature_3_title">Немедленная загрузка</string>
     <string name="welcome_feature_3_text">Держите ваши фотографии в безопасности</string>
 
     <string name="whats_new_skip">Пропустить</string>

+ 2 - 9
src/main/res/values/colors.xml

@@ -19,8 +19,8 @@
 -->
 <resources>
 
-    <color name="owncloud_blue">@color/actionbar_start_color</color>
-    <color name="owncloud_blue_accent">#007CC2</color>
+    <color name="nc_blue">@color/navigation_bar_start_color</color>
+    <color name="nc_blue_accent">#007CC2</color>
     <color name="owncloud_blue_bright">#00ddff</color>
 
     <color name="list_item_lastmod_and_filesize_text">@color/secondaryTextColor</color>
@@ -43,17 +43,10 @@
     <color name="highlightTextColor">#55739a</color>
 
     <!-- Colors -->
-    <color name="color_accent">@color/owncloud_blue_accent</color>
     <color name="dialog_list_item">#1F1F1F</color>
     <color name="standard_grey">#757575</color>
 
     <!-- standard material color definitions -->
-    <color name="primary">@color/owncloud_blue</color>
-    <color name="primary_dark">#006AA3</color>
-
-    <!-- special transparent action bar colors for image preview -->
-    <color name="owncloud_blue_transparent">#201D2D44</color>
-    <color name="owncloud_blue_dark_transparent">#40162233</color>
 
     <!-- level colors for info notifications/visualisations -->
     <color name="infolevel_info">@color/color_accent</color>

+ 16 - 7
src/main/res/values/setup.xml

@@ -37,25 +37,34 @@
     <bool name = "share_via_link_feature">true</bool>
     <bool name = "share_with_users_feature">true</bool>
     <bool name="show_whats_new">true</bool>
-
+    
     // Contacts backup
     <bool name="contacts_backup">true</bool>
     <string name="contacts_backup_folder">/Contacts-Backup</string>
     <integer name="contacts_backup_expire">-1</integer>
     
+    <!-- To fill if you want to show webviews instead of regular welcome views -->
+    <array name="whatsnew_urls"></array>
+    
     <!-- Colors -->
+    <color name="primary">@color/nc_blue</color>
+    <color name="primary_dark">#006AA3</color>
+    <color name="color_accent">@color/nc_blue_accent</color>
     <color name="login_text_color">@color/white</color>
     <color name="login_text_hint_color">#7fC0E3</color>
-    <color name="login_background_color">#FFFFFF</color>
-    <color name="login_logo_background_color">#FFFFFF</color>
+    <color name="login_background_color">#FFFFFF</color>    <!-- Not used at the moment -->
+    <color name="login_logo_background_color">#FFFFFF</color>    <!-- Not used at the moment -->
     <color name="background_color">#FFFFFF</color>
-    <color name="actionbar_start_color">#0082c9</color>
-    <color name="actionbar_end_color">#0082c9</color>
-    <color name="primary_button_background_color">@color/owncloud_blue_accent</color>
+    <color name="navigation_bar_start_color">#0082c9</color>
+    <color name="navigation_bar_end_color">#0082c9</color>
+    <color name="primary_button_background_color">@color/nc_blue_accent</color>
     <color name="primary_button_text_color">@color/white</color>
     <color name="secondary_button_background_color">#D6D7D7</color>
     <color name="secondary_button_text_color">@color/black</color>
-    <color name="drawer_header_color">@color/owncloud_blue_accent</color>
+
+    <!-- special transparent action bar colors for image preview -->
+    <color name="color_transparent">#201D2D44</color>
+    <color name="color_dark_transparent">#40162233</color>
 
     <!-- Button -->
     <color name="button_text_color">#000000</color>

+ 9 - 9
src/main/res/values/styles.xml

@@ -106,7 +106,7 @@
 
 	<style name="Button.Login" parent="Button">
 		<item name="colorButtonNormal">@color/white</item>
-		<item name="android:textColor">@color/owncloud_blue</item>
+		<item name="android:textColor">@color/nc_blue</item>
 	</style>
 
 	<style name="Button.Borderless" parent="Base.Widget.AppCompat.Button.Borderless">
@@ -129,10 +129,10 @@
 
 	<!-- ACTION BAR STYLES -->
 	<style name="Theme.ownCloud.Overlay.ActionBar" parent="@style/Widget.AppCompat.ActionBar">
-		<item name="android:background">@color/owncloud_blue_transparent</item>
+		<item name="android:background">@color/color_transparent</item>
 		<item name="android:windowActionBarOverlay">true</item>
 		<!-- Support library compatibility -->
-		<item name="background">@color/owncloud_blue_transparent</item>
+		<item name="background">@color/color_transparent</item>
 		<item name="windowActionBarOverlay">true</item>
 	</style>
 
@@ -150,8 +150,8 @@
 	
 	<style name="Theme.ownCloud.Widget.ActionBar"
 		parent="style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
-    	<item name="android:background">@color/owncloud_blue</item>
-    	<item name="background">@drawable/main_header_bg</item>
+		<item name="android:background">@drawable/main_header_bg</item>
+		<item name="background">@drawable/main_header_bg</item>
     	<item name="android:textColor">#ffffff</item>
     	<item name="android:shadowColor">#222222</item>
     	<item name="android:shadowRadius">1</item>
@@ -162,19 +162,19 @@
 	<!-- Dialogs -->
 	<style name="Theme.ownCloud.Dialog" parent="style/Theme.AppCompat.Light.Dialog.Alert">
 		<item name="windowNoTitle">false</item>
-		<item name="colorAccent">@color/owncloud_blue_accent</item>
+		<item name="colorAccent">@color/color_accent</item>
 		<item name="buttonBarButtonStyle">@style/Theme.ownCloud.Dialog.ButtonBar.Button</item>
 		<item name="buttonBarStyle">@style/Theme.ownCloud.Dialog.ButtonBar</item>
 	</style>
 
 	<style name="Theme.ownCloud.Dialog.NoTitle" parent="style/Theme.ownCloud.Dialog">
 		<item name="windowNoTitle">true</item>
-		<item name="colorAccent">@color/owncloud_blue_accent</item>
+		<item name="colorAccent">@color/color_accent</item>
 	</style>
 
 	<style name="Theme.ownCloud.Dialog.NoButtonBarStyle" parent="style/Theme.AppCompat.Light.Dialog.Alert">
 		<item name="windowNoTitle">false</item>
-		<item name="colorAccent">@color/owncloud_blue_accent</item>
+		<item name="colorAccent">@color/color_accent</item>
 	</style>
 
 	<style name="menu_labels_style">
@@ -271,7 +271,7 @@
 	
 	<style name="OAuthDialog" parent="style/Theme.AppCompat.Light.Dialog.Alert">
 		<item name="windowNoTitle">false</item>
-		<item name="colorAccent">@color/owncloud_blue_accent</item>
+		<item name="colorAccent">@color/nc_blue_accent</item>
 	</style>    
 		
 	<color name="setup_text_hint">#777777</color>

+ 3 - 2
src/main/res/xml/exposed_filepaths.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <paths xmlns:android="http://schemas.android.com/apk/res/android">
-    <external-path name="file" path="/" />
+    <external-path name="external_files" path="."/>
+    <root-path name="external_files" path="/storage/" />
     <!-- yes, valid for ALL external storage and not only our app folder, since we can't use @string/data_folder
     as a value for 'path' attribute; in practice, we will only generate URIs in our folders, of course -->
-</paths>
+</paths>

+ 14 - 5
src/modified/res/values/setup.xml

@@ -33,25 +33,34 @@
     <string name = "send_files_to_other_apps">on</string>
     <bool name = "share_via_link_feature">true</bool>
     <bool name = "share_with_users_feature">true</bool>
-
+    <bool name="show_whats_new">true</bool>
+    <!-- To fill if you want to show webviews instead of regular welcome views -->
+    <array name="whatsnew_urls"></array>
+    
     // Contacts backup
     <bool name="contacts_backup">true</bool>
     <string name="contacts_backup_folder">/Contacts-Backup</string>
     <integer name="contacts_backup_expire">30</integer>
 
     <!-- Colors -->
+    <color name="primary">@color/nc_blue</color>
+    <color name="primary_dark">#006AA3</color>
+    <color name="color_accent">@color/nc_blue_accent</color>
     <color name="login_text_color">@color/white</color>
     <color name="login_text_hint_color">#7fC0E3</color>
     <color name="login_background_color">#FFFFFF</color>
     <color name="login_logo_background_color">#FFFFFF</color>
     <color name="background_color">#FFFFFF</color>
-    <color name="actionbar_start_color">#0082c9</color>
-    <color name="actionbar_end_color">#0082c9</color>
-    <color name="primary_button_background_color">@color/owncloud_blue_accent</color>
+    <color name="navigation_bar_start_color">#0082c9</color>
+    <color name="navigation_bar_end_color">#0082c9</color>
+    <color name="primary_button_background_color">@color/nc_blue_accent</color>
     <color name="primary_button_text_color">@color/white</color>
     <color name="secondary_button_background_color">#D6D7D7</color>
     <color name="secondary_button_text_color">@color/black</color>
-    <color name="drawer_header_color">@color/owncloud_blue_accent</color>
+
+    <!-- special transparent action bar colors for image preview -->
+    <color name="color_transparent">#201D2D44</color>
+    <color name="color_dark_transparent">#40162233</color>
 
     <!-- Button -->
     <color name="button_text_color">#000000</color>