UI commit

This commit is contained in:
yuyl 2025-04-16 17:13:30 +08:00
parent f307326db7
commit b46330784b
14 changed files with 44 additions and 52 deletions

View File

@ -119,9 +119,6 @@ dependencies {
implementation 'com.github.Baseflow:PhotoView:2.3.0' implementation 'com.github.Baseflow:PhotoView:2.3.0'
implementation 'com.tencent.bugly:crashreport:3.4.4'
implementation 'com.tencent.bugly:nativecrashreport:3.9.2'
implementation 'com.airbnb.android:lottie:4.1.0' implementation 'com.airbnb.android:lottie:4.1.0'
implementation 'com.scwang.smart:refresh-layout-kernel:2.0.3' implementation 'com.scwang.smart:refresh-layout-kernel:2.0.3'

View File

@ -1,10 +1,9 @@
package com.localee.mireo.app.aop package com.localee.mireo.app.aop
import android.app.Activity import android.app.Activity
import com.localee.mireo.app.other.PermissionCallback
import com.hjq.permissions.XXPermissions import com.hjq.permissions.XXPermissions
import com.localee.mireo.app.manager.ActivityManager import com.localee.mireo.app.manager.ActivityManager
import com.tencent.bugly.crashreport.CrashReport import com.localee.mireo.app.other.PermissionCallback
import org.aspectj.lang.ProceedingJoinPoint import org.aspectj.lang.ProceedingJoinPoint
import org.aspectj.lang.annotation.Around import org.aspectj.lang.annotation.Around
import org.aspectj.lang.annotation.Aspect import org.aspectj.lang.annotation.Aspect
@ -15,7 +14,8 @@ import timber.log.Timber
@Aspect @Aspect
class PermissionsAspect { class PermissionsAspect {
@Pointcut("execution(@com.localee.mireo.app.aop.Permissions * *(..))") @Pointcut("execution(@com.localee.mireo.app.aop.Permissions * *(..))")
fun method() {} fun method() {
}
@Around("method() && @annotation(permissions)") @Around("method() && @annotation(permissions)")
fun aroundJoinPoint(joinPoint: ProceedingJoinPoint, permissions: Permissions) { fun aroundJoinPoint(joinPoint: ProceedingJoinPoint, permissions: Permissions) {
@ -39,7 +39,11 @@ class PermissionsAspect {
requestPermissions(joinPoint, activity, permissions.value) requestPermissions(joinPoint, activity, permissions.value)
} }
private fun requestPermissions(joinPoint: ProceedingJoinPoint, activity: Activity, permissions: Array<out String>) { private fun requestPermissions(
joinPoint: ProceedingJoinPoint,
activity: Activity,
permissions: Array<out String>
) {
XXPermissions.with(activity) XXPermissions.with(activity)
.permission(*permissions) .permission(*permissions)
.request(object : PermissionCallback() { .request(object : PermissionCallback() {
@ -49,7 +53,7 @@ class PermissionsAspect {
// 获得权限,执行原方法 // 获得权限,执行原方法
joinPoint.proceed() joinPoint.proceed()
} catch (e: Throwable) { } catch (e: Throwable) {
CrashReport.postCatchedException(e) // CrashReport.postCatchedException(e)
} }
} }
} }

View File

@ -36,7 +36,6 @@ import com.localee.mireo.app.utils.MsMMKVUtils
import com.localee.mireo.app.utils.MsSystemUtlis import com.localee.mireo.app.utils.MsSystemUtlis
import com.scwang.smart.refresh.layout.SmartRefreshLayout import com.scwang.smart.refresh.layout.SmartRefreshLayout
import com.scwang.smart.refresh.layout.api.RefreshLayout import com.scwang.smart.refresh.layout.api.RefreshLayout
import com.tencent.bugly.crashreport.CrashReport
import com.tencent.mmkv.MMKV import com.tencent.mmkv.MMKV
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import timber.log.Timber import timber.log.Timber
@ -122,10 +121,6 @@ class AppApplication : Application() {
"en" "en"
) )
headers.put("system-type", "android") headers.put("system-type", "android")
headers.put("app_id", "nice_short")
headers.put("system_version", "12")
headers.put("model", Build.MODEL)
headers.put("brand", Build.MANUFACTURER + "-" + Build.PRODUCT)
headers.put( headers.put(
"app_version", "app_version",
MsSystemUtlis.getVerNameInfo(instance) MsSystemUtlis.getVerNameInfo(instance)
@ -139,7 +134,6 @@ class AppApplication : Application() {
.into() .into()
GsonFactory.setJsonCallback { typeToken: TypeToken<*>, fieldName: String?, jsonToken: JsonToken -> GsonFactory.setJsonCallback { typeToken: TypeToken<*>, fieldName: String?, jsonToken: JsonToken ->
CrashReport.postCatchedException(IllegalArgumentException("Type parsing exception$typeToken#$fieldNamethe type returned by the background is$jsonToken"))
} }
if (AppConfig.isLogEnable()) { if (AppConfig.isLogEnable()) {

View File

@ -2,7 +2,6 @@ package com.localee.mireo.app.manager
import android.content.Context import android.content.Context
import android.os.Environment import android.os.Environment
import com.tencent.bugly.crashreport.CrashReport
import java.io.File import java.io.File
import java.math.BigDecimal import java.math.BigDecimal
@ -49,7 +48,6 @@ object CacheDataManager {
} }
} }
} catch (e: Exception) { } catch (e: Exception) {
CrashReport.postCatchedException(e)
} }
return size return size
} }

View File

@ -47,7 +47,7 @@ class SearchActivity : AppActivity(), StatusAction {
mKeyAdapter = SearchSearchAdapter() mKeyAdapter = SearchSearchAdapter()
recycler?.adapter = mAdapter recycler?.adapter = mAdapter
getSearchHot() // getSearchHot()
} }

View File

@ -580,7 +580,6 @@ open class VideoPlayActivity : AppActivity(), VideoPlayAdapter.PlayerDetailColle
override fun collection(episode: VideoDetailsApi.Bean.Episode) { override fun collection(episode: VideoDetailsApi.Bean.Episode) {
singleClick { singleClick {
if (!episode.is_lock) {
if (shortVideo?.is_collect == true) { if (shortVideo?.is_collect == true) {
val exampleUnFavoriteDialog = ExampleUnFavoriteDialog(this) val exampleUnFavoriteDialog = ExampleUnFavoriteDialog(this)
val tvThinkAgain = val tvThinkAgain =
@ -620,7 +619,6 @@ open class VideoPlayActivity : AppActivity(), VideoPlayAdapter.PlayerDetailColle
} }
} }
} }
}
override fun chooseSeries(episode: VideoDetailsApi.Bean.Episode) { override fun chooseSeries(episode: VideoDetailsApi.Bean.Episode) {
postDelayed({ detailPlayerView()?.pause() }, 300) postDelayed({ detailPlayerView()?.pause() }, 300)

View File

@ -2,6 +2,7 @@ package com.localee.mireo.app.ui.fragment
import android.content.Intent import android.content.Intent
import android.graphics.Rect import android.graphics.Rect
import android.view.Display
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView import android.widget.ImageView
@ -46,6 +47,7 @@ import com.localee.mireo.app.utils.TranslatesUtils
import com.youth.banner.Banner import com.youth.banner.Banner
import com.youth.banner.listener.OnBannerListener import com.youth.banner.listener.OnBannerListener
class HomeFragment : TitleBarFragment<HomeActivity>(), HomeBannerAdapter.HomeBannerOnClick, class HomeFragment : TitleBarFragment<HomeActivity>(), HomeBannerAdapter.HomeBannerOnClick,
TabAdapter.OnTabListener, TabAdapter.OnTabListener,
ViewPager.OnPageChangeListener { ViewPager.OnPageChangeListener {
@ -172,7 +174,6 @@ class HomeFragment : TitleBarFragment<HomeActivity>(), HomeBannerAdapter.HomeBan
viewPager?.adapter = pagerAdapter viewPager?.adapter = pagerAdapter
viewPager?.addOnPageChangeListener(this@HomeFragment) viewPager?.addOnPageChangeListener(this@HomeFragment)
} }
override fun initData() { override fun initData() {
@ -316,10 +317,10 @@ class HomeFragment : TitleBarFragment<HomeActivity>(), HomeBannerAdapter.HomeBan
override fun onHttpSuccess(result: HttpData<HomeDayMaxRechargeShortPlayRankApi.Bean>) { override fun onHttpSuccess(result: HttpData<HomeDayMaxRechargeShortPlayRankApi.Bean>) {
if (result.getData() == null) { if (result.getData() == null) {
layoutShort?.visibility = View.GONE layoutCritically?.visibility = View.GONE
} else { } else {
result.getData()?.let { result.getData()?.let {
layoutShort?.visibility = View.VISIBLE layoutCritically?.visibility = View.VISIBLE
criticallyAdapter?.submitList(it.list) criticallyAdapter?.submitList(it.list)
} }
} }
@ -366,12 +367,6 @@ class HomeFragment : TitleBarFragment<HomeActivity>(), HomeBannerAdapter.HomeBan
}) })
} }
override fun onDestroy() {
super.onDestroy()
}
override fun bannerAdd(dataRes: RecommendBean) { override fun bannerAdd(dataRes: RecommendBean) {
dataRes.short_play_id?.let { doCollect(it) }; dataRes.short_play_id?.let { doCollect(it) };
} }

View File

@ -17,9 +17,11 @@ class ExampleSeriesNumAdapter :
) { ) {
holder.setText(R.id.example_tv_num_episodes, item) holder.setText(R.id.example_tv_num_episodes, item)
if (currentPosition == position) { if (currentPosition == position) {
holder.setTextColor(R.id.example_tv_num_episodes, context.getColor(R.color.white)) holder.setTextColor(R.id.example_tv_num_episodes, context.getColor(R.color.example_color_F56490))
holder.setVisible(R.id.example_v_num_episodes, true)
} else { } else {
holder.setTextColor(R.id.example_tv_num_episodes, Color.parseColor("#40FFFFFF")) holder.setTextColor(R.id.example_tv_num_episodes, context.getColor(R.color.example_color_d9d9d9))
holder.setVisible(R.id.example_v_num_episodes, false)
} }
} }

