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 { | dependencies { | ||||||
|     implementation 'com.simplemobiletools:commons:5.25.18' |     implementation 'com.simplemobiletools:commons:5.25.19' | ||||||
|     implementation 'joda-time:joda-time:2.10.1' |     implementation 'joda-time:joda-time:2.10.1' | ||||||
|     implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4' |     implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4' | ||||||
|     implementation 'com.googlecode.ez-vcard:ez-vcard:0.10.5' |     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, | class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val refreshListener: RefreshContactsListener?, recyclerView: MyRecyclerView, | ||||||
|                     fastScroller: FastScroller, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, fastScroller, itemClick) { |                     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 = "" |     private var textToHighlight = "" | ||||||
|  |  | ||||||
|     var adjustedPrimaryColor = activity.getAdjustedPrimaryColor() |     var adjustedPrimaryColor = activity.getAdjustedPrimaryColor() | ||||||
| @@ -165,17 +163,11 @@ class GroupsAdapter(activity: SimpleActivity, var groups: ArrayList<Group>, val | |||||||
|                 setTextColor(textColor) |                 setTextColor(textColor) | ||||||
|                 setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize) |                 setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize) | ||||||
|                 text = groupTitle |                 text = groupTitle | ||||||
|  |  | ||||||
|                 if (showContactThumbnails) { |  | ||||||
|                     setPadding(smallPadding, bigPadding, bigPadding, bigPadding) |  | ||||||
|                 } else { |  | ||||||
|                     setPadding(bigPadding, bigPadding, bigPadding, bigPadding) |  | ||||||
|                 } |  | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             group_tmb.beVisibleIf(showContactThumbnails) |             group_tmb.beVisibleIf(showContactThumbnails) | ||||||
|             if (showContactThumbnails) { |             if (showContactThumbnails) { | ||||||
|                 group_tmb.applyColorFilter(textColor) |                 group_tmb.setImageDrawable(activity.getColoredGroupIcon(group.title)) | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -13,16 +13,19 @@ | |||||||
|         android:id="@+id/group_holder" |         android:id="@+id/group_holder" | ||||||
|         android:layout_width="match_parent" |         android:layout_width="match_parent" | ||||||
|         android:layout_height="wrap_content" |         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:paddingEnd="@dimen/activity_margin" | ||||||
|         android:paddingBottom="@dimen/tiny_margin"> |         android:paddingBottom="@dimen/medium_margin"> | ||||||
|  |  | ||||||
|         <ImageView |         <ImageView | ||||||
|             android:id="@+id/group_tmb" |             android:id="@+id/group_tmb" | ||||||
|             android:layout_width="@dimen/normal_icon_size" |             android:layout_width="@dimen/normal_icon_size" | ||||||
|             android:layout_height="@dimen/normal_icon_size" |             android:layout_height="@dimen/normal_icon_size" | ||||||
|             android:layout_centerVertical="true" |             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" /> |             android:src="@drawable/ic_people_vector" /> | ||||||
|  |  | ||||||
|         <TextView |         <TextView | ||||||
| @@ -34,6 +37,8 @@ | |||||||
|             android:ellipsize="end" |             android:ellipsize="end" | ||||||
|             android:gravity="center_vertical" |             android:gravity="center_vertical" | ||||||
|             android:maxLines="1" |             android:maxLines="1" | ||||||
|  |             android:paddingStart="@dimen/medium_margin" | ||||||
|  |             android:paddingEnd="@dimen/activity_margin" | ||||||
|             android:textSize="@dimen/big_text_size" |             android:textSize="@dimen/big_text_size" | ||||||
|             tools:text="Family" /> |             tools:text="Family" /> | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user