diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/SyncedFolderAdapter.java b/app/src/main/java/com/owncloud/android/ui/adapter/SyncedFolderAdapter.java
index 194c3f50680d..9734a28f1d5d 100644
--- a/app/src/main/java/com/owncloud/android/ui/adapter/SyncedFolderAdapter.java
+++ b/app/src/main/java/com/owncloud/android/ui/adapter/SyncedFolderAdapter.java
@@ -37,6 +37,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
+import androidx.appcompat.view.ContextThemeWrapper;
/**
* Adapter to display all auto-synced folders and/or instant upload media folders.
@@ -291,7 +292,9 @@ public void onBindHeaderViewHolder(SectionedViewHolder commonHolder, final int s
}
private void onOverflowIconClicked(int section, SyncedFolderDisplayItem item, View view) {
- PopupMenu popup = new PopupMenu(context, view);
+ //NMC Customisation
+ ContextThemeWrapper ctw = new ContextThemeWrapper(context, R.style.CustomPopupTheme);
+ PopupMenu popup = new PopupMenu(ctw, view);
popup.inflate(R.menu.synced_folders_adapter);
popup.setOnMenuItemClickListener(i -> optionsItemSelected(i, section, item));
popup.getMenu()
diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/UploadListAdapter.java b/app/src/main/java/com/owncloud/android/ui/adapter/UploadListAdapter.java
index 2a747669bd58..1d593f877361 100755
--- a/app/src/main/java/com/owncloud/android/ui/adapter/UploadListAdapter.java
+++ b/app/src/main/java/com/owncloud/android/ui/adapter/UploadListAdapter.java
@@ -59,6 +59,7 @@
import java.util.Optional;
import androidx.annotation.NonNull;
+import androidx.appcompat.view.ContextThemeWrapper;
/**
* This Adapter populates a ListView with following types of uploads: pending, active, completed. Filtering possible.
@@ -608,7 +609,9 @@ private void showItemConflictPopup(User user,
OCUpload item,
String status,
View view) {
- PopupMenu popup = new PopupMenu(MainApp.getAppContext(), view);
+ //NMC Customisation
+ ContextThemeWrapper ctw = new ContextThemeWrapper(MainApp.getAppContext(), R.style.CustomPopupTheme);
+ PopupMenu popup = new PopupMenu(ctw, view);
popup.inflate(R.menu.upload_list_item_file_conflict);
popup.setOnMenuItemClickListener(i -> {
int itemId = i.getItemId();
diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/GalleryFragment.java b/app/src/main/java/com/owncloud/android/ui/fragment/GalleryFragment.java
index 950d74d6ada9..bf38a415ef43 100644
--- a/app/src/main/java/com/owncloud/android/ui/fragment/GalleryFragment.java
+++ b/app/src/main/java/com/owncloud/android/ui/fragment/GalleryFragment.java
@@ -42,6 +42,7 @@
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
+import androidx.core.content.ContextCompat;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@@ -275,7 +276,8 @@ public void onCreateOptionsMenu(Menu menu, @NonNull MenuInflater inflater) {
MenuItem menuItem = menu.findItem(R.id.action_three_dot_icon);
if (menuItem != null) {
- viewThemeUtils.platform.colorMenuItemText(requireContext(), menuItem);
+ //NMC customization
+ menuItem.setIcon(viewThemeUtils.platform.colorDrawable(menuItem.getIcon(), ContextCompat.getColor(requireContext(), R.color.fontAppbar)));
}
}
diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java b/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java
index 4bd1e91c379c..2e8b447e8d63 100644
--- a/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java
+++ b/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java
@@ -737,7 +737,8 @@ public boolean onCreateActionMode(ActionMode mode, Menu menu) {
MenuInflater inflater = getActivity().getMenuInflater();
inflater.inflate(R.menu.custom_menu_placeholder, menu);
final MenuItem item = menu.findItem(R.id.custom_menu_placeholder_item);
- item.setIcon(viewThemeUtils.platform.colorDrawable(item.getIcon(), ContextCompat.getColor(requireContext(), R.color.white)));
+ //NMC customization
+ item.setIcon(viewThemeUtils.platform.colorDrawable(item.getIcon(), ContextCompat.getColor(requireContext(), R.color.fontAppbar)));
mode.invalidate();
//set actionMode color
diff --git a/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java b/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java
index 5b0fd459e3f6..d35c3585d30a 100644
--- a/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java
+++ b/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageFragment.java
@@ -365,7 +365,8 @@ public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflat
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.custom_menu_placeholder, menu);
final MenuItem item = menu.findItem(R.id.custom_menu_placeholder_item);
- item.setIcon(viewThemeUtils.platform.colorDrawable(item.getIcon(), ContextCompat.getColor(requireContext(), R.color.white)));
+ //NMC customization
+ item.setIcon(viewThemeUtils.platform.colorDrawable(item.getIcon(), ContextCompat.getColor(requireContext(), R.color.fontAppbar)));
}
@Override
diff --git a/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java b/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java
index 39f2b0900db9..1927a7d501b6 100644
--- a/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java
+++ b/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaFragment.java
@@ -59,6 +59,7 @@
import com.owncloud.android.ui.dialog.RemoveFilesDialogFragment;
import com.owncloud.android.ui.fragment.FileFragment;
import com.owncloud.android.utils.MimeTypeUtil;
+import com.owncloud.android.utils.theme.ViewThemeUtils;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
@@ -73,6 +74,7 @@
import androidx.annotation.StringRes;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.core.graphics.drawable.DrawableCompat;
+import androidx.core.content.ContextCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
@@ -122,6 +124,7 @@ public class PreviewMediaFragment extends FileFragment implements OnTouchListene
@Inject ClientFactory clientFactory;
@Inject UserAccountManager accountManager;
@Inject BackgroundJobManager backgroundJobManager;
+ @Inject ViewThemeUtils viewThemeUtils;
FragmentPreviewMediaBinding binding;
private ViewGroup emptyListView;
private ExoPlayer exoPlayer;
@@ -399,6 +402,9 @@ public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflat
super.onCreateOptionsMenu(menu, inflater);
menu.removeItem(R.id.action_search);
inflater.inflate(R.menu.custom_menu_placeholder, menu);
+ //NMC customization
+ final MenuItem item = menu.findItem(R.id.custom_menu_placeholder_item);
+ item.setIcon(viewThemeUtils.platform.colorDrawable(item.getIcon(), ContextCompat.getColor(requireContext(), R.color.fontAppbar)));
}
@Override
diff --git a/app/src/main/java/com/owncloud/android/ui/trashbin/TrashbinActivity.kt b/app/src/main/java/com/owncloud/android/ui/trashbin/TrashbinActivity.kt
index 5046a0df8e10..bd01eb122fad 100644
--- a/app/src/main/java/com/owncloud/android/ui/trashbin/TrashbinActivity.kt
+++ b/app/src/main/java/com/owncloud/android/ui/trashbin/TrashbinActivity.kt
@@ -18,6 +18,7 @@ import android.widget.TextView
import android.widget.Toast
import androidx.activity.OnBackPressedCallback
import androidx.annotation.VisibleForTesting
+import androidx.appcompat.view.ContextThemeWrapper
import androidx.core.content.res.ResourcesCompat
import androidx.recyclerview.widget.LinearLayoutManager
import com.google.android.material.snackbar.Snackbar
@@ -208,7 +209,9 @@ class TrashbinActivity :
}
override fun onOverflowIconClicked(file: TrashbinFile, view: View) {
- val popup = PopupMenu(this, view)
+ // NMC Customization
+ val ctw = ContextThemeWrapper(this, R.style.CustomPopupTheme)
+ val popup = PopupMenu(ctw, view)
popup.inflate(R.menu.item_trashbin)
popup.setOnMenuItemClickListener {
trashbinPresenter?.removeTrashbinFile(file)
diff --git a/app/src/main/java/com/owncloud/android/utils/theme/FilesSpecificViewThemeUtils.kt b/app/src/main/java/com/owncloud/android/utils/theme/FilesSpecificViewThemeUtils.kt
index 4135df898793..bb93fc2b06ce 100644
--- a/app/src/main/java/com/owncloud/android/utils/theme/FilesSpecificViewThemeUtils.kt
+++ b/app/src/main/java/com/owncloud/android/utils/theme/FilesSpecificViewThemeUtils.kt
@@ -103,7 +103,8 @@ class FilesSpecificViewThemeUtils @Inject constructor(
.setThumbDrawable(getThumbDrawable(context))
.setPopupStyle {
PopupStyles.MD2.accept(it)
- it.background = FastScrollPopupBackground(context, scheme.primary)
+ //NMC customisation
+ it.background = FastScrollPopupBackground(context, context.resources.getColor(R.color.primary, null))
}
}
}
@@ -117,7 +118,7 @@ class FilesSpecificViewThemeUtils @Inject constructor(
me.zhanghai.android.fastscroll.R.drawable.afs_md2_thumb,
null
)
- return androidViewThemeUtils.tintPrimaryDrawable(context, thumbDrawable)!!
+ return androidViewThemeUtils.colorDrawable(thumbDrawable!!, context.resources.getColor(R.color.primary, null))
}
private fun getHomeAsUpIcon(isMenu: Boolean): Int {
diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml
index e9c749b86943..76e4e05ca495 100644
--- a/app/src/main/res/values-night/colors.xml
+++ b/app/src/main/res/values-night/colors.xml
@@ -36,4 +36,68 @@
#1E1E1E
@android:color/white
+
+
+ #FFFFFF
+ @color/grey_30
+ @color/grey_30
+ #CCCCCC
+ @color/grey_70
+ @color/grey_80
+ #2D2D2D
+ @color/grey_70
+ @color/grey_70
+
+
+ @color/grey_80
+ @color/grey_0
+
+
+ @color/grey_80
+ @color/grey_0
+
+
+ @color/grey_60
+ @color/grey_0
+ @color/grey_0
+ @color/grey_30
+ #FFFFFF
+ @color/grey_30
+ @color/grey_80
+ #FFFFFF
+
+
+ @color/grey_80
+ @color/grey_30
+ @color/grey_0
+
+
+ @color/grey_80
+ @color/grey_0
+ @color/grey_80
+
+
+ @color/grey_70
+ @color/grey_60
+
+
+ @color/grey_70
+ @color/grey_70
+
+
+ #FFFFFF
+ @color/grey_30
+ @color/grey_0
+ @color/grey_0
+ @color/grey_0
+ @color/grey_0
+ @color/grey_60
+ @color/grey_0
+ #FFFFFF
+
+
+ #121212
+ @color/grey_0
+ @color/grey_80
+ @color/grey_80
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index d28fe7946729..94645a1e2784 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -75,4 +75,93 @@
@android:color/white
#666666
#A5A5A5
+
+
+ #191919
+ @color/primary
+ #191919
+ #191919
+ @color/grey_30
+ @android:color/white
+ #FFFFFF
+ @color/grey_0
+ #CCCCCC
+ #77c4ff
+ #B3FFFFFF
+ @color/grey_10
+
+
+ #101010
+ #F2F2F2
+ #E5E5E5
+ #B2B2B2
+ #666666
+ #4C4C4C
+ #333333
+
+
+ @color/design_snackbar_background_color
+ @color/white
+
+
+ #FFFFFF
+ #191919
+
+
+ @color/grey_0
+ #191919
+ @color/primary
+ #191919
+ @color/primary
+ @color/grey_30
+ @color/white
+ #191919
+
+
+ #FFFFFF
+ #191919
+ #191919
+
+
+ #FFFFFF
+ #191919
+ #FFFFFF
+
+
+ @color/primary
+ #F399C7
+ #FFFFFF
+ @color/grey_30
+ @color/grey_10
+ @color/grey_0
+
+
+ @color/primary
+ @color/grey_30
+ @color/grey_30
+ #CCCCCC
+
+
+ #191919
+ @color/grey_30
+ #191919
+ #191919
+ #191919
+ #191919
+ @color/grey_30
+ #191919
+ #000000
+ #191919
+ #F6E5EB
+ #C16F81
+ #0D39DF
+ #0099ff
+
+
+ @color/grey_0
+ #191919
+ @color/grey_0
+ @color/grey_30
+ #77b6bb
+ #5077b6bb
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 1a8b501ee4b7..bcb7e792f643 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -360,9 +360,9 @@
+
+
+
+
+