Correct for Lint errors and warnings
This commit is contained in:
Родитель
a0e4a1aba4
Коммит
961953c0fd
|
@ -17,6 +17,16 @@ android {
|
|||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
lintOptions {
|
||||
// set to true to turn off analysis progress reporting by lint
|
||||
quiet false
|
||||
// if true, stop the gradle build if errors are found
|
||||
abortOnError true
|
||||
// if true, only report errors
|
||||
ignoreWarnings false
|
||||
// project specific lint options
|
||||
lintConfig new File(rootProject.projectDir, "lint.xml")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="loop.ms.looptestuser">
|
||||
|
||||
<!-- Not visible to Google App indexer -->
|
||||
<!--suppress GoogleAppIndexingWarning -->
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
|
|
|
@ -11,6 +11,8 @@ import android.widget.Button;
|
|||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import ms.loop.loopsdk.api.LoopHttpError;
|
||||
import ms.loop.loopsdk.core.ILoopServiceCallback;
|
||||
import ms.loop.loopsdk.core.LoopSDK;
|
||||
|
@ -71,9 +73,9 @@ public class MainActivity extends AppCompatActivity implements SharedPreferences
|
|||
public void run(){
|
||||
checkboxImageView.setVisibility(View.VISIBLE);
|
||||
|
||||
userIdView.setText("Current User Id\n" + LoopSDK.userId + "\n\nTest Count");
|
||||
userIdView.setText(String.format(Locale.US, "Current User Id\n%s\n\nTest Count", LoopSDK.userId));
|
||||
userIdView.setVisibility(View.VISIBLE);
|
||||
profileCountView.setText(String.format("%.0f", score));
|
||||
profileCountView.setText(String.format(Locale.US, "%.0f", score));
|
||||
profileCountView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<Button
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:text="Get test profile"
|
||||
android:text="@string/get_test_profile"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="#208DED"
|
||||
android:textColor="#fff"
|
||||
|
@ -42,7 +42,7 @@
|
|||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Current User Id:"
|
||||
android:text="@string/current_user_id"
|
||||
android:layout_marginTop="20dp"
|
||||
android:textColor="#FF000000"
|
||||
android:textSize="20sp"
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<resources>
|
||||
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
|
||||
(such as screen margins) for screens with more than 820dp of available width. This
|
||||
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
|
||||
<dimen name="activity_horizontal_margin">64dp</dimen>
|
||||
</resources>
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
</resources>
|
|
@ -1,5 +0,0 @@
|
|||
<resources>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
</resources>
|
|
@ -1,3 +1,5 @@
|
|||
<resources>
|
||||
<string name="app_name">Loop Test User</string>
|
||||
<string name="get_test_profile">Get test profile</string>
|
||||
<string name="current_user_id">Current User Id:</string>
|
||||
</resources>
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<lint>
|
||||
<issue id="InvalidPackage">
|
||||
<!-- due to an issue with okio, we need to exclude lint errors for it -->
|
||||
<!-- http://stackoverflow.com/questions/35492259/lint-error-on-okio -->
|
||||
<!-- https://github.com/square/okio/issues/58 -->
|
||||
<ignore regexp=".*okio.*" />
|
||||
|
||||
<!-- due to an issue with Apache Commons Math3, we need to exclude lint errors for it -->
|
||||
<ignore regexp="org.apache.commons.math3.*" />
|
||||
</issue>
|
||||
|
||||
<!-- Disable check for old api versions -->
|
||||
<issue id="OldTargetApi" severity="ignore" />
|
||||
|
||||
<!-- Disable check for old versions of Gradle dependencies -->
|
||||
<issue id="GradleDependency" severity="ignore" />
|
||||
|
||||
<!-- Disable check for 'center' attribute on API level 15 -->
|
||||
<issue id="UnusedAttribute" severity="ignore" />
|
||||
|
||||
<!-- Disable check for drawable density -->
|
||||
<issue id="IconLocation" severity="ignore" />
|
||||
|
||||
<!-- Disable check ImageView content description -->
|
||||
<issue id="ContentDescription" severity="ignore" />
|
||||
</lint>
|
Загрузка…
Ссылка в новой задаче