mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Update: Handle gitlab and kde source icons
This commit is contained in:
parent
7a1ca2481f
commit
c4a835bf38
@ -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()))
|
||||
}
|
||||
|
@ -1,12 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="?android:attr/colorBackground"
|
||||
android:pathData="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z" />
|
||||
|
||||
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" />
|
||||
</vector>
|
9
src/main/res/drawable/ic_gitlab.xml
Normal file
9
src/main/res/drawable/ic_gitlab.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
<path
|
||||
android:fillColor="?android:textColor"
|
||||
android:pathData="M494.07,281.6l-25.18,-78.08a11,11 0,0 0,-0.61 -2.1L417.78,44.48a20.08,20.08 0,0 0,-19.17 -13.82A19.77,19.77 0,0 0,379.66 44.6L331.52,194.15h-152L131.34,44.59a19.76,19.76 0,0 0,-18.86 -13.94h-0.11a20.15,20.15 0,0 0,-19.12 14L42.7,201.73c0,0.14 -0.11,0.26 -0.16,0.4L16.91,281.61a29.15,29.15 0,0 0,10.44 32.46L248.79,476.48a11.25,11.25 0,0 0,13.38 -0.07L483.65,314.07a29.13,29.13 0,0 0,10.42 -32.47m-331,-64.51L224.8,408.85 76.63,217.09m209.64,191.8 l59.19,-183.84 2.55,-8h86.52L300.47,390.44M398.8,59.31l43.37,134.83H355.35M324.16,217l-43,133.58L255.5,430.14 186.94,217M112.27,59.31l43.46,134.83H69M40.68,295.58a6.19,6.19 0,0 1,-2.21 -6.9l19,-59L197.08,410.27M470.34,295.58 L313.92,410.22l0.52,-0.69L453.5,229.64l19,59a6.2,6.2 0,0 1,-2.19 6.92" />
|
||||
</vector>
|
9
src/main/res/drawable/ic_kde.xml
Normal file
9
src/main/res/drawable/ic_kde.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="?android:textColor"
|
||||
android:pathData="M13.8521,0.7714C12.3162,0.2228 11.0572,0.3718 9.89,0.7524L9.9406,16.1462c0.8343,0.7743 3.0648,0.8543 3.8984,0.0768V9.216l5.2569,7.0811c0.9244,0.5188 4.1768,0.2319 4.162,-1.317L17.873,8.196 23.352,1.146C22.8842,0.3544 19.6824,0.1619 18.7887,1.003L13.84,7.22ZM4.834,4.005C4.7874,4.0099 4.744,4.0307 4.711,4.064L3.145,5.63C3.0793,5.696 3.0669,5.7982 3.115,5.878L4.949,8.9C4.6205,9.4525 4.3613,10.0432 4.177,10.659l-3.367,0.7c-0.0944,0.0195 -0.1621,0.1026 -0.162,0.199v2.215c0,0.093 0.064,0.174 0.155,0.196l3.268,0.8c0.1709,0.7107 0.4405,1.394 0.801,2.03L2.98,19.683c-0.0521,0.0804 -0.0408,0.1863 0.027,0.254l1.566,1.567c0.0663,0.0659 0.1689,0.0782 0.249,0.03l2.964,-1.8c0.582,0.336 1.21,0.6 1.874,0.78l0.692,3.325C10.372,23.933 10.454,24 10.55,24h2.215c0.0937,0.0003 0.1752,-0.0639 0.197,-0.155l0.815,-3.332c0.6758,-0.1827 1.3239,-0.4555 1.927,-0.811l2.922,1.915c0.08,0.053 0.186,0.042 0.254,-0.026l1.567,-1.566c0.0661,-0.0658 0.0784,-0.1683 0.03,-0.248L19.41,18.019C18.9297,17.2055 18.038,15.026 17.371,15.8 15.3819,19.6985 10.1369,20.4613 7.1197,17.291 4.1025,14.1206 5.1238,8.9198 9.116,7.126 9.5319,6.8182 7.957,5.999 7.957,5.999L7.956,5.997 4.966,4.037C4.9271,4.0111 4.8805,3.9995 4.834,4.004Z" />
|
||||
</vector>
|
Loading…
x
Reference in New Issue
Block a user