Browse Source

changes due to code review

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 5 years ago
parent
commit
c1aa005db9
31 changed files with 258 additions and 113 deletions
  1. 2 0
      .idea/codeStyles/Project.xml
  2. 1 1
      src/main/java/com/nextcloud/client/onboarding/FirstRunActivity.java
  3. 2 2
      src/main/java/com/nextcloud/client/preferences/AppPreferencesImpl.java
  4. 2 1
      src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
  5. 0 1
      src/main/java/com/owncloud/android/ui/ThemeableSwitchPreference.java
  6. 29 26
      src/main/java/com/owncloud/android/ui/activity/BaseActivity.java
  7. 8 3
      src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java
  8. 1 3
      src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java
  9. 12 9
      src/main/java/com/owncloud/android/ui/activity/ThemedPreferenceActivity.java
  10. 6 2
      src/main/java/com/owncloud/android/ui/adapter/ActivityListAdapter.java
  11. 2 3
      src/main/java/com/owncloud/android/ui/adapter/NotificationListAdapter.java
  12. 1 5
      src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java
  13. 4 5
      src/main/java/com/owncloud/android/utils/ThemeUtils.java
  14. 19 0
      src/main/res/drawable-night/round_bgnd.xml
  15. 18 0
      src/main/res/drawable-night/shared_via_link.xml
  16. 18 0
      src/main/res/drawable-night/shared_via_users.xml
  17. 20 1
      src/main/res/drawable/round_bgnd.xml
  18. 24 0
      src/main/res/drawable/round_bgnd_icons.xml
  19. 18 0
      src/main/res/drawable/shared_via_link.xml
  20. 18 0
      src/main/res/drawable/shared_via_users.xml
  21. 11 9
      src/main/res/layout-land/account_setup.xml
  22. 11 9
      src/main/res/layout/account_setup.xml
  23. 3 3
      src/main/res/layout/activity_list_item.xml
  24. 1 1
      src/main/res/layout/notification_list_item.xml
  25. 3 3
      src/main/res/layout/ssl_validator_layout.xml
  26. 2 2
      src/main/res/layout/toolbar_user_information.xml
  27. 13 15
      src/main/res/values-night/colors.xml
  28. 0 1
      src/main/res/values-v21/styles.xml
  29. 6 5
      src/main/res/values/colors.xml
  30. 0 1
      src/main/res/values/strings.xml
  31. 3 2
      src/main/res/xml/preferences.xml

+ 2 - 0
.idea/codeStyles/Project.xml

@@ -27,6 +27,8 @@
         <emptyLine />
       </value>
     </option>
+    <option name="RIGHT_MARGIN" value="120" />
+    <option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" />
     <AndroidXmlCodeStyleSettings>
       <option name="ARRANGEMENT_SETTINGS_MIGRATED_TO_191" value="true" />
     </AndroidXmlCodeStyleSettings>

+ 1 - 1
src/main/java/com/nextcloud/client/onboarding/FirstRunActivity.java

@@ -94,7 +94,7 @@ public class FirstRunActivity extends BaseActivity implements ViewPager.OnPageCh
         });
 
         Button providerButton = findViewById(R.id.signup);
