正式包一测版本

This commit is contained in:
raoqian 2025-09-24 14:21:11 +08:00
parent a532d67a7a
commit 15f5c91d59
23 changed files with 576 additions and 97 deletions

View File

@ -9,6 +9,20 @@ plugins {
} }
android { android {
signingConfigs {
getByName("debug") {
storeFile = file("/Users/raoqian156/AndroidCode/Nebuluxe/nebuiuxe.jks")
storePassword = "123789"
keyAlias = "neb"
keyPassword = "123789"
}
create("release") {
storeFile = file("/Users/raoqian156/AndroidCode/Nebuluxe/nebuiuxe.jks")
storePassword = "123789"
keyAlias = "neb"
keyPassword = "123789"
}
}
namespace = "com.jia.er.nebuluxe.app" namespace = "com.jia.er.nebuluxe.app"
compileSdk = 35 compileSdk = 35
@ -18,11 +32,14 @@ android {
targetSdk = 35 targetSdk = 35
versionCode = 1 versionCode = 1
versionName = "1.0.0" versionName = "1.0.0"
signingConfig = signingConfigs.getByName("release")
} }
buildTypes { buildTypes {
debug { debug {
isMinifyEnabled = false // isMinifyEnabled = false
isMinifyEnabled = true
isShrinkResources = true
proguardFiles( proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"), getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro" "proguard-rules.pro"

350
app/proguard-rules.pro vendored
View File

@ -20,6 +20,319 @@
# hide the original source file name. # hide the original source file name.
#-renamesourcefileattribute SourceFile #-renamesourcefileattribute SourceFile
#指定压缩级别
-optimizationpasses 5
#不跳过非公共的库的类成员
-dontskipnonpubliclibraryclassmembers
#混淆时采用的算法
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
#把混淆类中的方法名也混淆了
-useuniqueclassmembernames
#优化时允许访问并修改有修饰符的类和类的成员
-allowaccessmodification
#将文件来源重命名为SourceFile字符串
-renamesourcefileattribute SourceFile
#保留行号
-keepattributes SourceFile,LineNumberTable
#保持所有实现 Serializable 接口的类成员
#-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();
#}
##包名不混合大小写
#-dontusemixedcaseclassnames
#
##不跳过非公共的库的类
#-dontskipnonpubliclibraryclasses
#
##混淆时记录日志
#-verbose
#
##关闭预校验
#-dontpreverify
#
##不优化输入的类文件
#-dontoptimize
#
##保护注解
#-keepattributes *Annotation*
#-keep public class * extends com.rq.base.ui.BaseController
-keep class com.jia.er.nebuluxe.app.data.** { *; }
-keepclassmembernames class com.jia.er.nebuluxe.app.data.** { *;}
-keep public class * extends android.app.Service
-dontwarn android.support.v4.**
-keep class android.support.v4.app.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep class android.support.v4.** { *; }
-keep public class * extends android.app.Application
-dontwarn android.support.v7.**
-keep class android.support.v7.internal.** { *; }
-keep interface android.support.v7.internal.** { *; }
-keep class android.support.v7.** { *; }
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Fragment
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
#
-keep class com.gyf.immersionbar.* {*;}
-dontwarn com.gyf.immersionbar.**
-keep public class * extends android.view.View {
####
*** get*();
void set*(***);
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepclassmembernames class * {
@android.webkit.JavascriptInterface <methods>;
}
-keepnames class * implements java.io.Serializable
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
private static final java.io.ObjectStreamField[] serialPersistentFields;
!static !transient <fields>;
!private <fields>;
!private <methods>;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keep class **.R$* {
*; }
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keepclasseswithmembernames class com.rq.**{*;}
#保持所有拥有本地方法的类名及本地方法名
-keepclasseswithmembernames class * {
native <methods>;
}
#保持自定义View的get和set相关方法
-keepclassmembers public class * extends android.view.View {
void set*(***);
*** get*();
}
#保持Activity中View及其子类入参的方法
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
#枚举
-keepclassmembers enum * {
**[] $VALUES;
public *;
}
#Parcelable
-keepclassmembers class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator CREATOR;
}
#R文件的静态成员
-keepclassmembers class **.R$* {
public static <fields>;
}
-dontwarn com.cmic.gen.sdk.**
-keep class com.cmic.gen.sdk.**{*;}
-dontwarn com.unicom.online.account.shield.**
-keep class com.unicom.online.account.shield.** {*;}
-dontwarn com.unicom.online.account.kernel.**
-keep class com.unicom.online.account.kernel.** {*;}
-keep class cn.com.chinatelecom.account.**{*;}
-keep public class * extends android.view.View
#-------------------------------------webView区---------------------------------------#
#WebView处理项目中没有使用到webView忽略即可
#保持Android与JavaScript进行交互的类不被混淆
-keep class **.AndroidJavaScript {
*; }
-keepclassmembers class * extends android.webkit.WebViewClient {
public void *(android.webkit.WebView,java.lang.String,android.graphics.Bitmap);
public boolean *(android.webkit.WebView,java.lang.String);
}
-keepclassmembers class * extends android.webkit.WebChromeClient {
public void *(android.webkit.WebView,java.lang.String);
}
################ EventBus ################
-keepattributes *Annotation*
-keepclassmembers class * {
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
# Only required if you use AsyncExecutor
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
<init>(java.lang.Throwable);
}
################ EventBus ################
################ OAID ################
-keep class com.bun.miitmdid.** { *; }
-keep interface com.bun.supplier.** { *; }
-keep class androidx.core.**{*;}
# asus
-keep class com.asus.msa.SupplementaryDID.** { *; }
-keep class com.asus.msa.sdid.** { *; }
# freeme
-keep class com.android.creator.** { *; }
-keep class com.android.msasdk.** { *; }
# huawei -keep class com.huawei.hms.** {*;}
-keep interface com.huawei.hms.** {*;}
# lenovo
-keep class com.zui.deviceidservice.** { *; }
-keep class com.zui.opendeviceidlibrary.** { *; }
# meizu
-keep class com.meizu.flyme.openidsdk.** { *; }
# oppo
-keep class com.heytap.openid.** { *; }
# samsung
-keep class com.samsung.android.deviceidservice.** { *; }
# vivo
-keep class com.vivo.identifier.** { *; }
# xiaomi -keep class com.bun.miitmdid.provider.xiaomi.IdentifierManager
# zte
-keep class com.bun.lib.** { *; }
# coolpad
-keep class com.coolpad.deviceidsupport.** { *; }
# EEBBK
#None
# honor
-keep class com.hihonor.** {*; }
################ OAID ################
#//聚合混淆
-keep class bykvm*.**
-keep class com.bytedance.msdk.adapter.**{ public *; }
-keep class com.bytedance.msdk.api.** {
public *;
}
-keep class com.bytedance.msdk.base.TTBaseAd{*;}
-keep class com.bytedance.msdk.adapter.TTAbsAdLoaderAdapter{
public *;
protected <fields>;
}
# baidu sdk 不接入baidu sdk可以不引入
-ignorewarnings
-dontwarn com.baidu.mobads.sdk.api.**
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class com.baidu.mobads.** { *; }
-keep class com.style.widget.** {*;}
-keep class com.component.** {*;}
-keep class com.baidu.ad.magic.flute.** {*;}
-keep class com.baidu.mobstat.forbes.** {*;}
#ks 不接入ks sdk可以不引入
-keep class org.chromium.** {*;}
-keep class org.chromium.** { *; }
-keep class aegon.chrome.** { *; }
-keep class com.kwai.**{ *; }
-dontwarn com.kwai.**
-dontwarn com.kwad.**
-dontwarn com.ksad.**
-dontwarn aegon.chrome.**
#sigmob 不接入sigmob sdk可以不引入
-dontwarn android.support.v4.**
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.** { *; }
-keep public class * extends android.support.v4.**
-dontwarn com.sigmob.**
-keep class com.sigmob.**.**{*;}
#oaid 不同的版本混淆代码不太一致你注意你接入的oaid版本 不接入oaid可以不添加
-dontwarn com.bun.**
-keep class com.bun.** {*;}
-keep class a.**{*;}
-keep class XI.CA.XI.**{*;}
-keep class XI.K0.XI.**{*;}
-keep class XI.XI.K0.**{*;}
-keep class XI.vs.K0.**{*;}
-keep class XI.xo.XI.XI.**{*;}
-keep class com.asus.msa.SupplementaryDID.**{*;}
-keep class com.asus.msa.sdid.**{*;}
-keep class com.huawei.hms.ads.identifier.**{*;}
-keep class com.samsung.android.deviceidservice.**{*;}
-keep class com.zui.opendeviceidlibrary.**{*;}
-keep class org.json.**{*;}
-dontwarn com.cmic.gen.sdk.**
-keep class com.cmic.gen.sdk.**{*;}
-dontwarn com.unicom.online.account.shield.**
-keep class com.unicom.online.account.shield.** {*;}
-dontwarn com.unicom.online.account.kernel.**
-keep class com.unicom.online.account.kernel.** {*;}
-keep class cn.com.chinatelecom.account.**{*;}
-keep public class * extends android.view.View
#Mintegral 不接入Mintegral sdk可以不引入
-keepattributes Signature
-keepattributes *Annotation*
-keep class com.mbridge.** {*; }
-keep interface com.mbridge.** {*; }
-keep class android.support.v4.** { *; }
-dontwarn com.mbridge.**
-keep class **.R$* { public static final int mbridge*; }
-keep class com.android.inputmethod.** {*; }
# glide 的混淆代码 # glide 的混淆代码
-keep public class * implements com.bumptech.glide.module.GlideModule -keep public class * implements com.bumptech.glide.module.GlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** { -keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
@ -30,3 +343,40 @@
-keep class com.youth.banner.** { -keep class com.youth.banner.** {
*; *;
} }
-keepattributes Signature
-keepattributes *Annotation*
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**
# Platform calls Class.forName on types which do not exist on Android to determine platform.
-dontnote retrofit2.Platform
# Platform used when running on RoboVM on iOS.
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
# Platform used when running on Java 8 VMs.
-dontwarn retrofit2.Platform$Java8
# Retain generic type information for use by reflection by converters and adapters.
-keepattributes Signature
# Retain declared checked exceptions for use by a Proxy instance.
-keepattributes Exception
-keep,allowobfuscation,includedescriptorclasses class okhttp3.** { *; }
-keep,allowobfuscation,includedescriptorclasses interface okhttp3.** { *; }
-dontwarn okhttp3.**
# Retrofit 2.x
-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
#-------------------------------------删除代码区--------------------------------------#
#删除代码中Log相关的代码
#-assumenosideeffects class android.util.Log {
#
# public static boolean isLoggable(java.lang.String, int);
# public static int v(...);
# public static int i(...);
# public static int w(...);
# public static int d(...);
# public static int e(...);
#}

View File

@ -22,12 +22,14 @@ import androidx.core.view.WindowInsetsCompat
import androidx.viewbinding.ViewBinding import androidx.viewbinding.ViewBinding
import com.blankj.utilcode.util.BarUtils import com.blankj.utilcode.util.BarUtils
import com.jia.er.nebuluxe.app.R import com.jia.er.nebuluxe.app.R
import com.jia.er.nebuluxe.app.utils.LOG
import com.jia.er.nebuluxe.app.utils.singleClick import com.jia.er.nebuluxe.app.utils.singleClick
abstract class BaseActivity<BV : ViewBinding> : AppCompatActivity() { abstract class BaseActivity<BV : ViewBinding> : AppCompatActivity() {
lateinit var binding: BV lateinit var binding: BV
private var networkErrorView: View? = null private var networkErrorView: View? = null
private var noDramaView: View? = null private var noDramaView: View? = null
private var container: FrameLayout? = null
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
binding = getViewBinding() binding = getViewBinding()
@ -85,7 +87,32 @@ abstract class BaseActivity<BV : ViewBinding> : AppCompatActivity() {
insets insets
} }
} }
this.container = container
} }
fun showInPan(layout: Int) {
LOG.d("BaseActivity", "showInPan.93:" + layout)
val noDramaView =
layoutInflater.inflate(layout, container, false).apply {
layoutParams = ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)
findViewById<AppCompatTextView>(R.id.tv_example_retry)?.setOnClickListener {
onReturn()
}
}
LOG.d("BaseActivity", "showInPan.106:")
container?.addView(
noDramaView, ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)
)
LOG.d("BaseActivity", "showInPan.108:")
}
protected fun skip2Activity(clazz: Class<out BaseActivity<*>>) { protected fun skip2Activity(clazz: Class<out BaseActivity<*>>) {
singleClick { singleClick {
startActivity( startActivity(
@ -93,6 +120,7 @@ abstract class BaseActivity<BV : ViewBinding> : AppCompatActivity() {
) )
} }
} }
protected abstract fun top() protected abstract fun top()
protected abstract fun center() protected abstract fun center()
protected abstract fun getViewBinding(): BV protected abstract fun getViewBinding(): BV
@ -115,6 +143,10 @@ abstract class BaseActivity<BV : ViewBinding> : AppCompatActivity() {
noDramaView?.visibility = View.VISIBLE noDramaView?.visibility = View.VISIBLE
} }
fun hideNoDrama() {
noDramaView?.visibility = View.GONE
}
private var loadingDialog: Dialog? = null private var loadingDialog: Dialog? = null
protected open fun showLoading( protected open fun showLoading(

View File

@ -2,6 +2,7 @@ package com.jia.er.nebuluxe.app.home
import android.content.Intent import android.content.Intent
import android.graphics.Rect import android.graphics.Rect
import android.os.Bundle
import android.view.View import android.view.View
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
@ -9,18 +10,15 @@ import androidx.recyclerview.widget.RecyclerView
import com.blankj.utilcode.util.NetworkUtils import com.blankj.utilcode.util.NetworkUtils
import com.jia.er.nebuluxe.app.R import com.jia.er.nebuluxe.app.R
import com.jia.er.nebuluxe.app.basics.BaseActivity import com.jia.er.nebuluxe.app.basics.BaseActivity
import com.jia.er.nebuluxe.app.basics.Constants import com.jia.er.nebuluxe.app.basics.Constants.CONSTANTS_short_play_id
import com.jia.er.nebuluxe.app.data.HomeRankingRes
import com.jia.er.nebuluxe.app.data.ShortListCategoryDataInfo import com.jia.er.nebuluxe.app.data.ShortListCategoryDataInfo
import com.jia.er.nebuluxe.app.databinding.ActivityFreshBinding import com.jia.er.nebuluxe.app.databinding.ActivityGenresBinding
import com.jia.er.nebuluxe.app.databinding.ActivityRankingsBinding
import com.jia.er.nebuluxe.app.net.MainViewModel import com.jia.er.nebuluxe.app.net.MainViewModel
import com.jia.er.nebuluxe.app.utils.singleClick import com.jia.er.nebuluxe.app.utils.singleClick
import com.jia.er.nebuluxe.app.utils.toast import com.jia.er.nebuluxe.app.utils.toast
import com.jia.er.nebuluxe.app.video.PlayerDetailActivity
class GenresActivity : BaseActivity<ActivityFreshBinding>() { class GenresActivity : BaseActivity<ActivityGenresBinding>() {
private val mViewModel by lazy { ViewModelProvider(this)[MainViewModel::class.java] } private val mViewModel by lazy { ViewModelProvider(this)[MainViewModel::class.java] }
override fun top() { override fun top() {
@ -60,6 +58,25 @@ class GenresActivity : BaseActivity<ActivityFreshBinding>() {
}) })
homeRankTrendingAdapter?.isStateViewEnable = true homeRankTrendingAdapter?.isStateViewEnable = true
homeRankTrendingAdapter?.setStateViewLayout(this, R.layout.layout_emptyview) homeRankTrendingAdapter?.setStateViewLayout(this, R.layout.layout_emptyview)
// homeRankTrendingAdapter.addOnItemChildClickListener(
// R.id.tv_num,
// { adapter, view, position ->
// {
// val data =
// adapter.getItem(position) as ShortListCategoryDataInfo.CategoryListData
// startActivity(
// Intent(
// this,
// GenresListActivity::class.java,
// ),
// Bundle().apply {
// putInt(
// CONSTANTS_short_play_id, data.short_play_id
// )
// }
// )
// }
// })
homeRankTrendingAdapter?.setOnItemClickListener { adapter, view, position -> homeRankTrendingAdapter?.setOnItemClickListener { adapter, view, position ->
val data = val data =
adapter.getItem(position) as ShortListCategoryDataInfo.CategoryListData adapter.getItem(position) as ShortListCategoryDataInfo.CategoryListData
@ -83,8 +100,8 @@ class GenresActivity : BaseActivity<ActivityFreshBinding>() {
} }
} }
override fun getViewBinding(): ActivityFreshBinding { override fun getViewBinding(): ActivityGenresBinding {
return ActivityFreshBinding.inflate(layoutInflater) return ActivityGenresBinding.inflate(layoutInflater)
} }
override fun onRetry() { override fun onRetry() {

View File

@ -1,10 +1,7 @@
package com.jia.er.nebuluxe.app.home package com.jia.er.nebuluxe.app.home
import android.annotation.SuppressLint
import android.content.Context import android.content.Context
import android.graphics.Color import android.content.Intent
import android.graphics.Rect
import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
@ -12,7 +9,11 @@ import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.fullspan.FullSpanAdapterType import com.chad.library.adapter4.fullspan.FullSpanAdapterType
import com.chad.library.adapter4.viewholder.QuickViewHolder import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.jia.er.nebuluxe.app.R import com.jia.er.nebuluxe.app.R
import com.jia.er.nebuluxe.app.basics.Constants
import com.jia.er.nebuluxe.app.data.ShortListCategoryDataInfo import com.jia.er.nebuluxe.app.data.ShortListCategoryDataInfo
import com.jia.er.nebuluxe.app.data.ShortListCategoryDataInfo.ShortPlayListData
import com.jia.er.nebuluxe.app.utils.LOG
import com.jia.er.nebuluxe.app.video.PlayerDetailActivity
class GenresAdapter : class GenresAdapter :
@ -50,18 +51,33 @@ class GenresAdapter :
R.id.tv_num, R.id.tv_num,
item?.short_play_list?.size.toString().plus("\n").plus("Dramas") item?.short_play_list?.size.toString().plus("\n").plus("Dramas")
) )
val homeRankTrendingAdapter = GenresItemAdapter() LOG.d("GenresAdapter", "onBindViewHolder.53:" + position)
val manager1 = LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false) view?.layoutManager = manager
view?.layoutManager = manager1
view?.adapter = homeRankTrendingAdapter view?.adapter = homeRankTrendingAdapter
homeRankTrendingAdapter?.submitList(item?.short_play_list) homeRankTrendingAdapter?.submitList(item?.short_play_list)
} }
val homeRankTrendingAdapter = GenresItemAdapter()
var manager: RecyclerView.LayoutManager? = null
override fun onCreateViewHolder( override fun onCreateViewHolder(
context: Context, context: Context,
parent: ViewGroup, parent: ViewGroup,
viewType: Int viewType: Int
): QuickViewHolder { ): QuickViewHolder {
manager = LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false)
homeRankTrendingAdapter.setOnItemClickListener { adapter, view, position ->
LOG.d("GenresAdapter", "onCreateViewHolder.68:")
var it = adapter.getItem(position) as ShortPlayListData
LOG.d("GenresAdapter", "onCreateViewHolder.70:")
context.startActivity(
Intent(
context, PlayerDetailActivity::class.java
).apply {
putExtra(
Constants.CONSTANTS_short_play_id, it.short_play_id
)
})
}
return QuickViewHolder(R.layout.item_genres, parent) return QuickViewHolder(R.layout.item_genres, parent)
} }
} }

