Przeglądaj źródła

fix codacy warnings and formatting

AndyScherzinger 8 lat temu
rodzic
commit
53e67c431e

+ 20 - 24
src/com/owncloud/android/ui/components/CustomEditText.java

@@ -1,22 +1,23 @@
 /**
- * Nextcloud Android client application
+ *   Nextcloud Android client application
  *
- * @author Mario Danic
- * Copyright (C) 2017 Mario Danic
- * <p>
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * at your option) any later version.
- * <p>
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- * <p>
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *   @author Mario Danic
+ *   Copyright (C) 2017 Mario Danic
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ *   License as published by the Free Software Foundation; either
+ *   version 3 of the License, or any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ *   You should have received a copy of the GNU Affero General Public
+ *   License along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
+
 package com.owncloud.android.ui.components;
 
 import android.content.Context;
@@ -31,7 +32,6 @@ import com.owncloud.android.authentication.AuthenticatorActivity;
 /**
  * Custom edit text to support fixed suffix or prefix
  */
-
 public class CustomEditText extends android.support.v7.widget.AppCompatEditText {
     private Rect fixedRect = new Rect();
     private String fixedText = "";
@@ -53,8 +53,6 @@ public class CustomEditText extends android.support.v7.widget.AppCompatEditText
         if (TextUtils.isEmpty(fixedText)) {
             setHint(R.string.auth_host_url);
         }
-
-
     }
 
     public String getFullServerUrl() {
@@ -80,11 +78,10 @@ public class CustomEditText extends android.support.v7.widget.AppCompatEditText
         super.onDraw(canvas);
         if (!TextUtils.isEmpty(fixedText)) {
             if (isPrefixFixed) {
-                canvas.drawText(fixedText, super.getCompoundPaddingLeft(),
-                        getBaseline(), getPaint());
+                canvas.drawText(fixedText, super.getCompoundPaddingLeft(), getBaseline(), getPaint());
             } else {
-                canvas.drawText(fixedText, super.getCompoundPaddingLeft() + getPaint().measureText(
-                        getText().toString()), getBaseline(), getPaint());
+                canvas.drawText(fixedText, super.getCompoundPaddingLeft()
+                        + getPaint().measureText(getText().toString()), getBaseline(), getPaint());
             }
         }
     }
@@ -97,5 +94,4 @@ public class CustomEditText extends android.support.v7.widget.AppCompatEditText
             return super.getCompoundPaddingLeft();
         }
     }
-
 }

+ 0 - 4
src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java

@@ -43,9 +43,7 @@ import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentTransaction;
 import android.text.Editable;
-import android.text.InputFilter;
 import android.text.InputType;
-import android.text.Spanned;
 import android.text.TextWatcher;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
@@ -100,8 +98,6 @@ import java.util.Map;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
-import static android.provider.ContactsContract.CommonDataKinds.StructuredName.PREFIX;
-
 /**
  * This Activity is used to add an ownCloud account to the App
  */

+ 1 - 1
src/main/res/layout-land/account_setup.xml

@@ -90,7 +90,7 @@
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content">
 
-						<com.owncloud.android.ui.components.CustomEditText
+                        <com.owncloud.android.ui.components.CustomEditText
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
                             android:layout_gravity="bottom"