mirror of
				https://github.com/SimpleMobileTools/Simple-Contacts.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	using the colored circle icons at groups too
This commit is contained in:
		| @@ -57,7 +57,7 @@ android { | ||||
| } | ||||
|  | ||||
| dependencies { | ||||
|     implementation 'com.simplemobiletools:commons:5.25.18' | ||||
|     implementation 'com.simplemobiletools:commons:5.25.19' | ||||
|     implementation 'joda-time:joda-time:2.10.1' | ||||
|     implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4' | ||||
|     implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5' | ||||
|   | ||||
| @@ -25,8 +25,6 @@ import java.util.* | ||||
| class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val refreshListener: RefreshContactsListener?, recyclerView: MyRecyclerView, | ||||
|                     fastScroller: FastScroller, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, fastScroller, itemClick) { | ||||
|  | ||||
|     private var smallPadding = activity.resources.getDimension(R.dimen.small_margin).toInt() | ||||
|     private var bigPadding = activity.resources.getDimension(R.dimen.normal_margin).toInt() | ||||
|     private var textToHighlight = "" | ||||
|  | ||||
|     var adjustedPrimaryColor = activity.getAdjustedPrimaryColor() | ||||
| @@ -165,17 +163,11 @@ class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val | ||||
|                 setTextColor(textColor) | ||||
|                 setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize) | ||||
|                 text = groupTitle | ||||
|  | ||||
|                 if (showContactThumbnails) { | ||||
|                     setPadding(smallPadding, bigPadding, bigPadding, bigPadding) | ||||
|                 } else { | ||||
|                     setPadding(bigPadding, bigPadding, bigPadding, bigPadding) | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             group_tmb.beVisibleIf(showContactThumbnails) | ||||
|             if (showContactThumbnails) { | ||||
|                 group_tmb.applyColorFilter(textColor) | ||||
|                 group_tmb.setImageDrawable(activity.getColoredGroupIcon(group.title)) | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -13,16 +13,19 @@ | ||||
|         android:id="@+id/group_holder" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:paddingTop="@dimen/tiny_margin" | ||||
|         android:minHeight="@dimen/min_row_height" | ||||
|         android:paddingStart="@dimen/tiny_margin" | ||||
|         android:paddingTop="@dimen/medium_margin" | ||||
|         android:paddingEnd="@dimen/activity_margin" | ||||
|         android:paddingBottom="@dimen/tiny_margin"> | ||||
|         android:paddingBottom="@dimen/medium_margin"> | ||||
|  | ||||
|         <ImageView | ||||
|             android:id="@+id/group_tmb" | ||||
|             android:layout_width="@dimen/normal_icon_size" | ||||
|             android:layout_height="@dimen/normal_icon_size" | ||||
|             android:layout_centerVertical="true" | ||||
|             android:padding="@dimen/medium_margin" | ||||
|             android:layout_marginStart="@dimen/small_margin" | ||||
|             android:padding="@dimen/tiny_margin" | ||||
|             android:src="@drawable/ic_people_vector" /> | ||||
|  | ||||
|         <TextView | ||||
| @@ -34,6 +37,8 @@ | ||||
|             android:ellipsize="end" | ||||
|             android:gravity="center_vertical" | ||||
|             android:maxLines="1" | ||||
|             android:paddingStart="@dimen/medium_margin" | ||||
|             android:paddingEnd="@dimen/activity_margin" | ||||
|             android:textSize="@dimen/big_text_size" | ||||
|             tools:text="Family" /> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user