forked from CatVodTVOfficial/TVBoxOSC
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
SDL
committed
Jun 27, 2022
1 parent
b9b2ce1
commit ba2fc9e
Showing
22 changed files
with
495 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
app/src/main/java/com/github/tvbox/osc/ui/adapter/HomeHotVodAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package com.github.tvbox.osc.ui.adapter; | ||
|
||
import android.text.TextUtils; | ||
import android.view.View; | ||
import android.widget.ImageView; | ||
import android.widget.TextView; | ||
|
||
import com.chad.library.adapter.base.BaseQuickAdapter; | ||
import com.chad.library.adapter.base.BaseViewHolder; | ||
import com.github.tvbox.osc.R; | ||
import com.github.tvbox.osc.picasso.RoundTransformation; | ||
import com.github.tvbox.osc.util.MD5; | ||
import com.squareup.picasso.Picasso; | ||
|
||
import java.util.ArrayList; | ||
|
||
import me.jessyan.autosize.utils.AutoSizeUtils; | ||
|
||
public class HomeHotVodAdapter extends BaseQuickAdapter<HomeHotVodAdapter.HotVod, BaseViewHolder> { | ||
public static class HotVod { | ||
String name; | ||
String rate; | ||
String pic; | ||
|
||
public HotVod(String name, String rate, String pic) { | ||
this.name = name; | ||
this.rate = rate; | ||
this.pic = pic; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
} | ||
|
||
public HomeHotVodAdapter() { | ||
super(R.layout.item_user_hot_vod, new ArrayList<>()); | ||
} | ||
|
||
@Override | ||
protected void convert(BaseViewHolder helper, HotVod item) { | ||
TextView tvRate = helper.getView(R.id.tvRate); | ||
if (item.rate == null || item.rate.isEmpty()) { | ||
tvRate.setVisibility(View.GONE); | ||
} else { | ||
tvRate.setText(item.rate); | ||
} | ||
helper.setText(R.id.tvName, item.name); | ||
ImageView ivThumb = helper.getView(R.id.ivThumb); | ||
//由于部分电视机使用glide报错 | ||
if (!TextUtils.isEmpty(item.pic)) { | ||
Picasso.get() | ||
.load(item.pic) | ||
.transform(new RoundTransformation(MD5.string2MD5(item.pic + "position=" + helper.getLayoutPosition())) | ||
.centerCorp(true) | ||
.override(AutoSizeUtils.mm2px(mContext, 300), AutoSizeUtils.mm2px(mContext, 400)) | ||
.roundRadius(AutoSizeUtils.mm2px(mContext, 10), RoundTransformation.RoundType.ALL)) | ||
.placeholder(R.drawable.error_loading) | ||
.error(R.drawable.error_loading) | ||
.into(ivThumb); | ||
} else { | ||
ivThumb.setImageResource(R.drawable.error_loading); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<corners | ||
android:bottomLeftRadius="10mm" | ||
android:bottomRightRadius="10mm" /> | ||
<solid android:color="@color/color_66000000" /> | ||
android:bottomLeftRadius="@dimen/vs_10" | ||
android:bottomRightRadius="@dimen/vs_10" /> | ||
<solid android:color="@color/color_99000000" /> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="48dp" | ||
android:height="48dp" | ||
android:viewportWidth="1024" | ||
android:viewportHeight="1024"> | ||
<path | ||
android:pathData="M96.43,397.1A247.77,247.77 0,0 1,512 214.83a247.77,247.77 0,0 1,415.57 182.27c0,118.91 -69.59,227.07 -149.85,308.1 -80.68,81.49 -179.46,143.1 -252.29,167.3a42.67,42.67 0,0 1,-26.88 0c-72.83,-24.19 -171.61,-85.8 -252.25,-167.25 -80.26,-81.07 -149.89,-189.23 -149.89,-308.14zM344.19,234.67A162.43,162.43 0,0 0,181.76 397.1c0,86.19 51.63,173.78 125.18,248.06 67.67,68.35 147.75,119.04 205.06,141.48 57.3,-22.4 137.39,-73.13 205.06,-141.48 73.56,-74.28 125.18,-161.92 125.18,-248.06a162.43,162.43 0,0 0,-295.34 -93.4,42.67 42.67,0 0,1 -69.8,0A162.18,162.18 0,0 0,344.19 234.67z" | ||
android:fillColor="#ffffff"/> | ||
</vector> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="48dp" | ||
android:height="48dp" | ||
android:viewportWidth="1024" | ||
android:viewportHeight="1024"> | ||
<path | ||
android:pathData="M554.75,341.33a42.67,42.67 0,1 0,-85.33 0v170.84a42.67,42.67 0,0 0,12.5 30.17l106.58,106.5a42.67,42.67 0,1 0,60.33 -60.33L554.67,494.46V341.33z" | ||
android:fillColor="#ffffff"/> | ||
<path | ||
android:pathData="M273.66,267.65h36.65a42.67,42.67 0,1 1,0 85.33H170.67a42.67,42.67 0,0 1,-42.67 -42.67V170.67a42.67,42.67 0,0 1,85.33 0v36.65A425.39,425.39 0,0 1,512 85.33c235.65,0 426.67,191.02 426.67,426.67s-191.02,426.67 -426.67,426.67S85.33,747.65 85.33,512a42.67,42.67 0,1 1,85.33 0,341.33 341.33,0 1,0 103,-244.35z" | ||
android:fillColor="#ffffff"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="48dp" | ||
android:height="48dp" | ||
android:viewportWidth="1024" | ||
android:viewportHeight="1024"> | ||
<path | ||
android:pathData="M752.73,128c-36.91,0.6 -78.42,10.54 -124.59,29.82 -38.78,16.21 -77.48,37.12 -116.14,62.68a701.7,701.7 0,0 0,-116.18 -62.72c-46.12,-19.24 -87.64,-29.18 -124.59,-29.74 -44.37,-0.68 -79.49,11.95 -105.39,37.8 -25.9,25.9 -38.49,61.01 -37.8,105.39 0.55,36.95 10.5,78.46 29.78,124.59 16.21,38.83 37.12,77.53 62.68,116.18a701.65,701.65 0,0 0,-62.72 116.18c-19.24,46.12 -29.18,87.64 -29.74,124.59 -0.68,44.37 11.95,79.49 37.8,105.39 25.9,25.9 61.01,38.49 105.39,37.8 36.95,-0.55 78.46,-10.45 124.59,-29.78 38.83,-16.21 77.53,-37.12 116.18,-62.68a701.57,701.57 0,0 0,116.18 62.72c46.08,19.24 87.64,29.18 124.59,29.74 44.37,0.68 79.49,-11.95 105.39,-37.8 25.9,-25.9 38.49,-61.01 37.8,-105.39 -0.55,-36.95 -10.5,-78.51 -29.78,-124.59 -16.21,-38.83 -37.12,-77.53 -62.68,-116.18a701.74,701.74 0,0 0,62.72 -116.18c19.24,-46.12 29.18,-87.64 29.74,-124.59 0.68,-44.37 -11.95,-79.49 -37.8,-105.39 -25.9,-25.9 -61.01,-38.49 -105.39,-37.8zM363.95,234.24c25.43,10.62 50.94,23.64 76.54,39a1152.13,1152.13 0,0 0,-87.72 79.49,1152.21 1152.21,0 0,0 -79.49,87.72c-15.36,-25.6 -28.37,-51.11 -39.04,-76.54 -15.19,-36.35 -22.95,-67.63 -23.38,-93.87 -0.3,-21.08 4.22,-36.27 13.61,-45.65 9.39,-9.39 24.53,-13.87 45.57,-13.57 26.28,0.43 57.6,8.19 93.87,23.38zM671.32,352.73a1152.77,1152.77 0,0 0,-87.72 -79.49c25.6,-15.36 51.11,-28.37 76.54,-39.04 36.35,-15.19 67.63,-22.95 93.87,-23.38 21.08,-0.3 36.27,4.22 45.65,13.61 9.39,9.39 13.87,24.53 13.57,45.57 -0.43,26.28 -8.23,57.6 -23.38,93.87 -10.67,25.47 -23.68,50.99 -39.04,76.59a1151.7,1151.7 0,0 0,-79.49 -87.72zM411.31,411.26c33.71,-33.71 67.29,-63.36 100.74,-89.05a1032.96,1032.96 0,0 1,100.69 89.05c33.71,33.71 63.4,67.29 89.09,100.74a1032.79,1032.79 0,0 1,-89.05 100.69A1033.81,1033.81 0,0 1,512 701.82a1032.96,1032.96 0,0 1,-100.69 -89.05A1032.96,1032.96 0,0 1,322.18 512a1033.13,1033.13 0,0 1,89.05 -100.69zM789.85,660.1c15.15,36.35 22.95,67.63 23.38,93.87 0.3,21.08 -4.22,36.27 -13.61,45.65 -9.39,9.39 -24.53,13.87 -45.57,13.57 -26.28,-0.43 -57.6,-8.23 -93.87,-23.38a594.6,594.6 0,0 1,-76.59 -39.04,1152.77 1152.77,0 0,0 87.72,-79.49 1152.77,1152.77 0,0 0,79.49 -87.72c15.36,25.6 28.37,51.11 39.04,76.54zM234.24,660.1c10.67,-25.43 23.68,-50.94 39.04,-76.54a1152.77,1152.77 0,0 0,79.49 87.72,1152 1152,0 0,0 87.72,79.49c-25.6,15.36 -51.11,28.37 -76.54,39.04 -36.35,15.15 -67.63,22.95 -93.87,23.38 -21.08,0.3 -36.27,-4.22 -45.65,-13.61 -9.39,-9.39 -13.87,-24.53 -13.57,-45.57 0.43,-26.28 8.19,-57.6 23.38,-93.87z" | ||
android:fillColor="#ffffff"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="48dp" | ||
android:height="48dp" | ||
android:viewportWidth="1024" | ||
android:viewportHeight="1024"> | ||
<path | ||
android:pathData="M413.27,106.67c-14.51,0 -27.73,8.11 -34.35,20.99l-197.46,385.07a38.61,38.61 0,0 0,34.35 56.23L417.28,568.96l-77.35,300.12a38.61,38.61 0,0 0,66.05 35.54l430.85,-476.76a38.61,38.61 0,0 0,-28.67 -64.47L617.39,363.39l149.67,-194.56a38.61,38.61 0,0 0,-30.63 -62.17L413.27,106.67zM278.95,491.73l157.87,-307.84h221.18l-149.67,194.56a38.61,38.61 0,0 0,30.59 62.12h182.36l-267.39,295.94 50.6,-196.57a38.61,38.61 0,0 0,-37.38 -48.21h-188.16z" | ||
android:fillColor="#ffffff"/> | ||
</vector> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="48dp" | ||
android:height="48dp" | ||
android:viewportWidth="1024" | ||
android:viewportHeight="1024"> | ||
<path | ||
android:pathData="M337.37,318.12a196.1,196.1 0,0 1,138.97 -57.6c54.27,0 103.47,22.1 139.01,57.6a42.67,42.67 0,0 1,-60.33 60.33,110.72 110.72,0 0,0 -78.68,-32.55c-30.72,0 -58.45,12.37 -78.63,32.55a42.67,42.67 0,0 1,-60.33 -60.33z" | ||
android:fillColor="#ffffff"/> | ||
<path | ||
android:pathData="M106.67,476.33a369.66,369.66 0,1 1,659.5 229.55l138.67,138.62a42.67,42.67 0,1 1,-60.33 60.33l-138.67,-138.67A369.66,369.66 0,0 1,106.67 476.33zM476.33,192a284.33,284.33 0,1 0,0 568.7,284.33 284.33,0 0,0 0,-568.7z" | ||
android:fillColor="#ffffff"/> | ||
</vector> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="48dp" | ||
android:height="48dp" | ||
android:viewportWidth="1024" | ||
android:viewportHeight="1024"> | ||
<path | ||
android:pathData="M512,341.33a170.67,170.67 0,1 0,0 341.33,170.67 170.67,0 0,0 0,-341.33zM426.67,512a85.33,85.33 0,1 1,170.67 0,85.33 85.33,0 0,1 -170.67,0z" | ||
android:fillColor="#ffffff"/> | ||
<path | ||
android:pathData="M447.32,123.52a42.67,42.67 0,0 0,-49.37 -21.76A426.03,426.03 0,0 0,221.53 200.53a42.67,42.67 0,0 0,-9.22 50.13,72.53 72.53,0 0,1 -65.11,104.53h-1.02a42.67,42.67 0,0 0,-41.3 29.87,428.37 428.37,0 0,0 -10.88,213.89 42.67,42.67 0,0 0,45.95 33.92,72.53 72.53,0 0,1 62.72,118.91 42.67,42.67 0,0 0,1.88 57.09,426.54 426.54,0 0,0 185.51,113.15 42.67,42.67 0,0 0,52.82 -27.9,72.58 72.58,0 0,1 138.24,0 42.67,42.67 0,0 0,52.82 27.9,426.54 426.54,0 0,0 185.51,-113.15 42.67,42.67 0,0 0,1.88 -57.09,72.53 72.53,0 0,1 62.72,-118.91 42.67,42.67 0,0 0,45.95 -33.92,428.37 428.37,0 0,0 -10.88,-213.89 42.67,42.67 0,0 0,-41.3 -29.87h-1.02a72.53,72.53 0,0 1,-65.11 -104.53,42.67 42.67,0 0,0 -9.22,-50.13 426.07,426.07 0,0 0,-176.43 -98.73,42.67 42.67,0 0,0 -49.37,21.76 72.53,72.53 0,0 1,-129.37 0zM305.07,282.62c0,-12.93 -1.58,-25.51 -4.52,-37.55A340.74,340.74 0,0 1,392.11 193.28,157.53 157.53,0 0,0 512,248.49a157.53,157.53 0,0 0,119.89 -55.17c33.28,12.5 64.09,30.04 91.56,51.71a157.91,157.91 0,0 0,121.47 192.21,342.53 342.53,0 0,1 6.53,111.91 157.91,157.91 0,0 0,-117.46 223.15,341.33 341.33,0 0,1 -90.88,55.98A157.65,157.65 0,0 0,512 758.31c-54.66,0 -102.78,27.82 -131.11,69.97a341.38,341.38 0,0 1,-90.88 -55.98,157.91 157.91,0 0,0 -117.46,-223.15 345.64,345.64 0,0 1,6.57 -111.91A157.91,157.91 0,0 0,305.07 282.62z" | ||
android:fillColor="#ffffff"/> | ||
</vector> |
Binary file not shown.
Oops, something went wrong.