diff --git a/src/main/kotlin/com/looker/droidify/screen/ProductAdapter.kt b/src/main/kotlin/com/looker/droidify/screen/ProductAdapter.kt index 3e49f7c9..afbd33a0 100644 --- a/src/main/kotlin/com/looker/droidify/screen/ProductAdapter.kt +++ b/src/main/kotlin/com/looker/droidify/screen/ProductAdapter.kt @@ -1234,7 +1234,13 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int) holder.devName.text = product?.author?.name?.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() } - holder.devIcon.load(imageSource) + when { + imageSource.toString() + .contains("kde.org") -> holder.devIcon.setImageResource(R.drawable.ic_kde) + imageSource.toString() + .contains("gitlab") -> holder.devIcon.setImageResource(R.drawable.ic_gitlab) + imageSource.toString().contains("github") -> holder.devIcon.load(imageSource) + } holder.dev.setOnClickListener { context.startActivity(Intent(Intent.ACTION_VIEW, product?.source?.toUri())) } diff --git a/src/main/res/drawable/ic_code.xml b/src/main/res/drawable/ic_code.xml index a9035cc3..1c0066d8 100644 --- a/src/main/res/drawable/ic_code.xml +++ b/src/main/res/drawable/ic_code.xml @@ -1,12 +1,9 @@ - - - - + android:fillColor="?android:textColor" + android:pathData="M8.0855,18.6109L14.0817,4.6064C14.2991,4.0987 14.8868,3.8633 15.3946,4.0807C15.866,4.2826 16.1026,4.8038 15.96,5.2837L15.9202,5.3936L9.9241,19.3981C9.7067,19.9058 9.1189,20.1412 8.6112,19.9238C8.1398,19.722 7.9032,19.2007 8.0458,18.7208L8.0855,18.6109L14.0817,4.6064L8.0855,18.6109ZM2.2929,11.2929L6.2929,7.2929C6.6834,6.9024 7.3166,6.9024 7.7071,7.2929C8.0676,7.6534 8.0953,8.2206 7.7903,8.6129L7.7071,8.7071L4.4142,12L7.7071,15.2929C8.0976,15.6834 8.0976,16.3166 7.7071,16.7071C7.3466,17.0676 6.7794,17.0953 6.3871,16.7903L6.2929,16.7071L2.2929,12.7071C1.9324,12.3466 1.9047,11.7794 2.2097,11.3871L2.2929,11.2929L6.2929,7.2929L2.2929,11.2929ZM16.2921,7.2917C16.6526,6.9312 17.2198,6.9035 17.6121,7.2085L17.7063,7.2917L21.7071,11.2929C22.0678,11.6536 22.0953,12.2211 21.7899,12.6134L21.7066,12.7076L17.7058,16.7031C17.315,17.0934 16.6819,17.0929 16.2916,16.7022C15.9313,16.3414 15.904,15.7742 16.2093,15.3821L16.2925,15.288L19.5854,11.9995L16.292,8.7059C15.9015,8.3153 15.9015,7.6822 16.2921,7.2917Z" /> + \ No newline at end of file diff --git a/src/main/res/drawable/ic_gitlab.xml b/src/main/res/drawable/ic_gitlab.xml new file mode 100644 index 00000000..a4089ea0 --- /dev/null +++ b/src/main/res/drawable/ic_gitlab.xml @@ -0,0 +1,9 @@ + + + diff --git a/src/main/res/drawable/ic_kde.xml b/src/main/res/drawable/ic_kde.xml new file mode 100644 index 00000000..ffd419f3 --- /dev/null +++ b/src/main/res/drawable/ic_kde.xml @@ -0,0 +1,9 @@ + + +