Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
821938089 committed Mar 2, 2025
1 parent 5bcac0f commit d4f7a08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@
<!-- 阅读漫画界面 -->
<activity
android:name=".ui.book.manga.ReadMangaActivity"
android:configChanges="locale|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout"
android:exported="true"
android:exported="false"
android:launchMode="singleTask">
<intent-filter>
<action android:name="com.samsung.android.support.REMOTE_ACTION" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class WebtoonRecyclerView @JvmOverloads constructor(
halfHeight = MeasureSpec.getSize(heightSpec) / 2
if (!heightSet) {
originalHeight = MeasureSpec.getSize(heightSpec)
val width = MeasureSpec.getSize(widthSpec)
setClickArea(width, originalHeight)
heightSet = true
}
super.onMeasure(widthSpec, heightSpec)
Expand Down Expand Up @@ -103,8 +105,7 @@ class WebtoonRecyclerView @JvmOverloads constructor(
return super.dispatchNestedPreScroll(dx, dy, consumed, offsetInWindow, type)
}

override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
super.onSizeChanged(w, h, oldw, oldh)
private fun setClickArea(width: Int, height: Int) {
mcRect.set(width * 0.33f, height * 0.33f, width * 0.66f, height * 0.66f)
blRect.set(0f, height * 0.66f, width * 0.33f, height.toFloat())
brRect.set(width * 0.66f, height * 0.66f, width.toFloat(), height.toFloat())
Expand Down

0 comments on commit d4f7a08

Please sign in to comment.