Merge pull request #3237 from nextcloud/materialDesignRevamp

Material design revamp
This commit is contained in:
Andy Scherzinger 2019-01-12 16:17:15 +01:00 committed by GitHub
commit a201dae5e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 440 additions and 337 deletions

View file

@ -235,7 +235,7 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
/** /**
* {@inheritDoc} * {@inheritDoc}
* * <p>
* Updates action bar and second fragment, if in dual pane mode. * Updates action bar and second fragment, if in dual pane mode.
*/ */
@Override @Override
@ -411,13 +411,17 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
*/ */
private void initControls() { private void initControls() {
mCancelBtn = findViewById(R.id.folder_picker_btn_cancel); mCancelBtn = findViewById(R.id.folder_picker_btn_cancel);
mCancelBtn.setOnClickListener(this);
mChooseBtn = findViewById(R.id.folder_picker_btn_choose); mChooseBtn = findViewById(R.id.folder_picker_btn_choose);
if (mChooseBtn != null) { if (mChooseBtn != null) {
mChooseBtn.getBackground().setColorFilter(ThemeUtils.primaryColor(this, true), PorterDuff.Mode.SRC_ATOP); mChooseBtn.getBackground().setColorFilter(ThemeUtils.primaryColor(this, true), PorterDuff.Mode.SRC_ATOP);
mChooseBtn.setOnClickListener(this); mChooseBtn.setOnClickListener(this);
} }
if (mCancelBtn != null) {
mCancelBtn.setTextColor(ThemeUtils.primaryColor(this, true));
mCancelBtn.setOnClickListener(this);
}
} }
@Override @Override

View file

@ -81,7 +81,8 @@ public class LogHistoryActivity extends ToolbarActivity {
} }
Button deleteHistoryButton = findViewById(R.id.deleteLogHistoryButton); Button deleteHistoryButton = findViewById(R.id.deleteLogHistoryButton);
Button sendHistoryButton = findViewById(R.id.sendLogHistoryButton); Button sendHistoryButton = findViewById(R.id.sendLogHistoryButton);
sendHistoryButton.getBackground().setColorFilter(ThemeUtils.primaryAccentColor(this), PorterDuff.Mode.SRC_ATOP); sendHistoryButton.getBackground().setColorFilter(ThemeUtils.primaryColor(this), PorterDuff.Mode.SRC_ATOP);
deleteHistoryButton.setTextColor(ThemeUtils.primaryColor(this, true));
TextView logTV = findViewById(R.id.logTV); TextView logTV = findViewById(R.id.logTV);
deleteHistoryButton.setOnClickListener(new OnClickListener() { deleteHistoryButton.setOnClickListener(new OnClickListener() {

View file

@ -30,12 +30,11 @@ import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;
import com.google.android.material.button.MaterialButton;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.utils.DisplayUtils; import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.ThemeUtils; import com.owncloud.android.utils.ThemeUtils;
import androidx.appcompat.widget.AppCompatButton;
/** /**
* Activity providing information about ways to participate in the app's development. * Activity providing information about ways to participate in the app's development.
*/ */
@ -93,8 +92,8 @@ public class ParticipateActivity extends FileActivity {
ThemeUtils.colorToHexString(ThemeUtils.primaryColor(this, true)), ThemeUtils.colorToHexString(ThemeUtils.primaryColor(this, true)),
getString(R.string.contributing_link))))); getString(R.string.contributing_link)))));
AppCompatButton reportButton = findViewById(R.id.participate_testing_report); MaterialButton reportButton = findViewById(R.id.participate_testing_report);
reportButton.getBackground().setColorFilter(ThemeUtils.primaryAccentColor(this), PorterDuff.Mode.SRC_ATOP); reportButton.getBackground().setColorFilter(ThemeUtils.primaryColor(this), PorterDuff.Mode.SRC_ATOP);
reportButton.setOnClickListener(v -> DisplayUtils.startLinkIntent(this, R.string.report_issue_link)); reportButton.setOnClickListener(v -> DisplayUtils.startLinkIntent(this, R.string.report_issue_link));
} }

View file

@ -761,7 +761,7 @@ public class Preferences extends PreferenceActivity
.getColor(getResources(), R.color.background_color, null))); .getColor(getResources(), R.color.background_color, null)));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
window.setStatusBarColor(ThemeUtils.primaryDarkColor(this)); window.setStatusBarColor(ThemeUtils.primaryColor(this));
} }
// For adding content description tag to a title field in the action bar // For adding content description tag to a title field in the action bar

View file

@ -789,7 +789,7 @@ public class ReceiveExternalFilesActivity extends FileActivity
ThemeUtils.primaryColor(getAccount(), false, this))); ThemeUtils.primaryColor(getAccount(), false, this)));
} }
ThemeUtils.colorStatusBar(this, ThemeUtils.primaryDarkColor(getAccount(), this)); ThemeUtils.colorStatusBar(this, ThemeUtils.primaryColor(getAccount(), false, this));
ThemeUtils.colorToolbarProgressBar(this, ThemeUtils.primaryColor(getAccount(), false, this)); ThemeUtils.colorToolbarProgressBar(this, ThemeUtils.primaryColor(getAccount(), false, this));
@ -800,6 +800,7 @@ public class ReceiveExternalFilesActivity extends FileActivity
} }
Button btnNewFolder = findViewById(R.id.uploader_cancel); Button btnNewFolder = findViewById(R.id.uploader_cancel);
btnNewFolder.setTextColor(ThemeUtils.primaryColor(this, true));
btnNewFolder.setOnClickListener(this); btnNewFolder.setOnClickListener(this);
mListView.setOnItemClickListener(this); mListView.setOnItemClickListener(this);

View file

