diff --git a/app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt b/app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt index dc1bfbb23a8d..76b23ade82ef 100644 --- a/app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt +++ b/app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt @@ -18,9 +18,9 @@ import android.view.View import android.view.ViewGroup import android.widget.Toast import androidx.annotation.IdRes -import androidx.appcompat.content.res.AppCompatResources import androidx.core.os.bundleOf import androidx.core.view.isEmpty +import androidx.core.content.res.ResourcesCompat import androidx.core.view.isVisible import androidx.fragment.app.FragmentManager import androidx.fragment.app.setFragmentResult @@ -94,8 +94,6 @@ class FileActionsBottomSheet : BottomSheetDialogFragment(), Injectable { bottomSheetDialog.behavior.state = BottomSheetBehavior.STATE_EXPANDED bottomSheetDialog.behavior.skipCollapsed = true - viewThemeUtils.platform.colorViewBackground(binding.bottomSheet, ColorRole.SURFACE) - return binding.root } @@ -149,7 +147,11 @@ class FileActionsBottomSheet : BottomSheetDialogFragment(), Injectable { private fun setMultipleFilesThumbnail() { context?.let { - val drawable = viewThemeUtils.platform.tintDrawable(it, R.drawable.file_multiple, ColorRole.PRIMARY) + // NMC Customization + val drawable = viewThemeUtils.platform.colorDrawable( + ResourcesCompat.getDrawable(it.resources, R.drawable.file_multiple, null)!!, + it.resources.getColor(R.color.primary, null) + ) binding.thumbnailLayout.thumbnail.setImageDrawable(drawable) } } @@ -282,12 +284,8 @@ class FileActionsBottomSheet : BottomSheetDialogFragment(), Injectable { } text.setText(action.title) if (action.icon != null) { - val drawable = - viewThemeUtils.platform.tintDrawable( - requireContext(), - AppCompatResources.getDrawable(requireContext(), action.icon)!! - ) - icon.setImageDrawable(drawable) + //NMC customization + icon.setImageResource(action.icon) } } return itemBinding.root diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SendFilesDialog.kt b/app/src/main/java/com/owncloud/android/ui/dialog/SendFilesDialog.kt index cc407ce2a655..5bddf54a68b7 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/SendFilesDialog.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/SendFilesDialog.kt @@ -19,7 +19,6 @@ import android.view.ViewGroup import android.widget.Toast import androidx.recyclerview.widget.GridLayoutManager import com.google.android.material.bottomsheet.BottomSheetDialogFragment -import com.nextcloud.android.common.ui.theme.utils.ColorRole import com.nextcloud.client.di.Injectable import com.nextcloud.client.utils.IntentUtil.createSendIntent import com.owncloud.android.R @@ -60,7 +59,6 @@ class SendFilesDialog : BottomSheetDialogFragment(R.layout.send_files_fragment), binding = SendFilesFragmentBinding.inflate(inflater, container, false) setupSendButtonRecyclerView() - viewThemeUtils?.platform?.colorViewBackground(binding.bottomSheet, ColorRole.SURFACE) return binding.root } diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/GalleryFragmentBottomSheetDialog.kt b/app/src/main/java/com/owncloud/android/ui/fragment/GalleryFragmentBottomSheetDialog.kt index 178c5e6bb3c3..6ca2c2d9aeb9 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/GalleryFragmentBottomSheetDialog.kt +++ b/app/src/main/java/com/owncloud/android/ui/fragment/GalleryFragmentBottomSheetDialog.kt @@ -42,23 +42,6 @@ class GalleryFragmentBottomSheetDialog( } private fun setupLayout() { - viewThemeUtils.platform.colorViewBackground(binding.bottomSheet, ColorRole.SURFACE) - - listOf( - binding.tickMarkShowImages, - binding.tickMarkShowVideos - ).forEach { - viewThemeUtils.platform.colorImageView(it, ColorRole.PRIMARY) - } - - listOf( - binding.btnSelectMediaFolder, - binding.btnHideVideos, - binding.btnHideImages - ).forEach { - viewThemeUtils.material.colorMaterialButtonText(it) - } - when (currentMediaState) { MediaState.MEDIA_STATE_PHOTOS_ONLY -> { binding.tickMarkShowImages.visibility = View.VISIBLE diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListBottomSheetDialog.java b/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListBottomSheetDialog.java index 2deb69e0537d..56318fd3710a 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListBottomSheetDialog.java +++ b/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListBottomSheetDialog.java @@ -11,7 +11,6 @@ import com.google.android.material.bottomsheet.BottomSheetDialog; import com.google.gson.Gson; -import com.nextcloud.android.common.ui.theme.utils.ColorRole; import com.nextcloud.client.account.User; import com.nextcloud.client.device.DeviceInfo; import com.nextcloud.client.di.Injectable; @@ -76,12 +75,8 @@ protected void onCreate(Bundle savedInstanceState) { binding = FileListActionsBottomSheetFragmentBinding.inflate(getLayoutInflater()); setContentView(binding.getRoot()); - viewThemeUtils.platform.colorImageView(binding.menuIconUploadFiles, ColorRole.PRIMARY); - viewThemeUtils.platform.colorImageView(binding.menuIconUploadFromApp, ColorRole.PRIMARY); - viewThemeUtils.platform.colorImageView(binding.menuIconDirectCameraUpload, ColorRole.PRIMARY); - viewThemeUtils.platform.colorImageView(binding.menuIconScanDocUpload, ColorRole.PRIMARY); - viewThemeUtils.platform.colorImageView(binding.menuIconMkdir, ColorRole.PRIMARY); - viewThemeUtils.platform.colorImageView(binding.menuIconAddFolderInfo, ColorRole.PRIMARY); + // NMC Customization + reorderUploadFromOtherAppsView(); binding.addToCloud.setText(getContext().getResources().getString(R.string.add_to_cloud, themeUtils.getDefaultDisplayNameForRootFolder(getContext()))); @@ -136,8 +131,9 @@ protected void onCreate(Bundle savedInstanceState) { binding.menuDirectCameraUpload.setVisibility(View.GONE); } + // not required for NMC // create rich workspace - if (editorUtils.isEditorAvailable(user, + /* if (editorUtils.isEditorAvailable(user, MimeTypeUtil.MIMETYPE_TEXT_MARKDOWN) && file != null && !file.isEncrypted()) { // richWorkspace @@ -154,11 +150,19 @@ protected void onCreate(Bundle savedInstanceState) { } else { binding.menuCreateRichWorkspace.setVisibility(View.GONE); binding.menuCreateRichWorkspaceDivider.setVisibility(View.GONE); - } + } */ setupClickListener(); } + private void reorderUploadFromOtherAppsView() { + // move the upload from other app option + // below Create new folder or Create new e2ee folder + // NMC-3095 requirement + binding.actionLinear.removeView(binding.menuUploadFromApp); + binding.actionLinear.addView(binding.menuUploadFromApp, binding.actionLinear.indexOfChild(binding.menuEncryptedMkdir) + 1); + } + private void setupClickListener() { binding.menuCreateRichWorkspace.setOnClickListener(v -> { actions.createRichWorkspace(); diff --git a/app/src/main/res/drawable/ic_encrypted_folder.xml b/app/src/main/res/drawable/ic_encrypted_folder.xml new file mode 100644 index 000000000000..351565589c6a --- /dev/null +++ b/app/src/main/res/drawable/ic_encrypted_folder.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/ic_file_collection.xml b/app/src/main/res/drawable/ic_file_collection.xml new file mode 100644 index 000000000000..8825d1f461cf --- /dev/null +++ b/app/src/main/res/drawable/ic_file_collection.xml @@ -0,0 +1,12 @@ + + + diff --git a/app/src/main/res/drawable/ic_upload_file.xml b/app/src/main/res/drawable/ic_upload_file.xml new file mode 100644 index 000000000000..3c16034fc8f9 --- /dev/null +++ b/app/src/main/res/drawable/ic_upload_file.xml @@ -0,0 +1,12 @@ + + + diff --git a/app/src/main/res/layout/file_actions_bottom_sheet.xml b/app/src/main/res/layout/file_actions_bottom_sheet.xml index 92c93182a241..9dc3f46be36c 100644 --- a/app/src/main/res/layout/file_actions_bottom_sheet.xml +++ b/app/src/main/res/layout/file_actions_bottom_sheet.xml @@ -13,6 +13,7 @@ style="@style/Widget.Material3.BottomSheet" android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="@color/bottom_sheet_bg_color" android:layout_gravity="bottom" app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"> @@ -59,6 +60,7 @@ android:ellipsize="middle" android:lines="1" android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall" + android:textColor="@color/bottom_sheet_txt_color" tools:text="Test file name which is very very very very very long.pdf" /> diff --git a/app/src/main/res/layout/file_actions_bottom_sheet_item.xml b/app/src/main/res/layout/file_actions_bottom_sheet_item.xml index 576726071cd0..3af941c60930 100644 --- a/app/src/main/res/layout/file_actions_bottom_sheet_item.xml +++ b/app/src/main/res/layout/file_actions_bottom_sheet_item.xml @@ -29,7 +29,7 @@ android:layout_width="@dimen/iconized_single_line_item_icon_size" android:layout_height="@dimen/iconized_single_line_item_icon_size" android:contentDescription="@null" - app:tint="@color/primary" + app:tint="@color/bottom_sheet_icon_color" tools:src="@drawable/ic_delete" /> diff --git a/app/src/main/res/layout/file_list_actions_bottom_sheet_creator.xml b/app/src/main/res/layout/file_list_actions_bottom_sheet_creator.xml index ccb1fa4d2d7e..db2bc705b0b2 100644 --- a/app/src/main/res/layout/file_list_actions_bottom_sheet_creator.xml +++ b/app/src/main/res/layout/file_list_actions_bottom_sheet_creator.xml @@ -8,12 +8,15 @@ --> @@ -22,8 +25,7 @@ android:id="@+id/creator_thumbnail" android:layout_width="24dp" android:layout_height="24dp" - android:layout_marginTop="@dimen/standard_margin" - android:layout_marginBottom="@dimen/standard_margin" + app:tint="@color/bottom_sheet_icon_color" android:contentDescription="@null" android:src="@drawable/file_ppt" /> @@ -32,8 +34,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:layout_marginStart="@dimen/bottom_sheet_text_start_margin" + android:layout_marginStart="@dimen/standard_margin" android:text="@string/create_new_presentation" - android:textColor="@color/text_color" + android:textColor="@color/bottom_sheet_txt_color" android:textSize="@dimen/bottom_sheet_text_size" /> diff --git a/app/src/main/res/layout/file_list_actions_bottom_sheet_fragment.xml b/app/src/main/res/layout/file_list_actions_bottom_sheet_fragment.xml index 947a24fe27f6..7d6f69217e6b 100644 --- a/app/src/main/res/layout/file_list_actions_bottom_sheet_fragment.xml +++ b/app/src/main/res/layout/file_list_actions_bottom_sheet_fragment.xml @@ -10,6 +10,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@color/bottom_sheet_bg_color" android:orientation="vertical" android:paddingBottom="@dimen/standard_half_padding" app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"> @@ -26,7 +27,8 @@ android:paddingBottom="@dimen/standard_half_padding" android:text="@string/add_to_cloud" android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall" - android:textColor="@color/text_color" /> + android:textColor="@color/text_color" + android:visibility="gone" /> @@ -48,7 +51,7 @@ android:gravity="center_vertical" android:orientation="horizontal" android:paddingLeft="@dimen/standard_padding" - android:paddingTop="@dimen/standard_half_padding" + android:paddingTop="@dimen/standard_padding" android:paddingRight="@dimen/standard_padding" android:paddingBottom="@dimen/standard_half_padding" tools:ignore="UseCompoundDrawables"> @@ -58,8 +61,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@null" - android:src="@drawable/ic_action_upload" - app:tint="@color/primary" /> + android:src="@drawable/ic_upload_file" + app:tint="@color/bottom_sheet_icon_color" /> @@ -90,8 +93,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@null" - android:src="@drawable/ic_import" - app:tint="@color/primary" /> + android:src="@drawable/ic_file_collection" + app:tint="@color/bottom_sheet_icon_color" /> @@ -123,7 +126,7 @@ android:layout_height="wrap_content" android:contentDescription="@null" android:src="@drawable/ic_camera" - app:tint="@color/primary" /> + app:tint="@color/bottom_sheet_icon_color" /> @@ -186,7 +189,7 @@ android:layout_height="wrap_content" android:contentDescription="@null" android:src="@drawable/ic_action_create_dir" - app:tint="@color/primary" /> + app:tint="@color/bottom_sheet_icon_color" /> + + + + + + + @@ -263,7 +297,7 @@ android:layout_gravity="center_vertical" android:layout_marginStart="@dimen/bottom_sheet_text_start_margin" android:text="@string/create_new_spreadsheet" - android:textColor="@color/text_color" + android:textColor="@color/bottom_sheet_txt_color" android:textSize="@dimen/bottom_sheet_text_size" /> @@ -293,7 +327,7 @@ android:layout_gravity="center_vertical" android:layout_marginStart="@dimen/bottom_sheet_text_start_margin" android:text="@string/create_new_presentation" - android:textColor="@color/text_color" + android:textColor="@color/bottom_sheet_txt_color" android:textSize="@dimen/bottom_sheet_text_size" /> @@ -320,7 +354,8 @@ android:layout_marginStart="@dimen/bottom_sheet_menu_item_divider_standard_margin" android:layout_marginTop="@dimen/standard_half_margin" android:layout_marginBottom="@dimen/standard_half_margin" - android:background="@color/list_divider_background" /> + android:background="@color/list_divider_background" + android:visibility="gone" /> diff --git a/app/src/main/res/layout/fragment_gallery_bottom_sheet.xml b/app/src/main/res/layout/fragment_gallery_bottom_sheet.xml index 507cec6908bc..aa720ff688bb 100644 --- a/app/src/main/res/layout/fragment_gallery_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_gallery_bottom_sheet.xml @@ -15,10 +15,10 @@ android:layout_height="match_parent"> + android:textColor="@color/bottom_sheet_txt_color" + app:icon="@drawable/ic_camera" + app:iconTint="@color/bottom_sheet_icon_color"/> + android:textColor="@color/bottom_sheet_txt_color" + app:icon="@drawable/ic_video_camera" + app:iconTint="@color/bottom_sheet_icon_color"/> + android:textColor="@color/bottom_sheet_txt_color" + app:icon="@drawable/nav_photos" + app:iconTint="@color/bottom_sheet_icon_color"/> diff --git a/app/src/main/res/layout/send_files_fragment.xml b/app/src/main/res/layout/send_files_fragment.xml index d256a9433067..085cb14f043b 100644 --- a/app/src/main/res/layout/send_files_fragment.xml +++ b/app/src/main/res/layout/send_files_fragment.xml @@ -15,6 +15,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" + android:background="@color/bottom_sheet_bg_color" app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"> Neu Neues Dokument Neuer Ordner + Verschlüsselten Ordner erstellen Neue Präsentation Neue Tabelle Ordnerbeschreibung hinzufügen diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 1ce3f0da4f73..2f79b79712ed 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 89ed00a08bf2..46992e0a67c6 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/dims.xml b/app/src/main/res/values/dims.xml index 1f6a3f88885b..51e254b4c529 100644 --- a/app/src/main/res/values/dims.xml +++ b/app/src/main/res/values/dims.xml @@ -14,8 +14,8 @@ 164dp 12sp 20dp - 40dp - 56dp + 16dp + 48dp 80dp 40dp 100dp diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e347e81c90d6..b0870b589514 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -820,6 +820,7 @@ Scan document from camera Upload content from other apps New folder + Create new encrypted folder Virus detected. Upload cannot be completed! Tags Adding sharee failed diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 13c9a15b63a6..0453cda8b431 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -443,7 +443,7 @@