-        providerButton.setBackgroundColor(getResources().getColor(R.color.primary));
+        providerButton.setBackgroundColor(getResources().getColor(R.color.primary_dark));
         providerButton.setTextColor(getResources().getColor(R.color.login_text_color));
         providerButton.setVisibility(isProviderOrOwnInstallationVisible ? View.VISIBLE : View.GONE);
         providerButton.setOnClickListener(v -> {

+ 2 - 2
src/main/java/com/nextcloud/client/preferences/AppPreferencesImpl.java

@@ -68,8 +68,8 @@ public final class AppPreferencesImpl implements AppPreferences {
     private static final String PREF__AUTO_UPLOAD_INIT = "autoUploadInit";
     private static final String PREF__FOLDER_SORT_ORDER = "folder_sort_order";
     private static final String PREF__FOLDER_LAYOUT = "folder_layout";
+    public static final String PREF__THEME = "darkTheme";
 
-    private static final String PREF__DARK_THEME = "darkTheme";
     private static final String PREF__LOCK_TIMESTAMP = "lock_timestamp";
     private static final String PREF__SHOW_MEDIA_SCAN_NOTIFICATIONS = "show_media_scan_notifications";
     private static final String PREF__LOCK = SettingsActivity.PREFERENCE_LOCK;
@@ -344,7 +344,7 @@ public final class AppPreferencesImpl implements AppPreferences {
 
     @Override
     public boolean isDarkThemeEnabled() {
-        return preferences.getBoolean(PREF__DARK_THEME, false);
+        return preferences.getBoolean(PREF__THEME, false);
     }
 
     @Override

+ 2 - 1
src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java

@@ -1173,7 +1173,8 @@ public final class ThumbnailsCacheManager {
         Bitmap resultBitmap = Bitmap.createBitmap(pxW, pxH, Bitmap.Config.ARGB_8888);
         Canvas c = new Canvas(resultBitmap);
 
-        c.drawColor(MainApp.getAppContext().getResources().getColor(R.color.bg_default));
+        // TODO check based on https://github.com/nextcloud/android/pull/3459#discussion_r339935975
+        c.drawColor(MainApp.getAppContext().getResources().getColor(R.color.background_color_png));
         c.drawBitmap(bitmap, 0, 0, null);
 
         return resultBitmap;

+ 0 - 1
src/main/java/com/owncloud/android/ui/ThemeableSwitchPreference.java

@@ -85,7 +85,6 @@ public class ThemeableSwitchPreference extends SwitchPreference {
                             new int[][]{new int[]{android.R.attr.state_checked},
                                 new int[]{}},
                             new int[]{trackColor, trackColorUnchecked});
-//                            new int[]{trackColor, Color.parseColor("#4D000000")});
                 }
 
                 // setting the thumb color

+ 29 - 26
src/main/java/com/owncloud/android/ui/activity/BaseActivity.java

@@ -12,6 +12,7 @@ import android.os.Handler;
 
 import com.nextcloud.client.account.UserAccountManager;
 import com.nextcloud.client.di.Injectable;
+import com.nextcloud.client.preferences.AppPreferencesImpl;
 import com.owncloud.android.MainApp;
 import com.owncloud.android.R;
 import com.owncloud.android.datamodel.FileDataStorageManager;
@@ -27,29 +28,32 @@ import androidx.appcompat.app.AppCompatActivity;
 /**
  * Base activity with common behaviour for activities dealing with ownCloud {@link Account}s .
  */
-public abstract class BaseActivity extends AppCompatActivity implements Injectable, SharedPreferences.OnSharedPreferenceChangeListener {
+public abstract class BaseActivity
+    extends AppCompatActivity
+    implements Injectable, SharedPreferences.OnSharedPreferenceChangeListener {
+
     private static final String TAG = BaseActivity.class.getSimpleName();
 
     /**
      * ownCloud {@link Account} where the main {@link OCFile} handled by the activity is located.
      */
-    private Account mCurrentAccount;
+    private Account currentAccount;
 
     /**
-     * Capabilities of the server where {@link #mCurrentAccount} lives.
+     * Capabilities of the server where {@link #currentAccount} lives.
      */
-    private OCCapability mCapabilities;
+    private OCCapability capabilities;
 
     /**
      * Access point to the cached database for the current ownCloud {@link Account}.
      */
-    private FileDataStorageManager mStorageManager;
+    private FileDataStorageManager storageManager;
 
     /**
      * Tracks whether the activity should be recreate()'d after a theme change
      */
-    private boolean mThemeChangePending;
-    private boolean mPaused;
+    private boolean themeChangePending;
+    private boolean paused;
 
     @Inject UserAccountManager accountManager;
     @Inject SharedPreferences sharedPreferences;
@@ -73,16 +77,15 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab
     @Override
     protected void onPause() {
         super.onPause();
-        mPaused = true;
+        paused = true;
     }
 
     @Override
     protected void onResume() {
         super.onResume();
-        mPaused = false;
+        paused = false;
 
-        if(mThemeChangePending) {
-//            getDelegate().applyDayNight();
+        if(themeChangePending) {
             recreate();
         }
     }
@@ -98,8 +101,8 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab
 
         Log_OC.v(TAG, "onNewIntent() start");
         Account current = accountManager.getCurrentAccount();
-        if (current != null && mCurrentAccount != null && !mCurrentAccount.name.equals(current.name)) {
-            mCurrentAccount = current;
+        if (current != null && currentAccount != null && !currentAccount.name.equals(current.name)) {
+            currentAccount = current;
         }
         Log_OC.v(TAG, "onNewIntent() stop");
     }
@@ -112,7 +115,7 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab
     protected void onRestart() {
         Log_OC.v(TAG, "onRestart() start");
         super.onRestart();
-        boolean validAccount = mCurrentAccount != null && accountManager.exists(mCurrentAccount);
+        boolean validAccount = currentAccount != null && accountManager.exists(currentAccount);
         if (!validAccount) {
             swapToDefaultAccount();
         }
@@ -121,12 +124,12 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab
 
     @Override
     public void onSharedPreferenceChanged(final SharedPreferences sharedPreferences, final String key) {
-       if (!getString(R.string.prefs_key_theme).equals(key)) {
+       if (!AppPreferencesImpl.PREF__THEME.equals(key)) {
             return;
         }
 
-        if(mPaused) {
-            mThemeChangePending = true;
+        if(paused) {
+            themeChangePending = true;
             return;
         }
         recreate();
@@ -144,7 +147,7 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab
     protected void setAccount(Account account, boolean savedAccount) {
         boolean validAccount = account != null && accountManager.setCurrentOwnCloudAccount(account.name);
         if (validAccount) {
-            mCurrentAccount = account;
+            currentAccount = account;
         } else {
             swapToDefaultAccount();
         }
@@ -163,7 +166,7 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab
             /// no account available: force account creation
             createAccount(true);
         } else {
-            mCurrentAccount = newAccount;
+            currentAccount = newAccount;
         }
     }
 
@@ -192,8 +195,8 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab
     @Deprecated
     protected void onAccountSet() {
         if (getAccount() != null) {
-            mStorageManager = new FileDataStorageManager(getAccount(), getContentResolver());
-            mCapabilities = mStorageManager.getCapability(mCurrentAccount.name);
+            storageManager = new FileDataStorageManager(getAccount(), getContentResolver());
+            capabilities = storageManager.getCapability(currentAccount.name);
         } else {
             Log_OC.e(TAG, "onAccountChanged was called with NULL account associated!");
         }
@@ -201,7 +204,7 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab
 
     @Deprecated
     protected void setAccount(Account account) {
-        mCurrentAccount = account;
+        currentAccount = account;
     }
 
     /**
@@ -211,7 +214,7 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab
      * set yet.
      */
     public OCCapability getCapabilities() {
-        return mCapabilities;
+        return capabilities;
     }
 
     /**
@@ -222,20 +225,20 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab
      * is located.
      */
     public Account getAccount() {
-        return mCurrentAccount;
+        return currentAccount;
     }
 
     @Override
     protected void onStart() {
         super.onStart();
 
-        if(mCurrentAccount != null) {
+        if(currentAccount != null) {
             onAccountSet();
         }
     }
 
     public FileDataStorageManager getStorageManager() {
-        return mStorageManager;
+        return storageManager;
     }
 
     /**

+ 8 - 3
src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java

@@ -991,12 +991,17 @@ public abstract class DrawerActivity extends ToolbarActivity
                 MenuItem menuItem = mNavigationView.getMenu().getItem(i);
                 if (menuItem.getIcon() != null) {
                     menuItem.getIcon().clearColorFilter();
-                    if(menuItem.getGroupId() != R.id.drawer_menu_accounts
+                    if (menuItem.getGroupId() != R.id.drawer_menu_accounts
                         || menuItem.getItemId() == R.id.drawer_menu_account_add
                         || menuItem.getItemId() == R.id.drawer_menu_account_manage) {
-                        ThemeUtils.tintDrawable(menuItem.getIcon(), ContextCompat.getColor(this, R.color.drawer_menu_icon));
+                        ThemeUtils.tintDrawable(
+                            menuItem.getIcon(), ContextCompat.getColor(this, R.color.drawer_menu_icon));
                     }
-                    menuItem.setTitle(Html.fromHtml("<font color='" + ThemeUtils.colorToHexString(ContextCompat.getColor(this, R.color.textColor)) + "'>" + menuItem.getTitle() + "</font>"));
+                    menuItem.setTitle(Html.fromHtml(
+                        "<font color='"
+                            + ThemeUtils.colorToHexString(ContextCompat.getColor(this, R.color.textColor))
+                            + "'>" + menuItem.getTitle()
+                            + "</font>"));
                 }
             }
 

+ 1 - 3
src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java

@@ -39,7 +39,6 @@ import android.os.Build;
 import android.os.Bundle;
 import android.preference.ListPreference;
 import android.preference.Preference;
-import android.preference.PreferenceActivity;
 import android.preference.PreferenceCategory;
 import android.preference.PreferenceManager;
 import android.preference.PreferenceScreen;
@@ -693,13 +692,12 @@ public class SettingsActivity extends ThemedPreferenceActivity
 
         loadStoragePath();
 
-        SwitchPreference themePref = (SwitchPreference) findPreference(getString(R.string.prefs_key_theme));
+        SwitchPreference themePref = (SwitchPreference) findPreference(AppPreferencesImpl.PREF__THEME);
 
         themePref.setSummary(preferences.isDarkThemeEnabled() ?
                             getString(R.string.prefs_value_theme_dark) : getString(R.string.prefs_value_theme_light));
         themePref.setOnPreferenceChangeListener((preference, newValue) -> {
             MainApp.setAppTheme((Boolean) newValue);
-//            recreate();
 
             return true;
         });

+ 12 - 9
src/main/java/com/owncloud/android/ui/activity/ThemedPreferenceActivity.java

@@ -15,7 +15,7 @@
  * 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/>.
+ * License along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
 package com.owncloud.android.ui.activity;
@@ -28,12 +28,15 @@ import javax.inject.Inject;
 
 import androidx.annotation.Nullable;
 
-public class ThemedPreferenceActivity extends PreferenceActivity implements SharedPreferences.OnSharedPreferenceChangeListener {
+public class ThemedPreferenceActivity
+    extends PreferenceActivity
+    implements SharedPreferences.OnSharedPreferenceChangeListener {
+
     /**
      * Tracks whether the activity should be recreate()'d after a theme change
      */
-    private boolean mThemeChangePending;
-    private boolean mPaused;
+    private boolean themeChangePending;
+    private boolean paused;
 
     @Inject SharedPreferences sharedPreferences;
 
@@ -52,23 +55,23 @@ public class ThemedPreferenceActivity extends PreferenceActivity implements Shar
     @Override
     protected void onPause() {
         super.onPause();
-        mPaused = true;
+        paused = true;
     }
 
     @Override
     protected void onResume() {
         super.onResume();
-        mPaused = false;
+        paused = false;
 
-        if(mThemeChangePending) {
+        if(themeChangePending) {
             recreate();
         }
     }
 
     @Override
     public void onSharedPreferenceChanged(final SharedPreferences sharedPreferences, final String key) {
-        if(mPaused) {
-            mThemeChangePending = true;
+        if(paused) {
+            themeChangePending = true;
             return;
         }
 

+ 6 - 2
src/main/java/com/owncloud/android/ui/adapter/ActivityListAdapter.java

@@ -368,8 +368,12 @@ public class ActivityListAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
                     }
                 }, idx1, idx2, 0);
                 ssb.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), idx1, idx2, 0);
-                ssb.setSpan(new ForegroundColorSpan(context.getResources().getColor(R.color.textColor)),
-                            idx1, idx2, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+                ssb.setSpan(
+                    new ForegroundColorSpan(context.getResources().getColor(R.color.textColor)),
+                    idx1,
+                    idx2,
+                    Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
+                );
             }
             idx1 = text.indexOf('{', idx2);
         }

+ 2 - 3
src/main/java/com/owncloud/android/ui/adapter/NotificationListAdapter.java

@@ -22,8 +22,6 @@ package com.owncloud.android.ui.adapter;
 import android.content.Intent;
 import android.content.res.ColorStateList;
 import android.content.res.Resources;
-import android.graphics.Color;
-import android.graphics.PorterDuff;
 import android.graphics.Typeface;
 import android.graphics.drawable.PictureDrawable;
 import android.net.Uri;
@@ -87,7 +85,8 @@ public class NotificationListAdapter extends RecyclerView.Adapter<NotificationLi
         this.notificationsList = new ArrayList<>();
         this.client = client;
         this.notificationsActivity = notificationsActivity;
-        foregroundColorSpanBlack = new ForegroundColorSpan(notificationsActivity.getResources().getColor(R.color.textColor));
+        foregroundColorSpanBlack = new ForegroundColorSpan(
+            notificationsActivity.getResources().getColor(R.color.textColor));
     }
 
     public void setNotificationItems(List<Notification> notificationItems) {

+ 1 - 5
src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java

@@ -194,13 +194,9 @@ public class ExtendedListFragment extends Fragment implements
         searchView.setOnCloseListener(this);
         ThemeUtils.themeSearchView(searchView, true, requireContext());
 
-
-        SearchView.SearchAutoComplete theTextArea = (SearchView.SearchAutoComplete) searchView.findViewById(R.id.search_src_text);
+        SearchView.SearchAutoComplete theTextArea = searchView.findViewById(R.id.search_src_text);
         theTextArea.setHighlightColor(ThemeUtils.primaryAccentColor(getContext()));
 
-//        EditText searchText = searchView.findViewById(R.id.searchView);
-//        searchText.setHighlightColor(ThemeUtils.primaryColor(getContext(), true));
-
         final Handler handler = new Handler();
 
         DisplayMetrics displaymetrics = new DisplayMetrics();

+ 4 - 5
src/main/java/com/owncloud/android/utils/ThemeUtils.java

@@ -126,8 +126,8 @@ public final class ThemeUtils {
     }
 
     public static int primaryColor(Account account, boolean replaceWhite, Context context) {
-        if (context==null) {
-            return 255;
+        if (context == null) {
+            return Color.GRAY;
         }
 
         try {
@@ -508,8 +508,7 @@ public final class ThemeUtils {
                 color = ContextCompat.getColor(context, R.color.themed_fg_inverse);
             }
         }
-
-//        editText.setHintTextColor(color);
+        
         editText.setTextColor(color);
         editText.setHighlightColor(context.getResources().getColor(R.color.fg_contrast));
         setEditTextCursorColor(editText, color);
@@ -521,7 +520,7 @@ public final class ThemeUtils {
      *
      * @param searchView       searchView to be changed
      * @param themedBackground true if background is themed, e.g. on action bar; false if background is white
-     * @param context
+     * @param context          the app's context
      */
     public static void themeSearchView(SearchView searchView, boolean themedBackground, Context context) {
         // hacky as no default way is provided

+ 19 - 0
src/main/res/drawable-night/round_bgnd.xml

@@ -1,4 +1,23 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--
+    Nextcloud Android client application
+
+    @author Andy Scherzinger
+    Copyright (C) 2019 Andy Scherzinger
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) 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/>.
+-->
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="oval">
     <solid android:color="#222222"/>

+ 18 - 0
src/main/res/drawable-night/shared_via_link.xml

@@ -1,3 +1,21 @@
+<!--
+  Nextcloud Android client application
+
+  Copyright (C) 2015 ownCloud Inc.
+
+  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/>.
+
+-->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:width="16dp"
         android:height="16dp"

+ 18 - 0
src/main/res/drawable-night/shared_via_users.xml

@@ -1,3 +1,21 @@
+<!--
+  Nextcloud Android client application
+
+  Copyright (C) 2015 ownCloud Inc.
+
+  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/>.
+
+-->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:width="16dp"
         android:height="16dp"

+ 20 - 1
src/main/res/drawable/round_bgnd.xml

@@ -1,5 +1,24 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--
+    Nextcloud Android client application
+
+    @author Andy Scherzinger
+    Copyright (C) 2019 Andy Scherzinger
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) 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/>.
+-->
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="oval">
     <solid android:color="#ffffff"/>
-</shape>
+</shape>

+ 24 - 0
src/main/res/drawable/round_bgnd_icons.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    Nextcloud Android client application
+
+    @author Andy Scherzinger
+    Copyright (C) 2019 Andy Scherzinger
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) 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/>.
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+       android:shape="oval">
+    <solid android:color="#ffffff"/>
+</shape>

+ 18 - 0
src/main/res/drawable/shared_via_link.xml

@@ -1,3 +1,21 @@
+<!--
+  Nextcloud Android client application
+
+  Copyright (C) 2015 ownCloud Inc.
+
+  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/>.
+
+-->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:width="16dp"
         android:height="16dp"

+ 18 - 0
src/main/res/drawable/shared_via_users.xml

@@ -1,3 +1,21 @@
+<!--
+  Nextcloud Android client application
+
+  Copyright (C) 2015 ownCloud Inc.
+
+  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/>.
+
+-->
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
         android:width="16dp"
         android:height="16dp"

+ 11 - 9
src/main/res/layout-land/account_setup.xml

@@ -1,22 +1,24 @@
-<?xml version="1.0" encoding="utf-8"?><!--
-  ownCloud Android client application
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Nextcloud Android client application
 
   Copyright (C) 2012 Bartek Przybylski
   Copyright (C) 2015-2016 ownCloud Inc.
   Copyright (C) 2016 Nextcloud
   Copyright (C) 2019 Tobias Kaminsky
 
-  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 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 General Public License for more details.
+  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 General Public License
-  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  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/>.
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"

+ 11 - 9
src/main/res/layout/account_setup.xml

@@ -1,22 +1,24 @@
-<?xml version="1.0" encoding="utf-8"?><!--
-  ownCloud Android client application
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Nextcloud Android client application
 
   Copyright (C) 2012 Bartek Przybylski
   Copyright (C) 2015-2016 ownCloud Inc.
   Copyright (C) 2016 Nextcloud
   Copyright (C) 2019 Tobias Kaminsky
 
-  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 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 General Public License for more details.
+  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 General Public License
-  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  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/>.
 -->
 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"

+ 3 - 3
src/main/res/layout/activity_list_item.xml

@@ -30,13 +30,13 @@
 
     <ImageView
         android:id="@+id/activity_icon"
-        android:layout_width="@dimen/notification_icon_width"
-        android:layout_height="@dimen/notification_icon_height"
+        android:layout_width="@dimen/activity_icon_width"
+        android:layout_height="@dimen/activity_icon_height"
         android:layout_alignParentTop="true"
         android:layout_marginTop="@dimen/standard_margin"
         android:alpha="0.5"
         android:padding="2dp"
-        android:background="@drawable/round_bgnd"
+        android:background="@drawable/round_bgnd_icons"
         android:contentDescription="@string/activity_icon"
         android:src="@drawable/ic_activity" />
 

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

@@ -39,7 +39,7 @@
         android:layout_marginRight="@dimen/notification_icon_layout_right_end_margin"
         android:padding="2dp"
         android:alpha="0.5"
-        android:background="@drawable/round_bgnd"
+        android:background="@drawable/round_bgnd_icons"
         android:contentDescription="@string/notification_icon"
         android:src="@drawable/ic_notification" />
 

+ 3 - 3
src/main/res/layout/ssl_validator_layout.xml

@@ -30,9 +30,9 @@
 		android:layout_height="wrap_content"
 		android:text="@string/ssl_validator_header"
 		android:paddingBottom="@dimen/standard_padding"
-		android:textAppearance="?android:attr/textAppearanceMedium"
-		android:textColor="@color/textColor_inverse"
-		 />
+        android:textStyle="bold"
+        android:textColor="@color/textColor"
+		android:textAppearance="?android:attr/textAppearanceMedium" />
 
 	<TextView
 		android:id="@+id/reason_cert_not_trusted"

+ 2 - 2
src/main/res/layout/toolbar_user_information.xml

@@ -95,7 +95,7 @@
                         android:shadowDx="0.5"
                         android:shadowDy="0"
                         android:shadowRadius="2"
-                        android:textColor="@color/textColor"
+                        android:textColor="@color/white"
                         android:textSize="@dimen/drawer_header_text"
                         android:textStyle="bold"
                         tools:text="Max Mustermann"/>
@@ -111,7 +111,7 @@
                         android:shadowDx="0.5"
                         android:shadowDy="0"
                         android:shadowRadius="2"
-                        android:textColor="@color/textColor"
+                        android:textColor="@color/white"
                         android:textSize="@dimen/drawer_header_subtext"
                         tools:text="max@127.0.0.1/nextcloud"/>
                 </LinearLayout>

+ 13 - 15
src/main/res/values-night/colors.xml

@@ -1,29 +1,28 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-  ownCloud Android client application
+    Nextcloud Android client application
 
-  Copyright (C) 2012  Bartek Przybylski
-  Copyright (C) 2015 ownCloud Inc.
+    @author Daniel Bailey
+    Copyright (C) 2019 Daniel Bailey
 
-  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 free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) 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 General Public License for more details.
+    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 General Public License
-  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+    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/>.
 -->
 <resources>
 
     <color name="owncloud_blue_bright">#00ddff</color>
 
     <color name="list_item_lastmod_and_filesize_text">@color/secondaryTextColor</color>
-    <!--<color name="black">#000000</color>-->
-    <!--<color name="white">#FFFFFF</color>-->
     <color name="textColor">#ffffff</color>
     <color name="textColor_inverse">#ffffff</color>
     <color name="disabled_text">#ff888888</color>
@@ -45,7 +44,6 @@
     <!-- level colors for info notifications/visualisations -->
     <color name="infolevel_warning">#e9322d</color>
 
-
     <!-- Colors -->
     <color name="primary">#0082c9</color>
     <color name="primary_dark">#006AA3</color>

+ 0 - 1
src/main/res/values-v21/styles.xml

@@ -44,7 +44,6 @@
 
     <style name="DatePickerStyle" parent="">
         <item name="android:headerBackground">@color/bg_fallback_highlight</item>
-        <!-- TODO for < API21 -->
         <item name="android:datePickerMode">calendar</item>
     </style>
 

+ 6 - 5
src/main/res/values/colors.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
-  ownCloud Android client application
+  Nextcloud Android client application
 
-  Copyright (C) 2012  Bartek Przybylski
+  Copyright (C) 2012 Bartek Przybylski
   Copyright (C) 2015 ownCloud Inc.
 
   This program is free software: you can redistribute it and/or modify
@@ -15,7 +15,7 @@
   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/>.
+  along with this program. If not, see <http://www.gnu.org/licenses/>.
 -->
 <resources>
 
@@ -23,7 +23,7 @@
 
     <color name="list_item_lastmod_and_filesize_text">@color/secondaryTextColor</color>
     <color name="black">#000000</color>
-    <!--<color name="white">#FFFFFF</color>-->
+    <color name="white">#ffffff</color>
     <color name="textColor">#000000</color>
     <color name="textColor_inverse">#ffffff</color>
     <color name="disabled_text">#ff888888</color>
@@ -49,7 +49,6 @@
     <!-- level colors for info notifications/visualisations -->
     <color name="infolevel_warning">#e9322d</color>
 
-
     <!-- Colors -->
     <color name="primary">#0082c9</color>
     <color name="primary_dark">#006AA3</color>
@@ -70,6 +69,8 @@
     <color name="indicator_dot_selected">#ffffff</color>
     <color name="drawer_shadow">#000000</color>
 
+    <color name="background_color_png">#FFFFFF</color>
+
     <!-- special transparent action bar colors for image preview -->
     <color name="color_transparent">#201D2D44</color>
     <color name="color_dark_transparent">#40162233</color>

+ 0 - 1
src/main/res/values/strings.xml

@@ -58,7 +58,6 @@
     <string name="prefs_imprint">Imprint</string>
     <string name="prefs_value_theme_light">Light</string>
     <string name="prefs_value_theme_dark">Dark</string>
-    <string name="prefs_key_theme">darkTheme</string>
     <string name="prefs_theme_title">Theme</string>
 
 

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

@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--
+<?xml version="1.0" encoding="utf-8"?>
+<!--
   ownCloud Android client application
 
   Copyright (C) 2012  Bartek Przybylski
@@ -27,7 +28,7 @@
             android:key="storage_path"/>
         <com.owncloud.android.ui.ThemeableSwitchPreference
             android:defaultValue="@string/prefs_value_theme_light"
-            android:key="@string/prefs_key_theme"
+            android:key="darkTheme"
             android:summary="%s"
             android:title="@string/prefs_theme_title"
             android:theme="@style/SwitchPreference"/>