ZyreoTv v1.0

This commit is contained in:
guozhen 2025-04-17 16:27:00 +08:00
parent 8f079f407b
commit bbc2ba8b85
63 changed files with 770 additions and 343 deletions

View File

@ -30,15 +30,17 @@ android {
buildTypes {
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
// signingConfig signingConfigs.release
signingConfig signingConfigs.signs
}
debug {
signingConfig signingConfigs.signs
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
minifyEnabled true
}
}
@ -53,6 +55,18 @@ android {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
android.applicationVariants.all { variant ->
def buildType = variant.buildType.name
def date = new Date().format("yyyy-MM-dd HH-mm-ss")
variant.outputs.all { output ->
if (output instanceof com.android.build.gradle.internal.api.ApkVariantOutputImpl) {
output.outputFileName = "zyreotv_${android.defaultConfig.versionName}_${date}_${buildType}.apk"
}
}
}
}
dependencies {
@ -86,6 +100,7 @@ dependencies {
implementation libs.media3exoplayerhls
implementation libs.eventbut
implementation libs.baseRecyclerAdapter
implementation libs.splashscreen
}

181
app/proguard-rules.pro vendored
View File

@ -19,3 +19,184 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#如果你使用全文检索插件,需要加入
-dontwarn org.apache.lucene.**
-keep class org.apache.lucene.** {*;}
-keep class com.fractalwrench.** { *; }
### glide 4
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.module.AppGlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
-keep class com.alibaba.sdk.android.oss.** { *; }
-dontwarn okio.**
-dontwarn org.apache.commons.codec.binary.**
#okhttp
-dontwarn okhttp3.**
-keep class okhttp3.**{*;}
#如果你使用全文检索插件,需要加入
-dontwarn org.apache.lucene.**
-keep class org.apache.lucene.** {*;}
#如果你开启数据库功能,需要加入
-keep class net.sqlcipher.** {*;}
-keep class com.google.android.material.** {*;}
-keep class androidx.** {*;}
-keep public class * extends androidx.**
-keep interface androidx.** {*;}
-dontwarn com.google.android.material.**
-dontnote com.google.android.material.**
-dontwarn androidx.**
### APP 3rd party jars(xiaomi push)
-dontwarn com.xiaomi.push.**
-keep class com.xiaomi.** {*;}
### APP 3rd party jars(huawei push)
-ignorewarnings
-keepattributes *Annotation*
-keepattributes Exceptions
-keepattributes InnerClasses
-keepattributes Signature
-keepattributes SourceFile,LineNumberTable
# hmscore-support: remote transport
-keep class com.huawei.hianalytics.**{*;}
-keep class com.huawei.updatesdk.**{*;}
-keep class com.huawei.hms.**{*;}
### APP 3rd party jars(meizu push)
-dontwarn com.meizu.cloud.**
-keep class com.meizu.cloud.** {*;}
#vivo
-dontwarn com.vivo.push.**
-keep class com.vivo.push.** {*;}
-keep class com.vivo.vms.** {*;}
#oppo
-keep public class * extends android.app.Service
-keep class com.heytap.msp.** { *;}
### org.json xml
-dontwarn org.json.**
-keep class org.json.**{*;}
#okio
-dontwarn okio.**
-keep class okio.**{*;}
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
-keep class **.R$* {
*;
}
-dontwarn com.google.**
-keep class com.google.** {*;}
-keep public class * extends android.app.Service
-keep class com.heytap.msp.** { *;}
-dontwarn com.viontv.app.**
-keep class com.viontv.app.** {*;}
# RxJava2核心类保留
-keepclassmembers class rx.internal.util.unsafe.* {
*;
}
# 保留 RxJava2 所有 public 方法字段类(防止接口回调等失效)
-dontwarn io.reactivex.**
-keep class io.reactivex.** { *; }
-keep interface io.reactivex.** { *; }
# RxJava2 中的 lambda 保留(可选,如果你用 lambda 表达式)
-keepclassmembers class * {
@io.reactivex.annotations.NonNull <methods>;
}
# 避免 RxJava2 中使用的内部 Unsafe 类被混淆(在某些 Android 版本上避免崩溃)
-keepclassmembers class rx.internal.util.unsafe.* {
*;
}
# R8 针对 RxJava2 的优化处理(如果你使用的是 R8
-dontwarn sun.misc.**
# 仅用于调试(可选)
-keepattributes *Annotation*

View File

@ -21,13 +21,18 @@
android:theme="@style/Theme.VionTV">
<activity
android:name=".ui.activity.VTMainActivity"
android:name=".ui.activity.VTSplashActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.activity.VTMainActivity"
android:exported="true">
</activity>
<activity android:name=".ui.activity.play.VTVideoPlayerActivity" />
<activity android:name=".ui.activity.search.VTSearchActivity" />
<activity android:name=".ui.activity.WebViewActivity" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

View File

@ -1,9 +1,9 @@
package com.viontv.app.api;
import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import java.io.UnsupportedEncodingException;
import java.net.Proxy;
import java.net.URLDecoder;
@ -53,7 +53,7 @@ public class VTApi extends VTBaseApi {
builder.addInterceptor(new VTHeaderInterceptor());
builder.addInterceptor(new VTBodyloadInterceptor());
// if(Config.IS_DEBUG) {
if(!VTApiService.isProduce){
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor(message -> {
try {
String text = URLDecoder.decode(message, "utf-8");
@ -65,6 +65,9 @@ public class VTApi extends VTBaseApi {
});
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
builder.addInterceptor(interceptor);
}
// if(Config.IS_DEBUG) {
// }
return builder.build();

View File

@ -25,7 +25,8 @@ public interface VTApiService {
* 正式测试服
*/
boolean isProduce = true;
String URL = isProduce ? "https://api-zyreotv.zyreotv.com/7834f11d/" : "https://test1-api.guyantv.com";
// String URL = isProduce ? "https://api-zyreotv.zyreotv.com/7834f11d/" : "https://test1-api.guyantv.com";
String URL = "https://api-zyreotv.zyreotv.com/7834f11d/";
public static final String rankTop10Type = "most_trending";
public static final String ZyreoTV_Private = "https://www.zyreotv.com/private";

View File

@ -58,7 +58,7 @@ public class VTMainActivity extends VTCommonActivity<ActivityMainVtBinding> impl
binding.container.setUserInputEnabled(false); //disaple scroll
binding.container.setAdapter(fragmentAdapter);
binding.container.setCurrentItem(START_INDEX, false);
binding.container.setOffscreenPageLimit(1);
// binding.container.setOffscreenPageLimit(1);
binding.tvVtMainHome.setOnClickListener(this);

View File

@ -0,0 +1,38 @@
package com.viontv.app.ui.activity;
import android.content.Intent;
import android.os.Bundle;
import androidx.core.splashscreen.SplashScreen;
import com.viontv.app.databinding.ActivityMainVtBinding;
import com.viontv.app.databinding.ActivitySplashBinding;
import com.viontv.app.ui.activity.basic.VTCommonActivity;
public class VTSplashActivity extends VTCommonActivity<ActivitySplashBinding> {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SplashScreen splashScreen = SplashScreen.installSplashScreen(VTSplashActivity.this);
splashScreen.setKeepOnScreenCondition(() -> true);
startActivity(new Intent(this,VTMainActivity.class));
}
@Override
public void init() {
viewBinding = ActivitySplashBinding.inflate(getLayoutInflater());
setContentView(viewBinding.getRoot());
}
@Override
public void initView() {
}
@Override
public void logic() {
}
}

View File

@ -99,15 +99,22 @@ public class VTExploreFragment extends Fragment implements VTGooglePlayerExplore
@Override
public void onPageScrollStateChanged(int state) {
super.onPageScrollStateChanged(state);
if(viewBinding.viewPagerExploreEpisode.getAdapter()==null){
return;
}
if (state == ViewPager2.SCROLL_STATE_IDLE) {
if (viewBinding.viewPagerExploreEpisode.getCurrentItem() == viewBinding.viewPagerExploreEpisode.getAdapter().getItemCount() - 1) {
if (!first) {
pageHome++;
mViewModel.getExploreVideoList(pageHome, 10);
} else {
first = false;
if (viewBinding.viewPagerExploreEpisode.getCurrentItem() == viewBinding.viewPagerExploreEpisode.getAdapter().getItemCount() - 1) {
if (!first) {
pageHome++;
mViewModel.getExploreVideoList(pageHome, 10);
} else {
first = false;
}
}
}
}
}
});
@ -211,13 +218,18 @@ public class VTExploreFragment extends Fragment implements VTGooglePlayerExplore
@Subscribe(threadMode = ThreadMode.MAIN)
public void onEvent(VTBaseEventBus<VTVideoDetailsBean.ShortPlayInfo> event) {
if (VTAppConstants.Constants_Episodes_Series_DataExample.equals(event.getCode())) {
if( event.getData().getShort_play_id() == vtGooglePlayerAdapter.getItems().get(currentPosition).getShort_play_id()){
VTVideoExploreBean exploreBean = vtGooglePlayerAdapter.getItems().get(currentPosition);
if( event.getData().getShort_play_id() == exploreBean.getShort_play_id()){
AppCompatImageView imageView = getHomePlayerView().findViewById(R.id.iv_collection_controller);
AppCompatTextView textView = getHomePlayerView().findViewById(R.id.tv_collection_num_controller);
imageView.setImageResource(event.getData().isIs_collect() ? R.mipmap.iv_vt_collect_h : R.mipmap.iv_vt_collect_n);
vtGooglePlayerAdapter.getItems().get(currentPosition).setCollect_total(event.getData().getCollect_total());
if(event.getData().isIs_collect()){
exploreBean.setCollect_total(exploreBean.getCollect_total()+1);
}else{
exploreBean.setCollect_total(exploreBean.getCollect_total()-1);
}
vtGooglePlayerAdapter.getItems().get(currentPosition).setIs_collect(event.getData().isIs_collect());
textView.setText(TimeUtils.formatNumber(event.getData().getCollect_total()));
textView.setText(TimeUtils.formatNumber(exploreBean.getCollect_total()));
}
}
}
@ -274,6 +286,7 @@ public class VTExploreFragment extends Fragment implements VTGooglePlayerExplore
@Override
public void onDestroy() {
if (getHomePlayerView() != null) getHomePlayerView().stop();
if (getHomePlayerView() != null) getHomePlayerView().release();
super.onDestroy();
EventBus.getDefault().unregister(this);

View File

@ -1,5 +1,8 @@
package com.viontv.app.ui.activity.home;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
@ -28,6 +31,7 @@ import com.viontv.app.ui.adapter.VTBannerHomeAdapter;
import com.viontv.app.ui.adapter.VTHotBottomListAdapter;
import com.viontv.app.ui.adapter.VTNineSquareAdapter;
import com.viontv.app.utils.IntentUtils;
import com.youth.banner.listener.OnBannerListener;
import java.util.ArrayList;
import java.util.List;
@ -197,14 +201,29 @@ public class VTHotFragment extends Fragment {
public void initBanner(List<ItemBean> itemBeans) {
binding.banner.setAdapter(new VTBannerHomeAdapter(itemBeans)).
setCurrentItem(0, true)
.addBannerLifecycleObserver(this)
.setOnBannerListener((data, position) -> IntentUtils.startPlayerDetails(getActivity(), itemBeans.get(position).getShort_play_id(), 0))
.isAutoLoop(true);
if(itemBeans.size()>0){
binding.banner.setVisibility(VISIBLE);
VTBannerHomeAdapter adapter1 = new VTBannerHomeAdapter(itemBeans);
adapter1.setHomeHot(true);
binding.banner.setAdapter(adapter1).
setCurrentItem(0, true)
.addBannerLifecycleObserver(this)
.setOnBannerListener(new OnBannerListener() {
@Override
public void OnBannerClick(Object data, int position) {
ItemBean bean = itemBeans.get(position);
Log.i("tag====",bean.getShort_play_id()+" ");
IntentUtils.startPlayerDetails(getActivity(), itemBeans.get(position).getShort_play_id(), 0);
}
})
.isAutoLoop(true);
binding.banner.start();
binding.banner.start();
}else{
binding.banner.setVisibility(GONE);
}
}

View File

@ -152,10 +152,13 @@ public class VTTabItemFragment extends Fragment {
super.onScrolled(recyclerView, dx, dy);
}
});
initrequest();
}
public void initrequest(){
currentPage = 1;
getBottomData();
}
public void getBottomData() {
VTApi.getInstance().getVideoList(categoryId, currentPage, 10, "")
.subscribeOn(Schedulers.io())
@ -164,13 +167,21 @@ public class VTTabItemFragment extends Fragment {
@Override
public void onSuccess(VTResult<VTVideoListBean> feedbackResp) {
if (currentPage == 1) {
adapter.addDataList(feedbackResp.data.getList(), true);
} else {
adapter.addDataList(feedbackResp.data.getList(), false);
if(feedbackResp!=null&&feedbackResp.data!=null&&feedbackResp.data.getList().size()>0){
binding.ivEmptyData.setVisibility(View.GONE);
if (currentPage == 1) {
adapter.addDataList(feedbackResp.data.getList(), true);
} else {
adapter.addDataList(feedbackResp.data.getList(), false);
}
}else{
if (currentPage==1&&binding.banner.getVisibility()==View.GONE){
binding.ivEmptyData.setVisibility(View.VISIBLE);
}
}
}
@Override
@ -183,13 +194,19 @@ public class VTTabItemFragment extends Fragment {
public void initBanner(List<ItemBean> itemBeans) {
binding.banner.setAdapter(new VTBannerHomeAdapter(itemBeans)).
setCurrentItem(0, true)
.addBannerLifecycleObserver(this)
if(itemBeans.size()>0){
binding.banner.setVisibility(View.VISIBLE);
binding.banner.setAdapter(new VTBannerHomeAdapter(itemBeans)).
setCurrentItem(0, true)
.addBannerLifecycleObserver(this)
.setOnBannerListener((data, position) -> IntentUtils.startPlayerDetails(getActivity(), itemBeans.get(position).getShort_play_id(), 0))
.isAutoLoop(true);
binding.banner.start();
}else {
binding.banner.setVisibility(View.GONE);
}
.setOnBannerListener((data, position) -> IntentUtils.startPlayerDetails(getActivity(), itemBeans.get(position).getShort_play_id(), 0))
.isAutoLoop(true);
binding.banner.start();
}

View File

@ -18,9 +18,12 @@ import com.viontv.app.api.VTResult;
import com.viontv.app.databinding.FragmentTopVtBinding;
import com.viontv.app.databinding.ItemHomeExploreVtBinding;
import com.viontv.app.model.ItemBean;
import com.viontv.app.model.VTVideoListBean;
import com.viontv.app.ui.adapter.VTCommonAdapter;
import com.viontv.app.ui.adapter.VTTop10ListAdapter;
import com.viontv.app.utils.IntentUtils;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
@ -61,11 +64,12 @@ public class VTTopFragment extends Fragment {
}
public void initList() {
layoutManager = new LinearLayoutManager(getActivity());
binding.rvFragmentHometop.setLayoutManager(layoutManager);
layoutManager = new LinearLayoutManager(getActivity());
binding.rvFragmentHometop.setLayoutManager(layoutManager);
adapter = new VTTop10ListAdapter(getActivity(), ItemHomeExploreVtBinding.class);
adapter.setItemClickListener((data, holder) -> {
IntentUtils.startPlayerDetails(getActivity(), data.getShort_play_id(), 0);
});
binding.rvFragmentHometop.setAdapter(adapter);
getTop10Data();
}

View File

@ -132,7 +132,7 @@ public class VTFollowListFragment extends Fragment {
vtVideoViewModel.cancelcollection(adapter.getItemData(deletePosition).getShort_play_id());
VTVideoDetailsBean.ShortPlayInfo shortPlayInfo = new VTVideoDetailsBean.ShortPlayInfo();
shortPlayInfo.setShort_play_id(adapter.getItemData(deletePosition).getShort_play_id());
shortPlayInfo.setCollect_total(adapter.getItemData(deletePosition).getCollect_total());
shortPlayInfo.setIs_collect(false);
EventBus.getDefault().post(new VTBaseEventBus<>(VTAppConstants.Constants_Episodes_Series_DataExample, shortPlayInfo));
List<Fragment> fragments = getParentFragmentManager().getFragments();
Log.i(" ","fragments=="+fragments.size());

View File

@ -73,24 +73,24 @@ public class VTMyListFragment extends Fragment {
binding.viewpager.setAdapter(adapter);
//把TabLayout选项卡布局和ViewPager2绑定在一起特别说明一下下面这行代码是官方给的特别好使
new TabLayoutMediator(binding.tablayoutMylist, binding.viewpager, (tab, position) -> tab.setText(titles.get(position))).attach();
binding.tablayoutMylist.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
@Override
public void onTabSelected(TabLayout.Tab tab) {
binding.ivMylistDelete.setVisibility(tab.getPosition()==0?VISIBLE:GONE);
}
@Override
public void onTabUnselected(TabLayout.Tab tab) {
}
@Override
public void onTabReselected(TabLayout.Tab tab) {
}
});
// binding.tablayoutMylist.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
// @Override
// public void onTabSelected(TabLayout.Tab tab) {
//
// // binding.ivMylistDelete.setVisibility(tab.getPosition()==0?VISIBLE:GONE);
//
// }
//
// @Override
// public void onTabUnselected(TabLayout.Tab tab) {
//
// }
//
// @Override
// public void onTabReselected(TabLayout.Tab tab) {
//
// }
// });
binding.ivMylistDelete.setOnClickListener(v -> {
binding.tvMylistCancel.setVisibility(VISIBLE);

View File

@ -399,9 +399,9 @@ public class VTVideoPlayerActivity extends VTCommonActivity<ActivityVideoDetails
public void run() {
if (shortVideoInfo != null) {
if (shortVideoInfo.isIs_collect()) {
vtViewModel.cancelcollection(shortVideoInfo.getShort_play_id());
vtViewModel.cancelcollection(episodeDetailId);
} else {
vtViewModel.collection(shortVideoInfo.getShort_play_id(), episode.getId());
vtViewModel.collection(episodeDetailId, episode.getId());
}
}
}

View File

@ -1,14 +1,19 @@
package com.viontv.app.ui.adapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.appcompat.widget.AppCompatTextView;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
import com.viontv.app.R;
import com.viontv.app.model.ItemBean;
import com.youth.banner.adapter.BannerAdapter;
@ -21,16 +26,30 @@ public class VTBannerHomeAdapter extends BannerAdapter<ItemBean, VTBannerHomeAda
super(mData);
}
boolean isHomeHot = false;
public boolean isHomeHot() {
return isHomeHot;
}
public void setHomeHot(boolean homeHot) {
isHomeHot = homeHot;
}
@Override
public BannerHomeViewHolder onCreateHolder(ViewGroup parent, int viewType) {
ImageView imageView = new ImageView(parent.getContext());
//注意必须设置为match_parent这个是viewpager2强制要求的
imageView.setLayoutParams(new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
return new BannerHomeViewHolder(imageView);
// ImageView imageView = new ImageView(parent.getContext());
// //注意必须设置为match_parent这个是viewpager2强制要求的
// imageView.setLayoutParams(new ViewGroup.LayoutParams(
// ViewGroup.LayoutParams.MATCH_PARENT,
// ViewGroup.LayoutParams.MATCH_PARENT));
// imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
// View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_banner_, parent,
// false);
// ViewHolder holder = new ViewHolder(context, itemView, parent);
// return new BannerHomeViewHolder(imageView);
return new BannerHomeViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_banner, parent, false));
}
@Override
@ -39,17 +58,25 @@ public class VTBannerHomeAdapter extends BannerAdapter<ItemBean, VTBannerHomeAda
if(!imageUrl.endsWith(".jpg")){
imageUrl = data.getImage_url();
}
Glide.with(holder.itemView.getContext()).load(imageUrl).apply(RequestOptions.bitmapTransform(new RoundedCorners(30))).into(holder.imageView);
Glide.with(holder.itemView.getContext()).load(imageUrl).placeholder(R.mipmap.ic_loadingdefault_hor).into(holder.imageView);
holder.textView.setVisibility(View.GONE);
if(isHomeHot){
holder.textView.setVisibility(View.VISIBLE);
holder.textView.setText(data.getName()+"");
}
}
class BannerHomeViewHolder extends RecyclerView.ViewHolder {
ImageView imageView;
AppCompatImageView imageView;
AppCompatTextView textView;
public BannerHomeViewHolder(@NonNull ImageView view) {
public BannerHomeViewHolder(@NonNull View view) {
super(view);
this.imageView = view;
imageView = view.findViewById(R.id.iv_banner_img);
textView = view.findViewById(R.id.tv_banner_title);
}
}
}

View File

@ -10,10 +10,13 @@ import android.view.View;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.viontv.app.R;
import com.viontv.app.databinding.ItemHomeExploreVtBinding;
import com.viontv.app.model.ItemBean;
/**
* Home Hotbottom Home Top10
*/
public class VTHotBottomListAdapter
extends VTCommonAdapter<ItemBean, ItemHomeExploreVtBinding> {
@ -35,6 +38,7 @@ public class VTHotBottomListAdapter
if (data != null) {
Glide.with(mcontext)
.load(data.getImage_url())
.placeholder(R.mipmap.ic_loadingdefault_ver)
.apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.RESOURCE))
.into(binding.ivHotExploreItem);
binding.tvHomeExploretitleItem.setText(data.getName());

View File

@ -64,6 +64,7 @@ public class VTMyListFollowAdapter
if (data != null) {
Glide.with(mcontext)
.load(data.getImage_url())
.placeholder(R.mipmap.ic_loadingdefault_ver)
.apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.NONE))
.into(binding.ivMylistFollowlistItem);
binding.tvMylistFollowlistName.setText(data.getName());

View File

@ -43,6 +43,7 @@ public class VTMyListPlayAdapter
if (data != null) {
Glide.with(mcontext)
.load(data.getImage_url())
.placeholder(R.mipmap.ic_loadingdefault_ver)
.apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.NONE))
.into(binding.ivMylistPlayItem);
binding.tvMylistPlaylistName.setText(data.getName());

View File

@ -9,6 +9,7 @@ import android.content.Context;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.viontv.app.R;
import com.viontv.app.databinding.ItemHotSquareVtBinding;
import com.viontv.app.model.ItemBean;
@ -34,6 +35,7 @@ public class VTNineSquareAdapter
if (data != null) {
Glide.with(mcontext)
.load(data.getImage_url())
.placeholder(R.mipmap.ic_loadingdefault_ver)
.apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.NONE))
.into(binding.ivHotSquareItem);
binding.tvHotSquareDesc.setText(data.getName());

View File

@ -11,6 +11,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.viontv.app.R;
import com.viontv.app.databinding.ItemHomeTablistVtBinding;
import com.viontv.app.model.ItemBean;
@ -34,12 +35,13 @@ public class VTTabItemListAdapter
int bingingAdapterPosition) {
if (data != null) {
String imageUrl = data.getHorizontally_img();
if (!imageUrl.endsWith(".jpg")) {
imageUrl = data.getImage_url();
}
String imageUrl = data.getImage_url();
// if (!imageUrl.endsWith(".jpg")) {
// imageUrl = data.getImage_url();
// }
Glide.with(mcontext)
.load(imageUrl)
.placeholder(R.mipmap.ic_loadingdefault_hor)
.apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.RESOURCE))
.into(binding.ivHometabItem);
binding.tvHometabTitleItem.setText(data.getName());

View File

@ -10,6 +10,7 @@ import android.view.View;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.viontv.app.R;
import com.viontv.app.databinding.ItemHomeExploreVtBinding;
import com.viontv.app.model.ItemBean;
import com.viontv.app.utils.TimeUtils;
@ -42,6 +43,7 @@ public class VTTop10ListAdapter
//
Glide.with(mcontext)
.load(data.getImage_url())
.placeholder(R.mipmap.ic_loadingdefault_ver)
.apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.RESOURCE))
.into(binding.ivHotExploreItem);
binding.layoutHomeHotcontent.setVisibility(View.VISIBLE);

