Merge pull request #11811 from nextcloud/wip/app-integration
Wip/app integration
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 28 KiB |
|
@ -75,6 +75,9 @@ public interface AppPreferences {
|
|||
boolean isShowHiddenFilesEnabled();
|
||||
void setShowHiddenFilesEnabled(boolean enabled);
|
||||
|
||||
boolean isShowEcosystemApps();
|
||||
void setShowEcosystemApps(boolean enabled);
|
||||
|
||||
/**
|
||||
* Gets the selected file extension position the user selected to do the
|
||||
* last upload of a url file shared from other app.
|
||||
|
|
|
@ -76,6 +76,7 @@ public final class AppPreferencesImpl implements AppPreferences {
|
|||
private static final String PREF__INSTANT_UPLOADING = "instant_uploading";
|
||||
private static final String PREF__INSTANT_VIDEO_UPLOADING = "instant_video_uploading";
|
||||
private static final String PREF__SHOW_HIDDEN_FILES = "show_hidden_files_pref";
|
||||
private static final String PREF__SHOW_ECOSYSTEM_APPS = "show_ecosystem_apps";
|
||||
private static final String PREF__LEGACY_CLEAN = "legacyClean";
|
||||
private static final String PREF__KEYS_MIGRATION = "keysMigration";
|
||||
private static final String PREF__FIX_STORAGE_PATH = "storagePathFix";
|
||||
|
@ -221,6 +222,16 @@ public final class AppPreferencesImpl implements AppPreferences {
|
|||
preferences.edit().putBoolean(PREF__SHOW_HIDDEN_FILES, enabled).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isShowEcosystemApps() {
|
||||
return preferences.getBoolean(PREF__SHOW_ECOSYSTEM_APPS, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setShowEcosystemApps(boolean enabled) {
|
||||
preferences.edit().putBoolean(PREF__SHOW_ECOSYSTEM_APPS, enabled).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getUploadUrlFileExtensionUrlSelectedPos() {
|
||||
return preferences.getInt(AUTO_PREF__UPLOAD_FILE_EXTENSION_URL, 0);
|
||||
|
|
|
@ -30,7 +30,7 @@ public class DeepLinkLoginActivity extends AuthenticatorActivity implements Inje
|
|||
LoginUrlInfo loginUrlInfo = parseLoginDataUrl(prefix, data.toString());
|
||||
|
||||
TextView loginText = findViewById(R.id.loginInfo);
|
||||
loginText.setText(String.format("Login with %1$s to %2$s", loginUrlInfo.username,
|
||||
loginText.setText(String.format(getString(R.string.direct_login_text), loginUrlInfo.username,
|
||||
loginUrlInfo.serverAddress));
|
||||
} catch (IllegalArgumentException e) {
|
||||
Toast.makeText(this, R.string.direct_login_failed, Toast.LENGTH_LONG).show();
|
||||
|
|
|
@ -34,11 +34,14 @@ import android.accounts.OperationCanceledException;
|
|||
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;
|
||||
|
@ -48,8 +51,6 @@ import android.text.TextUtils;
|
|||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
import android.view.ViewGroup.MarginLayoutParams;
|
||||
import android.webkit.URLUtil;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
|
@ -133,6 +134,7 @@ import androidx.core.content.res.ResourcesCompat;
|
|||
import androidx.core.view.GravityCompat;
|
||||
import androidx.drawerlayout.widget.DrawerLayout;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import hct.Hct;
|
||||
|
||||
/**
|
||||
* Base class to handle setup of the drawer implementation including user switching and avatar fetching and fallback
|
||||
|
@ -320,7 +322,7 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
.decoder(new SvgOrImageDecoder());
|
||||
|
||||
// background image
|
||||
SimpleTarget target = new SimpleTarget<Bitmap>() {
|
||||
SimpleTarget<Bitmap> target = new SimpleTarget<>() {
|
||||
@Override
|
||||
public void onResourceReady(Bitmap resource, GlideAnimation glideAnimation) {
|
||||
|
||||
|
@ -332,7 +334,8 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
logo = BitmapUtils.scaleBitmap(resource, MAX_LOGO_SIZE_PX, width, height, max);
|
||||
}
|
||||
|
||||
Drawable[] drawables = {new ColorDrawable(primaryColor), new BitmapDrawable(logo)};
|
||||
Drawable[] drawables = {new ColorDrawable(primaryColor),
|
||||
new BitmapDrawable(getResources(), logo)};
|
||||
LayerDrawable layerDrawable = new LayerDrawable(drawables);
|
||||
|
||||
String name = capability.getServerName();
|
||||
|
@ -345,29 +348,91 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
.load(Uri.parse(logo))
|
||||
.into(target);
|
||||
}
|
||||
|
||||
// hide ecosystem apps according to user preference or in branded client
|
||||
LinearLayout ecosystemApps = mNavigationViewHeader.findViewById(R.id.drawer_ecosystem_apps);
|
||||
if (getResources().getBoolean(R.bool.is_branded_client) || !preferences.isShowEcosystemApps()) {
|
||||
ecosystemApps.setVisibility(View.GONE);
|
||||
} else {
|
||||
LinearLayout[] views = {
|
||||
ecosystemApps.findViewById(R.id.drawer_ecosystem_notes),
|
||||
ecosystemApps.findViewById(R.id.drawer_ecosystem_talk),
|
||||
ecosystemApps.findViewById(R.id.drawer_ecosystem_more)
|
||||
};
|
||||
|
||||
views[0].setOnClickListener(v -> openAppOrStore("it.niedermann.owncloud.notes"));
|
||||
views[1].setOnClickListener(v -> openAppOrStore("com.nextcloud.talk2"));
|
||||
views[2].setOnClickListener(v -> openAppStore("Nextcloud", true));
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
ecosystemApps.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setDrawerHeaderLogo(Drawable drawable, String name) {
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Open app store page of specified app or search for specified string.
|
||||
* Will attempt to open browser when no app store is available.
|
||||
*
|
||||
* @param string packageName or url-encoded search string
|
||||
* @param search false -> show app corresponding to packageName; true -> open search for string
|
||||
*/
|
||||
private void openAppStore(String string, boolean search) {
|
||||
String suffix = (search ? "search?q=" : "details?id=") + string;
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://" + suffix));
|
||||
try {
|
||||
startActivity(intent);
|
||||
} catch (android.content.ActivityNotFoundException activityNotFoundException1) {
|
||||
// all is lost: open google play store web page for app
|
||||
if (!search) {
|
||||
suffix = "apps/" + suffix;
|
||||
}
|
||||
intent.setData(Uri.parse("https://play.google.com/store/" + suffix));
|
||||
startActivity(intent);
|
||||
}
|
||||
}
|
||||
|
||||
private void setDrawerHeaderLogo(Drawable drawable, String serverName) {
|
||||
ImageView imageHeader = mNavigationViewHeader.findViewById(R.id.drawer_header_logo);
|
||||
imageHeader.setImageDrawable(drawable);
|
||||
imageHeader.setScaleType(ImageView.ScaleType.FIT_START);
|
||||
imageHeader.setAdjustViewBounds(true);
|
||||
|
||||
imageHeader.setMaxWidth(DisplayUtils.convertDpToPixel(100f, this));
|
||||
|
||||
MarginLayoutParams oldParam = (MarginLayoutParams) imageHeader.getLayoutParams();
|
||||
MarginLayoutParams params = new MarginLayoutParams(LayoutParams.WRAP_CONTENT,
|
||||
LayoutParams.MATCH_PARENT);
|
||||
params.leftMargin = oldParam.leftMargin;
|
||||
params.rightMargin = oldParam.rightMargin;
|
||||
|
||||
imageHeader.setLayoutParams(new LinearLayout.LayoutParams(params));
|
||||
|
||||
if (!TextUtils.isEmpty(name)) {
|
||||
TextView serverName = mNavigationViewHeader.findViewById(R.id.drawer_header_server_name);
|
||||
serverName.setText(name);
|
||||
serverName.setTextColor(themeColorUtils.unchangedFontColor(this));
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -653,11 +718,7 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
|
||||
// set home button properties
|
||||
if (mDrawerToggle != null) {
|
||||
if (chosenFile != null && isRoot(chosenFile)) {
|
||||
mDrawerToggle.setDrawerIndicatorEnabled(true);
|
||||
} else {
|
||||
mDrawerToggle.setDrawerIndicatorEnabled(false);
|
||||
}
|
||||
mDrawerToggle.setDrawerIndicatorEnabled(chosenFile != null && isRoot(chosenFile));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -700,7 +761,7 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
viewThemeUtils.material.colorProgressBar(mQuotaProgressBar);
|
||||
} else {
|
||||
viewThemeUtils.material.colorProgressBar(mQuotaProgressBar,
|
||||
getResources().getColor(R.color.infolevel_warning));
|
||||
getResources().getColor(R.color.infolevel_warning, getTheme()));
|
||||
}
|
||||
|
||||
updateQuotaLink();
|
||||
|
@ -1053,28 +1114,22 @@ public abstract class DrawerActivity extends ToolbarActivity
|
|||
|
||||
@Override
|
||||
public void avatarGenerated(Drawable avatarDrawable, Object callContext) {
|
||||
if (callContext instanceof MenuItem) {
|
||||
MenuItem menuItem = (MenuItem) callContext;
|
||||
if (callContext instanceof MenuItem menuItem) {
|
||||
menuItem.setIcon(avatarDrawable);
|
||||
} else if (callContext instanceof ImageView) {
|
||||
ImageView imageView = (ImageView) callContext;
|
||||
} else if (callContext instanceof ImageView imageView) {
|
||||
imageView.setImageDrawable(avatarDrawable);
|
||||
} else if (callContext instanceof MaterialButton) {
|
||||
MaterialButton materialButton = (MaterialButton) callContext;
|
||||
} else if (callContext instanceof MaterialButton materialButton) {
|
||||
materialButton.setIcon(avatarDrawable);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCallGeneratedCallback(String tag, Object callContext) {
|
||||
if (callContext instanceof MenuItem) {
|
||||
MenuItem menuItem = (MenuItem) callContext;
|
||||
if (callContext instanceof MenuItem menuItem) {
|
||||
return String.valueOf(menuItem.getTitle()).equals(tag);
|
||||
} else if (callContext instanceof ImageView) {
|
||||
ImageView imageView = (ImageView) callContext;
|
||||
} else if (callContext instanceof ImageView imageView) {
|
||||
return String.valueOf(imageView.getTag()).equals(tag);
|
||||
} else if (callContext instanceof MaterialButton) {
|
||||
MaterialButton materialButton = (MaterialButton) callContext;
|
||||
} else if (callContext instanceof MaterialButton materialButton) {
|
||||
return String.valueOf(materialButton.getTag()).equals(tag);
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -391,6 +391,10 @@ public class FileDisplayActivity extends FileActivity
|
|||
if (OPEN_FILE.equals(getIntent().getAction())) {
|
||||
getSupportFragmentManager().executePendingTransactions();
|
||||
onOpenFileIntent(getIntent());
|
||||
} else if (RESTART.equals(getIntent().getAction())) {
|
||||
// most likely switched to different account
|
||||
DisplayUtils.showSnackMessage(this, String.format(getString(R.string.logged_in_as),
|
||||
accountManager.getUser().getAccountName()));
|
||||
}
|
||||
|
||||
upgradeNotificationForInstantUpload();
|
||||
|
@ -2503,7 +2507,7 @@ public class FileDisplayActivity extends FileActivity
|
|||
openFileByPath(optionalUser.get(), filePath);
|
||||
} else {
|
||||
dismissLoadingDialog();
|
||||
DisplayUtils.showSnackMessage(this, getString(R.string.file_not_found));
|
||||
accountClicked(optionalUser.get().hashCode());
|
||||
}
|
||||
} else {
|
||||
dismissLoadingDialog();
|
||||
|
|
|
@ -137,6 +137,7 @@ public class SettingsActivity extends PreferenceActivity
|
|||
|
||||
private ListPreference lock;
|
||||
private ThemeableSwitchPreference showHiddenFiles;
|
||||
private ThemeableSwitchPreference showEcosystemApps;
|
||||
private AppCompatDelegate delegate;
|
||||
|
||||
private ListPreference prefStoragePath;
|
||||
|
@ -606,6 +607,7 @@ public class SettingsActivity extends PreferenceActivity
|
|||
boolean fPassCodeEnabled = getResources().getBoolean(R.bool.passcode_enabled);
|
||||
boolean fDeviceCredentialsEnabled = getResources().getBoolean(R.bool.device_credentials_enabled);
|
||||
boolean fShowHiddenFilesEnabled = getResources().getBoolean(R.bool.show_hidden_files_enabled);
|
||||
boolean fShowEcosystemAppsEnabled = !getResources().getBoolean(R.bool.is_branded_client);
|
||||
boolean fSyncedFolderLightEnabled = getResources().getBoolean(R.bool.syncedFolder_light);
|
||||
boolean fShowMediaScanNotifications = preferences.isShowMediaScanNotifications();
|
||||
|
||||
|
@ -613,6 +615,8 @@ public class SettingsActivity extends PreferenceActivity
|
|||
|
||||
setupHiddenFilesPreference(preferenceCategoryDetails, fShowHiddenFilesEnabled);
|
||||
|
||||
setupShowEcosystemAppsPreference(preferenceCategoryDetails, fShowEcosystemAppsEnabled);
|
||||
|
||||
setupShowMediaScanNotifications(preferenceCategoryDetails, fShowMediaScanNotifications);
|
||||
|
||||
if (!fPassCodeEnabled && !fDeviceCredentialsEnabled && !fShowHiddenFilesEnabled && fSyncedFolderLightEnabled
|
||||
|
@ -644,6 +648,20 @@ public class SettingsActivity extends PreferenceActivity
|
|||
}
|
||||
}
|
||||
|
||||
private void setupShowEcosystemAppsPreference(PreferenceCategory preferenceCategoryDetails,
|
||||
boolean fShowEcosystemAppsEnabled) {
|
||||
showEcosystemApps = (ThemeableSwitchPreference) findPreference("show_ecosystem_apps");
|
||||
if (fShowEcosystemAppsEnabled) {
|
||||
showEcosystemApps.setOnPreferenceClickListener(preference -> {
|
||||
preferences.setShowEcosystemApps(showEcosystemApps.isChecked());
|
||||
return true;
|
||||
});
|
||||
} else {
|
||||
preferenceCategoryDetails.removePreference(showEcosystemApps);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void setupLockPreference(PreferenceCategory preferenceCategoryDetails,
|
||||
boolean passCodeEnabled,
|
||||
boolean deviceCredentialsEnabled) {
|
||||
|
|
38
app/src/main/res/drawable/ic_more_apps.xml
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Nextcloud Android client application
|
||||
|
||||
Copyright (C) 2023 Nextcloud GmbH
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
License as published by the Free Software Foundation; either
|
||||
version 3 of the License, or any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public
|
||||
License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="16dp"
|
||||
android:height="16dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="m4.425,1.5c-0.495,0 -0.893,0.398 -0.893,0.893l0,1.786c0,0.495 0.398,0.893 0.893,0.893s0.893,-0.398 0.893,-0.893l0,-1.786c0,-0.495 -0.398,-0.893 -0.893,-0.893zM11.568,1.5c-0.495,0 -0.893,0.398 -0.893,0.893l0,1.786c0,0.495 0.398,0.893 0.893,0.893s0.893,-0.398 0.893,-0.893l0,-1.786c0,-0.495 -0.398,-0.893 -0.893,-0.893zM5.764,3.286l0,0.893c0,0.742 -0.597,1.339 -1.339,1.339s-1.339,-0.597 -1.339,-1.339l0,-0.837c-0.771,0.198 -1.339,0.895 -1.339,1.73l0,7.143c0,0.989 0.796,1.786 1.786,1.786l8.929,0c0.989,0 1.786,-0.796 1.786,-1.786l0,-7.143c0,-0.835 -0.568,-1.532 -1.339,-1.73l0,0.837c0,0.742 -0.597,1.339 -1.339,1.339s-1.339,-0.597 -1.339,-1.339l0,-0.893zM3.128,7.304l9.738,0c0.025,0 0.042,0.017 0.042,0.042l0,5.273c0,0.025 -0.017,0.042 -0.042,0.042l-9.738,0c-0.025,0 -0.042,-0.017 -0.042,-0.042l0,-5.273c0,-0.025 0.017,-0.042 0.042,-0.042z"
|
||||
android:strokeWidth="1.786" />
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="m20.551,3.041c-0.96,0 -1.774,0.702 -1.774,1.608 0.007,0.286 0.032,0.64 0.203,1.386v0.019l0.019,0.018c0.055,0.157 0.135,0.247 0.24,0.37s0.231,0.267 0.351,0.388c0.014,0.014 0.023,0.023 0.037,0.037 0.024,0.103 0.052,0.214 0.074,0.314 0.057,0.265 0.051,0.453 0.037,0.517 -0.412,0.145 -0.926,0.317 -1.386,0.517 -0.259,0.112 -0.492,0.213 -0.684,0.333 -0.191,0.12 -0.382,0.211 -0.444,0.481 -0.001,0.012 -0.001,0.025 0,0.037 -0.06,0.555 -0.152,1.371 -0.222,1.922 -0.015,0.116 0.046,0.238 0.148,0.296 0.836,0.452 2.121,0.633 3.401,0.628 1.28,-0.005 2.555,-0.197 3.364,-0.628 0.102,-0.058 0.163,-0.18 0.148,-0.296 -0.022,-0.172 -0.05,-0.561 -0.074,-0.943 -0.024,-0.382 -0.045,-0.758 -0.074,-0.98 -0.01,-0.055 -0.036,-0.107 -0.074,-0.148 -0.257,-0.307 -0.641,-0.495 -1.09,-0.684 -0.41,-0.173 -0.891,-0.352 -1.368,-0.554 -0.027,-0.059 -0.053,-0.232 0,-0.499 0.014,-0.072 0.037,-0.148 0.055,-0.222 0.045,-0.05 0.08,-0.091 0.129,-0.148 0.106,-0.121 0.22,-0.248 0.314,-0.37 0.095,-0.122 0.172,-0.227 0.222,-0.37l0.018,-0.019c0.193,-0.78 0.193,-1.105 0.203,-1.386v-0.019c0,-0.906 -0.814,-1.608 -1.774,-1.608zM25.627,1.565c-1.4,0 -2.587,1.024 -2.587,2.344 0.01,0.417 0.047,0.932 0.296,2.021v0.027l0.027,0.027c0.08,0.229 0.196,0.36 0.35,0.539 0.154,0.179 0.337,0.389 0.512,0.566 0.021,0.021 0.034,0.034 0.054,0.054 0.035,0.151 0.077,0.313 0.108,0.458 0.083,0.387 0.075,0.661 0.054,0.755 -0.601,0.211 -1.35,0.463 -2.021,0.755 -0.377,0.164 -0.718,0.31 -0.997,0.485 -0.279,0.175 -0.557,0.307 -0.647,0.701 -0.001,0.018 -0.001,0.036 0,0.054 -0.088,0.809 -0.221,1.999 -0.323,2.803 -0.022,0.169 0.067,0.347 0.216,0.431 1.219,0.658 3.092,0.924 4.958,0.916 1.867,-0.007 3.724,-0.288 4.904,-0.916 0.148,-0.084 0.238,-0.262 0.216,-0.431 -0.033,-0.251 -0.072,-0.817 -0.108,-1.374 -0.035,-0.557 -0.066,-1.105 -0.108,-1.428 -0.015,-0.08 -0.052,-0.156 -0.108,-0.216 -0.375,-0.448 -0.935,-0.721 -1.59,-0.997 -0.598,-0.252 -1.299,-0.513 -1.994,-0.808 -0.039,-0.087 -0.078,-0.339 0,-0.728 0.021,-0.104 0.053,-0.216 0.081,-0.323 0.065,-0.073 0.116,-0.133 0.189,-0.216 0.154,-0.176 0.32,-0.361 0.458,-0.539 0.138,-0.178 0.251,-0.331 0.323,-0.539l0.027,-0.027c0.282,-1.137 0.282,-1.611 0.297,-2.021v-0.027c0,-1.321 -1.187,-2.344 -2.587,-2.344z" />
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="m1.778,19.75c-0.431,0 -0.778,0.347 -0.778,0.778v7.195c0,0.431 0.347,0.777 0.778,0.777h12.444c0.431,0 0.778,-0.346 0.778,-0.777v-7.195c0,-0.431 -0.347,-0.778 -0.778,-0.778zM2.434,20.65 L7.757,25.973h0.462l5.347,-5.323 0.535,0.535 -3.184,3.233 2.406,2.455 -0.535,0.535 -2.455,-2.455 -1.774,1.799h-1.117l-1.774,-1.798 -2.455,2.479 -0.535,-0.559 2.431,-2.454 -3.208,-3.233z" />
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="m18.5,22.25a1.75,1.75 0,1 1,0 3.5,1.75 1.75,0 0,1 0,-3.5zM24,22.25a1.75,1.75 0,1 1,0 3.5,1.75 1.75,0 0,1 0,-3.5zM29.5,22.25a1.75,1.75 0,1 1,0 3.5,1.75 1.75,0 1,1 0,-3.5z" />
|
||||
</vector>
|
29
app/src/main/res/drawable/ic_notes.xml
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Nextcloud Android client application
|
||||
|
||||
Copyright (C) 2023 Nextcloud GmbH
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
License as published by the Free Software Foundation; either
|
||||
version 3 of the License, or any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public
|
||||
License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="16dp"
|
||||
android:height="16dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"
|
||||
android:strokeWidth=".14" />
|
||||
</vector>
|
26
app/src/main/res/drawable/white_outline.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Nextcloud Android client application
|
||||
|
||||
@author ZetaTom
|
||||
Copyright (C) 2023 ZetaTom
|
||||
Copyright (C) 2023 Nextcloud GmbH
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/white" />
|
||||
</shape>
|
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Nextcloud Android client application
|
||||
|
||||
Copyright (C) 2016 Andy Scherzinger
|
||||
|
@ -20,30 +19,146 @@
|
|||
License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_header_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/drawer_header_height"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/primary"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="horizontal"
|
||||
tools:background="@color/primary">
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/drawer_header_logo"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="@dimen/standard_margin"
|
||||
android:contentDescription="@null"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/nextcloud_logo" />
|
||||
android:layout_height="96dp"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="@dimen/standard_padding"
|
||||
android:paddingTop="@dimen/standard_padding"
|
||||
android:paddingBottom="@dimen/standard_half_padding">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/drawer_header_server_name"
|
||||
<ImageView
|
||||
android:id="@+id/drawer_header_logo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@null"
|
||||
android:maxWidth="96dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/nextcloud_logo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/drawer_header_server_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="@dimen/standard_half_margin"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="sans-serif"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/text_color_inverse"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
tools:ignore="RtlHardcoded"
|
||||
tools:text="Nextcloud" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/drawer_ecosystem_apps"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:ellipsize="middle"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="Custom Server Name" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/standard_half_margin"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/drawer_ecosystem_talk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="4dp"
|
||||
android:background="@drawable/white_outline"
|
||||
android:contentDescription="@string/ecosystem_apps_talk"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_talk"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/ecosystem_apps_display_talk"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/drawer_ecosystem_notes"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/standard_double_margin"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="4dp"
|
||||
android:background="@drawable/white_outline"
|
||||
android:contentDescription="@string/ecosystem_apps_notes"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_notes"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/ecosystem_apps_display_notes"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/drawer_ecosystem_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="4dp"
|
||||
android:background="@drawable/white_outline"
|
||||
android:contentDescription="@string/ecosystem_apps_more"
|
||||
android:padding="8dp"
|
||||
android:src="@drawable/ic_more_apps"
|
||||
app:tint="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/ecosystem_apps_display_more"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -40,8 +40,7 @@
|
|||
<color name="grey_200">#EEEEEE</color>
|
||||
<color name="grey_400">#BDBDBD</color>
|
||||
<color name="grey_600">#666666</color>
|
||||
|
||||
<!-- standard material color definitions -->
|
||||
<color name="grey_800_transparent">#CC000000</color>
|
||||
|
||||
<!-- level colors for info notifications/visualisations -->
|
||||
<color name="infolevel_warning">#e9322d</color>
|
||||
|
|
|
@ -135,7 +135,6 @@
|
|||
<dimen name="permission_dialog_text_size">18sp</dimen>
|
||||
<dimen name="button_corner_radius">24dp</dimen>
|
||||
<integer name="media_grid_width">4</integer>
|
||||
<dimen name="drawer_header_height">130dp</dimen>
|
||||
<dimen name="account_action_button_margin">12dp</dimen>
|
||||
<dimen name="account_action_button_height">50dp</dimen>
|
||||
<dimen name="account_action_button_vertical_margin">10dp</dimen>
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
<string name="prefs_lock_device_credentials_enabled">Device credentials enabled</string>
|
||||
<string name="prefs_lock_device_credentials_not_setup">No device credentials have been set up.</string>
|
||||
<string name="prefs_show_hidden_files">Show hidden files</string>
|
||||
<string name="prefs_show_ecosystem_apps">Show app switcher</string>
|
||||
<string name="prefs_show_ecosystem_apps_summary">Nextcloud app suggestions in navigation heading</string>
|
||||
<string name="prefs_enable_media_scan_notifications">Show media scan notifications</string>
|
||||
<string name="prefs_enable_media_scan_notifications_summary">Notify about newly found media folders</string>
|
||||
<string name="prefs_calendar_contacts">Sync calendar & contacts</string>
|
||||
|
@ -853,6 +855,7 @@
|
|||
<string name="reshare_not_allowed">Resharing is not allowed</string>
|
||||
<string name="retrieving_file">Retrieving file…</string>
|
||||
<string name="associated_account_not_found">Associated account not found!</string>
|
||||
<string name="logged_in_as">Logged in as %1$s</string>
|
||||
<string name="error_retrieving_file">Error retrieving file</string>
|
||||
<string name="could_not_retrieve_url">Could not retrieve URL</string>
|
||||
<string name="failed_to_download">Failed to pass file to download manager</string>
|
||||
|
@ -970,6 +973,7 @@
|
|||
<string name="wrong_storage_path">Data storage folder does not exist!</string>
|
||||
<string name="wrong_storage_path_desc">This might be due to a backup restore on another device. Falling back to default. Please check settings to adjust data storage folder.</string>
|
||||
<string name="dialog_close">Close</string>
|
||||
<string name="direct_login_text">Login with %1$s to %2$s</string>
|
||||
<string name="direct_login_failed">Login via direct link failed!</string>
|
||||
<string name="login_url_helper_text">The link to your %1$s web interface when you open it in the browser.</string>
|
||||
<string name="brute_force_delay">Delayed due to too many wrong attempts</string>
|
||||
|
@ -1088,4 +1092,10 @@
|
|||
<string name="image_editor_flip_vertical">Flip vertically</string>
|
||||
<string name="image_editor_unable_to_edit_image">Unable to edit image.</string>
|
||||
<string name="image_editor_file_edited_suffix">edited</string>
|
||||
<string name="ecosystem_apps_notes">Nextcloud Notes</string>
|
||||
<string name="ecosystem_apps_talk">Nextcloud Talk</string>
|
||||
<string name="ecosystem_apps_more">More Nextcloud Apps</string>
|
||||
<string name="ecosystem_apps_display_notes">Notes</string>
|
||||
<string name="ecosystem_apps_display_talk">Talk</string>
|
||||
<string name="ecosystem_apps_display_more">More</string>
|
||||
</resources>
|
||||
|
|
|
@ -50,9 +50,12 @@
|
|||
android:dialogTitle="@string/prefs_lock_title"
|
||||
android:defaultValue="none"/>
|
||||
<com.owncloud.android.ui.ThemeableSwitchPreference
|
||||
|
||||
android:title="@string/prefs_show_hidden_files"
|
||||
android:key="show_hidden_files"/>
|
||||
<com.owncloud.android.ui.ThemeableSwitchPreference
|
||||
android:title="@string/prefs_show_ecosystem_apps"
|
||||
android:key="show_ecosystem_apps"
|
||||
android:summary="@string/prefs_show_ecosystem_apps_summary"/>
|
||||
<com.owncloud.android.ui.ThemeableSwitchPreference
|
||||
android:title="@string/prefs_enable_media_scan_notifications"
|
||||
android:summary="@string/prefs_enable_media_scan_notifications_summary"
|
||||
|
|