mirror of
				https://github.com/commons-app/apps-android-commons.git
				synced 2025-10-31 14:53:59 +01:00 
			
		
		
		
	Fixed the badge issue & made the badge clickable
This commit is contained in:
		
							parent
							
								
									21af5b4627
								
							
						
					
					
						commit
						eef23f0c24
					
				
					 3 changed files with 9 additions and 10 deletions
				
			
		|  | @ -47,7 +47,7 @@ dependencies { | |||
| 
 | ||||
|     implementation 'com.jakewharton.timber:timber:4.7.1' | ||||
|     implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0' | ||||
|     implementation "com.google.android.material:material:1.9.0" | ||||
|     implementation "com.google.android.material:material:1.12.0" | ||||
|     implementation 'com.karumi:dexter:5.0.0' | ||||
|     implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' | ||||
| 
 | ||||
|  |  | |||
|  | @ -68,9 +68,9 @@ class AchievementsFragment : CommonsDaggerSupportFragment(){ | |||
|         binding.imagesUploadInfoIcon.setOnClickListener { showUploadInfo() } | ||||
|         binding.imagesRevertedInfoIcon.setOnClickListener { showRevertedInfo() } | ||||
|         binding.imagesUsedByWikiInfoIcon.setOnClickListener { showUsedByWikiInfo() } | ||||
|         //binding.imagesNearbyInfoIcon.setOnClickListener { showImagesViaNearbyInfo() } | ||||
|         //binding.imagesFeaturedInfoIcon.setOnClickListener { showFeaturedImagesInfo() } | ||||
|         //binding.thanksReceivedInfoIcon.setOnClickListener { showThanksReceivedInfo() } | ||||
|         binding.wikidataEditsIcon.setOnClickListener { showImagesViaNearbyInfo() } | ||||
|         binding.featuredImageIcon.setOnClickListener { showFeaturedImagesInfo() } | ||||
|         binding.thanksImageIcon.setOnClickListener { showThanksReceivedInfo() } | ||||
|         binding.qualityImageIcon.setOnClickListener { showQualityImagesInfo() } | ||||
| 
 | ||||
|         // DisplayMetrics used to fetch the size of the screen | ||||
|  | @ -345,7 +345,6 @@ class AchievementsFragment : CommonsDaggerSupportFragment(){ | |||
|      * and assign badge and level. Also stores the achievements level of the user in BasicKvStore to display in menu | ||||
|      * @param achievements | ||||
|      */ | ||||
| //    @OptIn(ExperimentalBadgeUtils::class) | ||||
|     private fun inflateAchievements(achievements: Achievements) { | ||||
| 
 | ||||
|         // Thanks Received Badge | ||||
|  | @ -412,7 +411,7 @@ class AchievementsFragment : CommonsDaggerSupportFragment(){ | |||
|                 badgeDrawable.badgeGravity = badgeGravity | ||||
|                 badgeDrawable.badgeTextColor = badgeTextColor | ||||
|                 badgeDrawable.backgroundColor = backgroundColor | ||||
|                 BadgeUtils.attachBadgeDrawable(badgeDrawable, binding.wikidataEditsIcon) | ||||
|                 BadgeUtils.attachBadgeDrawable(badgeDrawable, view) | ||||
|                 view.getViewTreeObserver().removeOnGlobalLayoutListener(this) | ||||
|             } | ||||
|         }) | ||||
|  |  | |||
|  | @ -396,7 +396,7 @@ | |||
|         android:id="@+id/wikidata_edits_icon" | ||||
|         android:layout_width="@dimen/dimen_40" | ||||
|         android:layout_height="@dimen/dimen_40" | ||||
|         android:layout_marginEnd="@dimen/medium_width" | ||||
|         android:layout_marginEnd="@dimen/large_gap" | ||||
|         app:srcCompat="@drawable/ic_custom_map_marker" /> | ||||
| 
 | ||||
|       <!--Featured Image Statistics--> | ||||
|  | @ -404,7 +404,7 @@ | |||
|         android:id="@+id/featured_image_icon" | ||||
|         android:layout_width="@dimen/dimen_40" | ||||
|         android:layout_height="@dimen/dimen_40" | ||||
|         android:layout_marginEnd="@dimen/medium_width" | ||||
|         android:layout_marginEnd="@dimen/large_gap" | ||||
|         app:srcCompat="@drawable/featured" /> | ||||
| 
 | ||||
|       <!--Quality Image Statistics--> | ||||
|  | @ -412,7 +412,7 @@ | |||
|         android:id="@+id/quality_image_icon" | ||||
|         android:layout_width="@dimen/dimen_40" | ||||
|         android:layout_height="@dimen/dimen_40" | ||||
|         android:layout_marginEnd="@dimen/medium_width" | ||||
|         android:layout_marginEnd="@dimen/large_gap" | ||||
|         app:srcCompat="@drawable/ic_quality_images_logo" /> | ||||
| 
 | ||||
|       <!--Thank Image Statistics--> | ||||
|  | @ -421,7 +421,7 @@ | |||
|         android:layout_width="@dimen/dimen_40" | ||||
|         android:layout_height="@dimen/dimen_40" | ||||
| 
 | ||||
|         android:layout_marginEnd="@dimen/medium_width" | ||||
|         android:layout_marginEnd="@dimen/large_gap" | ||||
|         app:srcCompat="@drawable/ic_thanks" /> | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Neel Doshi
						Neel Doshi