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 2f316929809b..a21044c551f9 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
@@ -50,6 +50,7 @@
import java.util.concurrent.Executors;
import androidx.annotation.NonNull;
+import androidx.appcompat.view.ContextThemeWrapper;
/**
* Adapter to display all auto-synced folders and/or instant upload media folders.
@@ -298,7 +299,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 1b1763ce01e8..a5942b93114a 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
@@ -75,6 +75,7 @@
import java.util.Arrays;
import androidx.annotation.NonNull;
+import androidx.appcompat.view.ContextThemeWrapper;
/**
* This Adapter populates a ListView with following types of uploads: pending, active, completed. Filtering possible.
@@ -540,7 +541,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 00b5b00adb62..fa9fe79e3d9e 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
@@ -57,6 +57,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;
@@ -290,7 +291,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 11594d5749b7..04b3f7f8ce9e 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
@@ -746,7 +746,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 7c1727ba22ee..b874fcd024c4 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
@@ -377,7 +377,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 04a74d310f0a..e3d3e3f8e9dd 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
@@ -78,6 +78,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;
@@ -92,6 +93,7 @@
import androidx.appcompat.content.res.AppCompatResources;
import androidx.appcompat.widget.AppCompatImageButton;
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;
@@ -138,6 +140,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;
@@ -430,6 +433,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 ff99ef902406..ef06b93ae542 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
@@ -33,6 +33,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
@@ -221,7 +222,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 2d728aca05f3..be83cb2b3808 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
@@ -118,7 +118,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))
}
}
}
@@ -132,7 +133,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 08bf64d552ad..e926fdcc432f 100644
--- a/app/src/main/res/values-night/colors.xml
+++ b/app/src/main/res/values-night/colors.xml
@@ -48,4 +48,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 58fcdecf1fc2..b05b582157a7 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -82,4 +82,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 cc4503ab5f59..22ce3735a07e 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -387,9 +387,9 @@
+
+
+
+
+