View File

@ -44,7 +44,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
} }
mViewModel.historysData_home.observe(this) { mViewModel.historysData_home.observe(this) {
if (it?.data?.list?.get(0) != null) { if (it?.data?.list?.isNotEmpty() == true) {
binding.llHistory.visibility = View.VISIBLE binding.llHistory.visibility = View.VISIBLE
binding.tvHisTitle.text = it.data.list[0].name binding.tvHisTitle.text = it.data.list[0].name
binding.tvHisEp.text = binding.tvHisEp.text =
@ -72,7 +72,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
binding.tvFresh.setOnClickListener { binding.tvFresh.setOnClickListener {
skip2Activity(FreshActivity::class.java) skip2Activity(FreshActivity::class.java)
} }
binding.tvFresh.setOnClickListener { binding.tvGenre.setOnClickListener {
skip2Activity(GenresActivity::class.java) skip2Activity(GenresActivity::class.java)
} }
binding.rlTop.setOnClickListener { binding.rlTop.setOnClickListener {

View File

@ -45,14 +45,8 @@ class ReelsBannerAdapter() : BaseQuickAdapter<RecommendDataRes.Data, QuickViewHo
(AppUtil.getScreenWidth(parent.context) - 20) / 5, ViewGroup.LayoutParams.MATCH_PARENT (AppUtil.getScreenWidth(parent.context) - 20) / 5, ViewGroup.LayoutParams.MATCH_PARENT
) )
view.addOnLayoutChangeListener { v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom -> view.addOnLayoutChangeListener { v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom ->
val name = view?.findViewById<AppCompatTextView>(R.id.tv_name)?.text as String
var focusPosition = currentSelect + 1 var focusPosition = currentSelect + 1
var position = v.getTag(R.id.tag_rev_id) as Int var position = v.getTag(R.id.tag_rev_id) as Int
LOG.d("ReelsBannerAdapter", "onCreateViewHolder.53:" + currentSelect)
LOG.d(
"ReelsBannerAdapter",
name + ".onCreateViewHolder.isSelect:" + v.getTag(R.id.tag_rev_id)
)
if (focusPosition == position) { if (focusPosition == position) {
view.scaleX = 0.9F view.scaleX = 0.9F
view.scaleY = 0.9F view.scaleY = 0.9F

View File

@ -104,10 +104,13 @@ class SearchActivity : BaseActivity<ActivitySearchBinding>() {
searchResultAdapter?.items = it?.data?.list.orEmpty() searchResultAdapter?.items = it?.data?.list.orEmpty()
if (it?.data?.list.isNullOrEmpty()) { if (it?.data?.list.isNullOrEmpty()) {
toast(R.string.toast_no_result_of_keyword) toast(R.string.toast_no_result_of_keyword)
binding.emptyPan.visibility = View.VISIBLE binding.emptyPan.visibility = View.GONE
binding.searchPan.visibility = View.GONE
binding.resultPan.visibility = View.GONE binding.resultPan.visibility = View.GONE
showInPan(R.layout.layout_no_result)
} else { } else {
binding.emptyPan.visibility = View.GONE binding.emptyPan.visibility = View.GONE
binding.searchPan.visibility = View.VISIBLE
binding.resultPan.visibility = View.VISIBLE binding.resultPan.visibility = View.VISIBLE
} }
searchResultAdapter?.notifyDataSetChanged() searchResultAdapter?.notifyDataSetChanged()
@ -115,6 +118,14 @@ class SearchActivity : BaseActivity<ActivitySearchBinding>() {
mViewModel.hots() mViewModel.hots()
} }
override fun onReturn() {
super.onReturn()
binding.emptyPan.visibility = View.VISIBLE
binding.searchPan.visibility = View.VISIBLE
binding.resultPan.visibility = View.GONE
findViewById<View>(R.id.default_empty_pan).visibility = View.GONE
}
private fun openDetail(id: Int) { private fun openDetail(id: Int) {
startActivity( startActivity(
Intent( Intent(

View File

@ -9,6 +9,7 @@ import com.jia.er.nebuluxe.app.R
import com.jia.er.nebuluxe.app.basics.Constants import com.jia.er.nebuluxe.app.basics.Constants
import com.jia.er.nebuluxe.app.basics.MyApplication.Companion.context import com.jia.er.nebuluxe.app.basics.MyApplication.Companion.context
import com.jia.er.nebuluxe.app.data.BaseRes import com.jia.er.nebuluxe.app.data.BaseRes
import com.jia.er.nebuluxe.app.utils.LOG
import com.jia.er.nebuluxe.app.utils.Memory import com.jia.er.nebuluxe.app.utils.Memory
import com.jia.er.nebuluxe.app.utils.PackageUtils import com.jia.er.nebuluxe.app.utils.PackageUtils
import com.jia.er.nebuluxe.app.utils.getAdvertisingIdInfo import com.jia.er.nebuluxe.app.utils.getAdvertisingIdInfo
@ -35,7 +36,15 @@ import kotlin.coroutines.suspendCoroutine
object Retrofit { object Retrofit {
private val retrofit: Retrofit private val retrofit: Retrofit
fun <P> build(serviceClass: Class<P>): P = retrofit.create(serviceClass) fun <P> build(serviceClass: Class<P>): P = retrofit.create(serviceClass)
private val httpLoggingInterceptor = HttpLoggingInterceptor() private val httpLoggingInterceptor = HttpLoggingInterceptor({
if (Constants.isUat) {
if(it.startsWith("{")){
LOG.bean("okhttp", it)
}else {
Log.d("okhttp", it)
}
}
})
private const val DELAY_TIME_MILLIS = 2000L private const val DELAY_TIME_MILLIS = 2000L
private var lastPostTime: Long = 0L private var lastPostTime: Long = 0L
private val lock = Any() private val lock = Any()

View File

@ -64,11 +64,15 @@ public class LOG {
Log.w("BEAN." + tag, "=====>null"); Log.w("BEAN." + tag, "=====>null");
return; return;
} }
Log.w("BEAN." + tag, "=====>" + log); Log.w("BEAN." + tag, "=====>" + log);
if ("pollAlarm".equals(tag)) { if ("pollAlarm".equals(tag)) {
return; return;
} }
//移除长数字数组的换行
log = log.replaceAll("(\\d*),˛", "$1_"); log = log.replaceAll("(\\d*),˛", "$1_");
//移除转移
log = log.replaceAll("\\\\", "");
String outPut = log.replaceAll(":\\{", ":,{").replaceAll(":\\[\\{", ":[,{").replaceAll("\\}", "},").replaceAll("\\]", "],").replaceAll("\\\\\"", ""); String outPut = log.replaceAll(":\\{", ":,{").replaceAll(":\\[\\{", ":[,{").replaceAll("\\}", "},").replaceAll("\\]", "],").replaceAll("\\\\\"", "");
String[] outs = outPut.split(","); String[] outs = outPut.split(",");

View File

@ -13,13 +13,11 @@ import androidx.activity.OnBackPressedCallback
import androidx.appcompat.widget.AppCompatImageView import androidx.appcompat.widget.AppCompatImageView
import androidx.appcompat.widget.AppCompatSeekBar import androidx.appcompat.widget.AppCompatSeekBar
import androidx.appcompat.widget.AppCompatTextView import androidx.appcompat.widget.AppCompatTextView
import androidx.fragment.app.DialogFragment
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope import androidx.lifecycle.lifecycleScope
import androidx.media3.common.MediaItem import androidx.media3.common.MediaItem
import androidx.media3.common.PlaybackException import androidx.media3.common.PlaybackException
import androidx.media3.common.Player import androidx.media3.common.Player
import androidx.media3.common.Timeline
import androidx.media3.datasource.DataSource import androidx.media3.datasource.DataSource
import androidx.media3.datasource.DefaultDataSourceFactory import androidx.media3.datasource.DefaultDataSourceFactory
import androidx.media3.exoplayer.DefaultRenderersFactory import androidx.media3.exoplayer.DefaultRenderersFactory
@ -85,7 +83,7 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(), OnSnapHe
private var collection: AppCompatImageView? = null private var collection: AppCompatImageView? = null
private var ivIconPlayer: AppCompatImageView? = null private var ivIconPlayer: AppCompatImageView? = null
private var ivCover: AppCompatImageView? = null private var ivCover: AppCompatImageView? = null
private var ivBackController: AppCompatImageView? = null private var btnBack: AppCompatImageView? = null
private var icBtnMore: View? = null private var icBtnMore: View? = null
private var exampleSeekbarPlayerController: AppCompatSeekBar? = null private var exampleSeekbarPlayerController: AppCompatSeekBar? = null
private var exampleProgressJob: Job? = null private var exampleProgressJob: Job? = null
@ -137,7 +135,7 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(), OnSnapHe
collection = playerView?.findViewById(R.id.example_iv_collection_controller) collection = playerView?.findViewById(R.id.example_iv_collection_controller)
play = playerView?.findViewById(R.id.example_iv_play_player_controller) play = playerView?.findViewById(R.id.example_iv_play_player_controller)
ivIconPlayer = playerView?.findViewById(R.id.iv_icon_player) ivIconPlayer = playerView?.findViewById(R.id.iv_icon_player)
ivBackController = playerView?.findViewById(R.id.iv_back_controller) btnBack = playerView?.findViewById(R.id.btn_back)
icBtnMore = playerView?.findViewById(R.id.iv_btn_more) icBtnMore = playerView?.findViewById(R.id.iv_btn_more)
icBtnMore?.setOnClickListener { icBtnMore?.setOnClickListener {
singleClick { singleClick {
@ -162,7 +160,7 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(), OnSnapHe
} }
} }
} }
ivBackController?.setOnClickListener { btnBack?.setOnClickListener {
singleClick { singleClick {
handleCustomLogic() handleCustomLogic()
} }

View File

@ -22,19 +22,6 @@ class SeriesDataAdapter :
val select: Boolean = currentPosition == view.text.toString().toInt() val select: Boolean = currentPosition == view.text.toString().toInt()
holder.setSelected(R.id.item_pan, select) holder.setSelected(R.id.item_pan, select)
holder.setVisible(R.id.iv_example_playing, select) holder.setVisible(R.id.iv_example_playing, select)
// if (currentPosition == view.text.toString().toInt()) {
// holder.setBackgroundResource(R.id.example_tv_num_data, R.drawable.bg_example_num_h)
// holder.setTextColor(
// R.id.example_tv_num_data,
// context.getColor(R.color.black)
// )
// } else {
// holder.setBackgroundResource(R.id.example_tv_num_data, R.drawable.bg_example_num_n)
// holder.setTextColor(
// R.id.example_tv_num_data,
// context.getColor(R.color.white)
// )
// }
// todo 解锁功能暂时隐藏 // todo 解锁功能暂时隐藏
// if (item?.is_lock == true && !Memory.isVip()) { // if (item?.is_lock == true && !Memory.isVip()) {
// holder.setVisible(R.id.iv_example_lock, true) // holder.setVisible(R.id.iv_example_lock, true)

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/padding_20px" />
<stroke android:width="1px"
android:color="@color/text_color_gray_DF"/>
</shape>

View File

@ -8,7 +8,6 @@
android:paddingTop="@dimen/padding_55px"> android:paddingTop="@dimen/padding_55px">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/example_iv_back" android:id="@+id/example_iv_back"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -23,7 +22,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_5px" android:layout_marginTop="@dimen/padding_5px"
android:text="Explore Genres" android:text="@string/title_explore_genres"
android:textColor="#FFffff" android:textColor="#FFffff"
android:textSize="@dimen/text_size_18px" android:textSize="@dimen/text_size_18px"
android:textStyle="bold" android:textStyle="bold"

View File

@ -12,32 +12,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_lock"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#50000000" />
<!-- <androidx.appcompat.widget.AppCompatTextView-->
<!-- android:id="@+id/tv_lock_episode"-->
<!-- android:layout_width="@dimen/padding_286px"-->
<!-- android:layout_height="@dimen/padding_52px"-->
<!-- android:background="@drawable/iv_lock_bg"-->
<!-- android:drawableStart="@drawable/iv_lock_detail"-->
<!-- android:drawablePadding="@dimen/padding_8px"-->
<!-- android:gravity="center"-->
<!-- android:paddingLeft="@dimen/padding_40px"-->
<!-- android:paddingRight="@dimen/padding_40px"-->
<!-- android:textColor="#FFF1DD"-->
<!-- android:textSize="@dimen/text_size_14px"-->
<!-- android:textStyle="bold"-->
<!-- android:visibility="invisible"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
<!-- app:layout_constraintRight_toRightOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent"-->
<!-- tools:text="Unlocking costs 100 coins" />-->
<include <include
android:id="@+id/view_video_recommend" android:id="@+id/view_video_recommend"
layout="@layout/close_episode_recommend" layout="@layout/close_episode_recommend"

View File

@ -38,7 +38,8 @@
android:background="@drawable/bg_content" android:background="@drawable/bg_content"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/example_iv_back"> app:layout_constraintTop_toBottomOf="@id/example_iv_back"
tools:visibility="gone">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="@dimen/padding_40px" android:layout_width="@dimen/padding_40px"
@ -73,7 +74,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/padding_16px" android:layout_margin="@dimen/padding_16px"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@id/search_pan"> app:layout_constraintTop_toBottomOf="@id/search_pan"
tools:visibility="gone">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/btn_delete" android:id="@+id/btn_delete"
@ -215,7 +217,7 @@
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/search_pan" app:layout_constraintTop_toBottomOf="@id/search_pan"
tools:visibility="visible"> tools:visibility="gone">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_result_tip" android:id="@+id/tv_result_tip"

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#90000000"> android:background="#4D000000">
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView

View File

@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#4D000000"
tools:background="@color/black"> tools:background="@color/black">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
@ -13,7 +14,7 @@
android:scaleType="centerCrop" /> android:scaleType="centerCrop" />
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_back_controller" android:id="@+id/btn_back"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/padding_15px" android:layout_marginLeft="@dimen/padding_15px"
@ -28,7 +29,7 @@
android:layout_marginLeft="@dimen/padding_6px" android:layout_marginLeft="@dimen/padding_6px"
android:layout_marginTop="@dimen/padding_55px" android:layout_marginTop="@dimen/padding_55px"
android:layout_toLeftOf="@id/iv_btn_more" android:layout_toLeftOf="@id/iv_btn_more"
android:layout_toRightOf="@id/iv_back_controller" android:layout_toRightOf="@id/btn_back"
android:lineSpacingExtra="@dimen/padding_1px" android:lineSpacingExtra="@dimen/padding_1px"
android:lineSpacingMultiplier="1.1" android:lineSpacingMultiplier="1.1"
android:text="Love Adventure Under Contract" android:text="Love Adventure Under Contract"

View File

@ -90,6 +90,7 @@
android:layout_height="@dimen/padding_300px" android:layout_height="@dimen/padding_300px"
android:layout_below="@id/tv_ep" android:layout_below="@id/tv_ep"
android:layout_marginTop="@dimen/padding_10px" android:layout_marginTop="@dimen/padding_10px"
android:layout_marginRight="@dimen/padding_15px" /> android:layout_marginRight="@dimen/padding_15px"
tools:listitem="@layout/item_num_data" />
</RelativeLayout> </RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -306,7 +306,8 @@
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/ll_language" android:id="@+id/ll_language"
style="@style/MineBtnPan"> style="@style/MineBtnPan"
android:visibility="gone">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="@dimen/padding_22px" android:layout_width="@dimen/padding_22px"
@ -345,7 +346,8 @@
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/ll_delete" android:id="@+id/ll_delete"
style="@style/MineBtnPan"> style="@style/MineBtnPan"
android:visibility="gone">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="@dimen/padding_22px" android:layout_width="@dimen/padding_22px"
@ -363,23 +365,10 @@
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/padding_16px"
android:layout_marginTop="@dimen/padding_18px"
android:layout_marginRight="@dimen/padding_16px"
android:orientation="horizontal"
android:paddingLeft="@dimen/padding_11px"
android:paddingRight="@dimen/padding_11px"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/ll_top">
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/ll_help" android:id="@+id/ll_help"
style="@style/MineBtnPan"> style="@style/MineBtnPan"
android:visibility="gone">
<androidx.appcompat.widget.AppCompatImageView <androidx.appcompat.widget.AppCompatImageView
android:layout_width="@dimen/padding_22px" android:layout_width="@dimen/padding_22px"

View File

@ -34,6 +34,7 @@
android:layout_height="@dimen/padding_12px" android:layout_height="@dimen/padding_12px"
android:layout_margin="@dimen/padding_6px" android:layout_margin="@dimen/padding_6px"
android:src="@drawable/ic_lock" android:src="@drawable/ic_lock"
android:visibility="gone"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />

View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/default_empty_pan"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:background="@color/black">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/example_iv_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_130px"
android:src="@drawable/iv_no_data"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.hjq.shape.view.ShapeTextView
android:id="@+id/tv_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/padding_10px"
android:gravity="center"
android:padding="@dimen/padding_10px"
android:text="No results found"
android:textSize="@dimen/text_size_18px"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/example_iv_empty"
app:shape_textEndColor="#E593CA"
app:shape_textGradientOrientation="horizontal"
app:shape_textStartColor="#FFFA80" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/example_tv_no_network"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_18px"
android:text="Cant find what youre looking for"
android:textColor="#FFDAA4"
android:textSize="@dimen/text_size_16px"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_top" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_example_retry"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_15px"
android:layout_marginRight="@dimen/padding_14px"
android:gravity="center"
android:paddingLeft="@dimen/padding_14px"
android:paddingTop="@dimen/padding_5px"
android:paddingRight="@dimen/padding_14px"
android:paddingBottom="@dimen/padding_5px"
android:text="Try again"
android:textColor="@color/text_color_white"
android:background="@drawable/bg_conner_20px_stoke"
android:textSize="@dimen/text_size_14px"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/example_tv_no_network" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -50,4 +50,5 @@
<string name="quality_540P">540P</string> <string name="quality_540P">540P</string>
<string name="quality_720P">720P</string> <string name="quality_720P">720P</string>
<string name="quality_1080P">1080P</string> <string name="quality_1080P">1080P</string>
<string name="title_explore_genres">Explore Genres</string>
</resources> </resources>