Browse Source

Enhanced code syntax

Signed-off-by: Kilian Périsset <kilian.perisset@infomaniak.com>
Kilian Périsset 5 years ago
parent
commit
f41e2c80b8

+ 2 - 1
src/main/java/com/owncloud/android/ui/adapter/UserListAdapter.java

@@ -74,7 +74,8 @@ public class UserListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
                            List<UserListItem> values,
                            Drawable tintedCheck,
                            ClickListener clickListener,
-                           boolean showAddAccount, boolean showDotsMenu) {
+                           boolean showAddAccount,
+                           boolean showDotsMenu) {
         this.context = context;
         this.accountManager = accountManager;
         this.values = values;

+ 2 - 1
src/main/java/com/owncloud/android/ui/dialog/MultipleAccountsDialog.java

@@ -95,7 +95,8 @@ public class MultipleAccountsDialog extends DialogFragment implements Injectable
                                                       getAccountListItems(),
                                                       tintedCheck,
                                                       this,
-                                                      false, false);
+                                                      false,
+                                                      false);
 
         listView.setHasFixedSize(true);
         listView.setLayoutManager(new LinearLayoutManager(activity));

+ 25 - 4
src/main/res/drawable/ic_check_circle.xml

@@ -1,5 +1,26 @@
-<vector android:height="24dp" android:tint="#4995FB"
-    android:viewportHeight="24.0" android:viewportWidth="24.0"
-    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
-    <path android:fillColor="#FF000000" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9z"/>
+<!--
+    @author Google LLC
+    Copyright (C) 2020 Google LLC
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:tint="#4995FB"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9z" />
 </vector>

+ 0 - 1
src/main/res/layout/account_item.xml

@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-
 <!--
   Nextcloud Android client application
 

+ 5 - 5
src/main/res/layout/dialog_choose_account.xml

@@ -44,9 +44,9 @@
         android:id="@+id/accounts_list"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
-        app:layout_constrainedHeight="true"
         android:layout_marginBottom="@dimen/account_action_button_vertical_margin"
         app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
+        app:layout_constrainedHeight="true"
         app:layout_constraintBottom_toTopOf="@+id/add_account"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
@@ -57,8 +57,8 @@
         style="@style/Widget.MaterialComponents.Button.TextButton.Icon"
         android:layout_width="0dp"
         android:layout_height="@dimen/account_action_button_height"
-        android:layout_marginStart="@dimen/account_action_button_margin"
-        android:layout_marginEnd="@dimen/account_action_button_margin"
+        android:layout_marginStart="@dimen/standard_half_margin"
+        android:layout_marginEnd="@dimen/standard_half_margin"
         android:paddingStart="10dp"
         android:paddingEnd="0dp"
         android:text="@string/prefs_add_account"
@@ -78,8 +78,8 @@
         style="@style/Widget.MaterialComponents.Button.TextButton.Icon"
         android:layout_width="0dp"
         android:layout_height="@dimen/account_action_button_height"
-        android:layout_marginStart="@dimen/account_action_button_margin"
-        android:layout_marginEnd="@dimen/account_action_button_margin"
+        android:layout_marginStart="@dimen/standard_half_margin"
+        android:layout_marginEnd="@dimen/standard_half_margin"
         android:paddingStart="12dp"
         android:paddingEnd="0dp"
         android:text="@string/prefs_manage_accounts"

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

@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
+<?xml version="1.0" encoding="utf-8"?><!--
   ownCloud Android client application
 
   Copyright (C) 2014 ownCloud Inc.
@@ -144,7 +143,6 @@
     <dimen name="button_corner_radius">24dp</dimen>
     <integer name="media_grid_width">4</integer>
     <dimen name="copy_internal_link_padding">10dp</dimen>
-    <dimen name="account_action_button_margin">8dp</dimen>
     <dimen name="account_action_button_height">50dp</dimen>
     <dimen name="account_action_button_vertical_margin">10dp</dimen>
 </resources>