diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 2d3bfe327d1e..8d8e5c2e9b38 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -342,11 +342,10 @@
+ android:theme="@style/Theme.ownCloud" />
+ android:exported="false" />
R.id.nav_shared
getString(R.string.drawer_item_groupfolders) -> R.id.nav_groupfolders
getString(R.string.drawer_item_on_device) -> R.id.nav_on_device
- getString(R.string.drawer_item_recently_modified) -> R.id.nav_recently_modified
+ getString(R.string.drawer_item_recent_files) -> R.id.nav_recently_modified
getString(R.string.drawer_item_assistant) -> R.id.nav_assistant
getString(R.string.drawer_item_uploads_list) -> R.id.nav_uploads
getString(R.string.drawer_item_trashbin) -> R.id.nav_trashbin
diff --git a/app/src/main/java/com/nmc/android/utils/DrawableThemeUtils.kt b/app/src/main/java/com/nmc/android/utils/DrawableThemeUtils.kt
new file mode 100644
index 000000000000..90d87bc6dcd6
--- /dev/null
+++ b/app/src/main/java/com/nmc/android/utils/DrawableThemeUtils.kt
@@ -0,0 +1,18 @@
+package com.nmc.android.utils
+
+import android.graphics.drawable.Drawable
+import androidx.annotation.ColorInt
+import androidx.core.graphics.BlendModeColorFilterCompat
+import androidx.core.graphics.BlendModeCompat
+import androidx.core.graphics.drawable.DrawableCompat
+
+object DrawableThemeUtils {
+ @JvmStatic
+ fun tintDrawable(drawable: Drawable, @ColorInt color: Int): Drawable {
+ val wrap: Drawable = DrawableCompat.wrap(drawable)
+ wrap.colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(
+ color, BlendModeCompat.SRC_ATOP
+ )
+ return wrap
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/nmc/android/utils/ToolbarThemeUtils.kt b/app/src/main/java/com/nmc/android/utils/ToolbarThemeUtils.kt
new file mode 100644
index 000000000000..de28f3a33952
--- /dev/null
+++ b/app/src/main/java/com/nmc/android/utils/ToolbarThemeUtils.kt
@@ -0,0 +1,27 @@
+package com.nmc.android.utils
+
+import android.content.Context
+import android.graphics.Typeface
+import android.text.Spannable
+import android.text.style.StyleSpan
+import androidx.appcompat.app.ActionBar
+import com.owncloud.android.R
+import com.owncloud.android.utils.StringUtils
+
+object ToolbarThemeUtils {
+ @JvmStatic
+ fun setColoredTitle(context: Context, actionBar: ActionBar?, title: String) {
+ if (actionBar != null) {
+ val text: Spannable = StringUtils.getColorSpan(title, context.resources.getColor(R.color.fontAppbar, null))
+
+ //bold the magenta from MagentaCLOUD title
+ if (title.contains(context.resources.getString(R.string.app_name))) {
+ val textToBold = context.resources.getString(R.string.splashScreenBold)
+ val indexStart = title.indexOf(textToBold)
+ val indexEnd = indexStart + textToBold.length
+ text.setSpan(StyleSpan(Typeface.BOLD), indexStart, indexEnd, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
+ }
+ actionBar.title = text
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java
index 98658dbf0694..735fd12bb852 100644
--- a/app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java
+++ b/app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java
@@ -17,33 +17,19 @@
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
-import android.content.res.ColorStateList;
import android.content.res.Configuration;
-import android.graphics.Bitmap;
-import android.graphics.Color;
-import android.graphics.drawable.BitmapDrawable;
-import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
-import android.graphics.drawable.GradientDrawable;
-import android.graphics.drawable.LayerDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.SystemClock;
-import android.text.TextUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
-import android.webkit.URLUtil;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
-import com.bumptech.glide.GenericRequestBuilder;
-import com.bumptech.glide.Glide;
-import com.bumptech.glide.load.engine.DiskCacheStrategy;
-import com.bumptech.glide.load.model.StreamEncoder;
-import com.bumptech.glide.load.resource.file.FileToStreamDecoder;
import com.bumptech.glide.request.animation.GlideAnimation;
import com.bumptech.glide.request.target.SimpleTarget;
import com.google.android.material.button.MaterialButton;
@@ -60,6 +46,7 @@
import com.nextcloud.ui.composeActivity.ComposeActivity;
import com.nextcloud.ui.composeActivity.ComposeDestination;
import com.nextcloud.utils.mdm.MDMConfig;
+import com.nmc.android.utils.DrawableThemeUtils;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.authentication.PassCodeManager;
@@ -92,14 +79,11 @@
import com.owncloud.android.ui.fragment.SharedListFragment;
import com.owncloud.android.ui.preview.PreviewTextStringFragment;
import com.owncloud.android.ui.trashbin.TrashbinActivity;
-import com.owncloud.android.utils.BitmapUtils;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.DrawerMenuUtil;
import com.owncloud.android.utils.FilesSyncHelper;
+import com.owncloud.android.utils.StringUtils;
import com.owncloud.android.utils.svg.MenuSimpleTarget;
-import com.owncloud.android.utils.svg.SVGorImage;
-import com.owncloud.android.utils.svg.SvgOrImageBitmapTranscoder;
-import com.owncloud.android.utils.svg.SvgOrImageDecoder;
import com.owncloud.android.utils.theme.CapabilityUtils;
import org.greenrobot.eventbus.EventBus;
@@ -107,9 +91,7 @@
import org.greenrobot.eventbus.ThreadMode;
import java.io.IOException;
-import java.io.InputStream;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import java.util.Optional;
@@ -118,12 +100,12 @@
import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBarDrawerToggle;
+import androidx.appcompat.widget.AppCompatTextView;
import androidx.core.content.ContextCompat;
import androidx.core.content.res.ResourcesCompat;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment;
-import hct.Hct;
import static com.nextcloud.utils.extensions.DrawerActivityExtensionsKt.getMenuItemIdFromTitle;
@@ -157,11 +139,6 @@ public abstract class DrawerActivity extends ToolbarActivity
*/
private NavigationView mNavigationView;
- /**
- * Reference to the navigation view header.
- */
- private View mNavigationViewHeader;
-
/**
* Flag to signal if the account chooser is active.
*/
@@ -187,6 +164,7 @@ public abstract class DrawerActivity extends ToolbarActivity
*/
private TextView mQuotaTextPercentage;
private TextView mQuotaTextLink;
+ private AppCompatTextView mQuotaTextUsage;
/**
* runnable that will be executed after the drawer has been closed.
@@ -211,10 +189,6 @@ protected void setupDrawer() {
mNavigationView = findViewById(R.id.nav_view);
if (mNavigationView != null) {
- // Setting up drawer header
- mNavigationViewHeader = mNavigationView.getHeaderView(0);
- updateHeader();
-
setupDrawerMenu(mNavigationView);
getAndDisplayUserQuota();
setupQuotaElement();
@@ -277,9 +251,10 @@ public void onDrawerOpened(View drawerView) {
Drawable backArrow = ResourcesCompat.getDrawable(getResources(),
R.drawable.ic_arrow_back,
null);
-
+ // custom color for back arrow required for NMC
if (backArrow != null) {
- viewThemeUtils.platform.tintToolbarArrowDrawable(this, mDrawerToggle, backArrow);
+ mDrawerToggle.setHomeAsUpIndicator(DrawableThemeUtils.tintDrawable(backArrow, getResources().getColor(R.color.fontAppbar, null)));
+ mDrawerToggle.getDrawerArrowDrawable().setColor(getResources().getColor(R.color.fontAppbar, null));
}
}
@@ -290,134 +265,9 @@ private void setupQuotaElement() {
mQuotaView = (LinearLayout) findQuotaViewById(R.id.drawer_quota);
mQuotaProgressBar = (LinearProgressIndicator) findQuotaViewById(R.id.drawer_quota_ProgressBar);
mQuotaTextPercentage = (TextView) findQuotaViewById(R.id.drawer_quota_percentage);
+ mQuotaTextUsage = mNavigationView.findViewById(R.id.drawer_quota_usage);
mQuotaTextLink = (TextView) findQuotaViewById(R.id.drawer_quota_link);
- viewThemeUtils.material.colorProgressBar(mQuotaProgressBar);
- }
-
- public void updateHeader() {
- int primaryColor = themeColorUtils.unchangedPrimaryColor(getAccount(), this);
- boolean isClientBranded = getResources().getBoolean(R.bool.is_branded_client);
-
- if (getAccount() != null &&
- getCapabilities().getServerBackground() != null && !isClientBranded) {
-
- OCCapability capability = getCapabilities();
- String logo = capability.getServerLogo();
-
- // set background to primary color
- LinearLayout drawerHeader = mNavigationViewHeader.findViewById(R.id.drawer_header_view);
- drawerHeader.setBackgroundColor(primaryColor);
-
- if (!TextUtils.isEmpty(logo) && URLUtil.isValidUrl(logo)) {
- // background image
- GenericRequestBuilder requestBuilder = Glide.with(this)
- .using(Glide.buildStreamModelLoader(Uri.class, this), InputStream.class)
- .from(Uri.class)
- .as(SVGorImage.class)
- .transcode(new SvgOrImageBitmapTranscoder(128, 128), Bitmap.class)
- .sourceEncoder(new StreamEncoder())
- .cacheDecoder(new FileToStreamDecoder<>(new SvgOrImageDecoder()))
- .decoder(new SvgOrImageDecoder());
-
- // background image
- SimpleTarget target = new SimpleTarget<>() {
- @Override
- public void onResourceReady(Bitmap resource, GlideAnimation glideAnimation) {
-
- Bitmap logo = resource;
- int width = resource.getWidth();
- int height = resource.getHeight();
- int max = Math.max(width, height);
- if (max > MAX_LOGO_SIZE_PX) {
- logo = BitmapUtils.scaleBitmap(resource, MAX_LOGO_SIZE_PX, width, height, max);
- }
-
- Drawable[] drawables = {new ColorDrawable(primaryColor),
- new BitmapDrawable(getResources(), logo)};
- LayerDrawable layerDrawable = new LayerDrawable(drawables);
-
- String name = capability.getServerName();
- setDrawerHeaderLogo(layerDrawable, name);
- }
- };
-
- requestBuilder
- .diskCacheStrategy(DiskCacheStrategy.SOURCE)
- .load(Uri.parse(logo))
- .into(target);
- }
- }
-
- // hide ecosystem apps according to user preference or in branded client
- LinearLayout banner = mNavigationViewHeader.findViewById(R.id.drawer_ecosystem_apps);
- boolean shouldHideTopBanner = isClientBranded || !preferences.isShowEcosystemApps();
-
- if (shouldHideTopBanner) {
- hideTopBanner(banner);
- } else {
- showTopBanner(banner, primaryColor);
- }
- }
-
- private void hideTopBanner(LinearLayout banner) {
- banner.setVisibility(View.GONE);
- }
-
- private void showTopBanner(LinearLayout banner, int primaryColor) {
- LinearLayout notesView = banner.findViewById(R.id.drawer_ecosystem_notes);
- LinearLayout talkView = banner.findViewById(R.id.drawer_ecosystem_talk);
- LinearLayout moreView = banner.findViewById(R.id.drawer_ecosystem_more);
- LinearLayout assistantView = banner.findViewById(R.id.drawer_ecosystem_assistant);
-
- notesView.setOnClickListener(v -> openAppOrStore("it.niedermann.owncloud.notes"));
- talkView.setOnClickListener(v -> openAppOrStore("com.nextcloud.talk2"));
- moreView.setOnClickListener(v -> openAppStore("Nextcloud", true));
- assistantView.setOnClickListener(v -> {
- DrawerActivity.menuItemId = Menu.NONE;
- startComposeActivity(ComposeDestination.AssistantScreen, R.string.assistant_screen_top_bar_title);
- });
- if (getCapabilities() != null && getCapabilities().getAssistant().isTrue()) {
- assistantView.setVisibility(View.VISIBLE);
- } else {
- assistantView.setVisibility(View.GONE);
- }
-
- List views = Arrays.asList(notesView, talkView, moreView, assistantView);
-
- int iconColor;
- if (Hct.fromInt(primaryColor).getTone() < 80.0) {
- iconColor = Color.WHITE;
- } else {
- iconColor = getColor(R.color.grey_800_transparent);
- }
-
- for (LinearLayout view : views) {
- ImageView imageView = (ImageView) view.getChildAt(0);
- imageView.setImageTintList(ColorStateList.valueOf(iconColor));
- GradientDrawable background = (GradientDrawable) imageView.getBackground();
- background.setStroke(DisplayUtils.convertDpToPixel(1, this), iconColor);
- TextView textView = (TextView) view.getChildAt(1);
- textView.setTextColor(iconColor);
- }
-
- banner.setVisibility(View.VISIBLE);
- }
-
- /**
- * Open specified app and, if not installed redirect to corresponding download.
- *
- * @param packageName of app to be opened
- */
- private void openAppOrStore(String packageName) {
- Intent intent = getPackageManager().getLaunchIntentForPackage(packageName);
- if (intent != null) {
- // app installed - open directly
- intent.putExtra(FileDisplayActivity.KEY_ACCOUNT, getUser().get().hashCode());
- startActivity(intent);
- } else {
- // app not found - open market (Google Play Store, F-Droid, etc.)
- openAppStore(packageName, false);
- }
+ viewThemeUtils.material.colorProgressBar(mQuotaProgressBar, getResources().getColor(R.color.primary));
}
/**
@@ -442,20 +292,6 @@ private void openAppStore(String string, boolean search) {
}
}
- private void setDrawerHeaderLogo(Drawable drawable, String serverName) {
- ImageView imageHeader = mNavigationViewHeader.findViewById(R.id.drawer_header_logo);
- imageHeader.setImageDrawable(drawable);
- imageHeader.setAdjustViewBounds(true);
-
- if (!TextUtils.isEmpty(serverName)) {
- TextView serverNameView = mNavigationViewHeader.findViewById(R.id.drawer_header_server_name);
- serverNameView.setVisibility(View.VISIBLE);
- serverNameView.setText(serverName);
- serverNameView.setTextColor(themeColorUtils.unchangedFontColor(this));
- }
-
- }
-
/**
* setup drawer content, basically setting the item selected listener.
*
@@ -482,7 +318,9 @@ private void filterDrawerMenu(final Menu menu, @NonNull final User user) {
OCCapability capability = getCapabilities();
DrawerMenuUtil.filterSearchMenuItems(menu, user, getResources());
- DrawerMenuUtil.filterTrashbinMenuItem(menu, capability);
+ // NMC: trashbin icon is depending on capability due to this it doesn't appear in some of the devices
+ // so removing the check as we need this option always
+ // DrawerMenuUtil.filterTrashbinMenuItem(menu, capability);
DrawerMenuUtil.filterActivityMenuItem(menu, capability);
DrawerMenuUtil.filterGroupfoldersMenuItem(menu, capability);
DrawerMenuUtil.filterAssistantMenuItem(menu, capability, getResources());
@@ -784,21 +622,20 @@ private void showQuota(boolean showQuota) {
* @param quotaValue {@link GetUserInfoRemoteOperation#SPACE_UNLIMITED} or other to determinate state
*/
private void setQuotaInformation(long usedSpace, long totalSpace, int relative, long quotaValue) {
- if (GetUserInfoRemoteOperation.SPACE_UNLIMITED == quotaValue) {
- mQuotaTextPercentage.setText(String.format(
- getString(R.string.drawer_quota_unlimited),
- DisplayUtils.bytesToHumanReadable(usedSpace)));
- } else {
- mQuotaTextPercentage.setText(String.format(
- getString(R.string.drawer_quota),
- DisplayUtils.bytesToHumanReadable(usedSpace),
- DisplayUtils.bytesToHumanReadable(totalSpace)));
- }
+ String usageText = String.format(
+ getString(R.string.drawer_quota_usage),
+ DisplayUtils.bytesToHumanReadable(usedSpace),
+ DisplayUtils.bytesToHumanReadable(totalSpace));
+
+ mQuotaTextUsage.setText(StringUtils.makeTextBold(usageText, DisplayUtils.bytesToHumanReadable(usedSpace)));
mQuotaProgressBar.setProgress(relative);
+ mQuotaTextPercentage.setText(String.format(
+ getString(R.string.drawer_quota_percentage), relative));
+
if (relative < RELATIVE_THRESHOLD_WARNING) {
- viewThemeUtils.material.colorProgressBar(mQuotaProgressBar);
+ viewThemeUtils.material.colorProgressBar(mQuotaProgressBar, getResources().getColor(R.color.primary));
} else {
viewThemeUtils.material.colorProgressBar(mQuotaProgressBar,
getResources().getColor(R.color.infolevel_warning, getTheme()));
@@ -894,14 +731,40 @@ public void setDrawerMenuItemChecked() {
return;
}
+ // NMC customisation
+ // if item is logout then do not show it as checked
+ if (menuItemId == R.id.nav_logout) {
+ return;
+ }
+
if (menuItem.isChecked()) {
return;
}
Log_OC.d(TAG, "New menu item is: " + menuItemId);
- viewThemeUtils.platform.colorNavigationView(mNavigationView);
menuItem.setChecked(true);
+
+ // for NMC customization
+ int drawerDefaultTxtColor = getResources().getColor(R.color.nav_txt_unselected_color, null);
+ int drawerActiveTxtColor = getResources().getColor(R.color.nav_txt_selected_color, null);
+
+ int drawerDefaultIconColor = getResources().getColor(R.color.nav_icon_unselected_color, null);
+ int drawerActiveIconColor = getResources().getColor(R.color.nav_icon_selected_color, null);
+
+ // For each menu item, change the color of the selected item, and of the other items
+ for (int i = 0; i < mNavigationView.getMenu().size(); i++) {
+ MenuItem item = mNavigationView.getMenu().getItem(i);
+ if (item.getIcon() != null) {
+ if (item == menuItem) {
+ viewThemeUtils.platform.colorDrawable(menuItem.getIcon(), drawerActiveIconColor);
+ menuItem.setTitle(StringUtils.getColorSpan(menuItem.getTitle().toString(), drawerActiveTxtColor));
+ } else {
+ viewThemeUtils.platform.colorDrawable(item.getIcon(), drawerDefaultIconColor);
+ item.setTitle(StringUtils.getColorSpan(item.getTitle().toString(), drawerDefaultTxtColor));
+ }
+ }
+ }
}
/**
@@ -1111,7 +974,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
* @return The view if found or null
otherwise.
*/
private View findQuotaViewById(int id) {
- View v = ((NavigationView) findViewById(R.id.nav_view)).getHeaderView(0).findViewById(id);
+ View v = ((NavigationView) findViewById(R.id.nav_view)).findViewById(id);
if (v != null) {
return v;
diff --git a/app/src/main/java/com/owncloud/android/ui/activity/ManageSpaceActivity.kt b/app/src/main/java/com/owncloud/android/ui/activity/ManageSpaceActivity.kt
index fe79e7aaa17c..be9af7ed0d03 100644
--- a/app/src/main/java/com/owncloud/android/ui/activity/ManageSpaceActivity.kt
+++ b/app/src/main/java/com/owncloud/android/ui/activity/ManageSpaceActivity.kt
@@ -18,6 +18,7 @@ import com.nextcloud.client.di.Injectable
import com.nextcloud.client.preferences.AppPreferences
import com.owncloud.android.R
import com.owncloud.android.lib.common.utils.Log_OC
+import com.owncloud.android.utils.theme.ViewThemeUtils
import java.io.File
import javax.inject.Inject
import kotlin.system.exitProcess
@@ -30,13 +31,17 @@ class ManageSpaceActivity : AppCompatActivity(), Injectable {
@Inject
lateinit var userAccountManager: UserAccountManager
+ @Inject
+ lateinit var viewThemeUtils: ViewThemeUtils
+
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_manage_space)
val actionBar = supportActionBar
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true)
- actionBar.setTitle(R.string.manage_space_title)
+ //NMC Customisation
+ viewThemeUtils.files.themeActionBar(this, actionBar, R.string.manage_space_title)
}
val descriptionTextView = findViewById(R.id.general_description)
descriptionTextView.text = getString(R.string.manage_space_description, getString(R.string.app_name))
diff --git a/app/src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java
index bde331c722a3..f6e9572a1be2 100644
--- a/app/src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java
+++ b/app/src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java
@@ -22,6 +22,7 @@
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
+import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
@@ -917,15 +918,10 @@ private void setupActionBar() {
actionBar.setDisplayShowTitleEnabled(true);
if (getResources() == null) return;
- Drawable menuIcon = ResourcesCompat.getDrawable(getResources(),
- R.drawable.ic_arrow_back,
- null);
-
- if (menuIcon == null) return;
- viewThemeUtils.androidx.themeActionBar(this,
- actionBar,
- getString(R.string.actionbar_settings),
- menuIcon);
+ // custom color for back arrow for NMC
+ viewThemeUtils.files.themeActionBar(this, actionBar, getResources().getString(R.string.actionbar_settings));
+ // required for NMC
+ actionBar.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.bg_default, null)));
}
private void launchDavDroidLogin() {
diff --git a/app/src/main/java/com/owncloud/android/ui/activity/ShareActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/ShareActivity.java
index 3c6b724e553f..8b0dcb3b417b 100644
--- a/app/src/main/java/com/owncloud/android/ui/activity/ShareActivity.java
+++ b/app/src/main/java/com/owncloud/android/ui/activity/ShareActivity.java
@@ -92,8 +92,6 @@ protected void onCreate(Bundle savedInstanceState) {
// Name
binding.shareFileName.setText(getResources().getString(R.string.share_file, file.getFileName()));
- viewThemeUtils.platform.colorViewBackground(binding.shareHeaderDivider);
-
// Size
binding.shareFileSize.setText(DisplayUtils.bytesToHumanReadable(file.getFileLength()));
diff --git a/app/src/main/java/com/owncloud/android/ui/activity/ToolbarActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/ToolbarActivity.java
index 0e56749caa79..b609deb7c066 100644
--- a/app/src/main/java/com/owncloud/android/ui/activity/ToolbarActivity.java
+++ b/app/src/main/java/com/owncloud/android/ui/activity/ToolbarActivity.java
@@ -17,6 +17,7 @@
import android.annotation.SuppressLint;
import android.graphics.Bitmap;
import android.graphics.Color;
+import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.FrameLayout;
@@ -31,9 +32,11 @@
import com.google.android.material.card.MaterialCardView;
import com.google.android.material.textview.MaterialTextView;
import com.nextcloud.client.di.Injectable;
+import com.nmc.android.utils.ToolbarThemeUtils;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.utils.StringUtils;
import com.owncloud.android.utils.theme.ThemeColorUtils;
import com.owncloud.android.utils.theme.ThemeUtils;
import com.owncloud.android.utils.theme.ViewThemeUtils;
@@ -64,6 +67,7 @@ public abstract class ToolbarActivity extends BaseActivity implements Injectable
private LinearLayout mInfoBox;
private TextView mInfoBoxMessage;
protected AppCompatSpinner mToolbarSpinner;
+ private View mDefaultToolbarDivider;
private boolean isHomeSearchToolbarShow = false;
@Inject public ThemeColorUtils themeColorUtils;
@@ -85,6 +89,7 @@ private void setupToolbar(boolean isHomeSearchToolbarShow, boolean showSortListB
mSearchText = findViewById(R.id.search_text);
mSwitchAccountButton = findViewById(R.id.switch_account_button);
mNotificationButton = findViewById(R.id.notification_button);
+ mDefaultToolbarDivider = findViewById(R.id.default_toolbar_divider);
if (showSortListButtonGroup) {
findViewById(R.id.sort_list_button_group).setVisibility(View.VISIBLE);
@@ -101,8 +106,10 @@ private void setupToolbar(boolean isHomeSearchToolbarShow, boolean showSortListB
mToolbarSpinner = findViewById(R.id.toolbar_spinner);
- viewThemeUtils.material.themeToolbar(mToolbar);
- viewThemeUtils.material.colorToolbarOverflowIcon(mToolbar);
+ // custom color for overflow icon required for NMC
+ if (mToolbar.getOverflowIcon() != null) {
+ mToolbar.getOverflowIcon().setColorFilter(getResources().getColor(R.color.fontAppbar, null), PorterDuff.Mode.SRC_ATOP);
+ }
viewThemeUtils.platform.themeStatusBar(this);
viewThemeUtils.material.colorMaterialTextButton(mSwitchAccountButton);
}
@@ -169,22 +176,11 @@ private void showHomeSearchToolbar(String title, boolean isRoot) {
@SuppressLint("PrivateResource")
private void showHomeSearchToolbar(boolean isShow) {
- viewThemeUtils.material.themeToolbar(mToolbar);
- if (isShow) {
- viewThemeUtils.platform.resetStatusBar(this);
- mAppBar.setStateListAnimator(AnimatorInflater.loadStateListAnimator(mAppBar.getContext(),
- R.animator.appbar_elevation_off));
- mDefaultToolbar.setVisibility(View.GONE);
- mHomeSearchToolbar.setVisibility(View.VISIBLE);
- viewThemeUtils.material.themeCardView(mHomeSearchToolbar);
- viewThemeUtils.material.themeSearchBarText(mSearchText);
- } else {
- mAppBar.setStateListAnimator(AnimatorInflater.loadStateListAnimator(mAppBar.getContext(),
- R.animator.appbar_elevation_on));
- viewThemeUtils.platform.themeStatusBar(this);
- mDefaultToolbar.setVisibility(View.VISIBLE);
- mHomeSearchToolbar.setVisibility(View.GONE);
- }
+ mAppBar.setStateListAnimator(AnimatorInflater.loadStateListAnimator(mAppBar.getContext(),
+ R.animator.appbar_elevation_on));
+ viewThemeUtils.platform.themeStatusBar(this);
+ mDefaultToolbar.setVisibility(View.VISIBLE);
+ mHomeSearchToolbar.setVisibility(View.GONE);
}
/**
@@ -197,7 +193,8 @@ public void updateActionBarTitleAndHomeButtonByString(String title) {
// set home button properties
if (actionBar != null) {
if (title != null) {
- actionBar.setTitle(title);
+ //custom styling for action bar title required for NMC
+ ToolbarThemeUtils.setColoredTitle(this, actionBar, title);
actionBar.setDisplayShowTitleEnabled(true);
} else {
actionBar.setDisplayShowTitleEnabled(false);
@@ -298,8 +295,8 @@ public FrameLayout getPreviewImageContainer() {
public void updateToolbarSubtitle(@NonNull String subtitle) {
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
- actionBar.setSubtitle(subtitle);
- viewThemeUtils.androidx.themeActionBarSubtitle(this, actionBar);
+ //required for NMC
+ actionBar.setSubtitle(StringUtils.getColorSpan(subtitle, getResources().getColor(R.color.fontAppbar, null)));
}
}
diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/SortingOrderDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/SortingOrderDialogFragment.kt
index 8a593cabf541..427547760139 100644
--- a/app/src/main/java/com/owncloud/android/ui/dialog/SortingOrderDialogFragment.kt
+++ b/app/src/main/java/com/owncloud/android/ui/dialog/SortingOrderDialogFragment.kt
@@ -10,6 +10,7 @@
package com.owncloud.android.ui.dialog
import android.app.Dialog
+import android.graphics.Typeface
import android.os.Bundle
import android.view.View
import androidx.fragment.app.DialogFragment
@@ -63,11 +64,19 @@ class SortingOrderDialogFragment : DialogFragment(), Injectable {
view.tag = sortOrder
view.let {
it.setOnClickListener(OnSortOrderClickListener())
- viewThemeUtils?.material?.colorMaterialButtonPrimaryBorderless(it)
+
+ // NMC Customization
+ if ((view.tag as FileSortOrder).name == currentSortOrderName) {
+ it.setTextColor(resources.getColor(R.color.primary, null))
+ it.setIconTintResource(R.color.primary)
+ it.setTypeface(it.typeface, Typeface.BOLD)
+ } else {
+ it.setTextColor(resources.getColor(R.color.standard_grey, null))
+ it.setIconTintResource(R.color.standard_grey)
+ }
}
}
- viewThemeUtils?.material?.colorMaterialButtonPrimaryTonal(binding.cancel)
binding.cancel.setOnClickListener { dismiss() }
}
diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java b/app/src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java
index 8922e792958b..98c3c1eb2463 100644
--- a/app/src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java
+++ b/app/src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java
@@ -354,13 +354,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
mRefreshListLayout.setOnRefreshListener(this);
mSortButton = getActivity().findViewById(R.id.sort_button);
- if (mSortButton != null) {
- viewThemeUtils.material.colorMaterialTextButton(mSortButton);
- }
mSwitchGridViewButton = getActivity().findViewById(R.id.switch_grid_view_button);
- if (mSwitchGridViewButton != null) {
- viewThemeUtils.material.colorMaterialTextButton(mSwitchGridViewButton);
- }
return v;
}
diff --git a/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.kt b/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.kt
index ff6d81ded961..ab2cb32060a9 100644
--- a/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.kt
+++ b/app/src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.kt
@@ -10,12 +10,8 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
-import android.os.Build
import android.os.Bundle
import android.view.MenuItem
-import android.view.View
-import android.view.WindowInsets
-import android.view.WindowInsetsController
import androidx.appcompat.app.ActionBar
import androidx.drawerlayout.widget.DrawerLayout
import androidx.localbroadcastmanager.content.LocalBroadcastManager
@@ -68,7 +64,6 @@ class PreviewImageActivity : FileActivity(), FileFragment.ContainerActivity, OnR
private var savedPosition = 0
private var hasSavedPosition = false
private var downloadFinishReceiver: DownloadFinishReceiver? = null
- private var fullScreenAnchorView: View? = null
private var isDownloadWorkStarted = false
private var screenState = PreviewImageActivityState.Idle
@@ -95,6 +90,7 @@ class PreviewImageActivity : FileActivity(), FileFragment.ContainerActivity, OnR
}
setContentView(R.layout.preview_image_activity)
+ setupToolbar()
livePhotoFile = intent.getParcelableArgument(EXTRA_LIVE_PHOTO_FILE, OCFile::class.java)
@@ -108,7 +104,6 @@ class PreviewImageActivity : FileActivity(), FileFragment.ContainerActivity, OnR
actionBar?.setDisplayHomeAsUpEnabled(true)
}
- fullScreenAnchorView = window.decorView
// to keep our UI controls visibility in line with system bars visibility
setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED)
@@ -227,7 +222,8 @@ class PreviewImageActivity : FileActivity(), FileFragment.ContainerActivity, OnR
if (file != null) {
// / Refresh the activity according to the Account and OCFile set
setFile(file) // reset after getting it fresh from storageManager
- updateActionBarTitle(getFile().fileName)
+ // NMC Customization
+ updateActionBarTitleAndHomeButton(getFile())
// if (!stateWasRecovered) {
initViewPager(optionalUser.get())
@@ -400,15 +396,12 @@ class PreviewImageActivity : FileActivity(), FileFragment.ContainerActivity, OnR
}
if (currentFile != null) {
- updateActionBarTitle(currentFile.fileName)
+ // NMC Customization
+ updateActionBarTitleAndHomeButton(currentFile)
setDrawerIndicatorEnabled(false)
}
}
- private fun updateActionBarTitle(title: String?) {
- supportActionBar?.title = title
- }
-
/**
* Class waiting for broadcast events from the [FileDownloadWorker] service.
*
@@ -471,17 +464,7 @@ class PreviewImageActivity : FileActivity(), FileFragment.ContainerActivity, OnR
get() = supportActionBar == null || supportActionBar?.isShowing == true
fun toggleFullScreen() {
- if (fullScreenAnchorView == null) return
- val visible = (
- fullScreenAnchorView!!.systemUiVisibility
- and View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
- ) == 0
-
- if (visible) {
- hideSystemUI(fullScreenAnchorView!!)
- } else {
- showSystemUI(fullScreenAnchorView!!)
- }
+ // do nothing for NMC
}
fun startImageEditor(file: OCFile) {
@@ -519,44 +502,6 @@ class PreviewImageActivity : FileActivity(), FileFragment.ContainerActivity, OnR
// TODO Auto-generated method stub
}
- private fun hideSystemUI(anchorView: View) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
- window.insetsController?.let { controller ->
- controller.hide(WindowInsets.Type.systemBars())
- controller.systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
- }
- } else {
- @Suppress("DEPRECATION")
- anchorView.systemUiVisibility = (
- View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hides NAVIGATION BAR; Android >= 4.0
- or View.SYSTEM_UI_FLAG_FULLSCREEN // hides STATUS BAR; Android >= 4.1
- or View.SYSTEM_UI_FLAG_IMMERSIVE // stays interactive; Android >= 4.4
- or View.SYSTEM_UI_FLAG_LAYOUT_STABLE // draw full window; Android >= 4.1
- or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN // draw full window; Android >= 4.1
- or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
- )
- }
- }
-
- private fun showSystemUI(anchorView: View) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
- window.insetsController?.let { controller ->
- controller.show(WindowInsets.Type.systemBars())
-
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
- controller.systemBarsBehavior = WindowInsetsController.BEHAVIOR_DEFAULT
- }
- }
- } else {
- @Suppress("DEPRECATION")
- anchorView.systemUiVisibility = (
- View.SYSTEM_UI_FLAG_LAYOUT_STABLE // draw full window; Android >= 4.1
- or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN // draw full window; Android >= 4.1
- or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
- )
- }
- }
-
companion object {
val TAG: String = PreviewImageActivity::class.java.simpleName
const val EXTRA_VIRTUAL_TYPE: String = "EXTRA_VIRTUAL_TYPE"
diff --git a/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaActivity.kt b/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaActivity.kt
index 1f892cf18122..9fce51b60ac7 100644
--- a/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaActivity.kt
+++ b/app/src/main/java/com/owncloud/android/ui/preview/PreviewMediaActivity.kt
@@ -156,7 +156,8 @@ class PreviewMediaActivity :
binding = ActivityPreviewMediaBinding.inflate(layoutInflater)
setContentView(binding.root)
- setSupportActionBar(binding.materialToolbar)
+ // NMC Customization: Customize toolbar
+ setupToolbar()
WindowCompat.setDecorFitsSystemWindows(window, false)
applyWindowInsets()
initArguments(savedInstanceState)
@@ -272,10 +273,6 @@ class PreviewMediaActivity :
it.setBackgroundDrawable(ColorDrawable(Color.BLACK))
}
}
-
- viewThemeUtils.platform.themeStatusBar(
- this
- )
}
private fun showProgressLayout() {
@@ -502,7 +499,7 @@ class PreviewMediaActivity :
.displayCutout()
)
- binding.materialToolbar.updateLayoutParams {
+ binding.mediaToolbar.appbar.updateLayoutParams {
topMargin = insets.top
}
exoControls.updateLayoutParams {
@@ -513,7 +510,7 @@ class PreviewMediaActivity :
}
exoControls.updatePadding(left = insets.left, right = insets.right)
exoProgress.updatePadding(left = insets.left, right = insets.right)
- binding.materialToolbar.updatePadding(left = insets.left, right = insets.right)
+ binding.mediaToolbar.appbar.updatePadding(left = insets.left, right = insets.right)
WindowInsetsCompat.CONSUMED
}
}
@@ -541,12 +538,18 @@ class PreviewMediaActivity :
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
menuInflater.inflate(R.menu.custom_menu_placeholder, menu)
-
- if (isFileVideo()) {
- val moreMenuItem = menu?.findItem(R.id.custom_menu_placeholder_item)
- moreMenuItem?.icon?.setTint(ContextCompat.getColor(this, R.color.white))
+ // NMC customization
+ menu?.findItem(R.id.custom_menu_placeholder_item)?.apply {
+ icon = icon?.let {
+ viewThemeUtils.platform.colorDrawable(
+ it,
+ ContextCompat.getColor(
+ this@PreviewMediaActivity,
+ if (isFileVideo()) R.color.white else R.color.fontAppbar
+ )
+ )
+ }
}
-
return true
}
diff --git a/app/src/main/java/com/owncloud/android/utils/StringUtils.java b/app/src/main/java/com/owncloud/android/utils/StringUtils.java
index d4339f0003eb..637b6c4ea15d 100644
--- a/app/src/main/java/com/owncloud/android/utils/StringUtils.java
+++ b/app/src/main/java/com/owncloud/android/utils/StringUtils.java
@@ -7,7 +7,14 @@
*/
package com.owncloud.android.utils;
+
+import android.text.Spannable;
+import android.text.SpannableString;
+import android.text.style.ForegroundColorSpan;
+
import java.util.Locale;
+import android.graphics.Typeface;
+import android.text.style.StyleSpan;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -55,6 +62,15 @@ String searchAndColor(@Nullable String text, @Nullable String searchText,
}
}
+ public static Spannable getColorSpan(@NonNull String title, @ColorInt int color) {
+ Spannable text = new SpannableString(title);
+ text.setSpan(new ForegroundColorSpan(color),
+ 0,
+ text.length(),
+ Spannable.SPAN_INCLUSIVE_INCLUSIVE);
+ return text;
+ }
+
public static
@NonNull
String removePrefix(@NonNull String s, @NonNull String prefix) {
@@ -63,4 +79,19 @@ String removePrefix(@NonNull String s, @NonNull String prefix) {
}
return s;
}
+
+ /**
+ * make the passed text bold
+ *
+ * @param fullText actual text
+ * @param textToBold to be bold
+ * @return
+ */
+ public static Spannable makeTextBold(String fullText, String textToBold) {
+ Spannable spannable = new SpannableString(fullText);
+ int indexStart = fullText.indexOf(textToBold);
+ int indexEnd = indexStart + textToBold.length();
+ spannable.setSpan(new StyleSpan(Typeface.BOLD), indexStart, indexEnd, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ return spannable;
+ }
}
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 41f13b37156f..d075e145d14c 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
@@ -28,7 +28,9 @@ import com.nextcloud.android.common.ui.theme.MaterialSchemes
import com.nextcloud.android.common.ui.theme.ViewThemeUtilsBase
import com.nextcloud.android.common.ui.theme.utils.AndroidViewThemeUtils
import com.nextcloud.android.common.ui.theme.utils.AndroidXViewThemeUtils
+import com.nmc.android.utils.ToolbarThemeUtils
import com.nextcloud.utils.view.FastScrollPopupBackground
+import com.nmc.android.utils.DrawableThemeUtils
import com.owncloud.android.R
import com.owncloud.android.lib.common.utils.Log_OC
import com.owncloud.android.lib.resources.shares.ShareType
@@ -133,18 +135,11 @@ class FilesSpecificViewThemeUtils @Inject constructor(
// TODO move back arrow resource to lib and use lib method directly?
@JvmOverloads
fun themeActionBar(context: Context, actionBar: ActionBar, title: String, isMenu: Boolean = false) {
- val icon = getHomeAsUpIcon(isMenu)
- val backArrow = ResourcesCompat.getDrawable(
- context.resources,
- icon,
- null
- )!!
- androidXViewThemeUtils.themeActionBar(
- context,
- actionBar,
- title,
- backArrow
- )
+ //custom styling for action bar title required for NMC
+ ToolbarThemeUtils.setColoredTitle(context, actionBar, title)
+
+ //custom color for back arrow for NMC
+ themeActionBar(context, actionBar, isMenu)
}
/**
@@ -171,7 +166,13 @@ class FilesSpecificViewThemeUtils @Inject constructor(
getHomeAsUpIcon(isMenu),
null
)!!
- androidXViewThemeUtils.themeActionBar(context, actionBar, backArrow)
+ //custom color for back arrow for NMC
+ actionBar.setHomeAsUpIndicator(
+ DrawableThemeUtils.tintDrawable(
+ backArrow,
+ context.resources.getColor(R.color.fontAppbar, null)
+ )
+ )
}
fun themeTemplateCardView(cardView: MaterialCardView) {
diff --git a/app/src/main/res/drawable/ic_magentacloud_product_logo.xml b/app/src/main/res/drawable/ic_magentacloud_product_logo.xml
new file mode 100644
index 000000000000..287fc029a729
--- /dev/null
+++ b/app/src/main/res/drawable/ic_magentacloud_product_logo.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/menu_background_color_state.xml b/app/src/main/res/drawable/menu_background_color_state.xml
new file mode 100644
index 000000000000..1aee89b3ea28
--- /dev/null
+++ b/app/src/main/res/drawable/menu_background_color_state.xml
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/app/src/main/res/layout/action_mode_close_layout.xml b/app/src/main/res/layout/action_mode_close_layout.xml
new file mode 100644
index 000000000000..36e355cb18c3
--- /dev/null
+++ b/app/src/main/res/layout/action_mode_close_layout.xml
@@ -0,0 +1,14 @@
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_preview_media.xml b/app/src/main/res/layout/activity_preview_media.xml
index c70adfa1b7cb..f6c696d298ae 100644
--- a/app/src/main/res/layout/activity_preview_media.xml
+++ b/app/src/main/res/layout/activity_preview_media.xml
@@ -15,15 +15,6 @@
android:gravity="center"
tools:context=".ui.preview.PreviewMediaActivity">
-
-
+
+
+
+
+
+
+
+
+ android:drawablePadding="@dimen/alternate_half_padding"
+ android:visibility="gone" />
@@ -59,9 +80,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/alternate_half_padding"
- android:fontFamily="sans-serif-medium"
+ android:paddingLeft="@dimen/standard_padding"
+ android:paddingRight="@dimen/standard_padding"
android:text="@string/drawer_quota"
- android:textColor="@color/drawer_text_color" />
+ android:textColor="@color/drawer_quota_txt_color"
+ android:textSize="@dimen/txt_size_14sp" />
diff --git a/app/src/main/res/layout/file_details_fragment.xml b/app/src/main/res/layout/file_details_fragment.xml
index 9466d4638d35..2b8c082247a4 100644
--- a/app/src/main/res/layout/file_details_fragment.xml
+++ b/app/src/main/res/layout/file_details_fragment.xml
@@ -206,7 +206,7 @@
+ android:background="@color/divider_color" />
~ SPDX-License-Identifier: GPL-2.0-only AND (AGPL-3.0-or-later OR GPL-2.0-only)
-->
-
-
+
+
+
+
+
+
+ android:layout_height="1dp"
+ android:background="@color/divider_color" />
@@ -61,11 +61,28 @@
android:layout_marginEnd="1dp"
android:contentDescription="@string/action_switch_grid_view"
app:cornerRadius="24dp"
+ app:iconSize="24dp"
app:icon="@drawable/ic_view_module"
- app:iconTint="@color/fontAppbar"
+ app:iconTint="@color/icon_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
+
+
+
+
@@ -86,6 +103,7 @@
android:id="@+id/preview_image"
android:layout_width="match_parent"
android:layout_height="@dimen/nav_drawer_header_height"
+ android:background="@color/bg_default"
android:contentDescription="@string/preview_image_description"
android:scaleType="centerCrop" />
@@ -99,7 +117,7 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
- android:background="@color/appbar"
+ android:background="@color/bg_default"
android:theme="@style/Theme.ToolbarTheme"
tools:visibility="gone">
@@ -112,6 +130,14 @@
app:popupTheme="@style/Theme.AppCompat.DayNight.NoActionBar" />
+
+
+ android:title="@string/drawer_item_recent_files"
+ android:visible="false"/>
+
+
+
+
#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-night/themes.xml b/app/src/main/res/values-night/themes.xml
index 19b3ce692520..ef13919a9f09 100644
--- a/app/src/main/res/values-night/themes.xml
+++ b/app/src/main/res/values-night/themes.xml
@@ -22,6 +22,11 @@
- @style/Widget.App.TextInputLayout
- @style/Nextcloud.Widget.PopupMenu
- @style/ThemeOverlay.App.BottomSheetDialog
+
+ - @color/primary
+
+ - @drawable/ic_arrow_back
+ - @drawable/ic_arrow_back
- @style/App.ActionMode
diff --git a/app/src/main/res/values-v27/styles.xml b/app/src/main/res/values-v27/styles.xml
index 22f2cbfe648f..80d94557e005 100644
--- a/app/src/main/res/values-v27/styles.xml
+++ b/app/src/main/res/values-v27/styles.xml
@@ -35,7 +35,7 @@
- false
-
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index efefff8f3b98..ec1a9407db96 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -76,4 +76,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/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100644
index 000000000000..43e80a31e3f2
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,33 @@
+
+
+ 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
+ 44dp
+
\ No newline at end of file
diff --git a/app/src/main/res/values/nmc_navigation_styles.xml b/app/src/main/res/values/nmc_navigation_styles.xml
new file mode 100644
index 000000000000..5e2acf8f859e
--- /dev/null
+++ b/app/src/main/res/values/nmc_navigation_styles.xml
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/setup.xml b/app/src/main/res/values/setup.xml
index 139e8b2e8d40..850a1ae0d1a6 100644
--- a/app/src/main/res/values/setup.xml
+++ b/app/src/main/res/values/setup.xml
@@ -78,7 +78,7 @@
false
true
- false
+ true
true
@@ -111,7 +111,7 @@
- true
+ false
https://f-droid.org/repository/browse/?fdid=com.nextcloud.android.beta
https://download.nextcloud.com/android/dev/latest.apk
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index e48003d71755..09dec6a5ab31 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -90,8 +90,11 @@
Notifications
%1$s of %2$s used
%1$s used
+ %d %% Storage used
+ %1$s of %2$s
Close sidebar
Open sidebar
+ Recent files
General
More
Manage accounts
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 08ebf4b5f8c7..60ba7860ab01 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -31,6 +31,11 @@
- @style/FallbackDatePickerDialogTheme
- @color/bg_default
- @style/Widget.App.TextInputLayout
+
+ - @color/primary
+
+ - @drawable/ic_arrow_back
+ - @drawable/ic_arrow_back
- @dimen/dialogBorderRadius
@@ -49,6 +54,11 @@
- @style/FallbackDatePickerDialogTheme
- @color/bg_default
- @style/Widget.App.TextInputLayout
+
+ - @color/primary
+
+ - @drawable/ic_arrow_back
+ - @drawable/ic_arrow_back
- @dimen/dialogBorderRadius
@@ -285,7 +295,7 @@
- end
- @color/transparent
- - @color/drawer_active_item_background
+ - @color/text_color
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index cefa8e7856d8..ebc41ddb9a42 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -23,6 +23,11 @@
- @style/Widget.App.TextInputLayout
- @style/Nextcloud.Widget.PopupMenu
- @style/ThemeOverlay.App.BottomSheetDialog
+
+ - @color/primary
+
+ - @drawable/ic_arrow_back
+ - @drawable/ic_arrow_back
- @style/App.ActionMode