@ -63,7 +63,6 @@ public abstract class ToolbarActivity extends BaseActivity {
*/ */
protected void setupToolbar(boolean useBackgroundImage) { protected void setupToolbar(boolean useBackgroundImage) {
int primaryColor = ThemeUtils.primaryColor(this, false); int primaryColor = ThemeUtils.primaryColor(this, false);
int primaryDarkColor = ThemeUtils.primaryDarkColor(this);
int fontColor = ThemeUtils.fontColor(this); int fontColor = ThemeUtils.fontColor(this);
Toolbar toolbar = findViewById(R.id.toolbar); Toolbar toolbar = findViewById(R.id.toolbar);
@ -74,14 +73,14 @@ public abstract class ToolbarActivity extends BaseActivity {
mProgressBar.setIndeterminateDrawable( mProgressBar.setIndeterminateDrawable(
ContextCompat.getDrawable(this, R.drawable.actionbar_progress_indeterminate_horizontal)); ContextCompat.getDrawable(this, R.drawable.actionbar_progress_indeterminate_horizontal));
ThemeUtils.colorToolbarProgressBar(this, ThemeUtils.primaryColor(this, false)); ThemeUtils.colorToolbarProgressBar(this, primaryColor);
} }
mInfoBox = findViewById(R.id.info_box); mInfoBox = findViewById(R.id.info_box);
mInfoBoxMessage = findViewById(R.id.info_box_message); mInfoBoxMessage = findViewById(R.id.info_box_message);
mPreviewImage = findViewById(R.id.preview_image); mPreviewImage = findViewById(R.id.preview_image);
ThemeUtils.colorStatusBar(this, primaryDarkColor); ThemeUtils.colorStatusBar(this, primaryColor);
if (toolbar.getOverflowIcon() != null) { if (toolbar.getOverflowIcon() != null) {
ThemeUtils.tintDrawable(toolbar.getOverflowIcon(), fontColor); ThemeUtils.tintDrawable(toolbar.getOverflowIcon(), fontColor);

View file

@ -42,6 +42,7 @@ import android.widget.ImageView;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.TextView; import android.widget.TextView;
import com.google.android.material.button.MaterialButton;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.db.PreferenceManager; import com.owncloud.android.db.PreferenceManager;
import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.lib.common.utils.Log_OC;
@ -62,7 +63,6 @@ import java.util.List;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.AppCompatButton;
import androidx.appcompat.widget.AppCompatSpinner; import androidx.appcompat.widget.AppCompatSpinner;
import androidx.appcompat.widget.SearchView; import androidx.appcompat.widget.SearchView;
import androidx.core.view.MenuItemCompat; import androidx.core.view.MenuItemCompat;
@ -160,17 +160,19 @@ public class UploadFilesActivity extends FileActivity implements
if (mLocalFolderPickerMode) { if (mLocalFolderPickerMode) {
findViewById(R.id.upload_options).setVisibility(View.GONE); findViewById(R.id.upload_options).setVisibility(View.GONE);
((AppCompatButton) findViewById(R.id.upload_files_btn_upload)) ((MaterialButton) findViewById(R.id.upload_files_btn_upload))
.setText(R.string.uploader_btn_alternative_text); .setText(R.string.uploader_btn_alternative_text);
} }
mFileListFragment = (LocalFileListFragment) getSupportFragmentManager().findFragmentById(R.id.local_files_list); mFileListFragment = (LocalFileListFragment) getSupportFragmentManager().findFragmentById(R.id.local_files_list);
// Set input controllers // Set input controllers
findViewById(R.id.upload_files_btn_cancel).setOnClickListener(this); MaterialButton mCancelButton = findViewById(R.id.upload_files_btn_cancel);
mCancelButton.setTextColor(ThemeUtils.primaryColor(this, true));
mCancelButton.setOnClickListener(this);
mUploadBtn = (AppCompatButton) findViewById(R.id.upload_files_btn_upload); mUploadBtn = findViewById(R.id.upload_files_btn_upload);
mUploadBtn.getBackground().setColorFilter(ThemeUtils.primaryAccentColor(this), PorterDuff.Mode.SRC_ATOP); mUploadBtn.getBackground().setColorFilter(ThemeUtils.primaryColor(this, true), PorterDuff.Mode.SRC_ATOP);
mUploadBtn.setOnClickListener(this); mUploadBtn.setOnClickListener(this);
int localBehaviour = PreferenceManager.getUploaderBehaviour(this); int localBehaviour = PreferenceManager.getUploaderBehaviour(this);

View file

@ -338,7 +338,7 @@ public class UserInfoActivity extends FileActivity {
public void onStart() { public void onStart() {
super.onStart(); super.onStart();
int color = ThemeUtils.primaryAccentColor(getActivity()); int color = ThemeUtils.primaryColor(getActivity());
AlertDialog alertDialog = (AlertDialog) getDialog(); AlertDialog alertDialog = (AlertDialog) getDialog();

View file

@ -34,7 +34,6 @@ import android.text.style.StyleSpan;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
@ -45,6 +44,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.model.StreamEncoder; import com.bumptech.glide.load.model.StreamEncoder;
import com.bumptech.glide.load.resource.file.FileToStreamDecoder; import com.bumptech.glide.load.resource.file.FileToStreamDecoder;
import com.caverock.androidsvg.SVG; import com.caverock.androidsvg.SVG;
import com.google.android.material.button.MaterialButton;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.lib.common.OwnCloudClient; import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.operations.RemoteOperation; import com.owncloud.android.lib.common.operations.RemoteOperation;
@ -135,12 +135,13 @@ public class NotificationListAdapter extends RecyclerView.Adapter<NotificationLi
// add action buttons // add action buttons
holder.buttons.removeAllViews(); holder.buttons.removeAllViews();
Button button; MaterialButton button;
for (Action action : notification.getActions()) { for (Action action : notification.getActions()) {
button = new Button(notificationsActivity); button = new MaterialButton(notificationsActivity);
button.setText(action.label); button.setText(action.label);
button.setCornerRadiusResource(R.dimen.button_corner_radius);
if (action.primary) { if (action.primary) {
button.getBackground().setColorFilter(ThemeUtils.primaryColor(notificationsActivity, true), button.getBackground().setColorFilter(ThemeUtils.primaryColor(notificationsActivity, true),

View file

@ -26,13 +26,14 @@ import android.graphics.Rect;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.AttributeSet; import android.util.AttributeSet;
import com.google.android.material.textfield.TextInputEditText;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.authentication.AuthenticatorActivity; import com.owncloud.android.authentication.AuthenticatorActivity;
/** /**
* Custom edit text to support fixed suffix or prefix * Custom edit text to support fixed suffix or prefix
*/ */
public class CustomEditText extends androidx.appcompat.widget.AppCompatEditText { public class CustomEditText extends TextInputEditText {
private Rect fixedRect = new Rect(); private Rect fixedRect = new Rect();
private String fixedText = ""; private String fixedText = "";
private boolean isPrefixFixed; private boolean isPrefixFixed;

View file

@ -24,14 +24,14 @@ package com.owncloud.android.ui.dialog;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.Dialog; import android.app.Dialog;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.graphics.PorterDuff;
import android.os.Bundle; import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.Window; import android.view.Window;
import android.view.WindowManager.LayoutParams; import android.view.WindowManager.LayoutParams;
import android.widget.EditText;
import com.google.android.material.textfield.TextInputEditText;
import com.google.android.material.textfield.TextInputLayout;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.lib.resources.shares.OCShare; import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.ui.activity.ComponentsGetter; import com.owncloud.android.ui.activity.ComponentsGetter;
@ -58,8 +58,11 @@ public class NoteDialogFragment extends DialogFragment implements DialogInterfac
private OCShare share; private OCShare share;
private Unbinder unbinder; private Unbinder unbinder;
@BindView(R.id.user_input_container)
public TextInputLayout noteEditTextInputLayout;
@BindView(R.id.user_input) @BindView(R.id.user_input)
EditText noteEditText; public TextInputEditText noteEditText;
public static NoteDialogFragment newInstance(OCShare share) { public static NoteDialogFragment newInstance(OCShare share) {
NoteDialogFragment frag = new NoteDialogFragment(); NoteDialogFragment frag = new NoteDialogFragment();
@ -107,7 +110,7 @@ public class NoteDialogFragment extends DialogFragment implements DialogInterfac
// Setup layout // Setup layout
noteEditText.setText(share.getNote()); noteEditText.setText(share.getNote());
noteEditText.requestFocus(); noteEditText.requestFocus();
noteEditText.getBackground().setColorFilter(accentColor, PorterDuff.Mode.SRC_ATOP); ThemeUtils.colorTextInputLayout(noteEditTextInputLayout, accentColor);
// Build the dialog // Build the dialog
AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity()); AlertDialog.Builder builder = new AlertDialog.Builder(requireActivity());

View file

@ -124,7 +124,7 @@ public class SetupEncryptionDialogFragment extends DialogFragment {
@NonNull @NonNull
@Override @Override
public Dialog onCreateDialog(Bundle savedInstanceState) { public Dialog onCreateDialog(Bundle savedInstanceState) {
int accentColor = ThemeUtils.primaryAccentColor(getContext()); int primaryColor = ThemeUtils.primaryColor(getContext());
account = getArguments().getParcelable(ARG_ACCOUNT); account = getArguments().getParcelable(ARG_ACCOUNT);
arbitraryDataProvider = new ArbitraryDataProvider(getContext().getContentResolver()); arbitraryDataProvider = new ArbitraryDataProvider(getContext().getContentResolver());
@ -137,13 +137,13 @@ public class SetupEncryptionDialogFragment extends DialogFragment {
textView = v.findViewById(R.id.encryption_status); textView = v.findViewById(R.id.encryption_status);
passphraseTextView = v.findViewById(R.id.encryption_passphrase); passphraseTextView = v.findViewById(R.id.encryption_passphrase);
passwordField = v.findViewById(R.id.encryption_passwordInput); passwordField = v.findViewById(R.id.encryption_passwordInput);
passwordField.getBackground().setColorFilter(accentColor, PorterDuff.Mode.SRC_ATOP); passwordField.getBackground().setColorFilter(primaryColor, PorterDuff.Mode.SRC_ATOP);
Drawable wrappedDrawable = DrawableCompat.wrap(passwordField.getBackground()); Drawable wrappedDrawable = DrawableCompat.wrap(passwordField.getBackground());
DrawableCompat.setTint(wrappedDrawable, accentColor); DrawableCompat.setTint(wrappedDrawable, primaryColor);
passwordField.setBackgroundDrawable(wrappedDrawable); passwordField.setBackgroundDrawable(wrappedDrawable);
return createDialog(accentColor, v); return createDialog(primaryColor, v);
} }
@NonNull @NonNull

View file

@ -30,13 +30,13 @@ import android.view.ViewGroup;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.TextView; import android.widget.TextView;
import com.google.android.material.button.MaterialButton;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.utils.FileSortOrder; import com.owncloud.android.utils.FileSortOrder;
import com.owncloud.android.utils.ThemeUtils; import com.owncloud.android.utils.ThemeUtils;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatButton;
import androidx.fragment.app.DialogFragment; import androidx.fragment.app.DialogFragment;
/** /**
@ -51,7 +51,7 @@ public class SortingOrderDialogFragment extends DialogFragment {
private View mView; private View mView;
private View[] mTaggedViews; private View[] mTaggedViews;
private AppCompatButton mCancel; private MaterialButton mCancel;
private String mCurrentSortOrderName; private String mCurrentSortOrderName;
public static SortingOrderDialogFragment newInstance(FileSortOrder sortOrder) { public static SortingOrderDialogFragment newInstance(FileSortOrder sortOrder) {

View file

@ -34,6 +34,7 @@ import android.view.View.OnClickListener;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.TextView; import android.widget.TextView;
import com.google.android.material.button.MaterialButton;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.datamodel.MediaFolderType; import com.owncloud.android.datamodel.MediaFolderType;
import com.owncloud.android.datamodel.SyncedFolderDisplayItem; import com.owncloud.android.datamodel.SyncedFolderDisplayItem;
@ -49,7 +50,6 @@ import java.io.File;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.AppCompatButton;
import androidx.appcompat.widget.AppCompatCheckBox; import androidx.appcompat.widget.AppCompatCheckBox;
import androidx.appcompat.widget.SwitchCompat; import androidx.appcompat.widget.SwitchCompat;
import androidx.fragment.app.DialogFragment; import androidx.fragment.app.DialogFragment;
@ -78,8 +78,8 @@ public class SyncedFolderPreferencesDialogFragment extends DialogFragment {
private TextView mRemoteFolderSummary; private TextView mRemoteFolderSummary;
private SyncedFolderParcelable mSyncedFolder; private SyncedFolderParcelable mSyncedFolder;
private AppCompatButton mCancel; private MaterialButton mCancel;
private AppCompatButton mSave; private MaterialButton mSave;
private boolean behaviourDialogShown; private boolean behaviourDialogShown;
private AlertDialog behaviourDialog; private AlertDialog behaviourDialog;

View file

@ -199,7 +199,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setHasOptionsMenu(true); setHasOptionsMenu(true);
mSystemBarActionModeColor = getResources().getColor(R.color.action_mode_status_bar_background); mSystemBarActionModeColor = getResources().getColor(R.color.action_mode_status_bar_background);
mSystemBarColor = ThemeUtils.primaryDarkColor(getContext()); mSystemBarColor = ThemeUtils.primaryColor(getContext());
mProgressBarActionModeColor = getResources().getColor(R.color.action_mode_background); mProgressBarActionModeColor = getResources().getColor(R.color.action_mode_background);
mProgressBarColor = ThemeUtils.primaryColor(getContext()); mProgressBarColor = ThemeUtils.primaryColor(getContext());
mMultiChoiceModeListener = new MultiChoiceModeListener(); mMultiChoiceModeListener = new MultiChoiceModeListener();

View file

@ -39,6 +39,7 @@ import android.widget.ListView;
import android.widget.ScrollView; import android.widget.ScrollView;
import android.widget.TextView; import android.widget.TextView;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.datamodel.OCFile;
@ -60,7 +61,6 @@ import java.util.Date;
import java.util.List; import java.util.List;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatButton;
import androidx.appcompat.widget.SwitchCompat; import androidx.appcompat.widget.SwitchCompat;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
@ -717,8 +717,8 @@ public class ShareFileFragment extends Fragment implements ShareUserListAdapter.
} }
// GetLink button // GetLink button
AppCompatButton getLinkButton = getGetLinkButton(); MaterialButton getLinkButton = getGetLinkButton();
getLinkButton.getBackground().setColorFilter(ThemeUtils.primaryAccentColor(getContext()), getLinkButton.getBackground().setColorFilter(ThemeUtils.primaryColor(getContext()),
PorterDuff.Mode.SRC_ATOP); PorterDuff.Mode.SRC_ATOP);
getLinkButton.setVisibility(View.VISIBLE); getLinkButton.setVisibility(View.VISIBLE);
getLinkButton.setOnClickListener(new View.OnClickListener() { getLinkButton.setOnClickListener(new View.OnClickListener() {
@ -873,8 +873,8 @@ public class ShareFileFragment extends Fragment implements ShareUserListAdapter.
return getView().findViewById(R.id.shareViaLinkHideFileListingPermissionSection); return getView().findViewById(R.id.shareViaLinkHideFileListingPermissionSection);
} }
private AppCompatButton getGetLinkButton() { private MaterialButton getGetLinkButton() {
return (AppCompatButton) getView().findViewById(R.id.shareViaLinkGetLinkButton); return (MaterialButton) getView().findViewById(R.id.shareViaLinkGetLinkButton);
} }
/** /**

View file

@ -690,7 +690,7 @@ class ContactListAdapter extends RecyclerView.Adapter<ContactListFragment.Contac
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
if (checked) { if (checked) {
checkedTextView.getCheckMarkDrawable() checkedTextView.getCheckMarkDrawable()
.setColorFilter(ThemeUtils.primaryAccentColor(context), PorterDuff.Mode.SRC_ATOP); .setColorFilter(ThemeUtils.primaryColor(context), PorterDuff.Mode.SRC_ATOP);
} else { } else {
checkedTextView.getCheckMarkDrawable().clearColorFilter(); checkedTextView.getCheckMarkDrawable().clearColorFilter();
} }
@ -703,7 +703,7 @@ class ContactListAdapter extends RecyclerView.Adapter<ContactListFragment.Contac
if (holder.getName().isChecked()) { if (holder.getName().isChecked()) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
holder.getName().getCheckMarkDrawable() holder.getName().getCheckMarkDrawable()
.setColorFilter(ThemeUtils.primaryAccentColor(context), PorterDuff.Mode.SRC_ATOP); .setColorFilter(ThemeUtils.primaryColor(context), PorterDuff.Mode.SRC_ATOP);
} }
checkedVCards.add(verifiedPosition); checkedVCards.add(verifiedPosition);

View file

@ -39,6 +39,7 @@ import android.widget.TextView;
import com.evernote.android.job.JobRequest; import com.evernote.android.job.JobRequest;
import com.evernote.android.job.util.support.PersistableBundleCompat; import com.evernote.android.job.util.support.PersistableBundleCompat;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.datamodel.ArbitraryDataProvider; import com.owncloud.android.datamodel.ArbitraryDataProvider;
@ -63,7 +64,6 @@ import java.util.List;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.AppCompatButton;
import androidx.appcompat.widget.SwitchCompat; import androidx.appcompat.widget.SwitchCompat;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import butterknife.BindView; import butterknife.BindView;
@ -81,13 +81,13 @@ public class ContactsBackupFragment extends FileFragment implements DatePickerDi
public SwitchCompat backupSwitch; public SwitchCompat backupSwitch;
@BindView(R.id.contacts_datepicker) @BindView(R.id.contacts_datepicker)
public AppCompatButton contactsDatePickerBtn; public MaterialButton contactsDatePickerBtn;
@BindView(R.id.contacts_last_backup_timestamp) @BindView(R.id.contacts_last_backup_timestamp)
public TextView lastBackup; public TextView lastBackup;
@BindView(R.id.contacts_backup_now) @BindView(R.id.contacts_backup_now)
public AppCompatButton backupNow; public MaterialButton backupNow;
private Date selectedDate; private Date selectedDate;
private boolean calendarPickerOpen; private boolean calendarPickerOpen;
@ -183,7 +183,7 @@ public class ContactsBackupFragment extends FileFragment implements DatePickerDi
contactsDatePickerBtn.getBackground().setColorFilter(accentColor, PorterDuff.Mode.SRC_ATOP); contactsDatePickerBtn.getBackground().setColorFilter(accentColor, PorterDuff.Mode.SRC_ATOP);
contactsDatePickerBtn.setTextColor(fontColor); contactsDatePickerBtn.setTextColor(fontColor);
AppCompatButton chooseDate = view.findViewById(R.id.contacts_datepicker); MaterialButton chooseDate = view.findViewById(R.id.contacts_datepicker);
chooseDate.getBackground().setColorFilter(accentColor, PorterDuff.Mode.SRC_ATOP); chooseDate.getBackground().setColorFilter(accentColor, PorterDuff.Mode.SRC_ATOP);
chooseDate.setTextColor(ThemeUtils.fontColor(getContext())); chooseDate.setTextColor(ThemeUtils.fontColor(getContext()));

View file

@ -40,6 +40,7 @@ import android.widget.SeekBar;
import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar; import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.textfield.TextInputLayout;
import com.owncloud.android.MainApp; import com.owncloud.android.MainApp;
import com.owncloud.android.R; import com.owncloud.android.R;
import com.owncloud.android.authentication.AccountUtils; import com.owncloud.android.authentication.AccountUtils;
@ -367,6 +368,26 @@ public final class ThemeUtils {
} }
} }
/**
* Sets the color of the TextInputLayout to {@code color} for hint text and box stroke.
*
* @param textInputLayout the TextInputLayout instance
* @param color the color to be used for the hint text and box stroke
*/
public static void colorTextInputLayout(TextInputLayout textInputLayout, int color) {
textInputLayout.setBoxStrokeColor(color);
textInputLayout.setDefaultHintTextColor(new ColorStateList(
new int[][]{
new int[]{-android.R.attr.state_focused},
new int[]{android.R.attr.state_focused},
},
new int[]{
Color.GRAY,
color
}
));
}
public static void tintCheckbox(AppCompatCheckBox checkBox, int color) { public static void tintCheckbox(AppCompatCheckBox checkBox, int color) {
CompoundButtonCompat.setButtonTintList(checkBox, new ColorStateList( CompoundButtonCompat.setButtonTintList(checkBox, new ColorStateList(
new int[][]{ new int[][]{

View file

@ -58,9 +58,8 @@
android:orientation="vertical" android:orientation="vertical"
android:padding="@dimen/standard_half_padding" > android:padding="@dimen/standard_half_padding" >
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/centeredRefreshButton" android:id="@+id/centeredRefreshButton"
style="@style/ownCloud.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
@ -68,7 +67,8 @@
android:theme="@style/Button" android:theme="@style/Button"
android:text="@string/auth_check_server" android:text="@string/auth_check_server"
android:visibility="gone" android:visibility="gone"
android:contentDescription="@string/auth_check_server"/> android:contentDescription="@string/auth_check_server"
app:cornerRadius="@dimen/button_corner_radius"/>
<TextView <TextView
android:id="@+id/instructions_message" android:id="@+id/instructions_message"
@ -175,7 +175,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/oAuthEntryPoint_1" android:id="@+id/oAuthEntryPoint_1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -197,7 +197,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/oAuthEntryPoint_2" android:id="@+id/oAuthEntryPoint_2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -220,7 +220,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"> android:visibility="gone">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/account_username" android:id="@+id/account_username"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -241,7 +241,7 @@
app:passwordToggleDrawable="@drawable/password_visibility_selector" app:passwordToggleDrawable="@drawable/password_visibility_selector"
app:passwordToggleTint="@color/white"> app:passwordToggleTint="@color/white">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/account_password" android:id="@+id/account_password"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -281,7 +281,7 @@
android:orientation="vertical" android:orientation="vertical"
android:paddingTop="@dimen/standard_half_padding"> android:paddingTop="@dimen/standard_half_padding">
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/buttonOK" android:id="@+id/buttonOK"
android:theme="@style/Button.Login" android:theme="@style/Button.Login"
style="@style/Button.Login" style="@style/Button.Login"
@ -292,7 +292,8 @@
android:enabled="false" android:enabled="false"
android:text="@string/setup_btn_connect" android:text="@string/setup_btn_connect"
android:contentDescription="@string/setup_btn_connect" android:contentDescription="@string/setup_btn_connect"
android:visibility="gone"/> android:visibility="visible"
app:cornerRadius="@dimen/button_corner_radius"/>
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>

View file

@ -50,9 +50,8 @@
android:orientation="vertical" android:orientation="vertical"
android:padding="@dimen/standard_half_padding"> android:padding="@dimen/standard_half_padding">
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/centeredRefreshButton" android:id="@+id/centeredRefreshButton"
style="@style/ownCloud.Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
@ -60,7 +59,8 @@
android:theme="@style/Button" android:theme="@style/Button"
android:text="@string/auth_check_server" android:text="@string/auth_check_server"
android:visibility="gone" android:visibility="gone"
android:contentDescription="@string/auth_check_server"/> android:contentDescription="@string/auth_check_server"
app:cornerRadius="@dimen/button_corner_radius"/>
<TextView <TextView
android:id="@+id/instructions_message" android:id="@+id/instructions_message"
@ -81,7 +81,7 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/input_layout_hostUrl" android:id="@+id/input_layout_hostUrl"
android:theme="@style/EditText" android:theme="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@ -168,7 +168,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/oAuthEntryPoint_1" android:id="@+id/oAuthEntryPoint_1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -190,7 +190,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/oAuthEntryPoint_2" android:id="@+id/oAuthEntryPoint_2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -209,12 +209,12 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/input_layout_account_username" android:id="@+id/input_layout_account_username"
android:theme="@style/EditText" android:theme="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="gone"> android:visibility="gone">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/account_username" android:id="@+id/account_username"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -231,12 +231,12 @@
android:id="@+id/input_layout_account_password" android:id="@+id/input_layout_account_password"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:theme="@style/EditText" android:theme="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:visibility="gone" android:visibility="gone"
app:passwordToggleDrawable="@drawable/password_visibility_selector" app:passwordToggleDrawable="@drawable/password_visibility_selector"
app:passwordToggleTint="@color/login_text_hint_color"> app:passwordToggleTint="@color/login_text_hint_color">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/account_password" android:id="@+id/account_password"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -262,7 +262,7 @@
android:textColor="@color/login_text_color" android:textColor="@color/login_text_color"
android:contentDescription="@string/auth_unauthorized"/> android:contentDescription="@string/auth_unauthorized"/>
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/buttonOK" android:id="@+id/buttonOK"
android:theme="@style/Button.Login" android:theme="@style/Button.Login"
style="@style/Button.Login" style="@style/Button.Login"
@ -273,7 +273,8 @@
android:enabled="false" android:enabled="false"
android:text="@string/setup_btn_connect" android:text="@string/setup_btn_connect"
android:contentDescription="@string/setup_btn_connect" android:contentDescription="@string/setup_btn_connect"
android:visibility="gone"/> android:visibility="gone"
app:cornerRadius="@dimen/button_corner_radius"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View file

@ -17,6 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -31,7 +32,7 @@
android:text="@string/manage_space_description" android:text="@string/manage_space_description"
/> />
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/manage_space_clear_data" android:text="@string/manage_space_clear_data"
@ -40,6 +41,7 @@
android:layout_margin="@dimen/standard_margin" android:layout_margin="@dimen/standard_margin"
android:theme="@style/Button.Primary" android:theme="@style/Button.Primary"
style="@style/Button.Primary" style="@style/Button.Primary"
android:contentDescription="@string/manage_space_clear_data"/> android:contentDescription="@string/manage_space_clear_data"
app:cornerRadius="@dimen/button_corner_radius" />
</LinearLayout> </LinearLayout>

View file

@ -47,7 +47,7 @@
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:text="Grant Nextcloud News access to your Nextcloud account incrediblyLong_username_with_123456789_number@Nextcloud_dummy.com?" /> tools:text="Grant Nextcloud News access to your Nextcloud account incrediblyLong_username_with_123456789_number@Nextcloud_dummy.com?" />
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/btnGrant" android:id="@+id/btnGrant"
style="@style/Button.Borderless" style="@style/Button.Borderless"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -56,7 +56,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" /> app:layout_constraintEnd_toEndOf="parent" />
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/btnDecline" android:id="@+id/btnDecline"
style="@style/Button.Borderless" style="@style/Button.Borderless"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -32,7 +32,7 @@
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1"></androidx.recyclerview.widget.RecyclerView> android:layout_weight="1"></androidx.recyclerview.widget.RecyclerView>
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/filename" android:id="@+id/filename"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -49,7 +49,7 @@
android:src="@drawable/uploader_list_separator" android:src="@drawable/uploader_list_separator"
android:contentDescription="@null"/> android:contentDescription="@null"/>
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/contactlist_restore_selected" android:id="@+id/contactlist_restore_selected"
style="@style/Button.Borderless" style="@style/Button.Borderless"
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -19,6 +19,7 @@
License along with this program. If not, see <http://www.gnu.org/licenses/>. License along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/contacts_linear_layout" android:id="@+id/contacts_linear_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -67,16 +68,17 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal"> android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/contacts_backup_now" android:id="@+id/contacts_backup_now"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/standard_margin" android:layout_margin="@dimen/standard_margin"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/contacts_backup_button" android:text="@string/contacts_backup_button"
android:theme="@style/Button.Primary"/> android:theme="@style/Button.Primary"
app:cornerRadius="@dimen/button_corner_radius" />
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/contacts_datepicker" android:id="@+id/contacts_datepicker"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -84,7 +86,8 @@
android:layout_weight="1" android:layout_weight="1"
android:text="@string/contacts_preference_choose_date" android:text="@string/contacts_preference_choose_date"
android:theme="@style/Button" android:theme="@style/Button"
android:visibility="gone"/> android:visibility="gone"
app:cornerRadius="@dimen/button_corner_radius" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View file

@ -24,7 +24,7 @@
android:orientation="vertical" android:orientation="vertical"
android:padding="@dimen/standard_padding"> android:padding="@dimen/standard_padding">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/user_input" android:id="@+id/user_input"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -17,6 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
@ -50,23 +51,25 @@
android:orientation="horizontal" android:orientation="horizontal"
android:padding="@dimen/standard_padding"> android:padding="@dimen/standard_padding">
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/folder_picker_btn_cancel" android:id="@+id/folder_picker_btn_cancel"
android:theme="@style/Button" android:theme="@style/OutlinedButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/common_cancel" android:text="@string/common_cancel"
android:layout_marginRight="@dimen/standard_half_margin" android:layout_marginRight="@dimen/standard_half_margin"
android:layout_marginEnd="@dimen/standard_half_margin"/> android:layout_marginEnd="@dimen/standard_half_margin"
app:cornerRadius="@dimen/button_corner_radius" />
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/folder_picker_btn_choose" android:id="@+id/folder_picker_btn_choose"
android:theme="@style/Button.Primary" android:theme="@style/Button.Primary"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/folder_picker_choose_button_text" /> android:text="@string/folder_picker_choose_button_text"
app:cornerRadius="@dimen/button_corner_radius" />
</LinearLayout> </LinearLayout>

View file

@ -20,6 +20,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
@ -63,29 +64,32 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/login" android:id="@+id/login"
android:theme="@style/Button.Login"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_margin="5dp" android:maxWidth="400dp"
android:layout_weight="1"
android:maxWidth="500dp"
android:minWidth="300dp" android:minWidth="300dp"
android:textStyle="bold" android:textStyle="bold"
android:text="@string/login"/> android:text="@string/login"
android:padding="@dimen/standard_padding"
app:cornerRadius="@dimen/button_corner_radius" />
<Button <com.google.android.material.button.MaterialButton
android:id="@+id/signup" android:id="@+id/signup"
android:theme="@style/OutlineLogindButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_margin="5dp" android:layout_margin="5dp"
android:layout_weight="1"
android:maxWidth="500dp" android:maxWidth="500dp"
android:minWidth="300dp" android:minWidth="300dp"
android:textStyle="bold" android:textStyle="bold"
android:text="@string/signup_with_provider"/> android:padding="@dimen/standard_padding"
android:text="@string/signup_with_provider"
app:cornerRadius="@dimen/button_corner_radius" />
</LinearLayout> </LinearLayout>
<TextView <TextView

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!-- <?xml version="1.0" encoding="utf-8"?>
<!--
ownCloud Android client application ownCloud Android client application
Copyright (C) 2015 ownCloud Inc. Copyright (C) 2015 ownCloud Inc.
@ -47,7 +48,7 @@
android:gravity="center" android:gravity="center"
android:orientation="horizontal" > android:orientation="horizontal" >
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/cancel" android:id="@+id/cancel"
android:theme="@style/Button" android:theme="@style/Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -55,7 +56,7 @@
android:layout_weight="1" android:layout_weight="1"
android:text="@string/common_cancel" /> android:text="@string/common_cancel" />
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/ok" android:id="@+id/ok"
android:theme="@style/Button.Primary" android:theme="@style/Button.Primary"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -17,6 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
@ -57,23 +58,29 @@
android:layout_marginLeft="@dimen/standard_margin" android:layout_marginLeft="@dimen/standard_margin"
android:layout_marginRight="@dimen/standard_margin"> android:layout_marginRight="@dimen/standard_margin">
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/deleteLogHistoryButton" android:id="@+id/deleteLogHistoryButton"
android:theme="@style/Button" android:theme="@style/OutlinedButton"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/prefs_log_delete_history_button" /> android:text="@string/prefs_log_delete_history_button"
android:layout_marginEnd="@dimen/standard_quarter_margin"
android:layout_marginRight="@dimen/standard_quarter_margin"
app:cornerRadius="@dimen/button_corner_radius" />
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/sendLogHistoryButton" android:id="@+id/sendLogHistoryButton"
android:theme="@style/Button.Primary" android:theme="@style/Button.Primary"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/log_send_history_button" /> android:text="@string/log_send_history_button"
android:layout_marginStart="@dimen/standard_quarter_margin"
android:layout_marginLeft="@dimen/standard_quarter_margin"
app:cornerRadius="@dimen/button_corner_radius" />
</LinearLayout> </LinearLayout>

View file

@ -26,15 +26,24 @@
android:orientation="vertical" android:orientation="vertical"
android:padding="@dimen/standard_padding"> android:padding="@dimen/standard_padding">
<EditText <com.google.android.material.textfield.TextInputLayout
android:id="@+id/user_input_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
style="@style/TextInputLayout"
android:hint="@string/hint_note">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/user_input" android:id="@+id/user_input"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="@string/hint_note" android:importantForAutofill="no"
android:inputType="textCapSentences|textMultiLine|textNoSuggestions" android:inputType="textCapSentences|textMultiLine|textNoSuggestions"
android:minLines="3"
android:lines="5" android:lines="5"
android:minLines="3"
android:scrollbars="vertical" android:scrollbars="vertical"
android:importantForAutofill="no"/> android:gravity="top"/>
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout> </LinearLayout>

View file

@ -20,6 +20,7 @@
--> -->
<androidx.drawerlayout.widget.DrawerLayout android:id="@+id/drawer_layout" <androidx.drawerlayout.widget.DrawerLayout android:id="@+id/drawer_layout"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:clickable="true" android:clickable="true"
@ -60,12 +61,13 @@
android:text="@string/participate_testing_bug_text" android:text="@string/participate_testing_bug_text"
android:textAppearance="?android:attr/textAppearanceMedium"/> android:textAppearance="?android:attr/textAppearanceMedium"/>
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/participate_testing_report" android:id="@+id/participate_testing_report"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/participate_testing_report_text" android:text="@string/participate_testing_report_text"
android:theme="@style/Button.Primary"/> android:theme="@style/Button.Primary"
app:cornerRadius="@dimen/button_corner_radius" />
<TextView <TextView
android:id="@+id/participate_text" android:id="@+id/participate_text"

View file

@ -18,8 +18,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:orientation="vertical" android:orientation="vertical"
android:padding="@dimen/standard_padding"> android:padding="@dimen/standard_padding">
@ -49,7 +51,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_horizontal" > android:gravity="center_horizontal" >
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/txt0" android:id="@+id/txt0"
android:focusable="true" android:focusable="true"
style="@style/PassCodeStyle" style="@style/PassCodeStyle"
@ -59,9 +61,9 @@
android:hint="@string/hidden_character" android:hint="@string/hidden_character"
android:textCursorDrawable="@null"> android:textCursorDrawable="@null">
<requestFocus/> <requestFocus/>
</EditText> </com.google.android.material.textfield.TextInputEditText>
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/txt1" android:id="@+id/txt1"
style="@style/PassCodeStyle" style="@style/PassCodeStyle"
android:cursorVisible="true" android:cursorVisible="true"
@ -70,7 +72,7 @@
android:hint="@string/hidden_character" android:hint="@string/hidden_character"
android:textCursorDrawable="@null" /> android:textCursorDrawable="@null" />
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/txt2" android:id="@+id/txt2"
style="@style/PassCodeStyle" style="@style/PassCodeStyle"
android:cursorVisible="true" android:cursorVisible="true"
@ -79,7 +81,7 @@
android:hint="@string/hidden_character" android:hint="@string/hidden_character"
android:textCursorDrawable="@null" /> android:textCursorDrawable="@null" />
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/txt3" android:id="@+id/txt3"
style="@style/PassCodeStyle" style="@style/PassCodeStyle"
android:cursorVisible="true" android:cursorVisible="true"
@ -89,11 +91,12 @@
android:textCursorDrawable="@null" /> android:textCursorDrawable="@null" />
</LinearLayout> </LinearLayout>
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/cancel" android:id="@+id/cancel"
android:theme="@style/Button.Primary" android:theme="@style/Button.Primary"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/common_cancel" /> android:text="@string/common_cancel"
app:cornerRadius="@dimen/button_corner_radius" />
</LinearLayout> </LinearLayout>

View file

@ -26,9 +26,10 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:theme="@style/TextInputLayout"
app:passwordToggleDrawable="@drawable/password_visibility_selector"> app:passwordToggleDrawable="@drawable/password_visibility_selector">
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/share_password" android:id="@+id/share_password"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -37,7 +38,7 @@
android:inputType="textPassword" android:inputType="textPassword"
android:layout_margin="@dimen/standard_margin" android:layout_margin="@dimen/standard_margin"
android:autofillHints="password"> android:autofillHints="password">
</EditText> </com.google.android.material.textfield.TextInputEditText>
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>

View file

@ -41,7 +41,7 @@
android:textIsSelectable="true" android:textIsSelectable="true"
android:visibility="gone" /> android:visibility="gone" />
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/encryption_passwordInput" android:id="@+id/encryption_passwordInput"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -15,10 +15,10 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<ScrollView <ScrollView android:id="@+id/shareScroll"
android:id="@+id/shareScroll"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:context="com.owncloud.android.ui.fragment.ShareFileFragment"> tools:context="com.owncloud.android.ui.fragment.ShareFileFragment">
@ -122,15 +122,15 @@
android:text="@string/share_no_users" android:text="@string/share_no_users"
android:textSize="@dimen/share_file_layout_text_size"/> android:textSize="@dimen/share_file_layout_text_size"/>
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/addUserButton" android:id="@+id/addUserButton"
style="@style/ownCloud.Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:contentDescription="@string/share_add_user_or_group" android:contentDescription="@string/share_add_user_or_group"
android:text="@string/share_add_user_or_group" android:text="@string/share_add_user_or_group"
android:theme="@style/Button.Primary"/> android:theme="@style/Button.Primary"
app:cornerRadius="@dimen/button_corner_radius" />
</LinearLayout> </LinearLayout>
@ -333,15 +333,15 @@
</RelativeLayout> </RelativeLayout>
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/shareViaLinkGetLinkButton" android:id="@+id/shareViaLinkGetLinkButton"
style="@style/ownCloud.Button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:contentDescription="@string/share_get_public_link_button" android:contentDescription="@string/share_get_public_link_button"
android:text="@string/share_get_public_link_button" android:text="@string/share_get_public_link_button"
android:theme="@style/Button.Primary"/> android:theme="@style/Button.Primary"
app:cornerRadius="@dimen/button_corner_radius" />
</LinearLayout> </LinearLayout>

View file

@ -290,7 +290,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="end"> android:gravity="end">
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/cancel" android:id="@+id/cancel"
style="@style/Button.Borderless" style="@style/Button.Borderless"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!-- <?xml version="1.0" encoding="utf-8"?>
<!--
ownCloud Android client application ownCloud Android client application
Copyright (C) 2015 ownCloud Inc. Copyright (C) 2015 ownCloud Inc.
@ -457,7 +458,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" > android:gravity="center" >
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/cancel" android:id="@+id/cancel"
style="@style/Button.Borderless" style="@style/Button.Borderless"
android:layout_width="@dimen/zero" android:layout_width="@dimen/zero"
@ -465,7 +466,7 @@
android:layout_weight="1" android:layout_weight="1"
android:text="@string/common_no" /> android:text="@string/common_no" />
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/details_btn" android:id="@+id/details_btn"
style="@style/Button.Borderless" style="@style/Button.Borderless"
android:layout_width="@dimen/zero" android:layout_width="@dimen/zero"
@ -473,7 +474,7 @@
android:layout_weight="2" android:layout_weight="2"
android:text="@string/ssl_validator_btn_details_see" /> android:text="@string/ssl_validator_btn_details_see" />
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/ok" android:id="@+id/ok"
style="@style/Button.Borderless" style="@style/Button.Borderless"
android:layout_width="@dimen/zero" android:layout_width="@dimen/zero"

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!-- <?xml version="1.0" encoding="utf-8"?>
<!--
ownCloud Android client application ownCloud Android client application
Copyright (C) 2015 ownCloud Inc. Copyright (C) 2015 ownCloud Inc.
@ -421,7 +422,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" > android:gravity="center" >
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/cancel" android:id="@+id/cancel"
style="@style/Button.Borderless" style="@style/Button.Borderless"
android:layout_width="@dimen/zero" android:layout_width="@dimen/zero"
@ -429,7 +430,7 @@
android:layout_weight="1" android:layout_weight="1"
android:text="@string/common_no" /> android:text="@string/common_no" />
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/details_btn" android:id="@+id/details_btn"
style="@style/Button.Borderless" style="@style/Button.Borderless"
android:layout_width="@dimen/zero" android:layout_width="@dimen/zero"
@ -437,7 +438,7 @@
android:layout_weight="2" android:layout_weight="2"
android:text="@string/ssl_validator_btn_details_see" /> android:text="@string/ssl_validator_btn_details_see" />
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/ok" android:id="@+id/ok"
style="@style/Button.Borderless" style="@style/Button.Borderless"
android:layout_width="@dimen/zero" android:layout_width="@dimen/zero"

View file

@ -18,7 +18,6 @@
--> -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
>
</RelativeLayout> </RelativeLayout>

View file

@ -420,7 +420,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/delete" android:id="@+id/delete"
style="@style/Button.Borderless.Destructive" style="@style/Button.Borderless.Destructive"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -435,14 +435,14 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"> android:layout_alignParentEnd="true">
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/cancel" android:id="@+id/cancel"
style="@style/Button.Borderless" style="@style/Button.Borderless"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/common_cancel"/> android:text="@string/common_cancel"/>
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/save" android:id="@+id/save"
style="@style/Button.Borderless" style="@style/Button.Borderless"
android:layout_width="wrap_content" android:layout_width="wrap_content"

View file

@ -33,7 +33,7 @@
android:text="@string/upload_file_dialog_filename" android:text="@string/upload_file_dialog_filename"
tools:text="@string/upload_file_dialog_filename"/> tools:text="@string/upload_file_dialog_filename"/>
<EditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/user_input" android:id="@+id/user_input"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!-- <?xml version="1.0" encoding="utf-8"?>
<!--
ownCloud Android client application ownCloud Android client application
Copyright (C) 2015 ownCloud Inc. Copyright (C) 2015 ownCloud Inc.
@ -16,6 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/upload_files_layout" android:id="@+id/upload_files_layout"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
@ -76,23 +78,25 @@
android:orientation="horizontal" android:orientation="horizontal"
android:padding="@dimen/standard_padding"> android:padding="@dimen/standard_padding">
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/upload_files_btn_cancel" android:id="@+id/upload_files_btn_cancel"
android:theme="@style/Button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/standard_half_margin"
android:layout_marginRight="@dimen/standard_half_margin"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/common_cancel" android:text="@string/common_cancel"
android:layout_marginRight="@dimen/standard_half_margin" android:theme="@style/OutlinedButton"
android:layout_marginEnd="@dimen/standard_half_margin"/> app:cornerRadius="@dimen/button_corner_radius" />
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/upload_files_btn_upload" android:id="@+id/upload_files_btn_upload"
android:theme="@style/Button.Primary"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/uploader_btn_upload_text" /> android:text="@string/uploader_btn_upload_text"
android:theme="@style/Button.Primary"
app:cornerRadius="@dimen/button_corner_radius" />
</LinearLayout> </LinearLayout>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!-- <?xml version="1.0" encoding="utf-8"?>
<!--
ownCloud Android client application ownCloud Android client application
Copyright (C) 2012 Bartek Przybylski Copyright (C) 2012 Bartek Przybylski
@ -17,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/upload_files_layout" android:id="@+id/upload_files_layout"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
@ -61,26 +63,27 @@
android:orientation="horizontal" android:orientation="horizontal"
android:padding="@dimen/standard_padding"> android:padding="@dimen/standard_padding">
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:theme="@style/Button" android:theme="@style/OutlinedButton"
android:id="@+id/uploader_cancel" android:id="@+id/uploader_cancel"
style="@style/ownCloud.Button"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/common_cancel" android:text="@string/common_cancel"
android:layout_marginRight="@dimen/standard_half_margin" android:layout_marginRight="@dimen/standard_half_margin"
android:layout_marginEnd="@dimen/standard_half_margin"/> android:layout_marginEnd="@dimen/standard_half_margin"
app:cornerRadius="@dimen/button_corner_radius" />
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/uploader_choose_folder" android:id="@+id/uploader_choose_folder"
android:theme="@style/Button.Primary" android:theme="@style/Button.Primary"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/uploader_btn_upload_text" /> android:text="@string/uploader_btn_upload_text"
app:cornerRadius="@dimen/button_corner_radius" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View file

@ -54,7 +54,7 @@
android:orientation="horizontal" android:orientation="horizontal"
android:weightSum="3"> android:weightSum="3">
<androidx.appcompat.widget.AppCompatButton <com.google.android.material.button.MaterialButton
android:id="@+id/skip" android:id="@+id/skip"
style="@style/Button.Borderless.Login" style="@style/Button.Borderless.Login"
android:layout_width="0dp" android:layout_width="0dp"

View file

@ -140,5 +140,6 @@
<dimen name="bottom_sheet_text_size">16sp</dimen> <dimen name="bottom_sheet_text_size">16sp</dimen>
<dimen name="permission_dialog_text_size">18sp</dimen> <dimen name="permission_dialog_text_size">18sp</dimen>
<dimen name="permission_dialog_text_padding">56dp</dimen> <dimen name="permission_dialog_text_padding">56dp</dimen>
<dimen name="button_corner_radius">24dp</dimen>
<integer name="media_grid_width">4</integer> <integer name="media_grid_width">4</integer>
</resources> </resources>

View file

@ -19,7 +19,7 @@
--> -->
<resources xmlns:android="http://schemas.android.com/apk/res/android"> <resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- General ownCloud app style --> <!-- General ownCloud app style -->
<style name="Theme.ownCloud" parent="Theme.AppCompat.Light.DarkActionBar"> <style name="Theme.ownCloud" parent="Theme.MaterialComponents.Light.DarkActionBar.Bridge">
<item name="android:actionBarStyle">@style/Theme.ownCloud.Widget.ActionBar</item> <item name="android:actionBarStyle">@style/Theme.ownCloud.Widget.ActionBar</item>
<item name="actionBarStyle">@style/Theme.ownCloud.Widget.ActionBar</item> <item name="actionBarStyle">@style/Theme.ownCloud.Widget.ActionBar</item>
<item name="actionModeBackground">@color/action_mode_background</item> <item name="actionModeBackground">@color/action_mode_background</item>
@ -34,19 +34,21 @@
<item name="fontFamily">@font/nunito_regular</item> <item name="fontFamily">@font/nunito_regular</item>
</style> </style>
<style name="FallbackThemingTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <style name="FallbackThemingTheme" parent="Theme.MaterialComponents.Light.DarkActionBar.Bridge">
<item name="colorPrimary">#424242</item> <item name="colorPrimary">#424242</item>
<item name="colorPrimaryDark">#212121</item> <item name="colorPrimaryDark">#212121</item>
<item name="colorAccent">#757575</item> <item name="colorAccent">#757575</item>
<item name="android:textAllCaps">false</item>
</style> </style>
<style name="FallbackDatePickerDialogTheme" parent="Theme.AppCompat.Light.Dialog"> <style name="FallbackDatePickerDialogTheme" parent="Theme.MaterialComponents.Light.Dialog">
<item name="colorPrimary">#424242</item> <item name="colorPrimary">#424242</item>
<item name="colorPrimaryDark">#212121</item> <item name="colorPrimaryDark">#212121</item>
<item name="colorAccent">#757575</item> <item name="colorAccent">#757575</item>
<item name="android:textAllCaps">false</item>
</style> </style>
<style name="FallbackTheming.Dialog" parent="Theme.AppCompat.Light.Dialog.Alert"> <style name="FallbackTheming.Dialog" parent="Theme.MaterialComponents.Light.Dialog.Alert">
<item name="colorPrimary">#424242</item> <item name="colorPrimary">#424242</item>
<item name="colorPrimaryDark">#212121</item> <item name="colorPrimaryDark">#212121</item>
<item name="colorAccent">#757575</item> <item name="colorAccent">#757575</item>
@ -56,7 +58,7 @@
</style> </style>
<!-- seperate action bar style for activities without an action bar --> <!-- seperate action bar style for activities without an action bar -->
<style name="Theme.ownCloud.Toolbar" parent="Theme.AppCompat.Light.NoActionBar"> <style name="Theme.ownCloud.Toolbar" parent="Theme.MaterialComponents.Light.NoActionBar.Bridge">
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<item name="colorPrimary">@color/primary</item> <item name="colorPrimary">@color/primary</item>
@ -82,15 +84,23 @@
<item name="android:textColorHint">@color/login_text_hint_color</item> <item name="android:textColorHint">@color/login_text_hint_color</item>
</style> </style>
<style name="ownCloud.AlertDialog" parent="Theme.AppCompat.Light.Dialog.Alert"> <style name="ownCloud.AlertDialog" parent="Theme.MaterialComponents.Light.Dialog.Alert">
<item name="colorAccent">@color/color_accent</item> <item name="colorAccent">@color/color_accent</item>
<item name="android:textColorPrimary">@color/primary</item> <item name="android:textColorPrimary">@color/primary</item>
<item name="searchViewStyle">@style/ownCloud.SearchView</item> <item name="searchViewStyle">@style/ownCloud.SearchView</item>
<item name="android:textAllCaps">false</item>
<item name="android:buttonStyle">@style/nextcloudButtonStyle</item>
</style> </style>
<style name="ownCloud.Dialog" parent="Theme.AppCompat.Light.Dialog"> <style name="ownCloud.Dialog" parent="Theme.MaterialComponents.Light.Dialog">
<item name="colorAccent">@color/color_accent</item> <item name="colorAccent">@color/color_accent</item>
<item name="searchViewStyle">@style/ownCloud.SearchView</item> <item name="searchViewStyle">@style/ownCloud.SearchView</item>
<item name="android:textAllCaps">false</item>
<item name="android:buttonStyle">@style/nextcloudButtonStyle</item>
</style>
<style name="nextcloudButtonStyle" parent="Widget.MaterialComponents.Button">
<item name="fontFamily">@font/nunito_bold</item>
</style> </style>
<style name="ProgressDialogTheme" parent="ownCloud.Dialog"> <style name="ProgressDialogTheme" parent="ownCloud.Dialog">
@ -110,36 +120,55 @@
<!--<item name="suggestionRowLayout">...</item>--> <!--<item name="suggestionRowLayout">...</item>-->
</style> </style>
<style name="ownCloud.Button" parent="Widget.AppCompat.Button"> <style name="Button" parent="Widget.MaterialComponents.Button.UnelevatedButton">
<item name="colorButtonNormal">@color/primary</item>
</style>
<style name="Button" parent="Base.Widget.AppCompat.Button">
<item name="colorButtonNormal">@color/secondary_button_background_color</item> <item name="colorButtonNormal">@color/secondary_button_background_color</item>
<item name="android:textColor">@color/secondary_button_text_color</item> <item name="android:textColor">@color/secondary_button_text_color</item>
<item name="android:textAllCaps">false</item>
<item name="fontFamily">@font/nunito_bold</item>
</style>
<style name="OutlinedButton" parent="Widget.MaterialComponents.Button.OutlinedButton">
<item name="colorAccent">@color/transparent</item>
<item name="android:textColor">@color/primary_dark</item>
<item name="android:textAllCaps">false</item>
<item name="fontFamily">@font/nunito_bold</item>
</style>
<style name="OutlineLogindButton" parent="Widget.MaterialComponents.Button.OutlinedButton">
<item name="colorAccent">@color/transparent</item>
<item name="android:textColor">@color/white</item>
<item name="android:textAllCaps">false</item>
<item name="fontFamily">@font/nunito_bold</item>
<item name="strokeColor">@color/white</item>
</style> </style>
<style name="Button.Primary" parent="Button"> <style name="Button.Primary" parent="Button">
<item name="colorButtonNormal">@color/primary_button_background_color</item> <item name="colorButtonNormal">@color/primary_button_background_color</item>
<item name="android:textColor">@color/primary_button_text_color</item> <item name="android:textColor">@color/primary_button_text_color</item>
<item name="fontFamily">@font/nunito_bold</item>
</style> </style>
<style name="Button.Login" parent="Button"> <style name="Button.Login" parent="Button">
<item name="colorButtonNormal">@color/white</item> <item name="colorButtonNormal">@color/white</item>
<item name="colorAccent">@color/white</item>
<item name="android:textColor">@color/primary_dark</item> <item name="android:textColor">@color/primary_dark</item>
</style> </style>
<style name="Button.Borderless" parent="Base.Widget.AppCompat.Button.Borderless"> <style name="Button.Borderless" parent="Widget.MaterialComponents.Button.TextButton">
<item name="android:textColor">@drawable/borderless_btn</item> <item name="android:textColor">@drawable/borderless_btn</item>
<item name="fontFamily">@font/nunito_bold</item>
<item name="android:textAllCaps">false</item>
</style> </style>
<style name="Button.Borderless.Destructive" parent="Base.Widget.AppCompat.Button.Borderless"> <style name="Button.Borderless.Destructive" parent="Widget.MaterialComponents.Button.TextButton">
<item name="fontFamily">@font/nunito_bold</item>
<item name="android:textColor">@color/highlight_textColor_Warning</item> <item name="android:textColor">@color/highlight_textColor_Warning</item>
<item name="android:textAllCaps">false</item>
</style> </style>
<style name="Button.Borderless.Login" parent="Base.Widget.AppCompat.Button.Borderless"> <style name="Button.Borderless.Login" parent="Widget.MaterialComponents.Button.TextButton">
<item name="fontFamily">@font/nunito_bold</item>
<item name="android:textColor">@color/white</item> <item name="android:textColor">@color/white</item>
<item name="android:textAllCaps">false</item>
</style> </style>
<!-- separat translucent action bar style --> <!-- separat translucent action bar style -->
@ -153,7 +182,7 @@
</style> </style>
<!-- ACTION BAR STYLES --> <!-- ACTION BAR STYLES -->
<style name="Theme.ownCloud.Overlay.ActionBar" parent="@style/Widget.AppCompat.ActionBar"> <style name="Theme.ownCloud.Overlay.ActionBar" parent="@style/Widget.MaterialComponents.Toolbar">
<item name="android:background">@color/color_transparent</item> <item name="android:background">@color/color_transparent</item>
<item name="android:windowActionBarOverlay">true</item> <item name="android:windowActionBarOverlay">true</item>
<!-- Support library compatibility --> <!-- Support library compatibility -->
@ -166,21 +195,19 @@
<item name="android:windowBackground">@drawable/launch_screen</item> <item name="android:windowBackground">@drawable/launch_screen</item>
</style> </style>
<!-- Progress bar --> <!-- Progress bar -->
<style name="Widget.ownCloud.TopProgressBar" parent="@style/Widget.AppCompat.ProgressBar.Horizontal"> <style name="Widget.ownCloud.TopProgressBar" parent="@style/Widget.AppCompat.ProgressBar.Horizontal">
<item name="android:progressDrawable">@drawable/actionbar_progress_horizontal</item> <item name="android:progressDrawable">@drawable/actionbar_progress_horizontal</item>
<item name="android:indeterminateDrawable">@drawable/actionbar_progress_indeterminate_horizontal</item> <item name="android:indeterminateDrawable">@drawable/actionbar_progress_indeterminate_horizontal</item>
</style> </style>
<style name="Theme.ownCloud.Fullscreen" parent="@style/Theme.AppCompat"> <style name="Theme.ownCloud.Fullscreen" parent="@style/Theme.MaterialComponents">
<item name="android:windowFullscreen">true</item> <item name="android:windowFullscreen">true</item>
<item name="colorAccent">@color/color_accent</item> <item name="colorAccent">@color/color_accent</item>
</style> </style>
<style name="Theme.ownCloud.Widget.ActionBar" <style name="Theme.ownCloud.Widget.ActionBar"
parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse"> parent="@style/Theme.MaterialComponents.Light.DarkActionBar.Bridge">
<item name="android:background">@color/primary</item> <item name="android:background">@color/primary</item>
<item name="background">@color/primary</item> <item name="background">@color/primary</item>
<item name="android:textColor">#ffffff</item> <item name="android:textColor">#ffffff</item>
@ -191,7 +218,7 @@
</style> </style>
<!-- Dialogs --> <!-- Dialogs -->
<style name="Theme.ownCloud.Dialog" parent="@style/Theme.AppCompat.Light.Dialog.Alert"> <style name="Theme.ownCloud.Dialog" parent="@style/Theme.MaterialComponents.Light.Dialog.Alert">
<item name="windowNoTitle">false</item> <item name="windowNoTitle">false</item>
<item name="colorAccent">@color/color_accent</item> <item name="colorAccent">@color/color_accent</item>
<item name="buttonBarButtonStyle">@style/Theme.ownCloud.Dialog.ButtonBar.Button</item> <item name="buttonBarButtonStyle">@style/Theme.ownCloud.Dialog.ButtonBar.Button</item>
@ -203,7 +230,7 @@
<item name="colorAccent">@color/color_accent</item> <item name="colorAccent">@color/color_accent</item>
</style> </style>
<style name="Theme.ownCloud.Dialog.NoButtonBarStyle" parent="@style/Theme.AppCompat.Light.Dialog.Alert"> <style name="Theme.ownCloud.Dialog.NoButtonBarStyle" parent="@style/Theme.MaterialComponents.Light.Dialog.Alert">
<item name="windowNoTitle">false</item> <item name="windowNoTitle">false</item>
<item name="colorAccent">@color/color_accent</item> <item name="colorAccent">@color/color_accent</item>
</style> </style>
@ -226,13 +253,14 @@
<item name="android:minHeight">@null</item> <item name="android:minHeight">@null</item>
</style> </style>
<style name="Theme.ownCloud.Dialog.ButtonBar.Button" parent="@style/Widget.AppCompat.Button.Borderless.Colored"> <style name="Theme.ownCloud.Dialog.ButtonBar.Button" parent="@style/Widget.MaterialComponents.Button.TextButton">
<!-- Setting the weight as follows should result in equally wide buttons filling the alert dialog width, <!-- Setting the weight as follows should result in equally wide buttons filling the alert dialog width,
but instead they span further out of the dialog, breaking in multiple lines though --> but instead they span further out of the dialog, breaking in multiple lines though -->
<item name="android:layout_width">0dp</item> <item name="android:layout_width">0dp</item>
<item name="android:layout_weight">1</item> <item name="android:layout_weight">1</item>
<!-- setting a fixed width as follows results in narrow buttons with line breaks, but of course this is not a solution --> <!-- setting a fixed width as follows results in narrow buttons with line breaks, but of course this is not a solution -->
<!-- <item name="android:width">100dp</item> --> <!-- <item name="android:width">100dp</item> -->
<item name="android:textAllCaps">false</item>
</style> </style>
<style name="PassCodeStyle"> <style name="PassCodeStyle">
@ -246,7 +274,6 @@
<item name="android:maxLength">1</item> <item name="android:maxLength">1</item>
<item name="android:password">true</item> <item name="android:password">true</item>
<item name="android:maxLines">1</item> <item name="android:maxLines">1</item>
</style> </style>
<style name="Theme.ownCloud.NoActionBar"> <style name="Theme.ownCloud.NoActionBar">
@ -262,10 +289,8 @@
<style name="NextcloudTextAppearanceMedium" parent="@style/TextAppearance.AppCompat.Medium"> <style name="NextcloudTextAppearanceMedium" parent="@style/TextAppearance.AppCompat.Medium">
</style> </style>
<style name="EditText" parent="Theme.AppCompat.Light"> <style name="TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<item name="colorControlActivated">@color/login_text_color</item>
<item name="colorControlNormal">@color/login_text_color</item>
<item name="android:textColorHint">@color/login_text_color</item>
</style> </style>
<style name="AppTabTextAppearance" parent="@style/TextAppearance.Design.Tab"> <style name="AppTabTextAppearance" parent="@style/TextAppearance.Design.Tab">