View File

@ -10,6 +10,7 @@ import android.view.View;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.viontv.app.R;
import com.viontv.app.databinding.ItemHomeExploreVtBinding;
import com.viontv.app.databinding.ItemVideoHistoryBinding;
import com.viontv.app.model.ItemBean;
@ -43,6 +44,7 @@ public class VTUserVideoHistoryAdapter
//
Glide.with(mcontext)
.load(data.getImage_url())
.placeholder(R.mipmap.ic_loadingdefault_ver)
.apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.RESOURCE))
.into(binding.ivHistoryItem);
binding.tvHistoryProgress.setText(TimeUtils.precess(data.getCurrent_episode(),data.getEpisode_total())+"%");

View File

@ -2,7 +2,9 @@ package com.viontv.app.ui.view;
import android.content.Context;
import android.net.Uri;
import android.os.Handler;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
@ -29,6 +31,8 @@ import com.viontv.app.utils.VTAppConstants;
import org.greenrobot.eventbus.EventBus;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
@ -45,8 +49,12 @@ public class VTGoogleExoPlayerView extends FrameLayout {
private AppCompatImageView ivPagePlay;
private AppCompatImageView iv_collection_controller;
private AppCompatImageView iv_back_hibit_episode;
private AppCompatTextView tv_des_player;
private AppCompatTextView tv_episode_player;
private AppCompatTextView tv_episode_playertotal;
private AppCompatImageView iv_episode_playertotal;
private AppCompatTextView tv_title_player;
private AppCompatTextView tv_collection_num_controller;
private AppCompatTextView tv_title_hibit_episode;
@ -54,6 +62,8 @@ public class VTGoogleExoPlayerView extends FrameLayout {
private RelativeLayout rl_ep;
private boolean isEpisodePlaying = false;
private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
public VTGoogleExoPlayerView(Context context, AttributeSet attrs) {
super(context, attrs);
player = new ExoPlayer.Builder(context).build();
@ -63,21 +73,23 @@ public class VTGoogleExoPlayerView extends FrameLayout {
bind.playerView.setPlayer(player);
seekBar = bind.playerView.findViewById(R.id.seekBar_player_detail);
ivCoverPlayerDetail = bind.playerView.findViewById(R.id.iv_cover_player_detail);
ivPagePlay = bind.playerView.findViewById(R.id.iv_hibit_play);
ivPagePlay = bind.playerView.findViewById(R.id.iv_vt_play);
iv_collection_controller = bind.playerView.findViewById(R.id.iv_collection_controller);
iv_back_hibit_episode = bind.playerView.findViewById(R.id.iv_back_hibit_episode);
iv_back_hibit_episode = bind.playerView.findViewById(R.id.iv_back_vt_episode);
tv_des_player = bind.playerView.findViewById(R.id.tv_des_player);
tv_episode_player = bind.playerView.findViewById(R.id.tv_episode_player);
tv_episode_playertotal = bind.playerView.findViewById(R.id.iv_episodes_total_controller);
tv_title_player = bind.playerView.findViewById(R.id.tv_title_player);
load_line = bind.playerView.findViewById(R.id.load_line);
rl_ep = bind.playerView.findViewById(R.id.rl_ep);
iv_episode_playertotal = bind.playerView.findViewById(R.id.iv_episodes_controller);
iv_back_hibit_episode.setOnClickListener(v ->
EventBus.getDefault().post(VTAppConstants.Constants_RecommendPlayerView_CLOSEExample)
);
tv_collection_num_controller = bind.playerView.findViewById(R.id.tv_collection_num_controller);
tv_title_hibit_episode = bind.playerView.findViewById(R.id.tv_title_hibit_episode);
tv_title_hibit_episode = bind.playerView.findViewById(R.id.tv_title_vt_episode);
player.addListener(new Player.Listener() {
@ -86,7 +98,7 @@ public class VTGoogleExoPlayerView extends FrameLayout {
Player.Listener.super.onPlaybackStateChanged(playbackState);
switch (playbackState) {
case Player.STATE_BUFFERING:
load_line.setVisibility(VISIBLE);
load_line.setVisibility(GONE);
load_line.startAnimation();
break;
case Player.STATE_READY:
@ -101,6 +113,7 @@ public class VTGoogleExoPlayerView extends FrameLayout {
break;
case Player.STATE_ENDED:
EventBus.getDefault().post(VTAppConstants.Constants_Google_PLAYER_STATUS_FINISH_DETAIL);
stopProgressJob();
break;
case Player.STATE_IDLE:
bind.playerView.setEnabled(false);
@ -121,7 +134,7 @@ public class VTGoogleExoPlayerView extends FrameLayout {
}
});
bind.playerView.setOnClickListener(v -> {
ivPagePlay.setOnClickListener(v -> {
if (!VTAppConstants.isLock) {
if (isEpisodePlaying) {
ivPagePlay.setImageResource(R.mipmap.iv_play_vt);
@ -134,22 +147,85 @@ public class VTGoogleExoPlayerView extends FrameLayout {
});
}
private void setProgress() {
if (progressJob != null) {
progressJob.cancel(true);
Timer mTimer;
TimerTask mTimerTask;
public void setSeekBar(){
long duration = player.getDuration();
long position = player.getCurrentPosition();
int progress = (int) (position * 100 / (duration == C.TIME_UNSET ? 1 : duration));
if (seekBar != null) {
seekBar.setMax(100);
seekBar.setProgress(progress + 1);
}
ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
progressJob = executor.scheduleWithFixedDelay(() -> {
if (!isDragging) {
long duration = player.getDuration();
long position = player.getCurrentPosition();
int progress = (int) (position * 100 / (duration == C.TIME_UNSET ? 1 : duration));
if (seekBar != null) {
seekBar.setMax(100);
seekBar.setProgress(progress + 1);
}
private boolean isProgressJobRunning =false;
private Runnable progressRunnable;
private Handler handler = new Handler();
private void startProgressJob() {
if (isProgressJobRunning) return;
isProgressJobRunning = true;
progressRunnable = new Runnable() {
@Override
public void run() {
if (!isDragging) {
long duration = player.getDuration();
long position = player.getCurrentPosition();
int progress = (int) (position * 100 / (duration == C.TIME_UNSET ? 1 : duration));
if (seekBar != null) {
seekBar.setMax(100);
seekBar.setProgress(progress + 1);
}
}
handler.postDelayed(this, 1000); // 1 秒执行一次
}
}, 0, 1, TimeUnit.SECONDS);
};
handler.post(progressRunnable); // 启动
}
private void stopProgressJob() {
isProgressJobRunning = false;
if (progressRunnable != null) {
handler.removeCallbacks(progressRunnable);
}
}
private void setProgress() {
startProgressJob();
// setSeekBar();
// if (progressJob != null) {
// progressJob.cancel(true);
// }
// ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
// Runnable task = () -> {
// if (!isDragging) {
// setSeekBar();
// }};
// executor.schedule(task,1,TimeUnit.SECONDS);
// progressJob = executor.schedule(task,1,TimeUnit.SECONDS);
// progressJob = executor.schedule(task,1,TimeUnit.SECONDS);
// progressJob = executor.scheduleWithFixedDelay(() -> {
// if (!isDragging) {
// long duration = player.getDuration();
// long position = player.getCurrentPosition();
// int progress = (int) (position * 100 / (duration == C.TIME_UNSET ? 1 : duration));
// if (seekBar != null) {
// seekBar.setMax(100);
// seekBar.setProgress(progress + 1);
// }
//
// }
// }, 0, 1, TimeUnit.SECONDS);
// if (progressJob != null) {
// progressJob.cancel(null);
// }
@ -212,16 +288,16 @@ public class VTGoogleExoPlayerView extends FrameLayout {
if (TranslatesUtils.translates() != null) {
tv_title_hibit_episode.setText(TranslatesUtils.replace(
TranslatesUtils.translates().getEpisode_set(),
String.valueOf(bean.getEpisode())
String.valueOf(bean.getEpisode()+" / "+shortVideoInfo.getName())
));
tv_episode_player.setText(TranslatesUtils.replace(
TranslatesUtils.translates().getComplete_episode(),
String.valueOf(shortVideoInfo.getEpisode_total())
));
String.valueOf(shortVideoInfo.getEpisode_total())));
} else {
tv_title_hibit_episode.setText("Episode ".concat(String.valueOf(bean.getEpisode())));
tv_title_hibit_episode.setText("Episode " +(bean.getEpisode()+" / "+shortVideoInfo.getName()));
tv_episode_player.setText("Complete set : ".concat(String.valueOf(shortVideoInfo.getEpisode_total())));
}
tv_episode_playertotal.setText(String.valueOf(shortVideoInfo.getEpisode_total()));
tv_des_player.setText(shortVideoInfo.getDescription());
Glide.with(getContext()).load(shortVideoInfo.getImage_url()).into(ivCoverPlayerDetail);
ivCoverPlayerDetail.setVisibility(View.VISIBLE);
@ -230,6 +306,9 @@ public class VTGoogleExoPlayerView extends FrameLayout {
rl_ep.setOnClickListener(v ->
EventBus.getDefault().post(VTAppConstants.Constants_PlayerView_MoreItemEvent)
);
iv_episode_playertotal.setOnClickListener(v ->
EventBus.getDefault().post(VTAppConstants.Constants_PlayerView_MoreItemEvent)
);
player.setMediaItem(MediaItem.fromUri(Uri.parse(bean.getVideo_url())));
player.prepare();
}
@ -244,5 +323,6 @@ public class VTGoogleExoPlayerView extends FrameLayout {
public void release() {
player.release();
stopProgressJob();
}
}

View File

@ -126,7 +126,7 @@ public class VTHomeGoogleExoPlayerView extends FrameLayout {
}
});
bind.playerView.setOnClickListener(v -> {
ivPagePlay.setOnClickListener(v -> {
if (!VTAppConstants.isLock) {
if (isEpisodePlaying) {
ivPagePlay.setImageResource(R.mipmap.iv_play_vt);

View File

@ -1,170 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:gravity="center_horizontal"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@android:color/black"
android:layout_height="match_parent">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="@dimen/dp_119"
android:layout_height="@dimen/dp_119"
app:srcCompat="@mipmap/ic_launcher"
android:layout_marginTop="@dimen/dp_224"/>
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/dp_89"
app:srcCompat="@mipmap/ic_splash_appname"/>
</RelativeLayout>

View File

@ -57,6 +57,14 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_20" />
<ImageView
android:id="@+id/iv_empty_data"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"
android:background="@mipmap/ic_empty_data"/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<!-- </com.scwang.smart.refresh.layout.SmartRefreshLayout>-->

View File

@ -120,18 +120,37 @@
android:textColor="#e6ffffff"
android:textSize="@dimen/sp_14" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_about_us"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@mipmap/ic_me_about_us"
android:drawablePadding="@dimen/dp_9"
android:gravity="center_vertical"
android:padding="@dimen/dp_10"
android:drawableEnd="@mipmap/ic_enter"
android:text="@string/tabme_about_us"
android:textColor="#e6ffffff"
android:textSize="@dimen/sp_14" />
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_about_us"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawableStart="@mipmap/ic_me_about_us"
android:drawablePadding="@dimen/dp_9"
android:gravity="center_vertical"
android:padding="@dimen/dp_10"
android:text="@string/tabme_version"
android:textColor="#e6ffffff"
android:textSize="@dimen/sp_14" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/dp_9"
android:layout_alignParentEnd="true"
android:padding="@dimen/dp_10"
android:text="v1.0"
android:textColor="#e6ffffff"
android:textSize="@dimen/sp_14" />
</RelativeLayout>
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@ -23,10 +23,8 @@
<ImageView
android:id="@+id/iv_hot_explore_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="@dimen/dp_110"
android:scaleType="centerCrop"
android:minHeight="@dimen/dp_110"
app:layout_constraintDimensionRatio="82:110"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@ -70,6 +68,7 @@
android:maxLines="2"
android:textColor="#ff9d9d9d"
android:textSize="@dimen/sp_12"
app:layout_constraintTop_toTopOf="@+id/cardview_hot_explore"
app:layout_constraintBottom_toBottomOf="@+id/cardview_hot_explore"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/tv_home_exploretitle_item" />

View File

@ -17,10 +17,8 @@
<ImageView
android:id="@+id/iv_hometab_item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="@dimen/dp_226"
android:scaleType="centerCrop"
android:minHeight="@dimen/dp_89"
app:layout_constraintDimensionRatio="h:1:1.9"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_banner_img"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_banner_title"
android:layout_width="match_parent"
android:layout_marginStart="@dimen/dp_7"
android:maxLines="1"
android:ellipsize="end"
android:visibility="gone"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
android:textSize="@dimen/sp_14"
android:textColor="#e6ffffff"
android:layout_marginBottom="@dimen/dp_12"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -12,7 +12,7 @@
android:scaleType="centerCrop" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_back_hibit_episode"
android:id="@+id/iv_back_vt_episode"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginLeft="15dp"
@ -20,24 +20,92 @@
android:src="@mipmap/ic_play_vt_episode_left" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_title_hibit_episode"
android:layout_width="wrap_content"
android:id="@+id/tv_title_vt_episode"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="50dp"
android:layout_marginStart="@dimen/dp_10"
android:layout_toRightOf="@+id/iv_back_vt_episode"
android:layout_marginEnd="@dimen/dp_15"
android:layout_marginTop="56dp"
android:textColor="@color/white"
android:textSize="16dp"
tools:text="1111111111111111"
android:maxLines="1"
android:ellipsize="marquee"
tools:textColor="@color/black" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_vt_play"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:contentDescription="@null"
android:padding="15dp"
android:src="@mipmap/iv_stop_vt" />
<!-- 收藏功能按钮 start -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_above="@+id/ll_top"
android:layout_marginRight="16dp"
android:layout_marginBottom="120dp"
android:gravity="center"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_collection_controller"
android:layout_width="34dp"
android:layout_height="34dp"
android:layout_marginBottom="3dp" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_collection_num_controller"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@color/white"
android:textSize="12sp" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_episodes_controller"
android:layout_width="34dp"
android:layout_height="34dp"
android:visibility="gone"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:srcCompat="@mipmap/ic_video_episodes"
android:layout_marginTop="@dimen/dp_25"
android:layout_marginBottom="3dp" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/iv_episodes_total_controller"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="26dp"
android:gravity="center"
android:visibility="gone"
android:text="@string/episodes_tv"
android:textColor="@color/white"
android:textSize="12sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 收藏功能按钮 end-->
<!-- progress-->
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/ll_top"
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_above="@id/rl_ep"
android:layout_alignParentBottom="true"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="7dp"
android:layout_marginBottom="60dp"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
@ -54,31 +122,23 @@
android:thumb="@drawable/bg_shape_seekbar_player_vt"
android:thumbOffset="8dp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_hibit_play"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:contentDescription="@null"
android:padding="15dp"
android:src="@mipmap/iv_stop_vt" />
<com.viontv.app.ui.view.ProgressLineView
android:id="@+id/load_line"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_above="@id/rl_ep"
android:layout_marginLeft="16dp"
android:visibility="gone"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp" />
<RelativeLayout
android:id="@+id/rl_ep"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="41dp"
android:layout_above="@id/tv_des_player"
android:layout_alignParentBottom="true"
android:background="#272A30">
<androidx.appcompat.widget.AppCompatTextView
@ -113,36 +173,10 @@
android:layout_marginRight="16dp"
android:src="@mipmap/ic_arrowright_vt_episode" />
</RelativeLayout>
<!-- 收藏功能按钮 start -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/ll_top"
android:layout_alignParentEnd="true"
android:layout_marginRight="16dp"
android:layout_marginBottom="26dp"
android:gravity="center"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_collection_controller"
android:layout_width="34dp"
android:layout_height="34dp"
android:layout_marginBottom="5dp" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_collection_num_controller"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="26dp"
android:gravity="center"
android:textColor="@color/white"
android:textSize="12sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 收藏功能按钮 end-->
<!--video description-->
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_des_player"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
@ -157,4 +191,5 @@
android:textSize="12dp"
tools:text="Complete set : 999" />
</RelativeLayout>

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -1,16 +1,11 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.VionTV" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<style name="Theme.VionTV" parent="Theme.MaterialComponents.DayNight.NoActionBar.Bridge">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/black</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<item name="colorPrimaryDark">@android:color/white</item>
<item name="android:windowLightStatusBar">true</item>
<!-- Customize your theme here. -->
</style>
</resources>

View File

@ -23,11 +23,13 @@
<string name="tabme_private_policy">Privacy Policy</string>
<string name="tabme_user_agreement">User Agreement</string>
<string name="tabme_about_us">About Us</string>
<string name="tabme_version">Version</string>
<string name="tab_mylist_followlist">Follow List</string>
<string name="tab_mylist_playlist">Play List</string>
<string name="mylist_playlist_process">EP.%d/EP.%d</string>
<string name="cancel_tv">Cancel</string>
<string name="delete_tv">Delete(%d)</string>
<string name="episodes_tv">Episodes</string>

View File

@ -26,6 +26,7 @@ avloadingindicatorview="2.1.4"
media3 ="1.4.0"
eventbus="3.3.1"
baseRecyclerViewAdapter="4.1.4"
splashscreen="1.0.1"
[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
@ -57,6 +58,7 @@ media3ui = { group = "androidx.media3", name = "media3-ui", version.ref = "media
media3exoplayerhls = { group = "androidx.media3", name = "media3-exoplayer-hls", version.ref = "media3" }
eventbut={group = "org.greenrobot", name = "eventbus", version.ref = "eventbus" }
baseRecyclerAdapter={group = "io.github.cymchad", name = "BaseRecyclerViewAdapterHelper4", version.ref = "baseRecyclerViewAdapter" }
splashscreen={group = "androidx.core", name = "core-splashscreen", version.ref = "splashscreen" }
[plugins]