-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
91 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
1.1.11: | ||
试着解决阅读页无法退出全屏的问题, | ||
并添加了返回键退出全屏的设置, | ||
|
||
1.1.10: | ||
修复分屏或旋转后使用容易崩溃的bug, | ||
修复“飘天文学”搜索有时没有结果的bug, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
app/src/main/java/cc/aoeiuv020/panovel/text/DispatchTouchFrameLayout.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package cc.aoeiuv020.panovel.text | ||
|
||
import android.content.Context | ||
import android.util.AttributeSet | ||
import android.view.MotionEvent | ||
import android.widget.FrameLayout | ||
import org.jetbrains.anko.AnkoLogger | ||
import org.jetbrains.anko.verbose | ||
|
||
/** | ||
* | ||
* Created by AoEiuV020 on 2017.11.24-19:54:53. | ||
*/ | ||
class DispatchTouchFrameLayout : FrameLayout, AnkoLogger { | ||
constructor(context: Context) | ||
: super(context) | ||
|
||
constructor(context: Context, attrs: AttributeSet) | ||
: super(context, attrs) | ||
|
||
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) | ||
: super(context, attrs, defStyleAttr) | ||
|
||
var activity: NovelTextActivity? = null | ||
|
||
private var previousAction: Int = MotionEvent.ACTION_UP | ||
override fun dispatchTouchEvent(event: MotionEvent): Boolean { | ||
verbose { event } | ||
if (previousAction == MotionEvent.ACTION_DOWN | ||
&& event.action == MotionEvent.ACTION_UP) { | ||
activity?.toggle() | ||
} | ||
previousAction = event.action | ||
return super.dispatchTouchEvent(event) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters