diff --git a/app/src/main/java/com/nmc/android/utils/DisplayUtils.kt b/app/src/main/java/com/nmc/android/utils/DisplayUtils.kt new file mode 100644 index 000000000000..f58e93c4252a --- /dev/null +++ b/app/src/main/java/com/nmc/android/utils/DisplayUtils.kt @@ -0,0 +1,18 @@ +package com.nmc.android.utils + +import android.content.res.Configuration +import com.owncloud.android.MainApp +import com.owncloud.android.R + +object DisplayUtils { + + @JvmStatic + fun isShowDividerForList(): Boolean = isTablet() || isLandscapeOrientation() + + @JvmStatic + fun isTablet(): Boolean = MainApp.getAppContext().resources.getBoolean(R.bool.isTablet) + + @JvmStatic + fun isLandscapeOrientation(): Boolean = + MainApp.getAppContext().resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE +} \ No newline at end of file diff --git a/app/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.kt b/app/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.kt index b0b5c69e0b7a..6edab8b92121 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.kt +++ b/app/src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.kt @@ -16,6 +16,7 @@ import android.content.IntentFilter import android.content.res.Resources import android.os.Bundle import android.os.Parcelable +import android.util.TypedValue import android.view.ActionMode import android.view.Menu import android.view.MenuItem @@ -54,6 +55,7 @@ import com.owncloud.android.utils.PathUtils import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import java.io.File +import java.util.Locale import javax.inject.Inject @Suppress("Detekt.TooManyFunctions") @@ -477,6 +479,30 @@ open class FolderPickerActivity : OperationsService.ACTION_MOVE_FILE ) } + adjustButtonTexts() + } + } + + // NMC-4239 fix + // adjust button german texts in portrait mode + private fun adjustButtonTexts(){ + if (!com.nmc.android.utils.DisplayUtils.isTablet() && !com.nmc.android.utils.DisplayUtils.isLandscapeOrientation()) { + if (Locale.getDefault().language.equals(Locale.GERMAN.language) + || Locale.getDefault().language.equals(Locale.GERMANY.language) + ) { + folderPickerBinding.folderPickerBtnCopy.setTextSize( + TypedValue.COMPLEX_UNIT_PX, + getResources().getDimension(R.dimen.txt_size_11sp) + ) + folderPickerBinding.folderPickerBtnMove.setTextSize( + TypedValue.COMPLEX_UNIT_PX, + getResources().getDimension(R.dimen.txt_size_11sp) + ) + folderPickerBinding.folderPickerBtnCancel.setTextSize( + TypedValue.COMPLEX_UNIT_PX, + getResources().getDimension(R.dimen.txt_size_11sp) + ); + } } } diff --git a/app/src/main/java/com/owncloud/android/ui/activity/UploadFilesActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/UploadFilesActivity.java index 5dab3516d444..443d3be66675 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/UploadFilesActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/UploadFilesActivity.java @@ -19,6 +19,7 @@ import android.content.Intent; import android.os.Bundle; import android.os.Environment; +import android.util.TypedValue; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -57,6 +58,7 @@ import java.io.File; import java.util.ArrayList; import java.util.List; +import java.util.Locale; import javax.inject.Inject; @@ -201,6 +203,19 @@ public void onCreate(Bundle savedInstanceState) { binding.uploadFilesBtnUpload.setOnClickListener(this); binding.uploadFilesBtnUpload.setEnabled(mLocalFolderPickerMode); + //reduce the button text size so that the text doesn't go to next line + //this should only happen for GERMAN language + //and device should not be tablet and should be in portrait mode + if (!com.nmc.android.utils.DisplayUtils.isTablet() && !com.nmc.android.utils.DisplayUtils.isLandscapeOrientation()) { + if (Locale.getDefault().getLanguage().equals(Locale.GERMAN.getLanguage()) + || Locale.getDefault().getLanguage().equals(Locale.GERMANY.getLanguage())) { + binding.uploadFilesBtnUpload.setTextSize(TypedValue.COMPLEX_UNIT_PX, + getResources().getDimensionPixelSize(R.dimen.txt_size_13sp)); + binding.uploadFilesBtnCancel.setTextSize(TypedValue.COMPLEX_UNIT_PX, + getResources().getDimensionPixelSize(R.dimen.txt_size_13sp)); + } + } + int localBehaviour = preferences.getUploaderBehaviour(); // file upload spinner diff --git a/app/src/main/java/com/owncloud/android/ui/activity/UploadListActivity.kt b/app/src/main/java/com/owncloud/android/ui/activity/UploadListActivity.kt index 5755eca72413..1e61e99dc797 100755 --- a/app/src/main/java/com/owncloud/android/ui/activity/UploadListActivity.kt +++ b/app/src/main/java/com/owncloud/android/ui/activity/UploadListActivity.kt @@ -12,6 +12,7 @@ import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import android.content.IntentFilter +import android.content.res.Configuration import android.os.Bundle import android.view.Menu import android.view.MenuItem @@ -49,6 +50,8 @@ import com.owncloud.android.ui.adapter.uploadList.helper.UploadListAdapterAction import com.owncloud.android.ui.adapter.uploadList.helper.UploadListAdapterHelper import com.owncloud.android.ui.adapter.uploadList.helper.UploadListItemOnClick import com.owncloud.android.ui.decoration.MediaGridItemDecoration +import com.nmc.android.utils.DisplayUtils +import com.owncloud.android.ui.decoration.SimpleListItemDividerDecoration import com.owncloud.android.utils.FilesSyncHelper import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch @@ -83,6 +86,8 @@ class UploadListActivity : private lateinit var adapterActionHandler: UploadListAdapterAction private lateinit var adapterHelper: UploadListAdapterHelper + private var simpleListItemDividerDecoration : SimpleListItemDividerDecoration? = null + override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -127,11 +132,14 @@ class UploadListActivity : val lm = GridLayoutManager(this, 1) uploadListAdapter.setLayoutManager(lm) + // NMC decorator + simpleListItemDividerDecoration = SimpleListItemDividerDecoration(this, R.drawable.item_divider, true) val spacing = getResources().getDimensionPixelSize(R.dimen.media_grid_spacing) binding?.list?.run { addItemDecoration(MediaGridItemDecoration(spacing)) setLayoutManager(lm) + addListItemDecorator() setAdapter(uploadListAdapter) } @@ -140,6 +148,25 @@ class UploadListActivity : loadItems() } + private fun addListItemDecorator() { + if (DisplayUtils.isShowDividerForList()) { + //check and remove divider item decorator if exist then add item decorator + removeListDividerDecorator() + simpleListItemDividerDecoration?.let { binding?.list?.addItemDecoration(it) } + } + } + + /** + * method to remove the divider item decorator + */ + private fun removeListDividerDecorator() { + binding?.list?.itemDecorationCount?.let { + if (it > 0) { + simpleListItemDividerDecoration?.let { decor -> binding?.list?.removeItemDecoration(decor) } + } + } + } + private fun setupEmptyList() { binding?.run { list.setEmptyView(emptyList.getRoot()) @@ -377,6 +404,21 @@ class UploadListActivity : } } + override fun onConfigurationChanged(newConfig: Configuration) { + super.onConfigurationChanged(newConfig) + //this should only run when device is not tablet because we are adding dividers in tablet for both the + // orientations + if (!DisplayUtils.isTablet()) { + if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) { + //add the divider item decorator when orientation is landscape + addListItemDecorator() + } else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) { + //remove the divider item decorator when orientation is portrait + removeListDividerDecorator() + } + } + } + private inner class UploadFinishReceiver : BroadcastReceiver() { override fun onReceive(context: Context?, intent: Intent?) { throttler.run("update_upload_list") { uploadListAdapter.loadUploadItemsFromDb() } diff --git a/app/src/main/java/com/owncloud/android/ui/decoration/SimpleListItemDividerDecoration.java b/app/src/main/java/com/owncloud/android/ui/decoration/SimpleListItemDividerDecoration.java new file mode 100644 index 000000000000..720b40d04e1e --- /dev/null +++ b/app/src/main/java/com/owncloud/android/ui/decoration/SimpleListItemDividerDecoration.java @@ -0,0 +1,86 @@ +/* + * Nextcloud - Android Client + * + * SPDX-FileCopyrightText: 2018 Andy Scherzinger + * SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only + */ +package com.owncloud.android.ui.decoration; + +import android.content.Context; +import android.content.res.TypedArray; +import android.graphics.Canvas; +import android.graphics.Rect; +import android.graphics.drawable.Drawable; +import android.util.DisplayMetrics; +import android.view.View; + +import androidx.core.content.ContextCompat; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.RecyclerView; + +/** + * DividerItemDecoration based on {@link DividerItemDecoration} adding a 72dp left padding. + */ +public class SimpleListItemDividerDecoration extends DividerItemDecoration { + private static final int[] ATTRS = new int[]{android.R.attr.listDivider}; + + private final Rect bounds = new Rect(); + private Drawable divider; + private int leftPadding = 0; + private boolean hasFooter; + + /** + * Default divider will be used + */ + public SimpleListItemDividerDecoration(Context context) { + super(context, DividerItemDecoration.VERTICAL); + final TypedArray styledAttributes = context.obtainStyledAttributes(ATTRS); + divider = styledAttributes.getDrawable(0); + leftPadding = Math.round(72 * (context.getResources().getDisplayMetrics().xdpi / DisplayMetrics.DENSITY_DEFAULT)); + styledAttributes.recycle(); + } + + /** + * Custom divider will be used + * + * @param hasFooter if recyclerview has footer and no divider should be shown for footer then pass true else false + */ + public SimpleListItemDividerDecoration(Context context, int resId, boolean hasFooter) { + super(context, DividerItemDecoration.VERTICAL); + this.hasFooter = hasFooter; + divider = ContextCompat.getDrawable(context, resId); + } + + @Override + public void onDraw(Canvas canvas, RecyclerView parent, RecyclerView.State state) { + canvas.save(); + final int right; + //noinspection AndroidLintNewApi - NewApi lint fails to handle overrides. + if (parent.getClipToPadding()) { + right = parent.getWidth() - parent.getPaddingRight(); + canvas.clipRect(leftPadding, parent.getPaddingTop(), right, + parent.getHeight() - parent.getPaddingBottom()); + } else { + right = parent.getWidth(); + } + + int childCount = parent.getChildCount(); + + if (hasFooter) { + childCount = childCount - 1; + } + + for (int i = 0; i < childCount; i++) { + final View child = parent.getChildAt(i); + parent.getDecoratedBoundsWithMargins(child, bounds); + final int bottom = bounds.bottom + Math.round(child.getTranslationY()); + final int top = bottom - 1; + + if (divider != null) { + divider.setBounds(leftPadding, top, right, bottom); + divider.draw(canvas); + } + } + canvas.restore(); + } +} diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/FileListLayoutManager.kt b/app/src/main/java/com/owncloud/android/ui/fragment/FileListLayoutManager.kt index 1f4375466bc7..e69afa36613b 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/FileListLayoutManager.kt +++ b/app/src/main/java/com/owncloud/android/ui/fragment/FileListLayoutManager.kt @@ -9,18 +9,49 @@ package com.owncloud.android.ui.fragment import android.annotation.SuppressLint import android.content.Context +import android.content.res.Configuration +import android.util.DisplayMetrics import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.GridLayoutManager.SpanSizeLookup import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.nextcloud.client.preferences.AppPreferences +import com.nextcloud.client.preferences.AppPreferencesImpl +import com.nmc.android.utils.DisplayUtils.isShowDividerForList +import com.nmc.android.utils.DisplayUtils.isTablet +import com.owncloud.android.R import com.owncloud.android.lib.common.utils.Log_OC import com.owncloud.android.ui.adapter.OCFileListAdapter +import com.owncloud.android.ui.decoration.MediaGridItemDecoration +import com.owncloud.android.ui.decoration.SimpleListItemDividerDecoration import com.owncloud.android.utils.DisplayUtils import com.owncloud.android.utils.FileSortOrder class FileListLayoutManager(private val fragment: OCFileListFragment, private val preferences: AppPreferences) { + /* ---- NMC Customization region start ---- */ + companion object { + private const val MAX_COLUMN_SIZE_LANDSCAPE = 5 + + // this variable will help us to provide number of span count for grid view + // the width for single item is approx to 180 + private const val GRID_ITEM_DEFAULT_WIDTH: Int = 180 + + private const val DEFAULT_FALLBACK_SPAN_COUNT: Int = 4 + } + + var simpleListItemDividerDecoration: SimpleListItemDividerDecoration = + SimpleListItemDividerDecoration(fragment.context, R.drawable.item_divider, true) + var mediaGridItemDecoration: MediaGridItemDecoration? = null + + init { + fragment.context?.let { + val spacing: Int = it.resources.getDimensionPixelSize(R.dimen.media_grid_spacing) + mediaGridItemDecoration = MediaGridItemDecoration(spacing) + } + } + + /* ---- NMC Customization region end ---- */ fun sortFiles(sortOrder: FileSortOrder?) { fragment.mSortButton?.setText(DisplayUtils.getSortOrderStringId(sortOrder)) sortOrder?.let { fragment.mAdapter.setSortOrder(fragment.mFile, it) } @@ -53,6 +84,8 @@ class FileListLayoutManager(private val fragment: OCFileListFragment, private va if (fragment.isGridEnabled) { switchLayoutManager(false) } + // NMC customization + addRemoveRecyclerViewItemDecorator() } fun setGridAsPreferred() { @@ -65,6 +98,8 @@ class FileListLayoutManager(private val fragment: OCFileListFragment, private va if (!fragment.isGridEnabled) { switchLayoutManager(true) } + // NMC customization + addRemoveRecyclerViewItemDecorator() } @SuppressLint("NotifyDataSetChanged") @@ -102,9 +137,128 @@ class FileListLayoutManager(private val fragment: OCFileListFragment, private va } recyclerView.setLayoutManager(layoutManager) + // NMC customization + updateSpanCount(context.resources.configuration); recyclerView.scrollToPosition(position) adapter.setGridView(grid) recyclerView.setAdapter(adapter) adapter.notifyDataSetChanged() } + + /* ---- NMC Customization region start ---- */ + private fun addRemoveRecyclerViewItemDecorator() { + val recyclerView: RecyclerView? = fragment.recyclerView + val context: Context? = fragment.context + + if (context == null || recyclerView == null) { + Log_OC.e(OCFileListFragment.TAG, "cannot add/remove decorator, arguments are null") + return + } + if (recyclerView.layoutManager is GridLayoutManager) { + removeItemDecorator() + if (recyclerView.itemDecorationCount == 0) { + mediaGridItemDecoration?.let { + recyclerView.addItemDecoration(it) + } + val padding: Int = context.resources.getDimensionPixelSize(R.dimen.grid_recyclerview_padding) + recyclerView.setPadding(padding, padding, padding, padding) + } + } else { + removeItemDecorator() + if (recyclerView.itemDecorationCount == 0 && isShowDividerForList()) { + recyclerView.addItemDecoration(simpleListItemDividerDecoration) + recyclerView.setPadding(0, 0, 0, 0) + } + } + } + + /** + * method to remove the item decorator + */ + private fun removeItemDecorator() { + val recyclerView: RecyclerView? = fragment.recyclerView + + if (recyclerView == null) { + Log_OC.e(OCFileListFragment.TAG, "cannot remove decorator, arguments are null") + return + } + while (recyclerView.itemDecorationCount > 0) { + recyclerView.removeItemDecorationAt(0) + } + } + + /** + * method will calculate the number of spans required for grid item and will update the span accordingly + * + */ + private fun calculateAndUpdateSpanCount() { + val recyclerView: RecyclerView? = fragment.recyclerView + val context: Context? = fragment.context + + if (context == null || recyclerView == null) { + Log_OC.e(OCFileListFragment.TAG, "cannot calculate and update span count, arguments are null") + return + } + // NMC-4667 fix + // use display metrics to calculate the span count + val displayMetrics: DisplayMetrics = context.resources.displayMetrics + val screenWidthDp = displayMetrics.widthPixels / displayMetrics.density + var newSpanCount = (screenWidthDp / GRID_ITEM_DEFAULT_WIDTH) as Int + val layoutManager: RecyclerView.LayoutManager? = recyclerView.layoutManager + if (layoutManager is GridLayoutManager) { + if (newSpanCount < 1) { + newSpanCount = DEFAULT_FALLBACK_SPAN_COUNT + } + layoutManager.setSpanCount(newSpanCount) + layoutManager.requestLayout() + } + } + + /** + * method will update the span count on basis of device orientation for the file listing + * + * @param newConfig current configuration + */ + fun updateSpanCount(newConfig: Configuration) { + val recyclerView: RecyclerView? = fragment.recyclerView + val adapter: OCFileListAdapter? = fragment.adapter + val context: Context? = fragment.context + + if (context == null || adapter == null || recyclerView == null) { + Log_OC.e(OCFileListFragment.TAG, "cannot update span count, arguments are null") + return + } + + //this should only run when current view is not media gallery + var maxColumnSize = AppPreferencesImpl.DEFAULT_GRID_COLUMN.toInt() + if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) { + //add the divider item decorator when orientation is landscape and device is not tablet + //because we don't have to add divider again as it is already added + if (!isTablet()) { + addRemoveRecyclerViewItemDecorator() + } + maxColumnSize = MAX_COLUMN_SIZE_LANDSCAPE + } else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) { + //remove the divider item decorator when orientation is portrait and when device is not tablet + //because we have to show divider in both landscape and portrait mode + if (!isTablet()) { + removeItemDecorator() + } + maxColumnSize = AppPreferencesImpl.DEFAULT_GRID_COLUMN.toInt() + } + + if (fragment.isGridEnabled) { + //for tablet calculate size on the basis of screen width + if (isTablet()) { + calculateAndUpdateSpanCount() + } else { + //and for phones directly show the hardcoded column size + if (recyclerView.layoutManager is GridLayoutManager) { + (recyclerView.layoutManager as GridLayoutManager).setSpanCount(maxColumnSize) + } + } + } + } + + /* ---- NMC Customization region end ---- */ } 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 40bc8de84031..1b577bc32d98 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 @@ -20,6 +20,7 @@ import android.app.Activity; import android.content.Context; import android.content.Intent; +import android.content.res.Configuration; import android.os.Bundle; import android.os.Handler; import android.os.Looper; @@ -2366,4 +2367,14 @@ public boolean shouldNavigateBackToAllFiles() { public FileListLayoutManager getFileListLayoutManager() { return fileListLayoutManager; } + + @SuppressLint("NotifyDataSetChanged") + @Override + public void onConfigurationChanged(@NonNull Configuration newConfig) { + super.onConfigurationChanged(newConfig); + if (getAdapter() != null) { + getAdapter().notifyDataSetChanged(); + } + fileListLayoutManager.updateSpanCount(newConfig); + } } diff --git a/app/src/main/java/com/owncloud/android/ui/trashbin/TrashbinFragment.kt b/app/src/main/java/com/owncloud/android/ui/trashbin/TrashbinFragment.kt index 87846a52b5b1..0fcc1204f43c 100644 --- a/app/src/main/java/com/owncloud/android/ui/trashbin/TrashbinFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/trashbin/TrashbinFragment.kt @@ -10,6 +10,7 @@ package com.owncloud.android.ui.trashbin import android.content.Intent +import android.content.res.Configuration import android.os.Bundle import android.view.ActionMode import android.view.LayoutInflater @@ -47,6 +48,7 @@ import com.owncloud.android.databinding.FragmentTrashbinBinding import com.owncloud.android.datamodel.SyncedFolderProvider import com.owncloud.android.lib.resources.trashbin.model.TrashbinFile import com.owncloud.android.ui.adapter.TrashbinListAdapter +import com.owncloud.android.ui.decoration.SimpleListItemDividerDecoration import com.owncloud.android.ui.dialog.SortingOrderDialogFragment.OnSortingOrderListener import com.owncloud.android.ui.interfaces.TrashbinActivityInterface import com.owncloud.android.ui.navigation.NavigatorActivity @@ -99,6 +101,8 @@ class TrashbinFragment : private var multiChoiceModeListener: MultiChoiceModeListener? = null + private var simpleListItemDividerDecoration: SimpleListItemDividerDecoration? = null + override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { binding = FragmentTrashbinBinding.inflate(inflater, container, false) val binding = binding!! @@ -160,6 +164,9 @@ class TrashbinFragment : recyclerView.setHasFixedSize(true) recyclerView.setHasFooter(true) recyclerView.layoutManager = LinearLayoutManager(requireContext()) + simpleListItemDividerDecoration = + SimpleListItemDividerDecoration(requireContext(), R.drawable.item_divider, true) + addListItemDecorator() viewThemeUtils.androidx.themeSwipeRefreshLayout(binding.swipeContainingList) binding.swipeContainingList.setOnRefreshListener { loadFolder() } @@ -202,6 +209,29 @@ class TrashbinFragment : } } + private fun addListItemDecorator() { + if (com.nmc.android.utils.DisplayUtils.isShowDividerForList()) { + // check and remove divider item decorator if exist then add item decorator + removeListDividerDecorator() + simpleListItemDividerDecoration?.let { + binding?.list?.addItemDecoration(it) + } + } + } + + /** + * method to remove the divider item decorator + */ + private fun removeListDividerDecorator() { + binding?.list?.let { + if (it.itemDecorationCount > 0) { + simpleListItemDividerDecoration?.let { decor -> + it.removeItemDecoration(decor) + } + } + } + } + fun loadFolder(onComplete: () -> Unit = {}, onError: () -> Unit = {}) { // exit action mode on data refresh multiChoiceModeListener?.exitSelectionMode() @@ -487,6 +517,21 @@ class TrashbinFragment : trashbinPresenter?.navigateUp() } + override fun onConfigurationChanged(newConfig: Configuration) { + super.onConfigurationChanged(newConfig) + // this should only run when device is not tablet because we are adding dividers in tablet for both the + // orientations + if (!com.nmc.android.utils.DisplayUtils.isTablet()) { + if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) { + // add the divider item decorator when orientation is landscape + addListItemDecorator() + } else if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) { + // remove the divider item decorator when orientation is portrait + removeListDividerDecorator() + } + } + } + companion object { const val EMPTY_LIST_COUNT = 1 } diff --git a/app/src/main/res/drawable/item_divider.xml b/app/src/main/res/drawable/item_divider.xml new file mode 100644 index 000000000000..9f742e91d67c --- /dev/null +++ b/app/src/main/res/drawable/item_divider.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 72908c65f15b..2219811975d4 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -39,4 +39,68 @@ @android:color/white #2A2A2A + + + #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-sw480dp/bool.xml b/app/src/main/res/values-sw480dp/bool.xml new file mode 100644 index 000000000000..8e66f10e898c --- /dev/null +++ b/app/src/main/res/values-sw480dp/bool.xml @@ -0,0 +1,4 @@ + + + true + diff --git a/app/src/main/res/values/bool.xml b/app/src/main/res/values/bool.xml new file mode 100644 index 000000000000..c2dcd8baf0ea --- /dev/null +++ b/app/src/main/res/values/bool.xml @@ -0,0 +1,4 @@ + + + false + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index aded2c0b3577..94aa837e1ce5 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -88,4 +88,93 @@ #A5A5A5 #EFEFEF + + + #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..cc9e25255a10 --- /dev/null +++ b/app/src/main/res/values/dimens.xml @@ -0,0 +1,31 @@ + + + 4dp + 16dp + 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