diff --git a/app/src/main/java/com/nextcloud/client/editimage/EditImageActivity.kt b/app/src/main/java/com/nextcloud/client/editimage/EditImageActivity.kt index 386c1bbe8e05..1a03938831ef 100644 --- a/app/src/main/java/com/nextcloud/client/editimage/EditImageActivity.kt +++ b/app/src/main/java/com/nextcloud/client/editimage/EditImageActivity.kt @@ -8,6 +8,7 @@ package com.nextcloud.client.editimage import android.graphics.Bitmap +import android.graphics.drawable.ColorDrawable import android.net.Uri import android.os.Build import android.os.Bundle @@ -16,9 +17,6 @@ import android.view.MenuItem import android.view.View import androidx.appcompat.content.res.AppCompatResources import androidx.core.content.ContextCompat -import androidx.core.graphics.drawable.DrawableCompat -import androidx.core.view.WindowCompat -import androidx.core.view.WindowInsetsCompat import com.canhub.cropper.CropImageView import com.nextcloud.client.di.Injectable import com.nextcloud.client.jobs.upload.FileUploadHelper @@ -73,21 +71,25 @@ class EditImageActivity : file = intent.extras?.getParcelableArgument(EXTRA_FILE, OCFile::class.java) ?: throw IllegalArgumentException("Missing file argument") - setSupportActionBar(binding.toolbar) - supportActionBar?.apply { - title = file.fileName - setDisplayHomeAsUpEnabled(true) - } - - val windowInsetsController = WindowCompat.getInsetsController(window, window.decorView) - windowInsetsController.hide(WindowInsetsCompat.Type.statusBars()) - - window.statusBarColor = ContextCompat.getColor(this, R.color.black) - window.navigationBarColor = getColor(R.color.black) + //NMC Customization + setupToolbar() + setupActionBar() setupCropper() } + //NMC Customization + private fun setupActionBar() { + supportActionBar?.let { + viewThemeUtils.platform.themeStatusBar(this) + it.setDisplayHomeAsUpEnabled(true) + it.setDisplayShowTitleEnabled(true) + //custom color for back arrow for NMC + viewThemeUtils.files.themeActionBar(this, it, file.fileName) + it.setBackgroundDrawable(ColorDrawable(resources.getColor(R.color.bg_default, null))) + } + } + override fun onCropImageComplete(view: CropImageView, result: CropImageView.CropResult) { if (!result.isSuccessful) { DisplayUtils.showSnackMessage(this, getString(R.string.image_editor_unable_to_edit_image)) @@ -124,14 +126,20 @@ class EditImageActivity : override fun onCreateOptionsMenu(menu: Menu?): Boolean { // add save button to action bar menuInflater.inflate(R.menu.custom_menu_placeholder, menu) - val saveIcon = AppCompatResources.getDrawable(this, R.drawable.ic_check)?.also { - DrawableCompat.setTint(it, resources.getColor(R.color.white, theme)) - } + // NMC: No need to apply NC tint here as we will be doing it later in code + val saveIcon = AppCompatResources.getDrawable(this, R.drawable.ic_tick) menu?.findItem(R.id.custom_menu_placeholder_item)?.apply { icon = saveIcon if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { contentDescription = getString(R.string.common_save) } + // NMC customization + icon = icon?.let { + viewThemeUtils.platform.colorDrawable( + it, + ContextCompat.getColor(this@EditImageActivity, R.color.fontAppbar) + ) + } } return true } 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 1269459f2a94..187682fdd11b 100644 --- a/app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt +++ b/app/src/main/java/com/nextcloud/ui/fileactions/FileActionsBottomSheet.kt @@ -140,7 +140,8 @@ class FileActionsBottomSheet : BottomSheetDialogFragment(), Injectable { binding.thumbnailLayout.thumbnailShimmer, syncedFolderProvider.preferences, viewThemeUtils, - syncedFolderProvider + syncedFolderProvider, + false ) } } diff --git a/app/src/main/java/com/owncloud/android/ui/activity/PassCodeActivity.kt b/app/src/main/java/com/owncloud/android/ui/activity/PassCodeActivity.kt index 77088066ea0f..929f9b63e7a3 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/PassCodeActivity.kt +++ b/app/src/main/java/com/owncloud/android/ui/activity/PassCodeActivity.kt @@ -21,7 +21,6 @@ import androidx.annotation.VisibleForTesting import androidx.appcompat.app.AppCompatActivity import androidx.lifecycle.lifecycleScope import com.google.android.material.snackbar.Snackbar -import com.nextcloud.android.common.ui.theme.utils.ColorRole import com.nextcloud.client.di.Injectable import com.nextcloud.client.preferences.AppPreferences import com.owncloud.android.R @@ -80,30 +79,18 @@ class PassCodeActivity : AppCompatActivity(), Injectable { setContentView(binding.root) PassCodeManager.setSecureFlag(this, true) - applyTint() setupPasscodeEditTexts() setSoftInputMode() setupUI(savedInstanceState) setTextListeners() } - private fun applyTint() { - viewThemeUtils.platform.colorViewBackground(binding.cardViewContent, ColorRole.SURFACE_VARIANT) - viewThemeUtils.material.colorMaterialButtonPrimaryBorderless(binding.cancel) - } - private fun setupPasscodeEditTexts() { passCodeEditTexts[0] = binding.txt0 passCodeEditTexts[1] = binding.txt1 passCodeEditTexts[2] = binding.txt2 passCodeEditTexts[3] = binding.txt3 - passCodeEditTexts.forEach { - it?.let { editText -> - viewThemeUtils.platform.colorEditText(editText) - } - } - passCodeEditTexts[0]?.requestFocus() binding.cardViewContent.setOnClickListener { diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/GalleryAdapter.kt b/app/src/main/java/com/owncloud/android/ui/adapter/GalleryAdapter.kt index b612c7960b1b..fccc4bea5bb0 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/GalleryAdapter.kt +++ b/app/src/main/java/com/owncloud/android/ui/adapter/GalleryAdapter.kt @@ -74,7 +74,8 @@ class GalleryAdapter( transferServiceGetter, showMetadata = false, showShareAvatar = false, - viewThemeUtils + viewThemeUtils, + true ) } diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/LocalFileListAdapter.java b/app/src/main/java/com/owncloud/android/ui/adapter/LocalFileListAdapter.java index 16c032707a29..3f5a14132553 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/LocalFileListAdapter.java +++ b/app/src/main/java/com/owncloud/android/ui/adapter/LocalFileListAdapter.java @@ -179,8 +179,7 @@ public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int positi if (isCheckedFile(file)) { gridViewHolder.itemLayout.setBackgroundColor(ContextCompat.getColor(mContext, R.color.selected_item_background)); - gridViewHolder.checkbox.setImageDrawable( - viewThemeUtils.platform.tintDrawable(mContext, R.drawable.ic_checkbox_marked, ColorRole.PRIMARY)); + gridViewHolder.checkbox.setImageResource(R.drawable.ic_checkbox_marked); } else { gridViewHolder.itemLayout.setBackgroundColor(mContext.getResources().getColor(R.color.bg_default)); gridViewHolder.checkbox.setImageResource(R.drawable.ic_checkbox_blank_outline); diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java index 2514e3eb0a64..fc5587c17493 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java +++ b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java @@ -178,6 +178,7 @@ public OCFileListAdapter( .getVersion() .isShareesOnDavSupported(), viewThemeUtils, + false, syncedFolderProvider); setHasStableIds(true); @@ -370,6 +371,8 @@ public boolean isEmpty() { @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { switch (viewType) { + // change required for NMC + // default case will be used for VIEW_TYPE_IMAGE & VIEWTYPE_ITEM also default -> { if (gridView) { return new OCFileListGridItemViewHolder( @@ -381,17 +384,6 @@ public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int ); } } - case VIEW_TYPE_IMAGE -> { - if (gridView) { - return new OCFileListViewHolder( - GridImageBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false) - ); - } else { - return new OCFileListItemViewHolder( - ListItemBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false) - ); - } - } case VIEW_TYPE_FOOTER -> { return new OCFileListFooterViewHolder( ListFooterBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false) @@ -415,7 +407,6 @@ public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { if (holder instanceof OCFileListFooterViewHolder footerViewHolder) { footerViewHolder.getFooterText().setText(getFooterText()); - viewThemeUtils.platform.colorCircularProgressBar(footerViewHolder.getLoadingProgressBar(), ColorRole.ON_SURFACE_VARIANT); footerViewHolder.getLoadingProgressBar().setVisibility( ocFileListFragmentInterface.isLoading() ? View.VISIBLE : View.GONE); } else if (holder instanceof OCFileListHeaderViewHolder headerViewHolder) { @@ -509,15 +500,10 @@ private void updateLivePhotoIndicators(ListViewHolder holder, OCFile file) { private void bindListGridItemViewHolder(ListGridItemViewHolder holder, OCFile file) { holder.getFileName().setText(file.getDecryptedFileName()); - boolean gridImage = MimeTypeUtil.isImage(file) || MimeTypeUtil.isVideo(file); - if (gridView && gridImage) { + if (gridView && ocFileListFragmentInterface.getColumnsCount() > showFilenameColumnThreshold) { holder.getFileName().setVisibility(View.GONE); } else { - if (gridView && ocFileListFragmentInterface.getColumnsCount() > showFilenameColumnThreshold) { - holder.getFileName().setVisibility(View.GONE); - } else { - holder.getFileName().setVisibility(View.VISIBLE); - } + holder.getFileName().setVisibility(View.VISIBLE); } ViewExtensionsKt.setVisibleIf(holder.getShared(), !file.isOfflineOperation()); @@ -722,7 +708,7 @@ public boolean shouldShowHeader() { return false; } - if (MainApp.isOnlyOnDevice()) { + if (MainApp.isOnlyOnDevice() || ocFileListFragmentInterface.isSearchFragment()) { return false; } @@ -1121,6 +1107,7 @@ public void cancelAllPendingTasks() { public void setGridView(boolean bool) { gridView = bool; + ocFileListDelegate.setGridView(bool); } public void setShowMetadata(boolean bool) { diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListDelegate.kt b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListDelegate.kt index dff220e2a3bd..a4ed0f771653 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListDelegate.kt +++ b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListDelegate.kt @@ -48,11 +48,12 @@ class OCFileListDelegate( private val storageManager: FileDataStorageManager, private val hideItemOptions: Boolean, private val preferences: AppPreferences, - private val gridView: Boolean, + private var gridView: Boolean, private val transferServiceGetter: ComponentsGetter, private val showMetadata: Boolean, private var showShareAvatar: Boolean, private var viewThemeUtils: ViewThemeUtils, + private val isMediaGallery: Boolean, private val syncFolderProvider: SyncedFolderProvider? = null ) { private val checkedFiles: MutableSet = HashSet() @@ -214,7 +215,8 @@ class OCFileListDelegate( gridViewHolder.shimmerThumbnail, preferences, viewThemeUtils, - syncFolderProvider + syncFolderProvider, + isMediaGallery ) // item layout + click listeners @@ -238,7 +240,8 @@ class OCFileListDelegate( // shares val shouldHideShare = ( - hideItemOptions || + gridView || // NMC: don't show share icon in grid mode + hideItemOptions || !file.isFolder && file.isEncrypted || file.isEncrypted && @@ -315,9 +318,8 @@ class OCFileListDelegate( private fun setCheckBoxImage(file: OCFile, gridViewHolder: ListViewHolder) { if (isCheckedFile(file)) { - gridViewHolder.checkbox.setImageDrawable( - viewThemeUtils.platform.tintDrawable(context, R.drawable.ic_checkbox_marked, ColorRole.PRIMARY) - ) + // NMC Customization + gridViewHolder.checkbox.setImageResource(R.drawable.ic_checkbox_marked) } else { gridViewHolder.checkbox.setImageResource(R.drawable.ic_checkbox_blank_outline) } @@ -405,6 +407,10 @@ class OCFileListDelegate( showShareAvatar = bool } + fun setGridView(bool: Boolean){ + gridView = bool + } + companion object { private val TAG = OCFileListDelegate::class.java.simpleName } diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListGridItemViewHolder.kt b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListGridItemViewHolder.kt index 05ee4731e994..013d92ca28ef 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListGridItemViewHolder.kt +++ b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListGridItemViewHolder.kt @@ -53,8 +53,8 @@ internal class OCFileListGridItemViewHolder(var binding: GridItemBinding) : get() = null override val livePhotoIndicatorSeparator: TextView? get() = null - override val fileFeaturesLayout: LinearLayout - get() = binding.fileFeaturesLayout + override val fileFeaturesLayout: LinearLayout? + get() = null override val more: ImageButton get() = binding.more 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 80fdcb89a5c0..ee0812f89997 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 @@ -101,7 +101,8 @@ public void onBindHeaderViewHolder(SectionedViewHolder holder, int section, bool headerViewHolder.binding.uploadListTitle.setText( String.format(parentActivity.getString(R.string.uploads_view_group_header), group.getGroupName(), group.getGroupItemCount())); - viewThemeUtils.platform.colorPrimaryTextViewElement(headerViewHolder.binding.uploadListTitle); + //NMC Customization + headerViewHolder.binding.uploadListTitle.setTextColor(parentActivity.getResources().getColor(R.color.primary, null)); headerViewHolder.binding.uploadListTitle.setOnClickListener(v -> { toggleSectionExpanded(section); diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/ConflictsResolveDialog.kt b/app/src/main/java/com/owncloud/android/ui/dialog/ConflictsResolveDialog.kt index bda667cd6b08..bd5c5e1ee0fe 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/ConflictsResolveDialog.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/ConflictsResolveDialog.kt @@ -229,7 +229,8 @@ class ConflictsResolveDialog : DialogFragment(), Injectable { null, syncedFolderProvider.preferences, viewThemeUtils, - syncedFolderProvider + syncedFolderProvider, + false ) } diff --git a/app/src/main/java/com/owncloud/android/ui/interfaces/OCFileListFragmentInterface.java b/app/src/main/java/com/owncloud/android/ui/interfaces/OCFileListFragmentInterface.java index 2d47d841299e..0b6c577e65cc 100644 --- a/app/src/main/java/com/owncloud/android/ui/interfaces/OCFileListFragmentInterface.java +++ b/app/src/main/java/com/owncloud/android/ui/interfaces/OCFileListFragmentInterface.java @@ -35,4 +35,6 @@ public interface OCFileListFragmentInterface { boolean isLoading(); void onHeaderClicked(); + + boolean isSearchFragment(); } diff --git a/app/src/main/java/com/owncloud/android/utils/DisplayUtils.java b/app/src/main/java/com/owncloud/android/utils/DisplayUtils.java index 106916fb6e93..0be098d6a1d0 100644 --- a/app/src/main/java/com/owncloud/android/utils/DisplayUtils.java +++ b/app/src/main/java/com/owncloud/android/utils/DisplayUtils.java @@ -860,9 +860,13 @@ public static void setThumbnail(OCFile file, LoaderImageView shimmerThumbnail, AppPreferences preferences, ViewThemeUtils viewThemeUtils, - SyncedFolderProvider syncedFolderProvider) { + SyncedFolderProvider syncedFolderProvider, + boolean isMediaGallery) { if (file.isFolder()) { stopShimmer(shimmerThumbnail, thumbnailView); + updateThumbnailViewSize(thumbnailView, gridView, context, isMediaGallery, R.dimen.standard_folders_grid_item_size); + //reset the padding as this will change for files and we don't this for folders + thumbnailView.setPadding(0, 0, 0, 0); boolean isAutoUploadFolder = SyncedFolderProvider.isAutoUploadFolder(syncedFolderProvider, file, user); boolean isDarkModeActive = preferences.isDarkModeEnabled(); @@ -871,26 +875,28 @@ public static void setThumbnail(OCFile file, LayerDrawable fileIcon = MimeTypeUtil.getFileIcon(isDarkModeActive, overlayIconId, context, viewThemeUtils); thumbnailView.setImageDrawable(fileIcon); } else { + updateThumbnailViewSize(thumbnailView, gridView, context, isMediaGallery, R.dimen.standard_files_grid_item_size); if (file.getRemoteId() != null && file.isPreviewAvailable()) { // Thumbnail in cache? Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache( ThumbnailsCacheManager.PREFIX_THUMBNAIL + file.getRemoteId()); if (thumbnail != null && !file.isUpdateThumbnailNeeded()) { + setThumbnailViewPadding(thumbnailView, gridView, context, isMediaGallery, R.dimen.alternate_padding); stopShimmer(shimmerThumbnail, thumbnailView); if (MimeTypeUtil.isVideo(file)) { - Bitmap withOverlay = ThumbnailsCacheManager.addVideoOverlay(thumbnail, context); - thumbnailView.setImageBitmap(withOverlay); + thumbnail = ThumbnailsCacheManager.addVideoOverlay(thumbnail, context); + } + + // NMC: set the corner for both video and image thumbnail + if (gridView) { + BitmapUtils.setRoundedBitmapForGridMode(thumbnail, thumbnailView); } else { - if (gridView) { - BitmapUtils.setRoundedBitmapForGridMode(thumbnail, thumbnailView); - } else { - BitmapUtils.setRoundedBitmap(thumbnail, thumbnailView); - } + BitmapUtils.setRoundedBitmap(thumbnail, thumbnailView); } } else { - generateNewThumbnail(file, thumbnailView, user, storageManager, asyncTasks, gridView, context, shimmerThumbnail, preferences, viewThemeUtils); + generateNewThumbnail(file, thumbnailView, user, storageManager, asyncTasks, gridView, context, shimmerThumbnail, preferences, viewThemeUtils, isMediaGallery); } if ("image/png".equalsIgnoreCase(file.getMimeType())) { @@ -898,9 +904,10 @@ public static void setThumbnail(OCFile file, } } else { if (file.getRemoteId() != null) { - generateNewThumbnail(file, thumbnailView, user, storageManager, asyncTasks, gridView, context, shimmerThumbnail, preferences, viewThemeUtils); + generateNewThumbnail(file, thumbnailView, user, storageManager, asyncTasks, gridView, context, shimmerThumbnail, preferences, viewThemeUtils, isMediaGallery); } else { stopShimmer(shimmerThumbnail, thumbnailView); + setThumbnailViewPadding(thumbnailView, gridView, context, isMediaGallery, R.dimen.standard_quarter_padding); thumbnailView.setImageDrawable(MimeTypeUtil.getFileTypeIcon(file.getMimeType(), file.getFileName(), context, @@ -919,7 +926,8 @@ private static void generateNewThumbnail(OCFile file, Context context, LoaderImageView shimmerThumbnail, AppPreferences preferences, - ViewThemeUtils viewThemeUtils) { + ViewThemeUtils viewThemeUtils, + boolean isMediaGallery) { if (!ThumbnailsCacheManager.cancelPotentialThumbnailWork(file, thumbnailView)) { return; } @@ -964,6 +972,10 @@ private static void generateNewThumbnail(OCFile file, int px = ThumbnailsCacheManager.getThumbnailDimension(); thumbnail = BitmapUtils.drawableToBitmap(drawable, px, px); + + //NMC: set thumbnailView padding for no thumbnail + setThumbnailViewPadding(thumbnailView, gridView, context, isMediaGallery, R.dimen.standard_quarter_padding); + final ThumbnailsCacheManager.AsyncThumbnailDrawable asyncDrawable = new ThumbnailsCacheManager.AsyncThumbnailDrawable(context.getResources(), thumbnail, task); @@ -971,9 +983,6 @@ private static void generateNewThumbnail(OCFile file, if (shimmerThumbnail != null) { shimmerThumbnail.postDelayed(() -> { if (thumbnailView.getDrawable() == null) { - if (gridView) { - configShimmerGridImageSize(shimmerThumbnail, preferences.getGridColumns()); - } startShimmer(shimmerThumbnail, thumbnailView); } }, 100); @@ -1045,4 +1054,41 @@ private static Point getScreenSize(Context context) throws Exception { throw new Exception("WindowManager not found"); } } + + /** + * method to set the padding to thumbnail view this is required for files so that there will be space between file + * and file name + * + * @param thumbnailView + * @param gridView + * @param context + * @param isMediaGallery + * @param dimensPadding + */ + private static void setThumbnailViewPadding(ImageView thumbnailView, boolean gridView, Context context, + boolean isMediaGallery, int dimensPadding) { + if (gridView && !isMediaGallery) { + int padding = context.getResources().getDimensionPixelSize(dimensPadding); + thumbnailView.setPadding(0, 0, 0, padding); + } + } + + /** + * method to set manual thumbnail view height and width for folders and files because we are using different size + * for both files and folders + * + * @param thumbnailView + * @param gridView + * @param context + * @param isMediaGallery + * @param size + */ + private static void updateThumbnailViewSize(ImageView thumbnailView, boolean gridView, Context context, + boolean isMediaGallery, int size) { + if (gridView && !isMediaGallery) { + thumbnailView.getLayoutParams().width = + context.getResources().getDimensionPixelSize(size); + thumbnailView.getLayoutParams().height = context.getResources().getDimensionPixelSize(size); + } + } } diff --git a/app/src/main/res/drawable/cursor_drawable.xml b/app/src/main/res/drawable/cursor_drawable.xml new file mode 100644 index 000000000000..dd35b659e8ae --- /dev/null +++ b/app/src/main/res/drawable/cursor_drawable.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/layout/activity_edit_image.xml b/app/src/main/res/layout/activity_edit_image.xml index 4b11869ee501..257ba56fa732 100644 --- a/app/src/main/res/layout/activity_edit_image.xml +++ b/app/src/main/res/layout/activity_edit_image.xml @@ -12,15 +12,10 @@ android:layout_height="match_parent" android:background="@color/black"> - + + + app:layout_constraintTop_toBottomOf="@+id/appbar" /> + tools:src="@drawable/folder" /> - - - - - + android:layout_height="0.5dp" + android:background="@color/divider_color" /> - + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:gravity="center" + android:orientation="vertical"> - - + android:layout_width="match_parent" + android:layout_height="wrap_content"> - + - + android:layout_gravity="center_horizontal" + app:layout_constraintBottom_toTopOf="@+id/Filename" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent"> + + + android:id="@+id/thumbnail" + android:layout_width="@dimen/standard_folders_grid_item_size" + android:layout_height="@dimen/standard_folders_grid_item_size" + android:layout_gravity="center" + android:contentDescription="@null" + android:src="@drawable/folder" + tools:visibility="visible" /> + app:tint="@color/list_icon_color" /> + android:visibility="gone" /> + android:src="@drawable/ic_synced" /> + + - + + app:layout_constraintBottom_toTopOf="@+id/gridItemGuideline" + app:layout_constraintStart_toStartOf="@+id/frameLayout" /> + app:srcCompat="@drawable/ic_dots_vertical" + app:tint="@color/list_icon_color" + tools:ignore="TouchTargetSizeCheck" /> - + \ No newline at end of file diff --git a/app/src/main/res/layout/list_item.xml b/app/src/main/res/layout/list_item.xml index 536940b0bfde..991dae3b12b3 100644 --- a/app/src/main/res/layout/list_item.xml +++ b/app/src/main/res/layout/list_item.xml @@ -15,19 +15,17 @@ xmlns:tools="http://schemas.android.com/tools" android:id="@+id/ListItemLayout" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="@dimen/standard_list_item_size" android:baselineAligned="false" android:descendantFocusability="blocksDescendants" - android:minHeight="@dimen/standard_list_item_size" - android:orientation="horizontal" - android:paddingTop="@dimen/standard_half_padding" - android:paddingBottom="@dimen/standard_half_padding"> + android:orientation="horizontal"> + android:layout_marginEnd="@dimen/standard_quarter_padding" + android:layout_marginBottom="@dimen/standard_padding"> + android:paddingTop="@dimen/standard_padding"> + tools:visibility="visible" + app:tint="@color/list_icon_color" /> @@ -275,15 +270,15 @@ + android:src="@drawable/ic_dots_vertical" + app:tint="@color/list_icon_color" /> diff --git a/app/src/main/res/layout/receive_external_files.xml b/app/src/main/res/layout/receive_external_files.xml index 1f85eae78a32..d25f4afcafb3 100644 --- a/app/src/main/res/layout/receive_external_files.xml +++ b/app/src/main/res/layout/receive_external_files.xml @@ -11,6 +11,7 @@ android:id="@+id/upload_files_layout" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@color/bg_default" android:orientation="vertical"> @@ -221,6 +222,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:ellipsize="marquee" + android:maxLines="2" android:text="@string/instant_upload_existing" android:textAppearance="?attr/textAppearanceListItem" /> diff --git a/app/src/main/res/layout/trashbin_item.xml b/app/src/main/res/layout/trashbin_item.xml index 3124e49dc442..126537e3eaf1 100644 --- a/app/src/main/res/layout/trashbin_item.xml +++ b/app/src/main/res/layout/trashbin_item.xml @@ -6,6 +6,7 @@ ~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only --> + android:src="@drawable/ic_history" + app:tint="@color/list_icon_color"/> + android:src="@drawable/ic_dots_vertical" + app:tint="@color/list_icon_color"/> diff --git a/app/src/main/res/layout/upload_files_layout.xml b/app/src/main/res/layout/upload_files_layout.xml index 4012193eb6a9..b5d4e9e90fec 100644 --- a/app/src/main/res/layout/upload_files_layout.xml +++ b/app/src/main/res/layout/upload_files_layout.xml @@ -26,17 +26,10 @@ android:layout_height="0dp" android:layout_weight="1" /> - - - - - + android:layout_height="0.5dp" + android:background="@color/divider_color" /> + @color/grey_30 #E3E3E3 #000000 #ff6F6F6F @@ -24,7 +25,7 @@ @color/appbar - #373535 + @color/grey_70 #222222 #DADADA @@ -34,6 +35,70 @@ @color/white - #1E1E1E + #121212 @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-night/themes.xml b/app/src/main/res/values-night/themes.xml index 19b3ce692520..167139478049 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -23,5 +23,8 @@ @style/Nextcloud.Widget.PopupMenu @style/ThemeOverlay.App.BottomSheetDialog @style/App.ActionMode + + @style/AutoCompleteCursorColorStyle + @style/AutoCompleteCursorColorStyle diff --git a/app/src/main/res/values-sw600dp/dims.xml b/app/src/main/res/values-sw600dp/dims.xml index 7436d593a3c5..a32fc3e858d1 100644 --- a/app/src/main/res/values-sw600dp/dims.xml +++ b/app/src/main/res/values-sw600dp/dims.xml @@ -8,5 +8,7 @@ --> 6 + 32dp + 16dp 512dp diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 89ed00a08bf2..d3a487f05279 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -10,11 +10,11 @@ ~ SPDX-License-Identifier: GPL-2.0-only AND (AGPL-3.0-or-later OR GPL-2.0-only) --> - @color/secondary_text_color + @color/grey_600 #000000 #ffffff #B3FFFFFF - #333333 + #191919 #F5F5F5 #303034 #E9E8EB @@ -26,7 +26,7 @@ #DDDDDD #EEEEEE #00000000 - #666666 + @color/grey_30 #e53935 @@ -64,15 +64,104 @@ #40162233 - @color/fontAppbar - #ECECEC + @color/white + @color/grey_0 #757575 #616161 - #80000000 + #919191 @android:color/white - #666666 + #191919 #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/dimens.xml b/app/src/main/res/values/dimens.xml new file mode 100644 index 000000000000..cc023ec9c6e1 --- /dev/null +++ b/app/src/main/res/values/dimens.xml @@ -0,0 +1,32 @@ + + + 4dp + 16dp + 24dp + 24dp + 6dp + 18sp + 15sp + 15dp + 56dp + 86dp + 80dp + 11sp + 30dp + 55dp + 258dp + 17sp + 20dp + 160dp + 50dp + 150dp + 55dp + 48dp + 48dp + 24dp + 26dp + 20sp + 145dp + 1dp + 13sp + \ No newline at end of file diff --git a/app/src/main/res/values/dims.xml b/app/src/main/res/values/dims.xml index 1f6a3f88885b..88624fb8aa7c 100644 --- a/app/src/main/res/values/dims.xml +++ b/app/src/main/res/values/dims.xml @@ -21,7 +21,7 @@ 100dp 128dp 8dp - 3dp + 4dp 128dp 512 28dp @@ -77,7 +77,7 @@ 15dp 40dp 240dp - 16sp + 14sp 200dp 20dp 12sp @@ -118,11 +118,13 @@ 40dp 72dp 72dp + 24dp + 24dp 22sp 14dp 14dp - 12dp - 12dp + 24dp + 24dp 72dp 72dp 26sp diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 4c1563085156..f079e0dd6afd 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -32,6 +32,9 @@ @color/bg_default @style/Widget.App.TextInputLayout @dimen/dialogBorderRadius + + @style/AutoCompleteCursorColorStyle + @style/AutoCompleteCursorColorStyle + +