6.6.2 - Alpha6 - 主页文档页面搜索时支持双向查找按钮
This commit is contained in:
@@ -36,8 +36,9 @@
|
|||||||
"调色盘 HEX 输入控件增强剪贴板粘贴色值时的兼容性",
|
"调色盘 HEX 输入控件增强剪贴板粘贴色值时的兼容性",
|
||||||
"应用内页面导航栏设置为透明或半透明以增强视觉体验",
|
"应用内页面导航栏设置为透明或半透明以增强视觉体验",
|
||||||
"UI 模式状态栏及导航栏默认为 `md_grey_50` 色值且设置为亮色模式",
|
"UI 模式状态栏及导航栏默认为 `md_grey_50` 色值且设置为亮色模式",
|
||||||
"应用主页 \"文件\" 标签支持通过长按切换浮动按钮可见状态",
|
"主页抽屉无障碍服务开关支持与脚本代码同步",
|
||||||
"应用主页抽屉无障碍服务开关支持与脚本代码同步",
|
"主页文档页面搜索时支持双向查找按钮",
|
||||||
|
"主页 \"文件\" 标签支持通过长按切换浮动按钮可见状态",
|
||||||
"代码编辑器标题文字支持字体大小自适应",
|
"代码编辑器标题文字支持字体大小自适应",
|
||||||
"日志页面浮动按钮可见状态与列表滚动操作联动",
|
"日志页面浮动按钮可见状态与列表滚动操作联动",
|
||||||
"脚本项目配置文件 project.json 支持更多打包选项 _[`issue #305`](http://issues.autojs6.com/305)_ _[`issue #306`](http://issues.autojs6.com/306)_",
|
"脚本项目配置文件 project.json 支持更多打包选项 _[`issue #305`](http://issues.autojs6.com/305)_ _[`issue #306`](http://issues.autojs6.com/306)_",
|
||||||
|
|||||||
@@ -188,8 +188,9 @@ AutoJs6 在 Auto.js 最终项目的基础上, 于 `2021/12/01` 进行二次开
|
|||||||
* `优化` 调色盘 HEX 输入控件增强剪贴板粘贴色值时的兼容性
|
* `优化` 调色盘 HEX 输入控件增强剪贴板粘贴色值时的兼容性
|
||||||
* `优化` 应用内页面导航栏设置为透明或半透明以增强视觉体验
|
* `优化` 应用内页面导航栏设置为透明或半透明以增强视觉体验
|
||||||
* `优化` UI 模式状态栏及导航栏默认为 `md_grey_50` 色值且设置为亮色模式
|
* `优化` UI 模式状态栏及导航栏默认为 `md_grey_50` 色值且设置为亮色模式
|
||||||
* `优化` 应用主页 "文件" 标签支持通过长按切换浮动按钮可见状态
|
* `优化` 主页抽屉无障碍服务开关支持与脚本代码同步
|
||||||
* `优化` 应用主页抽屉无障碍服务开关支持与脚本代码同步
|
* `优化` 主页文档页面搜索时支持双向查找按钮
|
||||||
|
* `优化` 主页 "文件" 标签支持通过长按切换浮动按钮可见状态
|
||||||
* `优化` 代码编辑器标题文字支持字体大小自适应
|
* `优化` 代码编辑器标题文字支持字体大小自适应
|
||||||
* `优化` 日志页面浮动按钮可见状态与列表滚动操作联动
|
* `优化` 日志页面浮动按钮可见状态与列表滚动操作联动
|
||||||
* `优化` 脚本项目配置文件 project.json 支持更多打包选项 _[`issue #305`](http://issues.autojs6.com/305)_ _[`issue #306`](http://issues.autojs6.com/306)_
|
* `优化` 脚本项目配置文件 project.json 支持更多打包选项 _[`issue #305`](http://issues.autojs6.com/305)_ _[`issue #306`](http://issues.autojs6.com/306)_
|
||||||
|
|||||||
@@ -188,8 +188,9 @@ AutoJs6 在 Auto.js 最终项目的基础上, 于 `2021/12/01` 进行二次开
|
|||||||
* `优化` 调色盘 HEX 输入控件增强剪贴板粘贴色值时的兼容性
|
* `优化` 调色盘 HEX 输入控件增强剪贴板粘贴色值时的兼容性
|
||||||
* `优化` 应用内页面导航栏设置为透明或半透明以增强视觉体验
|
* `优化` 应用内页面导航栏设置为透明或半透明以增强视觉体验
|
||||||
* `优化` UI 模式状态栏及导航栏默认为 `md_grey_50` 色值且设置为亮色模式
|
* `优化` UI 模式状态栏及导航栏默认为 `md_grey_50` 色值且设置为亮色模式
|
||||||
* `优化` 应用主页 "文件" 标签支持通过长按切换浮动按钮可见状态
|
* `优化` 主页抽屉无障碍服务开关支持与脚本代码同步
|
||||||
* `优化` 应用主页抽屉无障碍服务开关支持与脚本代码同步
|
* `优化` 主页文档页面搜索时支持双向查找按钮
|
||||||
|
* `优化` 主页 "文件" 标签支持通过长按切换浮动按钮可见状态
|
||||||
* `优化` 代码编辑器标题文字支持字体大小自适应
|
* `优化` 代码编辑器标题文字支持字体大小自适应
|
||||||
* `优化` 日志页面浮动按钮可见状态与列表滚动操作联动
|
* `优化` 日志页面浮动按钮可见状态与列表滚动操作联动
|
||||||
* `优化` 脚本项目配置文件 project.json 支持更多打包选项 _[`issue #305`](http://issues.autojs6.com/305)_ _[`issue #306`](http://issues.autojs6.com/306)_
|
* `优化` 脚本项目配置文件 project.json 支持更多打包选项 _[`issue #305`](http://issues.autojs6.com/305)_ _[`issue #306`](http://issues.autojs6.com/306)_
|
||||||
|
|||||||
@@ -37,8 +37,9 @@
|
|||||||
* `优化` 调色盘 HEX 输入控件增强剪贴板粘贴色值时的兼容性
|
* `优化` 调色盘 HEX 输入控件增强剪贴板粘贴色值时的兼容性
|
||||||
* `优化` 应用内页面导航栏设置为透明或半透明以增强视觉体验
|
* `优化` 应用内页面导航栏设置为透明或半透明以增强视觉体验
|
||||||
* `优化` UI 模式状态栏及导航栏默认为 `md_grey_50` 色值且设置为亮色模式
|
* `优化` UI 模式状态栏及导航栏默认为 `md_grey_50` 色值且设置为亮色模式
|
||||||
* `优化` 应用主页 "文件" 标签支持通过长按切换浮动按钮可见状态
|
* `优化` 主页抽屉无障碍服务开关支持与脚本代码同步
|
||||||
* `优化` 应用主页抽屉无障碍服务开关支持与脚本代码同步
|
* `优化` 主页文档页面搜索时支持双向查找按钮
|
||||||
|
* `优化` 主页 "文件" 标签支持通过长按切换浮动按钮可见状态
|
||||||
* `优化` 代码编辑器标题文字支持字体大小自适应
|
* `优化` 代码编辑器标题文字支持字体大小自适应
|
||||||
* `优化` 日志页面浮动按钮可见状态与列表滚动操作联动
|
* `优化` 日志页面浮动按钮可见状态与列表滚动操作联动
|
||||||
* `优化` 脚本项目配置文件 project.json 支持更多打包选项 _[`issue #305`](http://issues.autojs6.com/305)_ _[`issue #306`](http://issues.autojs6.com/306)_
|
* `优化` 脚本项目配置文件 project.json 支持更多打包选项 _[`issue #305`](http://issues.autojs6.com/305)_ _[`issue #306`](http://issues.autojs6.com/306)_
|
||||||
|
|||||||
@@ -37,8 +37,9 @@
|
|||||||
* `优化` 调色盘 HEX 输入控件增强剪贴板粘贴色值时的兼容性
|
* `优化` 调色盘 HEX 输入控件增强剪贴板粘贴色值时的兼容性
|
||||||
* `优化` 应用内页面导航栏设置为透明或半透明以增强视觉体验
|
* `优化` 应用内页面导航栏设置为透明或半透明以增强视觉体验
|
||||||
* `优化` UI 模式状态栏及导航栏默认为 `md_grey_50` 色值且设置为亮色模式
|
* `优化` UI 模式状态栏及导航栏默认为 `md_grey_50` 色值且设置为亮色模式
|
||||||
* `优化` 应用主页 "文件" 标签支持通过长按切换浮动按钮可见状态
|
* `优化` 主页抽屉无障碍服务开关支持与脚本代码同步
|
||||||
* `优化` 应用主页抽屉无障碍服务开关支持与脚本代码同步
|
* `优化` 主页文档页面搜索时支持双向查找按钮
|
||||||
|
* `优化` 主页 "文件" 标签支持通过长按切换浮动按钮可见状态
|
||||||
* `优化` 代码编辑器标题文字支持字体大小自适应
|
* `优化` 代码编辑器标题文字支持字体大小自适应
|
||||||
* `优化` 日志页面浮动按钮可见状态与列表滚动操作联动
|
* `优化` 日志页面浮动按钮可见状态与列表滚动操作联动
|
||||||
* `优化` 脚本项目配置文件 project.json 支持更多打包选项 _[`issue #305`](http://issues.autojs6.com/305)_ _[`issue #306`](http://issues.autojs6.com/306)_
|
* `优化` 脚本项目配置文件 project.json 支持更多打包选项 _[`issue #305`](http://issues.autojs6.com/305)_ _[`issue #306`](http://issues.autojs6.com/306)_
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import org.greenrobot.eventbus.Subscribe
|
|||||||
* Modified by SuperMonster003 as of Mar 26, 2022.
|
* Modified by SuperMonster003 as of Mar 26, 2022.
|
||||||
* Transformed by SuperMonster003 on Mar 31, 2023.
|
* Transformed by SuperMonster003 on Mar 31, 2023.
|
||||||
*/
|
*/
|
||||||
open class DocumentationFragment : ViewPagerFragment(ROTATION_GONE), BackPressedHandler, ViewStatesManageable {
|
class DocumentationFragment : ViewPagerFragment(ROTATION_GONE), BackPressedHandler, ViewStatesManageable {
|
||||||
|
|
||||||
private val binding by viewBinding(FragmentOnlineDocsBinding::bind)
|
private val binding by viewBinding(FragmentOnlineDocsBinding::bind)
|
||||||
|
|
||||||
@@ -99,7 +99,8 @@ open class DocumentationFragment : ViewPagerFragment(ROTATION_GONE), BackPressed
|
|||||||
mWebView.clearMatches()
|
mWebView.clearMatches()
|
||||||
mPreviousQuery = null
|
mPreviousQuery = null
|
||||||
}
|
}
|
||||||
event.isFindForward -> mWebView.findNext(false)
|
event === QueryEvent.FIND_FORWARD -> mWebView.findNext(true)
|
||||||
|
event.isFindBackward -> mWebView.findNext(false)
|
||||||
event.query == mPreviousQuery -> mWebView.findNext(true)
|
event.query == mPreviousQuery -> mWebView.findNext(true)
|
||||||
else -> {
|
else -> {
|
||||||
mWebView.findAllAsync(event.query)
|
mWebView.findAllAsync(event.query)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import android.view.MenuItem
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.appcompat.app.ActionBarDrawerToggle
|
import androidx.appcompat.app.ActionBarDrawerToggle
|
||||||
import androidx.appcompat.widget.SearchView
|
import androidx.appcompat.widget.SearchView
|
||||||
|
import androidx.core.view.forEach
|
||||||
import androidx.drawerlayout.widget.DrawerLayout
|
import androidx.drawerlayout.widget.DrawerLayout
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.viewpager.widget.ViewPager
|
import androidx.viewpager.widget.ViewPager
|
||||||
@@ -91,7 +92,6 @@ class MainActivity : BaseActivity(), DelegateHost, HostActivity {
|
|||||||
private val mBackPressObserver = BackPressedHandler.Observer()
|
private val mBackPressObserver = BackPressedHandler.Observer()
|
||||||
private val mForeGroundService = ForegroundService(this)
|
private val mForeGroundService = ForegroundService(this)
|
||||||
private var mSearchViewItem: SearchViewItem? = null
|
private var mSearchViewItem: SearchViewItem? = null
|
||||||
private var mDocsSearchItemExpanded = false
|
|
||||||
private val mA11yTool = AccessibilityTool(this)
|
private val mA11yTool = AccessibilityTool(this)
|
||||||
|
|
||||||
private val isCurrentPageDocs: Boolean
|
private val isCurrentPageDocs: Boolean
|
||||||
@@ -369,40 +369,53 @@ class MainActivity : BaseActivity(), DelegateHost, HostActivity {
|
|||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
menuInflater.inflate(R.menu.menu_main, menu)
|
menuInflater.inflate(R.menu.menu_main, menu)
|
||||||
mLogMenuItem = menu.findItem(R.id.action_log)
|
mLogMenuItem = menu.findItem(R.id.action_log)
|
||||||
mSearchMenuItem = menu.findItem(R.id.action_search)
|
setUpSearchMenuItem(menu)
|
||||||
setUpSearchMenuItem(mSearchMenuItem)
|
|
||||||
setUpToolbarColors()
|
setUpToolbarColors()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||||
if (item.itemId == R.id.action_log) {
|
if (item.itemId == R.id.action_log) {
|
||||||
if (mDocsSearchItemExpanded) {
|
LogActivity.launch(this)
|
||||||
submitForwardQuery()
|
return true
|
||||||
} else {
|
}
|
||||||
LogActivity.launch(this)
|
if (item.itemId == R.id.action_search_next) {
|
||||||
}
|
submitForwardQuery()
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if (item.itemId == R.id.action_search_prev) {
|
||||||
|
submitBackwardQuery()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item)
|
return super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setUpSearchMenuItem(searchMenuItem: MenuItem) {
|
private fun setUpSearchMenuItem(menu: Menu) {
|
||||||
mSearchViewItem = object : SearchViewItem(this, searchMenuItem) {
|
mSearchMenuItem = menu.findItem(R.id.action_search)
|
||||||
|
mSearchViewItem = object : SearchViewItem(this, mSearchMenuItem) {
|
||||||
override fun onMenuItemActionExpand(item: MenuItem): Boolean {
|
override fun onMenuItemActionExpand(item: MenuItem): Boolean {
|
||||||
if (isCurrentPageDocs) {
|
menu.forEach {
|
||||||
mDocsSearchItemExpanded = true
|
when (it.itemId) {
|
||||||
mLogMenuItem.setIcon(R.drawable.ic_ali_up)
|
R.id.action_search_next, R.id.action_search_prev -> {
|
||||||
|
it.isVisible = isCurrentPageDocs
|
||||||
|
}
|
||||||
|
else -> it.isVisible = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mToolbar.onceGlobalLayout { setUpToolbarColors() }
|
mToolbar.onceGlobalLayout { setUpToolbarColors() }
|
||||||
return super.onMenuItemActionExpand(item)
|
return super.onMenuItemActionExpand(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onMenuItemActionCollapse(item: MenuItem): Boolean {
|
override fun onMenuItemActionCollapse(item: MenuItem): Boolean {
|
||||||
if (mDocsSearchItemExpanded) {
|
menu.forEach {
|
||||||
mDocsSearchItemExpanded = false
|
when (it.itemId) {
|
||||||
mLogMenuItem.setIcon(R.drawable.ic_ali_log)
|
R.id.action_search_next, R.id.action_search_prev -> {
|
||||||
|
it.isVisible = false
|
||||||
|
}
|
||||||
|
else -> it.isVisible = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
mToolbar.onceGlobalLayout { setUpToolbarColors() }
|
||||||
return super.onMenuItemActionCollapse(item)
|
return super.onMenuItemActionCollapse(item)
|
||||||
}
|
}
|
||||||
}.apply {
|
}.apply {
|
||||||
@@ -430,6 +443,11 @@ class MainActivity : BaseActivity(), DelegateHost, HostActivity {
|
|||||||
EventBus.getDefault().post(event)
|
EventBus.getDefault().post(event)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun submitBackwardQuery() {
|
||||||
|
val event = QueryEvent.FIND_BACKWARD
|
||||||
|
EventBus.getDefault().post(event)
|
||||||
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
ViewUtils.configKeepScreenOnWhenInForeground(this)
|
ViewUtils.configKeepScreenOnWhenInForeground(this)
|
||||||
|
|||||||
@@ -6,15 +6,16 @@ package org.autojs.autojs.ui.main;
|
|||||||
public class QueryEvent {
|
public class QueryEvent {
|
||||||
|
|
||||||
public static final QueryEvent CLEAR = new QueryEvent(null);
|
public static final QueryEvent CLEAR = new QueryEvent(null);
|
||||||
public static final QueryEvent FIND_FORWARD = new QueryEvent("", true);
|
public static final QueryEvent FIND_FORWARD = new QueryEvent(null);
|
||||||
|
public static final QueryEvent FIND_BACKWARD = new QueryEvent("", true);
|
||||||
|
|
||||||
private boolean mShouldCollapseSearchView = false;
|
private boolean mShouldCollapseSearchView = false;
|
||||||
private final String mQuery;
|
private final String mQuery;
|
||||||
private final boolean mFindForward;
|
private final boolean mFindBackward;
|
||||||
|
|
||||||
public QueryEvent(String query, boolean b) {
|
public QueryEvent(String query, boolean findBackward) {
|
||||||
mQuery = query;
|
mQuery = query;
|
||||||
mFindForward = b;
|
mFindBackward = findBackward;
|
||||||
}
|
}
|
||||||
|
|
||||||
public QueryEvent(String query) {
|
public QueryEvent(String query) {
|
||||||
@@ -33,8 +34,8 @@ public class QueryEvent {
|
|||||||
return mShouldCollapseSearchView;
|
return mShouldCollapseSearchView;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFindForward() {
|
public boolean isFindBackward() {
|
||||||
return mFindForward;
|
return mFindBackward;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -173,6 +173,12 @@ class ExplorerFragment : ViewPagerFragment(0), OnFloatingActionButtonClickListen
|
|||||||
mExplorerView?.setFilter(null)
|
mExplorerView?.setFilter(null)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (event === QueryEvent.FIND_FORWARD) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (event === QueryEvent.FIND_BACKWARD) {
|
||||||
|
return
|
||||||
|
}
|
||||||
mExplorerView?.setFilter { item: ExplorerItem -> item.name.contains(event.query, true) }
|
mExplorerView?.setFilter { item: ExplorerItem -> item.name.contains(event.query, true) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
android:id="@+id/action_log"
|
android:id="@+id/action_log"
|
||||||
android:icon="@drawable/ic_ali_log"
|
android:icon="@drawable/ic_ali_log"
|
||||||
android:title="@string/text_log"
|
android:title="@string/text_log"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="always" />
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_search"
|
android:id="@+id/action_search"
|
||||||
@@ -16,6 +16,20 @@
|
|||||||
android:imeOptions="actionSearch"
|
android:imeOptions="actionSearch"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
app:actionViewClass="androidx.appcompat.widget.SearchView"
|
app:actionViewClass="androidx.appcompat.widget.SearchView"
|
||||||
app:showAsAction="ifRoom|collapseActionView" />
|
app:showAsAction="always|collapseActionView" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_search_prev"
|
||||||
|
android:icon="@drawable/ic_ali_up"
|
||||||
|
android:title="@string/text_find_prev_simplified"
|
||||||
|
android:visible="false"
|
||||||
|
app:showAsAction="always" />
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_search_next"
|
||||||
|
android:icon="@drawable/ic_ali_down"
|
||||||
|
android:title="@string/text_find_next_simplified"
|
||||||
|
android:visible="false"
|
||||||
|
app:showAsAction="always" />
|
||||||
|
|
||||||
</menu>
|
</menu>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#Sun Apr 13 20:26:15 CST 2025
|
#Sun Apr 13 22:00:48 CST 2025
|
||||||
BUILD_TIME=1744547175175
|
BUILD_TIME=1744552848536
|
||||||
COMPILE_SDK_VERSION=35
|
COMPILE_SDK_VERSION=35
|
||||||
JAVA_VERSION=23
|
JAVA_VERSION=23
|
||||||
JAVA_VERSION_MIN_RADICAL=0
|
JAVA_VERSION_MIN_RADICAL=0
|
||||||
@@ -17,6 +17,6 @@ RAPID_OCR_OPENCV_MOBILE_LABEL_VERSION=13
|
|||||||
RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3
|
RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3
|
||||||
TARGET_SDK_VERSION=35
|
TARGET_SDK_VERSION=35
|
||||||
TARGET_SDK_VERSION_INRT=29
|
TARGET_SDK_VERSION_INRT=29
|
||||||
VERSION_BUILD=3136
|
VERSION_BUILD=3137
|
||||||
VERSION_NAME=6.6.2 Alpha6
|
VERSION_NAME=6.6.2 Alpha6
|
||||||
VSCODE_EXT_REQUIRED_VERSION=1.0.8
|
VSCODE_EXT_REQUIRED_VERSION=1.0.8
|
||||||
|
|||||||
Reference in New Issue
Block a user