View File

@ -307,17 +307,13 @@ class VideoPlayerView(context: Context, attrs: AttributeSet?) :
player?.setMediaSource(buildMediaSource(episode.video_url)) player?.setMediaSource(buildMediaSource(episode.video_url))
player?.prepare() player?.prepare()
exampleTvEpisodePlayerController?.setOnClickListener { exampleTvEpisodePlayerController?.setOnClickListener {
if (!episode.is_lock) {
EventBus.getDefault() EventBus.getDefault()
.post(MsConstants.Constants_RecommendPlayerView_DramaSeriesExample) .post(MsConstants.Constants_RecommendPlayerView_DramaSeriesExample)
} }
}
ivEpisodePlayerController?.setOnClickListener { ivEpisodePlayerController?.setOnClickListener {
if (!episode.is_lock) {
EventBus.getDefault() EventBus.getDefault()
.post(MsConstants.Constants_RecommendPlayerView_DramaSeriesExample) .post(MsConstants.Constants_RecommendPlayerView_DramaSeriesExample)
} }
}
exampleIvBackController?.setOnClickListener { exampleIvBackController?.setOnClickListener {
EventBus.getDefault() EventBus.getDefault()
.post(MsConstants.Constants_RecommendPlayerView_CLOSEExample) .post(MsConstants.Constants_RecommendPlayerView_CLOSEExample)

View File

@ -5,13 +5,19 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:background="#121418"
tools:context=".ui.activity.BrowserActivity"> tools:context=".ui.activity.BrowserActivity">
<com.hjq.bar.TitleBar <com.hjq.bar.TitleBar
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/transparent"
app:rightIconHeight="@dimen/dp_20" app:rightIconHeight="@dimen/dp_20"
app:title="@string/web_title" /> app:title="@string/web_title"
app:leftIcon="@drawable/bar_arrows_left_white"
app:lineVisible="false"
app:titleColor="@color/white"
/>
<ProgressBar <ProgressBar
android:id="@+id/pb_browser_progress" android:id="@+id/pb_browser_progress"
@ -38,7 +44,9 @@
<com.localee.mireo.app.widget.BrowserView <com.localee.mireo.app.widget.BrowserView
android:id="@+id/wv_browser_view" android:id="@+id/wv_browser_view"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent"
android:background="@color/transparent"
/>
</com.scwang.smart.refresh.layout.SmartRefreshLayout> </com.scwang.smart.refresh.layout.SmartRefreshLayout>

View File

@ -10,10 +10,22 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="20dp" android:layout_marginLeft="20dp"
android:gravity="center" android:gravity="center"
android:textColor="#40FFFFFF" android:text="sadsasd"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<com.hjq.shape.view.ShapeView
android:id="@+id/example_v_num_episodes"
android:layout_width="@dimen/dp_10"
android:layout_height="2dp"
app:shape_solidColor="@color/example_color_F56490"
app:shape_radius="@dimen/dp_2"
app:layout_constraintLeft_toLeftOf="@+id/example_tv_num_episodes"
app:layout_constraintRight_toRightOf="@+id/example_tv_num_episodes"
app:layout_constraintTop_toBottomOf="@+id/example_tv_num_episodes" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -71,18 +71,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
<!-- <com.google.android.material.tabs.TabLayout-->
<!-- android:id="@+id/tablayout"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="wrap_content"-->
<!-- />-->
<!-- <androidx.viewpager2.widget.ViewPager2-->
<!-- android:id="@+id/viewpager2"-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="match_parent"-->
<!-- />-->
</LinearLayout> </LinearLayout>

View File

@ -162,7 +162,7 @@
<string name="register_password_hint1">Set a login password of 6 to 18 characters.</string> <string name="register_password_hint1">Set a login password of 6 to 18 characters.</string>
<string name="register_password_hint2">Please re-enter the password.</string> <string name="register_password_hint2">Please re-enter the password.</string>
<string name="setting_title">Setting title</string> <string name="setting_title">Setting</string>
<string name="setting_language_switchover">Language Switch</string> <string name="setting_language_switchover">Language Switch</string>
<string name="setting_language_simple">Simplified Chinese</string> <string name="setting_language_simple">Simplified Chinese</string>
<string name="setting_language_complex">Traditional Chinese</string> <string name="setting_language_complex">Traditional Chinese</string>

View File

@ -4,10 +4,10 @@ android {
compileSdk 34 compileSdk 34
defaultConfig { defaultConfig {
minSdk 21 minSdk 24
targetSdk 34 targetSdk 34
versionName '1.0.0' versionName '1.0.0'
versionCode 32 versionCode 1
} }
compileOptions { compileOptions {