Эх сурвалжийг харах

add pill-styled buttons and implement theming

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 6 жил өмнө
parent
commit
dab1812c31

+ 43 - 39
src/main/java/com/owncloud/android/ui/activity/FolderPickerActivity.java

@@ -73,7 +73,7 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
     public static final String EXTRA_FILES = FolderPickerActivity.class.getCanonicalName() + ".EXTRA_FILES";
     public static final String EXTRA_ACTION = FolderPickerActivity.class.getCanonicalName() + ".EXTRA_ACTION";
     public static final String EXTRA_CURRENT_FOLDER = FolderPickerActivity.class.getCanonicalName() +
-            ".EXTRA_CURRENT_FOLDER";
+        ".EXTRA_CURRENT_FOLDER";
     public static final String MOVE = "MOVE";
     public static final String COPY = "COPY";
 
@@ -158,7 +158,7 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
     }
 
     /**
-     *  Called when the ownCloud {@link Account} associated to the Activity was just updated.
+     * Called when the ownCloud {@link Account} associated to the Activity was just updated.
      */
     @Override
     protected void onAccountSet(boolean stateWasRecovered) {
@@ -211,10 +211,10 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
         if (listFragment != null) {
             if (!mSyncInProgress) {
                 listFragment.setMessageForEmptyList(
-                        R.string.file_list_empty_headline,
-                        R.string.file_list_empty_moving,
-                        R.drawable.ic_list_empty_create_folder,
-                        true
+                    R.string.file_list_empty_headline,
+                    R.string.file_list_empty_moving,
+                    R.drawable.ic_list_empty_create_folder,
+                    true
                 );
             } else {
                 listFragment.setEmptyListLoadingMessage();
@@ -227,7 +227,7 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
     protected OCFileListFragment getListOfFilesFragment() {
         Fragment listOfFiles = getSupportFragmentManager().findFragmentByTag(FolderPickerActivity.TAG_LIST_OF_FOLDERS);
         if (listOfFiles != null) {
-            return (OCFileListFragment)listOfFiles;
+            return (OCFileListFragment) listOfFiles;
         }
         Log_OC.e(TAG, "Access to non existing list of files fragment!!");
         return null;
@@ -235,7 +235,7 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
 
     /**
      * {@inheritDoc}
-     *
+     * <p>
      * Updates action bar and second fragment, if in dual pane mode.
      */
     @Override
@@ -258,7 +258,7 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
 
         // perform folder synchronization
         RemoteOperation refreshFolderOperation = new RefreshFolderOperation(folder, currentSyncTime, false,
-                ignoreETag, getStorageManager(), getAccount(), getApplicationContext());
+            ignoreETag, getStorageManager(), getAccount(), getApplicationContext());
 
         refreshFolderOperation.execute(getAccount(), this, null, null);
         setIndeterminate(true);
@@ -313,18 +313,18 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
     public boolean onOptionsItemSelected(MenuItem item) {
         boolean retval = true;
         switch (item.getItemId()) {
-        case R.id.action_create_dir: {
-            CreateFolderDialogFragment dialog = CreateFolderDialogFragment.newInstance(getCurrentFolder());
-            dialog.show(getSupportFragmentManager(), CreateFolderDialogFragment.CREATE_FOLDER_FRAGMENT);
-            break;
-        }
-        case android.R.id.home: {
-            OCFile currentDir = getCurrentFolder();
-            if(currentDir != null && currentDir.getParentId() != 0) {
-                onBackPressed();
+            case R.id.action_create_dir: {
+                CreateFolderDialogFragment dialog = CreateFolderDialogFragment.newInstance(getCurrentFolder());
+                dialog.show(getSupportFragmentManager(), CreateFolderDialogFragment.CREATE_FOLDER_FRAGMENT);
+                break;
+            }
+            case android.R.id.home: {
+                OCFile currentDir = getCurrentFolder();
+                if (currentDir != null && currentDir.getParentId() != 0) {
+                    onBackPressed();
+                }
+                break;
             }
-            break;
-        }
             case R.id.action_sort: {
                 FragmentManager fm = getSupportFragmentManager();
                 FragmentTransaction ft = fm.beginTransaction();
@@ -336,9 +336,9 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
 
                 break;
             }
-        default:
-            retval = super.onOptionsItemSelected(item);
-            break;
+            default:
+                retval = super.onOptionsItemSelected(item);
+                break;
         }
 
         return retval;
@@ -409,7 +409,7 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
     /**
      * Set per-view controllers
      */
-    private void initControls(){
+    private void initControls() {
         mCancelBtn = findViewById(R.id.folder_picker_btn_cancel);
         mCancelBtn.setOnClickListener(this);
         mChooseBtn = findViewById(R.id.folder_picker_btn_choose);
@@ -418,6 +418,10 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
             mChooseBtn.getBackground().setColorFilter(ThemeUtils.primaryColor(this, true), PorterDuff.Mode.SRC_ATOP);
             mChooseBtn.setOnClickListener(this);
         }
+
+        if (mCancelBtn != null) {
+            mCancelBtn.setTextColor(ThemeUtils.primaryColor(this, true));
+        }
     }
 
     @Override
@@ -453,23 +457,23 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
      * Updates the view associated to the activity after the finish of an operation trying
      * to create a new folder.
      *
-     * @param operation     Creation operation performed.
-     * @param result        Result of the creation.
+     * @param operation Creation operation performed.
+     * @param result    Result of the creation.
      */
     private void onCreateFolderOperationFinish(
-            CreateFolderOperation operation, RemoteOperationResult result
-            ) {
+        CreateFolderOperation operation, RemoteOperationResult result
+    ) {
 
         if (result.isSuccess()) {
             refreshListOfFilesFragment(false);
         } else {
             try {
                 DisplayUtils.showSnackMessage(
-                        this,ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources())
+                    this, ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources())
                 );
 
             } catch (NotFoundException e) {
-                Log_OC.e(TAG, "Error while trying to show fail message " , e);
+                Log_OC.e(TAG, "Error while trying to show fail message ", e);
             }
         }
     }
@@ -487,23 +491,23 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
                 String accountName = intent.getStringExtra(FileSyncAdapter.EXTRA_ACCOUNT_NAME);
                 String syncFolderRemotePath = intent.getStringExtra(FileSyncAdapter.EXTRA_FOLDER_PATH);
                 RemoteOperationResult syncResult = (RemoteOperationResult)
-                        DataHolderUtil.getInstance().retrieve(intent.getStringExtra(FileSyncAdapter.EXTRA_RESULT));
+                    DataHolderUtil.getInstance().retrieve(intent.getStringExtra(FileSyncAdapter.EXTRA_RESULT));
                 boolean sameAccount = getAccount() != null && accountName.equals(getAccount().name)
-                        && getStorageManager() != null;
+                    && getStorageManager() != null;
 
                 if (sameAccount) {
                     if (FileSyncAdapter.EVENT_FULL_SYNC_START.equals(event)) {
                         mSyncInProgress = true;
                     } else {
                         OCFile currentFile = (getFile() == null) ? null :
-                                getStorageManager().getFileByPath(getFile().getRemotePath());
+                            getStorageManager().getFileByPath(getFile().getRemotePath());
                         OCFile currentDir = (getCurrentFolder() == null) ? null :
                             getStorageManager().getFileByPath(getCurrentFolder().getRemotePath());
 
                         if (currentDir == null) {
                             // current folder was removed from the server
                             DisplayUtils.showSnackMessage(getActivity(), R.string.sync_current_folder_was_removed,
-                                    getCurrentFolder().getFileName());
+                                getCurrentFolder().getFileName());
                             browseToRoot();
                         } else {
                             if (currentFile == null && !getFile().isFolder()) {
@@ -521,17 +525,17 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
                         }
 
                         mSyncInProgress = (!FileSyncAdapter.EVENT_FULL_SYNC_END.equals(event) &&
-                                !RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED.equals(event));
+                            !RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED.equals(event));
 
                         if (RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED.equals(event) &&
-                                /// TODO refactor and make common
-                                syncResult != null && !syncResult.isSuccess()) {
+                            /// TODO refactor and make common
+                            syncResult != null && !syncResult.isSuccess()) {
 
                             if (ResultCode.UNAUTHORIZED.equals(syncResult.getCode()) || (syncResult.isException()
-                                    && syncResult.getException() instanceof AuthenticatorException)) {
+                                && syncResult.getException() instanceof AuthenticatorException)) {
                                 requestCredentialsUpdate(context);
                             } else if (RemoteOperationResult.ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED
-                                    .equals(syncResult.getCode())) {
+                                .equals(syncResult.getCode())) {
                                 showUntrustedCertDialog(syncResult);
                             }
 

+ 1 - 0
src/main/java/com/owncloud/android/ui/activity/LogHistoryActivity.java

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

+ 4 - 3
src/main/java/com/owncloud/android/ui/activity/ReceiveExternalFilesActivity.java

@@ -800,11 +800,12 @@ public class ReceiveExternalFilesActivity extends FileActivity
             }
 
             Button btnNewFolder = findViewById(R.id.uploader_cancel);
-                btnNewFolder.setOnClickListener(this);
+            btnNewFolder.setTextColor(ThemeUtils.primaryColor(this, true));
+            btnNewFolder.setOnClickListener(this);
 
-                mListView.setOnItemClickListener(this);
-            }
+            mListView.setOnItemClickListener(this);
         }
+    }
 
     protected void setupEmptyList() {
         mEmptyListContainer = findViewById(R.id.empty_list_view);

+ 4 - 2
src/main/java/com/owncloud/android/ui/activity/UploadFilesActivity.java

@@ -167,9 +167,11 @@ public class UploadFilesActivity extends FileActivity implements
         mFileListFragment = (LocalFileListFragment) getSupportFragmentManager().findFragmentById(R.id.local_files_list);
 
         // 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 = (MaterialButton) 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.setOnClickListener(this);
 

+ 4 - 2
src/main/java/com/owncloud/android/ui/adapter/NotificationListAdapter.java

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

+ 6 - 4
src/main/res/layout/activity_manage_space.xml

@@ -17,9 +17,10 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:orientation="vertical"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent">
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
 
     <TextView
         android:id="@+id/general_description"
@@ -40,6 +41,7 @@
         android:layout_margin="@dimen/standard_margin"
         android:theme="@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>

+ 8 - 5
src/main/res/layout/contacts_backup_fragment.xml

@@ -19,9 +19,10 @@
   License along with this program. If not, see <http://www.gnu.org/licenses/>.
 -->
 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
-            android:id="@+id/contacts_linear_layout"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent">
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/contacts_linear_layout"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
 
     <LinearLayout
         android:layout_width="match_parent"
@@ -74,7 +75,8 @@
                 android:layout_margin="@dimen/standard_margin"
                 android:layout_weight="1"
                 android:text="@string/contacts_backup_button"
-                android:theme="@style/Button.Primary"/>
+                android:theme="@style/Button.Primary"
+                app:cornerRadius="@dimen/button_corner_radius" />
 
             <com.google.android.material.button.MaterialButton
                 android:id="@+id/contacts_datepicker"
@@ -84,7 +86,8 @@
                 android:layout_weight="1"
                 android:text="@string/contacts_preference_choose_date"
                 android:theme="@style/Button"
-                android:visibility="gone"/>
+                android:visibility="gone"
+                app:cornerRadius="@dimen/button_corner_radius" />
         </LinearLayout>
 
     </LinearLayout>

+ 7 - 4
src/main/res/layout/files_folder_picker.xml

@@ -17,9 +17,10 @@
   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"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="vertical" >
+    android:orientation="vertical">
 
     <include
         layout="@layout/toolbar_standard" />
@@ -52,13 +53,14 @@
 
         <com.google.android.material.button.MaterialButton
             android:id="@+id/folder_picker_btn_cancel"
-            android:theme="@style/Button"
+            android:theme="@style/OutlinedButton"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_weight="1"
             android:text="@string/common_cancel"
             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" />
 
         <com.google.android.material.button.MaterialButton
 		    android:id="@+id/folder_picker_btn_choose"
@@ -66,7 +68,8 @@
 		    android:layout_width="wrap_content"
 		    android:layout_height="wrap_content"
 		    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>
 

+ 15 - 11
src/main/res/layout/first_run_activity.xml

@@ -20,9 +20,10 @@
   along with this program. If not, see <https://www.gnu.org/licenses/>.
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"
-              android:orientation="vertical">
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
 
     <LinearLayout
         android:layout_width="match_parent"
@@ -63,29 +64,32 @@
             android:layout_height="wrap_content"
             android:orientation="vertical">
 
-            <Button
+            <com.google.android.material.button.MaterialButton
                 android:id="@+id/login"
+                android:theme="@style/Button.Login"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
-                android:layout_margin="5dp"
-                android:layout_weight="1"
-                android:maxWidth="500dp"
+                android:maxWidth="400dp"
                 android:minWidth="300dp"
                 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:theme="@style/Button.Primary"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
                 android:layout_margin="5dp"
-                android:layout_weight="1"
                 android:maxWidth="500dp"
                 android:minWidth="300dp"
                 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>
 
         <TextView

+ 11 - 4
src/main/res/layout/log_send_file.xml

@@ -17,10 +17,11 @@
   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"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
-    android:weightSum="1" >
+    android:weightSum="1">
 
     <include
         layout="@layout/toolbar_standard" />
@@ -59,12 +60,15 @@
 
         <com.google.android.material.button.MaterialButton
         android:id="@+id/deleteLogHistoryButton"
-        android:theme="@style/Button"
+        android:theme="@style/OutlinedButton"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:layout_gravity="bottom"
         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" />
 
         <com.google.android.material.button.MaterialButton
         android:id="@+id/sendLogHistoryButton"
@@ -73,7 +77,10 @@
         android:layout_height="wrap_content"
         android:layout_gravity="bottom"
         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>
 

+ 8 - 6
src/main/res/layout/participate_layout.xml

@@ -19,11 +19,12 @@
   License along with this program. If not, see <http://www.gnu.org/licenses/>.
 -->
 <androidx.drawerlayout.widget.DrawerLayout android:id="@+id/drawer_layout"
-                                        xmlns:android="http://schemas.android.com/apk/res/android"
-                                        android:layout_width="match_parent"
-                                        android:layout_height="match_parent"
-                                        android:clickable="true"
-                                        android:fitsSystemWindows="true">
+    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_height="match_parent"
+    android:clickable="true"
+    android:fitsSystemWindows="true">
 
     <!-- The main content view -->
     <LinearLayout
@@ -65,7 +66,8 @@
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:text="@string/participate_testing_report_text"
-                    android:theme="@style/Button.Primary"/>
+                    android:theme="@style/Button.Primary"
+                    app:cornerRadius="@dimen/button_corner_radius" />
 
                 <TextView
                     android:id="@+id/participate_text"

+ 5 - 2
src/main/res/layout/passcodelock.xml

@@ -18,11 +18,13 @@
   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"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
+
     android:gravity="center_horizontal"
     android:orientation="vertical"
-    android:padding="@dimen/standard_padding" >
+    android:padding="@dimen/standard_padding">
 
     <TextView
         android:id="@+id/header"
@@ -94,6 +96,7 @@
         android:theme="@style/Button.Primary"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:text="@string/common_cancel" />
+        android:text="@string/common_cancel"
+        app:cornerRadius="@dimen/button_corner_radius" />
 
 </LinearLayout>

+ 6 - 4
src/main/res/layout/share_file_layout.xml

@@ -15,10 +15,10 @@
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
-<ScrollView
-    android:id="@+id/shareScroll"
+<ScrollView android:id="@+id/shareScroll"
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     tools:context="com.owncloud.android.ui.fragment.ShareFileFragment">
@@ -130,7 +130,8 @@
                 android:layout_gravity="center_horizontal"
                 android:contentDescription="@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>
 
@@ -341,7 +342,8 @@
                     android:layout_gravity="center_horizontal"
                     android:contentDescription="@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>
 

+ 2 - 3
src/main/res/layout/sso_dialog.xml

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

+ 2 - 2
src/main/res/layout/upload_files_layout.xml

@@ -87,7 +87,7 @@
             android:layout_weight="1"
             android:text="@string/common_cancel"
             android:theme="@style/OutlinedButton"
-            app:cornerRadius="120dp" />
+            app:cornerRadius="@dimen/button_corner_radius" />
 
         <com.google.android.material.button.MaterialButton
             android:id="@+id/upload_files_btn_upload"
@@ -96,7 +96,7 @@
             android:layout_weight="1"
             android:text="@string/uploader_btn_upload_text"
             android:theme="@style/Button.Primary"
-            app:cornerRadius="120dp" />
+            app:cornerRadius="@dimen/button_corner_radius" />
 
 	</LinearLayout>
 

+ 7 - 5
src/main/res/layout/uploader_layout.xml

@@ -18,10 +18,11 @@
   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"
     android:id="@+id/upload_files_layout"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
-    android:orientation="vertical" >
+    android:orientation="vertical">
 
     <include
         layout="@layout/toolbar_standard" />
@@ -63,16 +64,16 @@
         android:padding="@dimen/standard_padding">
 
         <com.google.android.material.button.MaterialButton
-            android:theme="@style/Button"
+            android:theme="@style/OutlinedButton"
             android:id="@+id/uploader_cancel"
-            style="@style/ownCloud.Button"
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:layout_gravity="bottom"
             android:layout_weight="1"
             android:text="@string/common_cancel"
             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" />
 
         <com.google.android.material.button.MaterialButton
 		    android:id="@+id/uploader_choose_folder"
@@ -81,7 +82,8 @@
 		    android:layout_height="wrap_content"
 		    android:layout_gravity="bottom"
 		    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>

+ 1 - 0
src/main/res/values/dims.xml

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

+ 1 - 0
src/main/res/values/styles.xml

@@ -132,6 +132,7 @@
 
 	<style name="Button.Login" parent="Button">
 		<item name="colorButtonNormal">@color/white</item>
+        <item name="colorAccent">@color/white</item>
 		<item name="android:textColor">@color/primary_dark</item>
 	</style>