Overview
Correctness | |
2 | warning DefaultLocale: Implied default locale in case conversion |
1 | warning SimpleDateFormat: Implied locale in date format |
1 | warning FragmentTagUsage: Use FragmentContainerView instead of the <fragment> tag |
9 | warning GradleDependency: Obsolete Gradle Dependency |
2 | warning ExtraText: Extraneous text in resource files |
6 | warning
SpUsage: Using dp instead of sp for text sizes |
3 | warning
UseCompatTextViewDrawableXml: Compat compound drawable attributes should be used on TextView |
Performance | |
1 | warning ObsoleteLayoutParam: Obsolete layout params |
2 | warning ObsoleteSdkInt: Obsolete SDK_INT Version Check |
4 | warning StaticFieldLeak: Static Field Leaks |
1 | warning
MergeRootFrame: FrameLayout can be replaced with <merge> tag |
1 | warning
UseValueOf: Should use valueOf instead of new |
1 | warning
DisableBaselineAlignment: Missing baselineAligned attribute |
5 | warning UnusedResources: Unused resources |
2 | warning RedundantNamespace: Redundant namespace |
Usability | |
1 | warning
TextFields: Missing inputType |
4 | warning Autofill: Use Autofill |
Accessibility | |
6 | warning
ContentDescription: Image without contentDescription |
Internationalization | |
39 | warning SetTextI18n: TextView Internationalization |
51 | warning HardcodedText: Hardcoded text |
Internationalization:Bidirectional Text | |
7 | warning RtlSymmetry: Padding and margin symmetry |
36 | warning RtlHardcoded: Using left/right instead of start/end attributes |
Testing | |
1 | warning IgnoreWithoutReason: @Ignore without Reason |
Disabled Checks (35) |
Implied default locale in case conversion
../../src/main/java/com/example/qr_go/adapters/UserArrayAdapter.java:140:
137 if (constraint == null || constraint.length() == 0) { 138 filteredList.addAll(allUserDisplays); 139 } else { 140 String filterPattern = constraint.toString().toLowerCase().trim(); 141 142 for (UserListDisplayContainer item : allUserDisplays) { 143 if (item.getUsername().toLowerCase().contains(filterPattern)) {../../src/main/java/com/example/qr_go/adapters/UserArrayAdapter.java:143:
140 String filterPattern = constraint.toString().toLowerCase().trim(); 141 142 for (UserListDisplayContainer item : allUserDisplays) { 143 if (item.getUsername().toLowerCase().contains(filterPattern)) { 144 filteredList.add(item); 145 } 146 }
DefaultLocale
Correctness
Warning
Priority 6/10
Implied locale in date format
../../src/main/java/com/example/qr_go/objects/CommentsQR.java:53:
50 details.put("Username", user.getUsername()); 51 details.put("Message", message); 52 Date date = Calendar.getInstance().getTime(); 53 DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd '@'hh:mm:ss a"); 54 String strDate = dateFormat.format(date); 55 comments.put(strDate, details); 56 }
SimpleDateFormat
Correctness
Warning
Priority 6/10
Use FragmentContainerView instead of the <fragment> tag
../../src/main/res/layout/activity_maps.xml:20:
17 app:layout_constraintRight_toRightOf="parent" 18 app:menu="@menu/bottom_nav_menu" /> 19 20 <fragment xmlns:android="http://schemas.android.com/apk/res/android" 21 xmlns:map="http://schemas.android.com/apk/res-auto" 22 xmlns:tools="http://schemas.android.com/tools" 23 android:id="@+id/map"
Vendor: Android Open Source Project (fragment-1.4.0)
Identifier: fragment-1.4.0
Feedback: https://issuetracker.google.com/issues/new?component=192731
Identifier: fragment-1.4.0
Feedback: https://issuetracker.google.com/issues/new?component=192731
FragmentTagUsage
Correctness
Warning
Priority 5/10
Obsolete Gradle Dependency
../../build.gradle:43:
40 implementation 'com.github.yuriy-budiyev:code-scanner:2.1.1' 41 implementation 'androidx.appcompat:appcompat:1.4.1' 42 implementation 'com.google.android.material:material:1.5.0' 43 implementation 'com.google.android.gms:play-services-maps:17.0.1' 44 implementation 'androidx.constraintlayout:constraintlayout:2.1.3' 45 implementation 'com.google.firebase:firebase-firestore:24.0.1' 46 implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0'../../build.gradle:45:
42 implementation 'com.google.android.material:material:1.5.0' 43 implementation 'com.google.android.gms:play-services-maps:17.0.1' 44 implementation 'androidx.constraintlayout:constraintlayout:2.1.3' 45 implementation 'com.google.firebase:firebase-firestore:24.0.1' 46 implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0' 47 implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0' 48 implementation 'androidx.navigation:navigation-fragment:2.4.0'../../build.gradle:46:
43 implementation 'com.google.android.gms:play-services-maps:17.0.1' 44 implementation 'androidx.constraintlayout:constraintlayout:2.1.3' 45 implementation 'com.google.firebase:firebase-firestore:24.0.1' 46 implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0' 47 implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0' 48 implementation 'androidx.navigation:navigation-fragment:2.4.0' 49 implementation 'androidx.navigation:navigation-ui:2.4.0'../../build.gradle:47:
44 implementation 'androidx.constraintlayout:constraintlayout:2.1.3' 45 implementation 'com.google.firebase:firebase-firestore:24.0.1' 46 implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0' 47 implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0' 48 implementation 'androidx.navigation:navigation-fragment:2.4.0' 49 implementation 'androidx.navigation:navigation-ui:2.4.0' 50 implementation platform('com.google.firebase:firebase-bom:29.3.0')../../build.gradle:48:
45 implementation 'com.google.firebase:firebase-firestore:24.0.1' 46 implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0' 47 implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0' 48 implementation 'androidx.navigation:navigation-fragment:2.4.0' 49 implementation 'androidx.navigation:navigation-ui:2.4.0' 50 implementation platform('com.google.firebase:firebase-bom:29.3.0') 51 implementation 'com.google.firebase:firebase-storage'+ 4 More Occurrences...
GradleDependency
Correctness
Warning
Priority 4/10
Extraneous text in resource files
../../src/main/res/layout/list_scanned_users_content.xml:8:
4 xmlns:tools="http://schemas.android.com/tools" 5 android:layout_width="match_parent" 6 android:layout_height="match_parent"> 7 android:layout_margin="10dp" 8 9 <androidx.cardview.widget.CardView 10 android:id="@+id/photo_container"../../src/main/res/layout/user_list_content.xml:21:
17 app:cardCornerRadius="30dp" 18 app:layout_constraintStart_toStartOf="parent" 19 app:layout_constraintTop_toTopOf="parent"> 20 android:layout_alignParentLeft="true" 21 22 <com.google.android.material.imageview.ShapeableImageView 23 android:id="@+id/user_picture"
ExtraText
Correctness
Warning
Priority 3/10
Using dp instead of sp for text sizes
../../src/main/res/layout/activity_player_info.xml:189:
186 android:layout_marginTop="10dp" 187 android:layout_marginBottom="10dp" 188 android:text="Scanned QR codes:" 189 android:textSize="20dp" /> 190 </LinearLayout> 191 192../../src/main/res/layout/activity_qr_info.xml:34:
31 android:layout_height="wrap_content" 32 android:layout_marginLeft="24dp" 33 android:text="QR NAME" 34 android:textSize="20dp" 35 android:textStyle="bold" 36 app:layout_constraintStart_toStartOf="parent" 37 app:layout_constraintTop_toTopOf="parent" />../../src/main/res/layout/activity_qr_info.xml:60:
57 android:layout_marginTop="16dp" 58 android:layout_marginEnd="16dp" 59 android:text="Score: N/A" 60 android:textSize="20dp" 61 android:textStyle="bold" 62 app:layout_constraintEnd_toEndOf="parent" 63 app:layout_constraintStart_toStartOf="parent"../../src/main/res/layout/activity_scanned_users.xml:16:
13 android:layout_marginTop="16dp" 14 android:layout_width="wrap_content" 15 android:layout_height="wrap_content" 16 android:textSize="20dp" 17 android:text="Scanned User List" 18 android:textStyle="bold"/> 19 <ListView../../src/main/res/layout/list_comments_content.xml:40:
37 android:layout_width="wrap_content" 38 android:layout_height="wrap_content" 39 android:text="User Name" 40 android:textSize="16dp" 41 android:textStyle="bold" /> 42 43 <TextView../../src/main/res/layout/list_comments_content.xml:48:
45 android:layout_width="wrap_content" 46 android:layout_height="wrap_content" 47 android:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." 48 android:textSize="16dp" 49 app:layout_constraintEnd_toEndOf="parent" /> 50 51 </LinearLayout>
SpUsage
Correctness
Warning
Priority 3/10
Compat compound drawable attributes should be used on TextView
../../src/main/res/layout/activity_qr_info.xml:43:
40 android:id="@+id/qrLocation" 41 android:layout_width="match_parent" 42 android:layout_height="wrap_content" 43 android:drawableStart="@drawable/baseline_place_24" 44 android:drawablePadding="0dp" 45 android:text="NO LOCATION DATA" 46 android:textSize="14sp"../../src/main/res/layout/player_profile_activity.xml:93:
90 android:layout_marginStart="32dp" 91 android:layout_marginEnd="32dp" 92 android:clickable="true" 93 android:drawableStart="@drawable/round_qr_code_scanner_24" 94 android:drawablePadding="10dp" 95 android:onClick="generateLoginQR" 96 android:padding="10dp"../../src/main/res/layout/player_profile_activity.xml:112:
109 android:layout_marginTop="88dp" 110 android:layout_marginEnd="32dp" 111 android:clickable="true" 112 android:drawableStart="@drawable/round_qr_code_scanner_24" 113 android:drawablePadding="10dp" 114 android:onClick="generateStatusQR" 115 android:padding="10dp"
Vendor: Android Open Source Project (appcompat-1.4.1)
Identifier: appcompat-1.4.1
Feedback: https://issuetracker.google.com/issues/new?component=192731
Identifier: appcompat-1.4.1
Feedback: https://issuetracker.google.com/issues/new?component=192731
UseCompatTextViewDrawableXml
Correctness
Warning
Priority 1/10
Obsolete layout params
../../src/main/res/layout/activity_search.xml:20:
17 android:id="@+id/sort_spinner" 18 android:layout_width="wrap_content" 19 android:layout_height="wrap_content" 20 android:layout_weight="1" 21 android:layout_alignParentRight="true" 22 android:layout_gravity="bottom" 23 android:background="@null"/>
ObsoleteLayoutParam
Performance
Warning
Priority 6/10
Obsolete SDK_INT Version Check
ObsoleteSdkInt
Performance
Warning
Priority 6/10
Static Field Leaks
../../src/main/java/com/example/qr_go/activities/MapsActivity.java:52:
49 private GoogleMap mMap; 50 private static String currentUUID; // userId singleton 51 private static String userPassword; // password singleton 52 public static FirebaseFirestore db; // database singleton 53 public static FirebaseStorage storage; 54 private static SharedPreferences sharedPrefs; 55 protected LocationManager locationManager;../../src/main/java/com/example/qr_go/activities/PlayerProfileActivity.java:51:
48 @RequiresApi(api = Build.VERSION_CODES.O) 49 public class PlayerProfileActivity extends BaseActivity { 50 public StringUtil stringUtil = new StringUtil(); 51 public static FirebaseFirestore db; 52 private Player currentUser = new Player(); 53 private String currentUserId; 54 public static final int GET_FROM_GALLERY = 3;../../src/main/java/com/example/qr_go/activities/SearchActivity.java:77:
74 private static ArrayList<QRListDisplayContainer> qrDisplays; 75 76 // The search bar 77 private static EditText searchBar; 78 79 // The qr search spinner 80 private static Spinner qrSearchSpinner;../../src/main/java/com/example/qr_go/activities/SearchActivity.java:80:
77 private static EditText searchBar; 78 79 // The qr search spinner 80 private static Spinner qrSearchSpinner; 81 // The qr search spinner's adapter 82 private QRSearchSpinnerAdapter qrSearchSpinnerAdapter; 83 // String array holding qr search options
StaticFieldLeak
Performance
Warning
Priority 6/10
FrameLayout can be replaced with <merge> tag
../../src/main/res/layout/activity_code_scanner.xml:2:
1 <?xml version="1.0" encoding="utf-8"?> 2 <FrameLayout 3 xmlns:android="http://schemas.android.com/apk/res/android" 4 xmlns:app="http://schemas.android.com/apk/res-auto" 5 android:layout_width="match_parent"
MergeRootFrame
Performance
Warning
Priority 4/10
Should use valueOf instead of new
../../src/main/java/com/example/qr_go/fragments/UserSearchFragment.java:84:
81 int rank = 1; 82 int userPos = 0; 83 for (UserListDisplayContainer user : userDisplays) { 84 user.setRankPosition(new Integer(rank)); 85 if (user.getIsCurrentUser()) { 86 userPos = rank-1; 87 }
UseValueOf
Performance
Warning
Priority 4/10
Missing baselineAligned attribute
../../src/main/res/layout/activity_player_info.xml:131:
128 129 </LinearLayout> 130 131 <LinearLayout 132 android:layout_width="match_parent" 133 android:layout_height="wrap_content" 134 android:orientation="horizontal"
DisableBaselineAlignment
Performance
Warning
Priority 3/10
Unused resources
../../src/main/res/layout/activity_my_qr_codes.xml:3:
1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- CODE IS DEPRECIATED IN FAVOR OF activity_player_info.xml --> 3 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" 4 xmlns:app="http://schemas.android.com/apk/res-auto" 5 android:id="@+id/container" 6 android:layout_width="match_parent"../../src/main/res/values/colors.xml:10:
7 <color name="teal_700">#FF018786</color> 8 <color name="black">#FF000000</color> 9 <color name="white">#FFFFFFFF</color> 10 <color name="gray">#F0F0F0</color> 11 </resources>../../src/main/res/drawable/ic_baseline_chevron_left_24.xml:1:
1 <vector xmlns:android="http://schemas.android.com/apk/res/android" 2 android:width="24dp" 3 android:height="24dp" 4 android:viewportWidth="24"../../src/main/res/drawable/sample_prof_pic.xml:2:
1 <?xml version="1.0" encoding="utf-8"?> 2 <selector xmlns:android="http://schemas.android.com/apk/res/android"> 3 4 </selector>../../src/main/res/values/strings.xml:3:
1 <resources> 2 <string name="app_name">QR Go</string> 3 <string name="title_activity_maps">MapsActivity</string> 4 </resources>
UnusedResources
Performance
Warning
Priority 3/10
Redundant namespace
../../src/main/res/layout/activity_maps.xml:20:
17 app:layout_constraintRight_toRightOf="parent" 18 app:menu="@menu/bottom_nav_menu" /> 19 20 <fragment xmlns:android="http://schemas.android.com/apk/res/android" 21 xmlns:map="http://schemas.android.com/apk/res-auto" 22 xmlns:tools="http://schemas.android.com/tools" 23 android:id="@+id/map"../../src/main/res/layout/activity_search.xml:89:
86 android:layout_margin="0dp" 87 android:orientation="vertical"> 88 <androidx.viewpager2.widget.ViewPager2 89 xmlns:android="http://schemas.android.com/apk/res/android" 90 android:id="@+id/search_pager" 91 android:layout_width="match_parent" 92 android:layout_height="0dp"
RedundantNamespace
Performance
Warning
Priority 1/10
Missing inputType
../../src/main/res/layout/player_profile_activity.xml:38:
35 android:drawableStart="@android:drawable/sym_action_email" 36 android:drawablePadding="10dp" 37 android:hint="Email" 38 android:inputType="textPersonName" 39 app:layout_constraintEnd_toEndOf="parent" 40 app:layout_constraintHorizontal_bias="0.0" 41 app:layout_constraintStart_toStartOf="parent"
26 27 28 <EditText 29 android:id="@+id/player_email" 30 android:layout_width="match_parent" 31 android:layout_height="wrap_content" 32 android:layout_marginStart="40dp"
TextFields
Usability
Warning
Priority 5/10
Use Autofill
../../src/main/res/layout/activity_qr_info.xml:121:
118 app:layout_constraintBottom_toTopOf="@id/bottom_nav_view" 119 app:layout_constraintEnd_toEndOf="parent" /> 120 121 <EditText 122 android:id="@+id/inputComment" 123 android:layout_width="0dp" 124 android:layout_height="wrap_content"../../src/main/res/layout/activity_search.xml:32:
29 android:layout_height="45dp" 30 android:layout_marginTop="0dp" 31 android:layout_marginHorizontal="15dp"> 32 <EditText 33 android:id="@+id/search_bar" 34 android:layout_width="match_parent" 35 android:layout_height="match_parent"../../src/main/res/layout/player_profile_activity.xml:28:
25 </androidx.cardview.widget.CardView> 26 27 28 <EditText 29 android:id="@+id/player_email" 30 android:layout_width="match_parent" 31 android:layout_height="wrap_content"../../src/main/res/layout/player_profile_activity.xml:44:
41 app:layout_constraintStart_toStartOf="parent" 42 app:layout_constraintTop_toBottomOf="@+id/player_username" /> 43 44 <EditText 45 android:id="@+id/player_username" 46 android:layout_width="match_parent" 47 android:layout_height="wrap_content"
Autofill
Usability
Warning
Priority 3/10
Image without contentDescription
../../src/main/res/layout/activity_new_game_qr_activity.xml:81:
78 app:layout_constraintHorizontal_bias="0.497" 79 app:layout_constraintStart_toStartOf="parent" /> 80 81 <ImageView 82 android:id="@+id/take_qr_photo_imageview" 83 android:layout_width="170dp" 84 android:layout_height="170dp"../../src/main/res/layout/activity_player_info.xml:35:
32 app:layout_constraintStart_toStartOf="parent" 33 app:layout_constraintTop_toTopOf="parent"> 34 35 <ImageView 36 android:id="@+id/profile_photo" 37 android:layout_width="match_parent" 38 android:layout_height="match_parent"../../src/main/res/layout/activity_qr_info.xml:8:
5 android:layout_width="match_parent" 6 android:layout_height="match_parent"> 7 8 <ImageView 9 android:id="@+id/profile_photo" 10 android:layout_width="120dp" 11 android:layout_height="120dp"../../src/main/res/layout/fragment_show_qr_code.xml:8:
5 android:layout_width="match_parent" 6 android:layout_height="match_parent"> 7 8 <ImageView 9 android:id="@+id/qr_code_image" 10 android:layout_width="wrap_content" 11 android:layout_height="wrap_content"../../src/main/res/layout/list_comments_content.xml:18:
15 app:layout_constraintStart_toStartOf="parent" 16 app:layout_constraintTop_toTopOf="parent"> 17 18 <ImageView 19 android:id="@+id/commenterPhoto" 20 android:layout_width="match_parent" 21 android:layout_height="match_parent"../../src/main/res/layout/player_profile_activity.xml:20:
17 app:layout_constraintStart_toStartOf="parent" 18 app:layout_constraintTop_toTopOf="parent"> 19 20 <ImageView 21 android:id="@+id/profile_photo" 22 android:layout_width="match_parent" 23 android:layout_height="match_parent"
ContentDescription
Accessibility
Warning
Priority 3/10
TextView Internationalization
../../src/main/java/com/example/qr_go/activities/MyQRCodesActivity.java:115:
112 qrDisplays.add(qrToDisplay); 113 } 114 playernameText.setText(selectedPlayer.getUsername()); 115 highestScoreText.setText(Integer.toString(selectedPlayer.getHighestUniqueScore())); 116 lowestScoreText.setText(Integer.toString(selectedPlayer.getLowestUniqueScore())); 117 qrNumText.setText(Integer.toString(selectedPlayer.getScannedQRCodeIds().size())); 118 totalScoreText.setText(Integer.toString(selectedPlayer.getTotalScore()));../../src/main/java/com/example/qr_go/activities/MyQRCodesActivity.java:116:
113 } 114 playernameText.setText(selectedPlayer.getUsername()); 115 highestScoreText.setText(Integer.toString(selectedPlayer.getHighestUniqueScore())); 116 lowestScoreText.setText(Integer.toString(selectedPlayer.getLowestUniqueScore())); 117 qrNumText.setText(Integer.toString(selectedPlayer.getScannedQRCodeIds().size())); 118 totalScoreText.setText(Integer.toString(selectedPlayer.getTotalScore())); 119 highestQRCode = selectedPlayer.getHighestQRCode();../../src/main/java/com/example/qr_go/activities/MyQRCodesActivity.java:117:
114 playernameText.setText(selectedPlayer.getUsername()); 115 highestScoreText.setText(Integer.toString(selectedPlayer.getHighestUniqueScore())); 116 lowestScoreText.setText(Integer.toString(selectedPlayer.getLowestUniqueScore())); 117 qrNumText.setText(Integer.toString(selectedPlayer.getScannedQRCodeIds().size())); 118 totalScoreText.setText(Integer.toString(selectedPlayer.getTotalScore())); 119 highestQRCode = selectedPlayer.getHighestQRCode(); 120 highestScoreQrIDText.setText(highestQRCode.getKey().substring(0, 6));../../src/main/java/com/example/qr_go/activities/MyQRCodesActivity.java:118:
115 highestScoreText.setText(Integer.toString(selectedPlayer.getHighestUniqueScore())); 116 lowestScoreText.setText(Integer.toString(selectedPlayer.getLowestUniqueScore())); 117 qrNumText.setText(Integer.toString(selectedPlayer.getScannedQRCodeIds().size())); 118 totalScoreText.setText(Integer.toString(selectedPlayer.getTotalScore())); 119 highestQRCode = selectedPlayer.getHighestQRCode(); 120 highestScoreQrIDText.setText(highestQRCode.getKey().substring(0, 6)); 121 highestScoreQrScoreText.setText("Score: " + highestQRCode.getValue().toString());../../src/main/java/com/example/qr_go/activities/MyQRCodesActivity.java:121:
118 totalScoreText.setText(Integer.toString(selectedPlayer.getTotalScore())); 119 highestQRCode = selectedPlayer.getHighestQRCode(); 120 highestScoreQrIDText.setText(highestQRCode.getKey().substring(0, 6)); 121 highestScoreQrScoreText.setText("Score: " + highestQRCode.getValue().toString()); 122 lowestQRCode = selectedPlayer.getLowestQRCode(); 123 lowestScoreQrIDText.setText(lowestQRCode.getKey().substring(0, 6)); 124 lowestScoreQrScoreText.setText("Score: " + lowestQRCode.getValue().toString());+ 34 More Occurrences...
SetTextI18n
Internationalization
Warning
Priority 6/10
Hardcoded text
../../src/main/res/layout/activity_new_game_qr_activity.xml:19:
16 android:layout_width="wrap_content" 17 android:layout_height="wrap_content" 18 android:layout_marginTop="8dp" 19 android:text="123" 20 android:textAlignment="center" 21 android:textSize="48sp" 22 android:textStyle="bold"../../src/main/res/layout/activity_new_game_qr_activity.xml:33:
30 android:layout_width="wrap_content" 31 android:layout_height="wrap_content" 32 android:layout_marginTop="64dp" 33 android:text="Score" 34 android:textSize="20sp" 35 app:layout_constraintEnd_toEndOf="parent" 36 app:layout_constraintStart_toStartOf="parent"../../src/main/res/layout/activity_new_game_qr_activity.xml:46:
43 android:layout_marginBottom="124dp" 44 android:backgroundTint="@color/purple_500" 45 android:onClick="saveNewQRCode" 46 android:text="Save" 47 android:textColor="@color/white" 48 app:layout_constraintBottom_toBottomOf="parent" 49 app:layout_constraintEnd_toEndOf="parent"../../src/main/res/layout/activity_new_game_qr_activity.xml:59:
56 android:layout_height="wrap_content" 57 android:layout_marginBottom="48dp" 58 android:checked="true" 59 android:text="Save location" 60 android:textSize="16sp" 61 app:layout_constraintBottom_toTopOf="@+id/save_game_qr" 62 app:layout_constraintEnd_toEndOf="parent"../../src/main/res/layout/activity_new_game_qr_activity.xml:74:
71 android:drawableStart="@android:drawable/ic_menu_gallery" 72 android:drawablePadding="10dp" 73 android:onClick="launchTakePhoto" 74 android:text="Take photo of object" 75 android:textColor="#000000" 76 app:layout_constraintBottom_toTopOf="@+id/location_checkbox" 77 app:layout_constraintEnd_toEndOf="parent"+ 46 More Occurrences...
HardcodedText
Internationalization
Warning
Priority 5/10
Padding and margin symmetry
../../src/main/res/layout/activity_player_info.xml:74:
71 android:layout_height="wrap_content" 72 android:orientation="horizontal"> 73 <LinearLayout 74 android:paddingRight="16dp" 75 android:layout_width="match_parent" 76 android:layout_height="wrap_content" 77 android:orientation="vertical">../../src/main/res/layout/list_scanned_users_content.xml:15:
12 android:layout_height="50dp" 13 android:layout_alignParentTop="false" 14 android:layout_centerVertical="true" 15 android:paddingRight="10dp" 16 app:cardCornerRadius="30dp" 17 app:layout_constraintStart_toStartOf="parent" 18 app:layout_constraintTop_toTopOf="parent">../../src/main/res/layout/qr_list_content.xml:16:
13 android:layout_height="50dp" 14 android:layout_alignParentLeft="true" 15 android:layout_centerVertical="true" 16 android:paddingRight="10dp" 17 android:src="@drawable/round_qr_code_scanner_24" /> 18 19 <LinearLayout../../src/main/res/layout/qr_search_spinner_item.xml:14:
11 android:layout_height="35dp" 12 android:layout_width="35dp" 13 app:tint="?colorPrimary" 14 android:paddingRight="10dp" 15 android:src="@drawable/ic_baseline_public_24" 16 android:layout_centerVertical="true" /> 17../../src/main/res/layout/user_list_content.xml:16:
13 android:layout_height="50dp" 14 android:layout_alignParentTop="false" 15 android:layout_centerVertical="true" 16 android:paddingRight="10dp" 17 app:cardCornerRadius="30dp" 18 app:layout_constraintStart_toStartOf="parent" 19 app:layout_constraintTop_toTopOf="parent">../../src/main/res/layout/user_list_content.xml:79:
76 android:layout_height="wrap_content" 77 android:layout_alignParentRight="true" 78 android:layout_centerVertical="true" 79 android:paddingRight="0dp" 80 android:visibility="gone" 81 app:icon="@drawable/ic_baseline_delete_24" 82 app:iconSize="30dp" />../../src/main/res/layout/user_qr_list_content.xml:16:
13 android:layout_height="50dp" 14 android:layout_alignParentLeft="true" 15 android:layout_centerVertical="true" 16 android:paddingRight="10dp" 17 android:src="@drawable/round_qr_code_scanner_24" /> 18 19 <LinearLayout
RtlSymmetry
Bidirectional Text
Internationalization
Warning
Priority 6/10
Using left/right instead of start/end attributes
../../src/main/res/layout/activity_player_info.xml:30:
27 android:layout_width="100dp" 28 android:layout_height="100dp" 29 app:cardCornerRadius="60dp" 30 android:layout_marginLeft="50dp" 31 app:layout_constraintEnd_toEndOf="parent" 32 app:layout_constraintStart_toStartOf="parent" 33 app:layout_constraintTop_toTopOf="parent">../../src/main/res/layout/activity_player_info.xml:47:
44 <LinearLayout 45 android:layout_width="200dp" 46 android:layout_height="128dp" 47 android:layout_marginLeft="50dp" 48 android:orientation="vertical"> 49 50 <TextView../../src/main/res/layout/activity_player_info.xml:74:
71 android:layout_height="wrap_content" 72 android:orientation="horizontal"> 73 <LinearLayout 74 android:paddingRight="16dp" 75 android:layout_width="match_parent" 76 android:layout_height="wrap_content" 77 android:orientation="vertical">../../src/main/res/layout/activity_qr_info.xml:32:
29 android:id="@+id/qrName" 30 android:layout_width="wrap_content" 31 android:layout_height="wrap_content" 32 android:layout_marginLeft="24dp" 33 android:text="QR NAME" 34 android:textSize="20dp" 35 android:textStyle="bold"../../src/main/res/layout/activity_search.xml:21:
18 android:layout_width="wrap_content" 19 android:layout_height="wrap_content" 20 android:layout_weight="1" 21 android:layout_alignParentRight="true" 22 android:layout_gravity="bottom" 23 android:background="@null"/> 24+ 31 More Occurrences...
RtlHardcoded
Bidirectional Text
Internationalization
Warning
Priority 5/10
@Ignore without Reason
../../src/test/java/com/example/qr_go/objects/LoginQRCodeTest.java:18:
15 private String mockUserId = "user-id"; 16 private String mockPassword = "password"; 17 18 @Ignore // need to mock firestore 19 @Test 20 public void testIsLoginValid() {
IgnoreWithoutReason
Testing
Warning
Priority 2/10
Disabled Checks
One or more issues were not run by lint, either
because the check is not enabled by default, or because
it was disabled with a command line flag or via one or
more
lint.xml
configuration files in the project directories.
Suppressing Warnings and Errors
Lint errors can be suppressed in a variety of ways:
1. With a
2. With a
3. With a //noinspection comment in the source code
4. With ignore flags specified in the
5. With a
6. With a
7. With the --ignore flag passed to lint.
To suppress a lint warning with an annotation, add a
To suppress a lint warning with a comment, add a
To suppress a lint warning in an XML file, add a
To suppress a lint warning in a
Here we specify a comma separated list of issue id's after the disable command. You can also use
To suppress lint warnings with a configuration XML file, create a file named
The format of the
To suppress lint checks from the command line, pass the --ignore flag with a comma separated list of ids to be suppressed, such as:
For more information, see https://developer.android.com/studio/write/lint.html#config
1. With a
@SuppressLint
annotation in the Java code2. With a
tools:ignore
attribute in the XML file3. With a //noinspection comment in the source code
4. With ignore flags specified in the
build.gradle
file, as explained below5. With a
lint.xml
configuration file in the project6. With a
lint.xml
configuration file passed to lint via the --config flag7. With the --ignore flag passed to lint.
To suppress a lint warning with an annotation, add a
@SuppressLint("id")
annotation on the class, method or variable declaration closest to the warning instance you want to disable. The id can be one or more issue id's, such as "UnusedResources"
or {"UnusedResources","UnusedIds"}
, or it can be "all"
to suppress all lint warnings in the given scope.To suppress a lint warning with a comment, add a
//noinspection id
comment on the line before the statement with the error.To suppress a lint warning in an XML file, add a
tools:ignore="id"
attribute on the element containing the error, or one of its surrounding elements. You also need to define the namespace for the tools prefix on the root element in your document, next to the xmlns:android
declaration:xmlns:tools="http://schemas.android.com/tools"
To suppress a lint warning in a
build.gradle
file, add a section like this:android { lintOptions { disable 'TypographyFractions','TypographyQuotes' } }
Here we specify a comma separated list of issue id's after the disable command. You can also use
warning
or error
instead of disable
to change the severity of issues.To suppress lint warnings with a configuration XML file, create a file named
lint.xml
and place it at the root directory of the module in which it applies.The format of the
lint.xml
file is something like the following:<?xml version="1.0" encoding="UTF-8"?> <lint> <!-- Ignore everything in the test source set --> <issue id="all"> <ignore path="\*/test/\*" /> </issue> <!-- Disable this given check in this project --> <issue id="IconMissingDensityFolder" severity="ignore" /> <!-- Ignore the ObsoleteLayoutParam issue in the given files --> <issue id="ObsoleteLayoutParam"> <ignore path="res/layout/activation.xml" /> <ignore path="res/layout-xlarge/activation.xml" /> <ignore regexp="(foo|bar)\.java" /> </issue> <!-- Ignore the UselessLeaf issue in the given file --> <issue id="UselessLeaf"> <ignore path="res/layout/main.xml" /> </issue> <!-- Change the severity of hardcoded strings to "error" --> <issue id="HardcodedText" severity="error" /> </lint>
To suppress lint checks from the command line, pass the --ignore flag with a comma separated list of ids to be suppressed, such as:
$ lint --ignore UnusedResources,UselessLeaf /my/project/path
For more information, see https://developer.android.com/studio/write/lint.html#config