1) 纯色遮罩层: TvFocusStyler.install() 会把背景整体换成不透明的红→橙渐变作为
焦点/按下反馈, 而 prepareTvFocusableTree(window.decorView) 会遍历整棵树施加。
按钮/Tab/卡片需要该反馈, 但铺满屏幕或覆盖播放画面的「表面型」View 一旦被套上,
触摸一次(state_pressed)就会用纯色盖住整屏内容。
新增 TvFocusStyler.suppressFill(view, focusable) 显式排除:
- 播放触摸层 playerTouchOverlay(浮在播放画面上方, 主要元凶; 传 focusable=false
保持其 isFocusable=false, 不再抢遥控器焦点)
- 全屏播放容器 R.id.container、启动加载遮罩 databaseLoadingOverlay
- 手机点歌二维码浮层(首页右下 + 全屏右上)、全屏音量面板
- 原 preserveBackground 更名为 suppressFill(播放画面宿主/海报沿用)
同时 install() 对已标记的 View 直接跳过, 不再替调用方强制可聚焦。
2) App 音量默认 85%: 新增 KtvStore.DEFAULT_MUSIC_VOLUME 作为唯一来源,
KtvStore 字段默认值与 optInt 兜底、MainActivity.musicVolume 初值、
调音弹窗「默认」按钮(原 80)统一引用; 远程页面 assets/mobile 默认值同步为 85。
版本号 1.3.2 -> 1.3.3(versionCode 8 -> 9)。按约定本次不发布 Release, 仅本地打包测试。
96 lines
2.9 KiB
Groovy
96 lines
2.9 KiB
Groovy
plugins {
|
|
id "com.android.application"
|
|
id "org.jetbrains.kotlin.android"
|
|
}
|
|
|
|
android {
|
|
namespace "com.local.ktv"
|
|
compileSdk 35
|
|
|
|
defaultConfig {
|
|
applicationId "com.local.ktv"
|
|
minSdk 21
|
|
targetSdk 25
|
|
versionCode 9
|
|
versionName "1.3.3"
|
|
ndk {
|
|
// 双 ABI 打包:兼容 64 位(Exynos 1580 等 arm64-v8a)与 32 位设备(极米 Play 超越版
|
|
// 的 Amlogic 950X2/S905X2 采用 32 位 Android 用户态,必须包含 armeabi-v7a,否则
|
|
// 会出现 INSTALL_FAILED_NO_MATCHING_ABIS 安装失败)。
|
|
// Package each ABI's complete IJK set; never mix individual SOs across the two sets.
|
|
abiFilters "armeabi-v7a", "arm64-v8a"
|
|
}
|
|
// 曲库已改为官方 Muse 同步(database_publish 不再发布到 Gitee),
|
|
// 不再需要 GITEE_DATABASE_* 构建参数。
|
|
}
|
|
|
|
// 签名配置:使用已有的 ktv_keystore.jks
|
|
signingConfigs {
|
|
release {
|
|
storeFile file("../../ktv_keystore.jks")
|
|
storePassword "123456"
|
|
keyAlias "ktv"
|
|
keyPassword "123456"
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
signingConfig signingConfigs.release
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
debug {
|
|
debuggable true
|
|
applicationIdSuffix ".qa"
|
|
}
|
|
}
|
|
|
|
// 支持 .ts 视频文件(aapt 不压缩这些文件以避免 SoundPool/MediaPlayer 问题)
|
|
androidResources {
|
|
noCompress 'ts', 'mp3', 'mp4', 'aac', 'm4a', 'flac', 'wav'
|
|
}
|
|
|
|
// 关闭发布构建的 lint vital 检查(本地分发的 APK 不需要 Google Play 上架要求)
|
|
lint {
|
|
checkReleaseBuilds false
|
|
abortOnError false
|
|
}
|
|
|
|
// 启用 BuildConfig 生成,供 AboutFragment 读取版本号/版本Code等信息
|
|
buildFeatures {
|
|
buildConfig = true
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
|
|
}
|
|
|
|
// 强制统一 Kotlin 标准库版本,避免 appcompat 与其他依赖的版本冲突
|
|
configurations.all {
|
|
resolutionStrategy {
|
|
force "org.jetbrains.kotlin:kotlin-stdlib:1.8.22"
|
|
force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.22"
|
|
force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22"
|
|
force "org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation files('libs/original-ijk-runtime.jar')
|
|
implementation "androidx.core:core:1.12.0"
|
|
implementation "androidx.appcompat:appcompat:1.6.1"
|
|
implementation "com.google.zxing:core:3.5.3"
|
|
implementation "com.liulishuo.okdownload:okdownload:1.0.7"
|
|
testImplementation "junit:junit:4.13.2"
|
|
|
|
}
|