6.6.2 - Alpha4 - 导航栏设置为透明或半透明以增强视觉体验
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
"打包页面支持 Pinyin 库选项",
|
||||
"打包应用主活动页面优化状态栏背景及文字颜色",
|
||||
"控件的文字及图标根据主题色亮度值自动切换合适的颜色",
|
||||
"应用内页面导航栏设置为透明或半透明以增强视觉体验",
|
||||
"长按应用主页 \"文件\" 标签可切换浮动按钮可见状态",
|
||||
"日志页面浮动按钮可见状态与列表滚动操作联动",
|
||||
"脚本项目配置文件 project.json 支持更多打包选项 _[`issue #305`](http://issues.autojs6.com/305)_ _[`issue #306`](http://issues.autojs6.com/306)_",
|
||||
"脚本项目配置文件 project.json 支持选项名称宽松匹配及别名兼容",
|
||||
"APK 文件类型信息对话框增加文件大小与签名方案信息",
|
||||
|
||||
@@ -149,7 +149,7 @@ open class ApkBuilder(apkInputStream: InputStream?, private val outApkFile: File
|
||||
prepareManifestConfiguration(this)
|
||||
setArscPackageName(packageName)
|
||||
updateProjectConfig(this)
|
||||
copyAssetsRecursively("", File(buildDir, "assets"))
|
||||
copyAssetsRecursively("", File(buildPath, "assets"))
|
||||
copyLibrariesByConfig(this)
|
||||
setScriptFile(sourcePath)
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ import org.autojs.autojs.tool.MapBuilder;
|
||||
import org.autojs.autojs.ui.enhancedfloaty.ResizableExpandableFloatyWindow;
|
||||
import org.autojs.autojs.ui.log.LogActivity;
|
||||
import org.autojs.autojs.util.DisplayUtils;
|
||||
import org.autojs.autojs.util.ViewUtils;
|
||||
import org.autojs.autojs6.R;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
@@ -61,17 +61,17 @@ public class ConsoleView extends FrameLayout implements ConsoleImpl.LogListener
|
||||
|
||||
public ConsoleView(Context context) {
|
||||
super(context);
|
||||
init(null);
|
||||
init(null, 0);
|
||||
}
|
||||
|
||||
public ConsoleView(Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init(attrs);
|
||||
init(attrs, 0);
|
||||
}
|
||||
|
||||
public ConsoleView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
init(attrs);
|
||||
init(attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
public Map<Integer, Integer> getTextColors() {
|
||||
@@ -79,14 +79,16 @@ public class ConsoleView extends FrameLayout implements ConsoleImpl.LogListener
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
private void init(@Nullable AttributeSet attrs) {
|
||||
private void init(@Nullable AttributeSet attrs, int defStyleAttr) {
|
||||
inflate(getContext(), R.layout.console_view, this);
|
||||
|
||||
Map<Integer, Integer> logLevelColorResIdMap = getLogLevelMap();
|
||||
Map<Integer, Integer> logLevelColorIntMap = getLogLevelMap();
|
||||
|
||||
boolean isExcludeFromNavigationBar = false;
|
||||
|
||||
if (attrs != null) {
|
||||
TypedArray ta = getContext().obtainStyledAttributes(attrs, R.styleable.ConsoleView);
|
||||
TypedArray ta = getContext().obtainStyledAttributes(attrs, R.styleable.ConsoleView, defStyleAttr, 0);
|
||||
|
||||
logLevelColorIntMap.put(Log.VERBOSE, ta.getColor(R.styleable.ConsoleView_color_verbose, Color.TRANSPARENT));
|
||||
logLevelColorIntMap.put(Log.DEBUG, ta.getColor(R.styleable.ConsoleView_color_debug, Color.TRANSPARENT));
|
||||
@@ -95,6 +97,8 @@ public class ConsoleView extends FrameLayout implements ConsoleImpl.LogListener
|
||||
logLevelColorIntMap.put(Log.ERROR, ta.getColor(R.styleable.ConsoleView_color_error, Color.TRANSPARENT));
|
||||
logLevelColorIntMap.put(Log.ASSERT, ta.getColor(R.styleable.ConsoleView_color_assert, Color.TRANSPARENT));
|
||||
|
||||
isExcludeFromNavigationBar = ta.getBoolean(R.styleable.ConsoleView_excludeFromNavigationBar, false);
|
||||
|
||||
ta.recycle();
|
||||
}
|
||||
|
||||
@@ -128,6 +132,10 @@ public class ConsoleView extends FrameLayout implements ConsoleImpl.LogListener
|
||||
|
||||
initEditText();
|
||||
initSubmitButton();
|
||||
|
||||
if (isExcludeFromNavigationBar) {
|
||||
ViewUtils.excludePaddingClippableViewFromNavigationBar(mLogListRecyclerView);
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
||||
@@ -288,7 +288,9 @@ public class RootAutomator implements Shell.Callback {
|
||||
@Override
|
||||
public void onInitialized() {
|
||||
String path = RootAutomatorEngine.getExecutablePath(mContext);
|
||||
String deviceNameOrPath = RootAutomatorEngine.getDeviceNameOrPath(mContext, InputDevices.getTouchDeviceName());
|
||||
// @Reference to ozobiozobi (https://github.com/ozobiozobi) by SuperMonster003 on Mar 10, 2025.
|
||||
// ! https://github.com/aiselp/AutoX/commit/8fe5d674f080c0ab109ce13f7cabd98795c22a1f#diff-dc753defa5bc4d7d6fab4f2e59a219ce7b89d7bcff2c9585f87c96964081ad72R290-R291
|
||||
String deviceNameOrPath = "'" + RootAutomatorEngine.getDeviceNameOrPath(mContext, InputDevices.getTouchDeviceName()) + "'";
|
||||
Log.d(LOG_TAG, "deviceNameOrPath: " + deviceNameOrPath);
|
||||
mShell.exec("chmod 777 " + path);
|
||||
String command = String.format(Locale.getDefault(),
|
||||
|
||||
@@ -28,4 +28,5 @@ public class PermissionRequestActivity extends Activity {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
finish();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.autojs.autojs.core.ui.inflater.ResourceParser
|
||||
import org.autojs.autojs.core.ui.inflater.util.Dimensions
|
||||
import org.autojs.autojs.runtime.ScriptRuntime
|
||||
import org.autojs.autojs.util.ColorUtils
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
|
||||
/**
|
||||
* Modified by SuperMonster003 as of Jan 21, 2023.
|
||||
@@ -26,6 +27,7 @@ open class FloatingActionButtonAttributes(scriptRuntime: ScriptRuntime, resource
|
||||
registerAttrs(arrayOf("backgroundTint", "bgTint")) { view.backgroundTintList = ColorUtils.toColorStateList(view, it) }
|
||||
registerAttr("ensureMinTouchTargetSize") { view.setEnsureMinTouchTargetSize(it.toBoolean()) }
|
||||
registerAttr("maxImageSize") { view.setMaxImageSize(it.toInt()) }
|
||||
registerAttr("excludeFromNavigationBar") { ViewUtils.excludeFloatingActionButtonFromNavigationBar(view) }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -40,6 +40,7 @@ class TaskPrefEditActivity : AbstractAppCompatPluginActivity() {
|
||||
binding.editScript.setOnClickListener { editPreExecuteScript() }
|
||||
|
||||
ViewUtils.setToolbarAsBack(this, R.string.text_please_choose_a_script)
|
||||
ViewUtils.excludePaddingClippableViewFromNavigationBar(binding.scriptList)
|
||||
initScriptListRecyclerView()
|
||||
}
|
||||
|
||||
|
||||
@@ -6,12 +6,14 @@ import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import org.autojs.autojs.model.explorer.Explorer;
|
||||
import org.autojs.autojs.model.explorer.ExplorerDirPage;
|
||||
import org.autojs.autojs.model.explorer.ExplorerFileProvider;
|
||||
import org.autojs.autojs.model.script.Scripts;
|
||||
import org.autojs.autojs.ui.BaseActivity;
|
||||
import org.autojs.autojs.ui.explorer.ExplorerView;
|
||||
import org.autojs.autojs.util.ViewUtils;
|
||||
import org.autojs.autojs.util.WorkingDirectoryUtils;
|
||||
import org.autojs.autojs6.R;
|
||||
import org.autojs.autojs6.databinding.ActivityScriptWidgetSettingsBinding;
|
||||
@@ -38,6 +40,10 @@ public class ScriptWidgetSettingsActivity extends BaseActivity {
|
||||
initScriptListRecyclerView();
|
||||
}
|
||||
|
||||
private void setUpToolbarColors() {
|
||||
ViewUtils.setToolbarMenuIconsColorByThemeColorLuminance(this, binding.toolbar);
|
||||
}
|
||||
|
||||
private void initScriptListRecyclerView() {
|
||||
mExplorer = new Explorer(new ExplorerFileProvider(Scripts.FILE_FILTER), 0);
|
||||
ExplorerView explorerView = binding.scriptList;
|
||||
@@ -47,6 +53,10 @@ public class ScriptWidgetSettingsActivity extends BaseActivity {
|
||||
mSelectedScriptFilePath = file.getPath();
|
||||
finish();
|
||||
});
|
||||
RecyclerView explorerItemListView = explorerView.getExplorerItemListView();
|
||||
if (explorerItemListView != null) {
|
||||
ViewUtils.excludePaddingClippableViewFromNavigationBar(explorerItemListView);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,6 +72,7 @@ public class ScriptWidgetSettingsActivity extends BaseActivity {
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
getMenuInflater().inflate(R.menu.script_widget_settings_menu, menu);
|
||||
setUpToolbarColors();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,13 +5,12 @@ import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import org.autojs.autojs.core.console.ConsoleImpl
|
||||
import org.autojs.autojs.core.console.ConsoleView
|
||||
import org.autojs.autojs.inrt.autojs.AutoJs
|
||||
import org.autojs.autojs.inrt.launch.GlobalProjectLauncher
|
||||
import org.autojs.autojs.ui.BaseActivity
|
||||
import org.autojs.autojs6.R
|
||||
import org.autojs.autojs6.databinding.ActivityMainInrtBinding
|
||||
|
||||
class LogActivity : BaseActivity() {
|
||||
|
||||
@@ -24,12 +23,16 @@ class LogActivity : BaseActivity() {
|
||||
}
|
||||
|
||||
private fun setupView() {
|
||||
setContentView(R.layout.activity_main_inrt)
|
||||
val toolbar = findViewById<Toolbar>(R.id.toolbar)
|
||||
setSupportActionBar(toolbar)
|
||||
val consoleView = findViewById<ConsoleView>(R.id.console)
|
||||
consoleView.setConsole(AutoJs.instance.globalConsole as ConsoleImpl)
|
||||
consoleView.findViewById<View>(R.id.input_container).visibility = View.GONE
|
||||
ActivityMainInrtBinding.inflate(layoutInflater).also { binding ->
|
||||
setContentView(binding.root)
|
||||
binding.toolbar.apply {
|
||||
setSupportActionBar(this)
|
||||
}
|
||||
binding.console.apply {
|
||||
setConsole(AutoJs.instance.globalConsole as ConsoleImpl)
|
||||
findViewById<View>(R.id.input_container).visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
@@ -47,4 +50,5 @@ class LogActivity : BaseActivity() {
|
||||
const val EXTRA_LAUNCH_SCRIPT = "launch_script"
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ package org.autojs.autojs.inrt
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import org.autojs.autojs6.R
|
||||
import org.autojs.autojs6.databinding.ActivitySettingsInrtBinding
|
||||
|
||||
/**
|
||||
* Created by Stardust on Dec 8, 2017.
|
||||
@@ -13,16 +13,16 @@ class SettingsActivity : AppCompatActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setupViews()
|
||||
}
|
||||
|
||||
private fun setupViews() {
|
||||
setContentView(R.layout.activity_settings_inrt)
|
||||
supportFragmentManager.beginTransaction().replace(R.id.fragment_setting, PreferenceFragment()).commit()
|
||||
val toolbar = findViewById<Toolbar>(R.id.toolbar)
|
||||
toolbar.setTitle(R.string.text_settings)
|
||||
setSupportActionBar(toolbar)
|
||||
toolbar.setNavigationOnClickListener { finish() }
|
||||
val binding = ActivitySettingsInrtBinding.inflate(layoutInflater).also { setContentView(it.root) }
|
||||
supportFragmentManager
|
||||
.beginTransaction()
|
||||
.replace(R.id.fragment_setting, PreferenceFragment())
|
||||
.commit()
|
||||
binding.toolbar.apply {
|
||||
setTitle(R.string.text_settings)
|
||||
setSupportActionBar(this)
|
||||
setNavigationOnClickListener { finish() }
|
||||
}
|
||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,9 @@ class Classes {
|
||||
@JvmField
|
||||
val Settings = android.provider.Settings::class
|
||||
|
||||
@JvmField
|
||||
val TextToSpeech = android.speech.tts.TextToSpeech::class
|
||||
|
||||
@JvmField
|
||||
val InputType = android.text.InputType::class
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package org.autojs.autojs.runtime.api.augment.global
|
||||
|
||||
import org.autojs.autojs.annotation.AugmentableSimpleGetterProxyInterface
|
||||
import org.autojs.autojs.annotation.RhinoStandardFunctionInterface
|
||||
import org.autojs.autojs.runtime.ScriptRuntime
|
||||
import org.autojs.autojs.runtime.api.augment.SimpleGetterProxy
|
||||
import org.mozilla.javascript.NativeJavaClass
|
||||
import org.mozilla.javascript.Scriptable
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.autojs.autojs.theme
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.graphics.Paint
|
||||
import android.view.View
|
||||
import org.autojs.autojs.util.ColorUtils
|
||||
@@ -76,6 +77,12 @@ object ThemeColorManager {
|
||||
currentThemeColor.saveIn()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getDayOrNightColorByLuminance(context: Context): Int = context.getColor(getDayOrNightColorResByLuminance())
|
||||
|
||||
@JvmStatic
|
||||
fun getDayOrNightColorResByLuminance(): Int = if (isThemeColorLuminanceLight()) R.color.day else R.color.night
|
||||
|
||||
private object BackgroundColorManager {
|
||||
|
||||
private val views: MutableList<WeakReference<View>> = LinkedList()
|
||||
|
||||
@@ -50,6 +50,7 @@ class ColorSelectActivity : BaseActivity() {
|
||||
handleIntent()
|
||||
binding = MtActivityColorSelectBinding.inflate(layoutInflater).also {
|
||||
setUpUI(it)
|
||||
ViewUtils.excludePaddingClippableViewFromNavigationBar(it.colorSettingRecyclerView)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import org.autojs.autojs6.R;
|
||||
* Created by Stardust on Aug 16, 2016.
|
||||
*/
|
||||
public class ThemeColorFloatingActionButton extends FloatingActionButton implements ThemeColorMutable {
|
||||
|
||||
public ThemeColorFloatingActionButton(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.autojs.autojs.theme.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@@ -49,15 +48,8 @@ public class ThemeColorToolbar extends Toolbar implements ThemeColorMutable {
|
||||
int colorPrimary = color.colorPrimary;
|
||||
setBackgroundColor(colorPrimary);
|
||||
|
||||
int aimColor;
|
||||
int popupTheme;
|
||||
if (ThemeColorManager.isThemeColorLuminanceLight()) {
|
||||
aimColor = getResources().getColor(R.color.day, null);
|
||||
popupTheme = R.style.PopupMenuThemeLight;
|
||||
} else {
|
||||
aimColor = getResources().getColor(R.color.night, null);
|
||||
popupTheme = R.style.PopupMenuThemeDark;
|
||||
}
|
||||
int aimColor = ThemeColorManager.getDayOrNightColorByLuminance(getContext());
|
||||
int popupTheme = ThemeColorManager.isThemeColorLuminanceLight() ? R.style.PopupMenuThemeLight : R.style.PopupMenuThemeDark;
|
||||
|
||||
setTitleTextColor(aimColor);
|
||||
setSubtitleTextColor(aimColor);
|
||||
|
||||
@@ -5,8 +5,8 @@ package org.autojs.autojs.ui
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.view.View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
import android.view.View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||
import android.view.View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
import android.view.WindowManager
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
@@ -18,6 +18,7 @@ import org.autojs.autojs.theme.ThemeColorManager
|
||||
import org.autojs.autojs.util.LocaleUtils
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs6.BuildConfig
|
||||
import org.autojs.autojs6.R
|
||||
|
||||
/**
|
||||
* Created by Stardust on Jan 23, 2017.
|
||||
@@ -26,14 +27,21 @@ import org.autojs.autojs6.BuildConfig
|
||||
abstract class BaseActivity : AppCompatActivity() {
|
||||
|
||||
open val handleStatusBarThemeColorAutomatically = true
|
||||
open val handleNavigationBarContrastEnforcedAutomatically = true
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
ViewUtils.appendSystemUiVisibility(this, SYSTEM_UI_FLAG_LAYOUT_STABLE or SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)
|
||||
ViewUtils.addWindowFlags(this, WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
|
||||
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
|
||||
@Suppress("DEPRECATION")
|
||||
ViewUtils.appendSystemUiVisibility(this, SYSTEM_UI_FLAG_LAYOUT_STABLE or SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN or SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION)
|
||||
|
||||
if (handleNavigationBarContrastEnforcedAutomatically) {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
||||
window.navigationBarColor = getColor(R.color.black_alpha_44)
|
||||
}
|
||||
}
|
||||
|
||||
setApplicationLocale(this)
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.autojs.autojs.ui.main.ViewPagerFragment
|
||||
import org.autojs.autojs.ui.main.ViewStatesManageable
|
||||
import org.autojs.autojs.ui.widget.NestedWebView
|
||||
import org.autojs.autojs.util.DocsUtils.getUrl
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs.util.WebViewUtils.Companion.adaptDarkMode
|
||||
import org.autojs.autojs6.R
|
||||
import org.autojs.autojs6.databinding.FragmentOnlineDocsBinding
|
||||
@@ -51,6 +52,7 @@ open class DocumentationFragment : ViewPagerFragment(ROTATION_GONE), BackPressed
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
webView = binding!!.ewebView.webView.also {
|
||||
adaptDarkMode(requireContext(), it)
|
||||
ViewUtils.excludePaddingClippableViewFromNavigationBar(it)
|
||||
}
|
||||
restoreViewStates()
|
||||
(activity as? MainActivity)?.apply {
|
||||
|
||||
@@ -10,6 +10,7 @@ import android.util.Log
|
||||
import android.view.ActionMode
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
@@ -21,10 +22,10 @@ import org.autojs.autojs.core.permission.PermissionRequestProxyActivity
|
||||
import org.autojs.autojs.core.permission.RequestPermissionCallbacks
|
||||
import org.autojs.autojs.pio.PFiles
|
||||
import org.autojs.autojs.storage.file.TmpScriptFiles
|
||||
import org.autojs.autojs.theme.ThemeColorManager
|
||||
import org.autojs.autojs.ui.BaseActivity
|
||||
import org.autojs.autojs.ui.main.MainActivity
|
||||
import org.autojs.autojs.util.Observers
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs6.R
|
||||
import org.autojs.autojs6.databinding.ActivityEditBinding
|
||||
import java.io.File
|
||||
@@ -36,6 +37,7 @@ import java.io.IOException
|
||||
*/
|
||||
open class EditActivity : BaseActivity(), DelegateHost, PermissionRequestProxyActivity {
|
||||
|
||||
private var mToolbar: Toolbar? = null
|
||||
private val mMediator = OnActivityResultDelegate.Mediator()
|
||||
|
||||
private lateinit var mEditorView: EditorView
|
||||
@@ -48,20 +50,16 @@ open class EditActivity : BaseActivity(), DelegateHost, PermissionRequestProxyAc
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
val binding = ActivityEditBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
val binding = ActivityEditBinding.inflate(layoutInflater).also { setContentView(it.root) }
|
||||
mToolbar = findViewById(R.id.toolbar)
|
||||
mEditorView = binding.editorView.apply {
|
||||
handleIntent(intent)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(Observers.emptyConsumer()) { ex: Throwable -> onLoadFileError(ex.message) }
|
||||
}
|
||||
|
||||
mEditorMenu = EditorMenu(mEditorView)
|
||||
|
||||
mNewTask = intent.flags and Intent.FLAG_ACTIVITY_NEW_TASK != 0
|
||||
setUpToolbar()
|
||||
window.statusBarColor = ThemeColorManager.colorPrimary
|
||||
}
|
||||
|
||||
override fun onWindowStartingActionMode(callback: ActionMode.Callback): ActionMode? {
|
||||
@@ -88,6 +86,7 @@ open class EditActivity : BaseActivity(), DelegateHost, PermissionRequestProxyAc
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
menuInflater.inflate(R.menu.menu_editor, menu)
|
||||
ViewUtils.setToolbarMenuIconsColorByThemeColorLuminance(this, mToolbar)
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -1,110 +1,109 @@
|
||||
package org.autojs.autojs.ui.error;
|
||||
package org.autojs.autojs.ui.error
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import com.afollestad.materialdialogs.MaterialDialog;
|
||||
|
||||
import org.autojs.autojs.ui.BaseActivity;
|
||||
import org.autojs.autojs.util.ViewUtils;
|
||||
import org.autojs.autojs6.BuildConfig;
|
||||
import org.autojs.autojs6.R;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import org.autojs.autojs.app.GlobalAppContext
|
||||
import org.autojs.autojs.ui.BaseActivity
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs6.BuildConfig
|
||||
import org.autojs.autojs6.R
|
||||
import org.autojs.autojs6.databinding.ActivityErrorReportBinding
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Created by Stardust on Feb 2, 2017.
|
||||
* Transformed by SuperMonster003 on Mar 10, 2025.
|
||||
*/
|
||||
public class ErrorReportActivity extends BaseActivity {
|
||||
class ErrorReportActivity : BaseActivity() {
|
||||
|
||||
private static final String TAG = ErrorReportActivity.class.getSimpleName();
|
||||
|
||||
private String mTitle;
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
try {
|
||||
super.onCreate(savedInstanceState);
|
||||
mTitle = getString(R.string.text_app_crashed);
|
||||
setUpUI();
|
||||
handleIntent();
|
||||
} catch (Throwable throwable) {
|
||||
Log.e(TAG, "", throwable);
|
||||
exitAfter(3000);
|
||||
super.onCreate(savedInstanceState)
|
||||
ActivityErrorReportBinding.inflate(layoutInflater).also { binding ->
|
||||
setContentView(binding.root)
|
||||
binding.toolbar.apply {
|
||||
title = getString(R.string.text_error_report)
|
||||
setSupportActionBar(this)
|
||||
}
|
||||
supportActionBar?.setHomeButtonEnabled(false)
|
||||
}
|
||||
} catch (t: Throwable) {
|
||||
t.message?.let { msg ->
|
||||
copyToClip(msg)
|
||||
ViewUtils.showToast(this, msg)
|
||||
}
|
||||
Log.e(TAG, t.message ?: "", t)
|
||||
exitAfter(3000)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
val message = intent.getStringExtra("message")
|
||||
val errorDetail = intent.getStringExtra("error")
|
||||
|
||||
val errorMessage = buildString {
|
||||
appendLine("Version: ${BuildConfig.VERSION_CODE}")
|
||||
appendLine("Android: ${Build.VERSION.SDK_INT}")
|
||||
message?.let { appendLine().appendLine(it) }
|
||||
errorDetail?.let { appendLine().appendLine(it) }
|
||||
}
|
||||
|
||||
MaterialDialog.Builder(this)
|
||||
.title(R.string.text_app_crashed)
|
||||
.content(R.string.crash_feedback)
|
||||
.positiveText(R.string.text_exit)
|
||||
.negativeText(R.string.text_copy_debug_info)
|
||||
.onPositive { _, _ -> exit() }
|
||||
.onNegative { _, _ ->
|
||||
copyToClip(errorMessage)
|
||||
exitAfter(1500)
|
||||
}
|
||||
.cancelable(false)
|
||||
.show()
|
||||
}
|
||||
|
||||
private fun exitAfter(delay: Int) {
|
||||
Timer().schedule(object : TimerTask() {
|
||||
override fun run() = exit()
|
||||
}, delay.toLong())
|
||||
}
|
||||
|
||||
private fun copyToClip(text: String) {
|
||||
val clipboardManager = getSystemService(CLIPBOARD_SERVICE) as ClipboardManager
|
||||
clipboardManager.setPrimaryClip(ClipData.newPlainText("Debug", text))
|
||||
ViewUtils.showToast(this, R.string.text_already_copied_to_clip)
|
||||
}
|
||||
|
||||
@Deprecated("Deprecated in Java")
|
||||
@SuppressLint("MissingSuperCall")
|
||||
override fun onBackPressed() = exit()
|
||||
|
||||
private fun exit() = finishAffinity()
|
||||
|
||||
companion object {
|
||||
|
||||
private val TAG: String = ErrorReportActivity::class.java.simpleName
|
||||
|
||||
@JvmStatic
|
||||
@JvmOverloads
|
||||
fun test(context: Context = GlobalAppContext.get()) {
|
||||
Intent(context, ErrorReportActivity::class.java)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
.putExtra("message", "Test message\nSecond line")
|
||||
.putExtra("error", "Test error\nSecond line")
|
||||
.let { context.startActivity(it) }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void handleIntent() {
|
||||
String message = getIntent().getStringExtra("message");
|
||||
final String errorDetail = getIntent().getStringExtra("error");
|
||||
showErrorMessageByDialog(message, errorDetail);
|
||||
}
|
||||
|
||||
private void showErrorMessageByDialog(String message, final String errorDetail) {
|
||||
new MaterialDialog.Builder(this)
|
||||
.title(mTitle)
|
||||
.content(R.string.crash_feedback)
|
||||
.positiveText(R.string.text_exit)
|
||||
.negativeText(R.string.text_copy_debug_info)
|
||||
.onPositive((dialog, which) -> exit())
|
||||
.onNegative((dialog, which) -> {
|
||||
copyToClip(getDeviceMessage() + message + "\n" + errorDetail);
|
||||
exitAfter(1500);
|
||||
})
|
||||
.cancelable(false)
|
||||
.show();
|
||||
}
|
||||
|
||||
private String getDeviceMessage() {
|
||||
return String.format(Locale.getDefault(), "Version: %s\nAndroid: %d\n", BuildConfig.VERSION_CODE, Build.VERSION.SDK_INT);
|
||||
}
|
||||
|
||||
private void exitAfter(int delay) {
|
||||
new Timer().schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
exit();
|
||||
}
|
||||
}, delay);
|
||||
}
|
||||
|
||||
private void copyToClip(String text) {
|
||||
((ClipboardManager) getSystemService(CLIPBOARD_SERVICE))
|
||||
.setPrimaryClip(ClipData.newPlainText("Debug", text));
|
||||
ViewUtils.showToast(ErrorReportActivity.this, R.string.text_already_copied_to_clip);
|
||||
}
|
||||
|
||||
private void setUpUI() {
|
||||
setContentView(R.layout.activity_error_report);
|
||||
setUpToolbar();
|
||||
}
|
||||
|
||||
private void setUpToolbar() {
|
||||
Toolbar toolbar;
|
||||
toolbar = findViewById(R.id.toolbar);
|
||||
toolbar.setTitle(getString(R.string.text_error_report));
|
||||
setSupportActionBar(toolbar);
|
||||
Objects.requireNonNull(getSupportActionBar()).setHomeButtonEnabled(false);
|
||||
}
|
||||
|
||||
@SuppressLint("MissingSuperCall")
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
exit();
|
||||
}
|
||||
|
||||
private void exit() {
|
||||
finishAffinity();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ open class ExplorerView : ThemeColorSwipeRefreshLayout, SwipeRefreshLayout.OnRef
|
||||
val currentDirectory: ScriptFile
|
||||
get() = currentPage.toScriptFile()
|
||||
|
||||
protected var explorerItemListView: RecyclerView? = null
|
||||
var explorerItemListView: RecyclerView? = null
|
||||
private set
|
||||
|
||||
private lateinit var mProjectToolbar: ExplorerProjectToolbar
|
||||
@@ -717,7 +717,7 @@ open class ExplorerView : ThemeColorSwipeRefreshLayout, SwipeRefreshLayout.OnRef
|
||||
mFirstChar.setIcon(ExplorerViewHelper.getIcon(item))
|
||||
when (item.type) {
|
||||
FileUtils.TYPE.JAVASCRIPT, FileUtils.TYPE.AUTO -> mFirstChar
|
||||
.setIconTextByThemeColorLuminance()
|
||||
.setIconTextColorByThemeColorLuminance()
|
||||
.setStrokeThemeColor()
|
||||
.setFillThemeColor()
|
||||
else -> mFirstChar
|
||||
|
||||
@@ -46,7 +46,7 @@ class ExplorerItemViewHolder extends BindableViewHolder<Object> {
|
||||
|
||||
switch (explorerItem.getType()) {
|
||||
case JAVASCRIPT, AUTO -> firstCharIconBinding.firstChar
|
||||
.setIconTextByThemeColorLuminance()
|
||||
.setIconTextColorByThemeColorLuminance()
|
||||
.setStrokeThemeColor()
|
||||
.setFillColorDayNight();
|
||||
default -> firstCharIconBinding.firstChar
|
||||
|
||||
@@ -19,11 +19,12 @@ import com.mcal.apksigner.utils.KeyStoreHelper
|
||||
import org.autojs.autojs.apkbuilder.keystore.AESUtils
|
||||
import org.autojs.autojs.apkbuilder.keystore.KeyStore
|
||||
import org.autojs.autojs.core.pref.Pref
|
||||
import org.autojs.autojs6.R
|
||||
import org.autojs.autojs6.databinding.ActivityManageKeyStoreBinding
|
||||
import org.autojs.autojs.ui.BaseActivity
|
||||
import org.autojs.autojs.ui.keystore.NewKeyStoreDialog.NewKeyStoreConfigs
|
||||
import org.autojs.autojs.ui.viewmodel.KeyStoreViewModel
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs6.R
|
||||
import org.autojs.autojs6.databinding.ActivityManageKeyStoreBinding
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
|
||||
@@ -82,8 +83,11 @@ class ManageKeyStoreActivity : BaseActivity() {
|
||||
keyStoreViewModel =
|
||||
ViewModelProvider(this, KeyStoreViewModel.Factory(this))[KeyStoreViewModel::class.java]
|
||||
|
||||
binding.fab.setOnClickListener {
|
||||
NewKeyStoreDialog(newKeyStoreDialogCallback).show(supportFragmentManager, null)
|
||||
binding.fab.apply {
|
||||
setOnClickListener {
|
||||
NewKeyStoreDialog(newKeyStoreDialogCallback).show(supportFragmentManager, null)
|
||||
}
|
||||
ViewUtils.excludeFloatingActionButtonFromNavigationBar(this)
|
||||
}
|
||||
|
||||
keyStoreAdapter = KeyStoreAdaptor(keyStoreAdapterCallback)
|
||||
@@ -91,6 +95,7 @@ class ManageKeyStoreActivity : BaseActivity() {
|
||||
adapter = keyStoreAdapter
|
||||
layoutManager = LinearLayoutManager(this@ManageKeyStoreActivity)
|
||||
itemAnimator = DefaultItemAnimator()
|
||||
ViewUtils.excludePaddingClippableViewFromNavigationBar(this)
|
||||
}
|
||||
binding.swipeRefreshLayout.setOnRefreshListener {
|
||||
loadKeyStores()
|
||||
@@ -113,6 +118,7 @@ class ManageKeyStoreActivity : BaseActivity() {
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
menuInflater.inflate(R.menu.menu_manage_key_store, menu)
|
||||
ViewUtils.setToolbarMenuIconsColorByThemeColorLuminance(this)
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -126,8 +132,6 @@ class ManageKeyStoreActivity : BaseActivity() {
|
||||
deleteAllKeyStores()
|
||||
}.show()
|
||||
}
|
||||
|
||||
else -> {}
|
||||
}
|
||||
return super.onOptionsItemSelected(item)
|
||||
}
|
||||
@@ -264,4 +268,5 @@ class ManageKeyStoreActivity : BaseActivity() {
|
||||
private fun showToast(message: String) {
|
||||
Toast.makeText(this, message, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,15 +6,14 @@ import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import org.autojs.autojs.AutoJs.Companion.instance
|
||||
import org.autojs.autojs.core.console.GlobalConsole
|
||||
import org.autojs.autojs.runtime.api.Mime
|
||||
import org.autojs.autojs.ui.BaseActivity
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs.util.ViewUtils.showToast
|
||||
import org.autojs.autojs6.R
|
||||
import org.autojs.autojs6.databinding.ActivityLogBinding
|
||||
import org.autojs.autojs6.databinding.ConsoleViewBinding
|
||||
|
||||
class LogActivity : BaseActivity() {
|
||||
|
||||
@@ -24,21 +23,20 @@ class LogActivity : BaseActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
val activityLogBinding = ActivityLogBinding.inflate(layoutInflater)
|
||||
setContentView(activityLogBinding.root)
|
||||
|
||||
setContentView(activityLogBinding.root)
|
||||
setToolbarAsBack(R.string.text_log)
|
||||
|
||||
val mConsoleView = activityLogBinding.console
|
||||
activityLogBinding.console.apply {
|
||||
setConsole(instance.globalConsole.also { mConsoleImpl = it })
|
||||
setLogActivity(this@LogActivity)
|
||||
setPinchToZoomEnabled(true)
|
||||
}
|
||||
|
||||
mConsoleImpl = instance.globalConsole
|
||||
mConsoleView.setConsole(mConsoleImpl)
|
||||
mConsoleView.setLogActivity(this)
|
||||
mConsoleView.setPinchToZoomEnabled(true)
|
||||
|
||||
val consoleViewBinding = ConsoleViewBinding.inflate(layoutInflater)
|
||||
consoleViewBinding.inputContainer.visibility = View.GONE
|
||||
|
||||
activityLogBinding.fab.setOnClickListener { mConsoleImpl.clear() }
|
||||
activityLogBinding.fab.apply {
|
||||
setOnClickListener { mConsoleImpl.clear() }
|
||||
ViewUtils.excludeFloatingActionButtonFromNavigationBar(this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
|
||||
@@ -161,10 +161,10 @@ public class FloatingActionMenu extends FrameLayout implements View.OnClickListe
|
||||
if (mOnFloatingActionButtonClickListener != null) {
|
||||
mOnFloatingActionButtonClickListener.onClick((FloatingActionButton) v, (int) v.getTag());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setOnFloatingActionButtonClickListener(OnFloatingActionButtonClickListener onFloatingActionButtonClickListener) {
|
||||
mOnFloatingActionButtonClickListener = onFloatingActionButtonClickListener;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,12 +19,10 @@ import android.view.MenuItem
|
||||
import android.view.View
|
||||
import androidx.activity.result.contract.ActivityResultContracts.RequestMultiplePermissions
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle
|
||||
import androidx.core.view.forEach
|
||||
import androidx.drawerlayout.widget.DrawerLayout
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.viewpager.widget.ViewPager
|
||||
import androidx.viewpager.widget.ViewPager.SimpleOnPageChangeListener
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import com.huaban.analysis.jieba.CharsDictionaryDatabase
|
||||
import com.huaban.analysis.jieba.PhrasesDictionaryDatabase
|
||||
@@ -49,6 +47,7 @@ import org.autojs.autojs.runtime.api.WrappedShizuku
|
||||
import org.autojs.autojs.service.ForegroundService
|
||||
import org.autojs.autojs.theme.ThemeColorManager
|
||||
import org.autojs.autojs.theme.ThemeColorManager.addViewBackground
|
||||
import org.autojs.autojs.theme.widget.ThemeColorFloatingActionButton
|
||||
import org.autojs.autojs.theme.widget.ThemeColorToolbar
|
||||
import org.autojs.autojs.ui.BaseActivity
|
||||
import org.autojs.autojs.ui.doc.DocumentationFragment
|
||||
@@ -82,7 +81,7 @@ class MainActivity : BaseActivity(), DelegateHost, HostActivity {
|
||||
private var binding: ActivityMainBinding? = null
|
||||
|
||||
private lateinit var mViewPager: ViewPager
|
||||
private lateinit var mFab: FloatingActionButton
|
||||
private lateinit var mFab: ThemeColorFloatingActionButton
|
||||
private lateinit var mTab: TabLayout
|
||||
private lateinit var mToolbar: ThemeColorToolbar
|
||||
private lateinit var mPagerAdapter: StoredFragmentPagerAdapter
|
||||
@@ -104,18 +103,23 @@ class MainActivity : BaseActivity(), DelegateHost, HostActivity {
|
||||
return pageTitle != null && getString(R.string.text_documentation).contentEquals(pageTitle)
|
||||
}
|
||||
|
||||
val filesItemIndex: Int
|
||||
get() = findPageIndexByTitle(R.string.text_file)
|
||||
|
||||
val docsItemIndex: Int
|
||||
get() {
|
||||
var i = 0
|
||||
while (i < mPagerAdapter.count) {
|
||||
val pageTitle = mPagerAdapter.getPageTitle(i)
|
||||
if (pageTitle != null && getString(R.string.text_documentation).contentEquals(pageTitle)) {
|
||||
return i
|
||||
}
|
||||
i += 1
|
||||
get() = findPageIndexByTitle(R.string.text_documentation)
|
||||
|
||||
private fun findPageIndexByTitle(titleRes: Int): Int {
|
||||
var i = 0
|
||||
while (i < mPagerAdapter.count) {
|
||||
val pageTitle = mPagerAdapter.getPageTitle(i)
|
||||
if (pageTitle != null && getString(titleRes).contentEquals(pageTitle)) {
|
||||
return i
|
||||
}
|
||||
return -1
|
||||
i += 1
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
val requestMultiplePermissionsLauncher = registerForActivityResult(RequestMultiplePermissions()) {
|
||||
it.forEach { (key: String, isGranted: Boolean) ->
|
||||
@@ -134,7 +138,7 @@ class MainActivity : BaseActivity(), DelegateHost, HostActivity {
|
||||
binding = it
|
||||
setContentView(it.root)
|
||||
mViewPager = it.viewpager
|
||||
mFab = it.fab
|
||||
mFab = it.fab.apply { ViewUtils.excludeFloatingActionButtonFromNavigationBar(this) }
|
||||
mTab = it.tab
|
||||
mToolbar = it.toolbar
|
||||
addViewBackground(it.appBar)
|
||||
@@ -270,13 +274,7 @@ class MainActivity : BaseActivity(), DelegateHost, HostActivity {
|
||||
}
|
||||
|
||||
private fun setUpToolbarColors() {
|
||||
val aimColor = when {
|
||||
ThemeColorManager.isThemeColorLuminanceLight() -> getColor(R.color.day)
|
||||
else -> getColor(R.color.night)
|
||||
}
|
||||
mToolbar.menu.forEach { menuItem ->
|
||||
menuItem.icon?.colorFilter = PorterDuffColorFilter(aimColor, PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
ViewUtils.setToolbarMenuIconsColorByThemeColorLuminance(this, mToolbar)
|
||||
mSearchViewItem?.initThemeColors()
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,10 @@ public abstract class ViewPagerFragment extends Fragment implements BackPressedH
|
||||
mFab = fab;
|
||||
}
|
||||
|
||||
public FloatingActionButton getFab() {
|
||||
return mFab;
|
||||
}
|
||||
|
||||
protected abstract void onFabClick(FloatingActionButton fab);
|
||||
|
||||
@CallSuper
|
||||
|
||||
@@ -59,6 +59,7 @@ abstract class BaseDisplayContentActivity : BaseActivity() {
|
||||
internalTextView = binding.textView
|
||||
internalFabView = binding.fab.apply {
|
||||
setOnClickListener { view -> showPopupMenu(view, internalTextView) }
|
||||
ViewUtils.excludeFloatingActionButtonFromNavigationBar(this)
|
||||
}
|
||||
|
||||
val scaleGestureDetector = ScaleGestureDetector(this, ScaleListener(internalTextView))
|
||||
@@ -107,6 +108,7 @@ abstract class BaseDisplayContentActivity : BaseActivity() {
|
||||
else -> super.onTouchEvent(event)
|
||||
}
|
||||
}
|
||||
ViewUtils.excludePaddingClippableViewFromNavigationBar(it)
|
||||
}
|
||||
|
||||
// 使用协程加载内容
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
package org.autojs.autojs.ui.main.scripts
|
||||
|
||||
import android.animation.Animator
|
||||
import android.animation.AnimatorListenerAdapter
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.marginBottom
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import org.autojs.autojs.app.GlobalAppContext
|
||||
import org.autojs.autojs.model.explorer.ExplorerItem
|
||||
@@ -16,11 +23,14 @@ import org.autojs.autojs.ui.common.ScriptOperations
|
||||
import org.autojs.autojs.ui.explorer.ExplorerView
|
||||
import org.autojs.autojs.ui.main.FloatingActionMenu
|
||||
import org.autojs.autojs.ui.main.FloatingActionMenu.OnFloatingActionButtonClickListener
|
||||
import org.autojs.autojs.ui.main.MainActivity
|
||||
import org.autojs.autojs.ui.main.QueryEvent
|
||||
import org.autojs.autojs.ui.main.ViewPagerFragment
|
||||
import org.autojs.autojs.ui.main.ViewStatesManageable
|
||||
import org.autojs.autojs.ui.project.ProjectConfigActivity
|
||||
import org.autojs.autojs.ui.widget.ScrollAwareFABBehavior
|
||||
import org.autojs.autojs.util.IntentUtils
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs6.R
|
||||
import org.autojs.autojs6.databinding.FragmentExplorerBinding
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
@@ -33,10 +43,12 @@ import org.greenrobot.eventbus.Subscribe
|
||||
*/
|
||||
open class ExplorerFragment : ViewPagerFragment(0), OnFloatingActionButtonClickListener, ViewStatesManageable {
|
||||
|
||||
private var mBottomInset: Int = 0
|
||||
private var binding: FragmentExplorerBinding? = null
|
||||
|
||||
private var mExplorerView: ExplorerView? = null
|
||||
private var mFloatingActionMenu: FloatingActionMenu? = null
|
||||
private var mIsCurrentPageFiles = false
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
@@ -49,8 +61,12 @@ open class ExplorerFragment : ViewPagerFragment(0), OnFloatingActionButtonClickL
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
mExplorerView = binding!!.itemList.apply {
|
||||
setOnItemClickListener(object : ExplorerView.OnItemClickListener {
|
||||
ViewCompat.setOnApplyWindowInsetsListener(view) { _, insets ->
|
||||
mBottomInset = insets.getInsets(WindowInsetsCompat.Type.systemBars()).bottom
|
||||
insets
|
||||
}
|
||||
mExplorerView = binding!!.itemList.also { explorerView ->
|
||||
explorerView.setOnItemClickListener(object : ExplorerView.OnItemClickListener {
|
||||
override fun onItemClick(view: View?, item: ExplorerItem) {
|
||||
when {
|
||||
item.isTextEditable -> Scripts.edit(requireActivity(), item.toScriptFile())
|
||||
@@ -60,29 +76,63 @@ open class ExplorerFragment : ViewPagerFragment(0), OnFloatingActionButtonClickL
|
||||
}
|
||||
}
|
||||
})
|
||||
explorerView.explorerItemListView?.let { ViewUtils.excludePaddingClippableViewFromNavigationBar(it) }
|
||||
}
|
||||
(activity as? MainActivity)?.apply {
|
||||
val tabLayout: TabLayout = findViewById(R.id.tab)
|
||||
val docsTab = tabLayout.getTabAt(filesItemIndex)
|
||||
docsTab?.view?.let { setTabViewClickListeners(it) }
|
||||
}
|
||||
restoreViewStates()
|
||||
}
|
||||
|
||||
private fun setTabViewClickListeners(tabView: TabLayout.TabView) {
|
||||
tabView.setOnLongClickListener { if (mIsCurrentPageFiles) true.also { toggleFabVisibility() } else false }
|
||||
}
|
||||
|
||||
private fun toggleFabVisibility() {
|
||||
val behavior = (fab.layoutParams as? CoordinatorLayout.LayoutParams)?.behavior as? ScrollAwareFABBehavior
|
||||
|
||||
when {
|
||||
behavior == null || fab.translationY == 0f -> {
|
||||
if (fab.isShown) fab.hide() else fab.show()
|
||||
}
|
||||
else -> fab.animate()
|
||||
.translationY(0f)
|
||||
.setDuration(ScrollAwareFABBehavior.DURATION)
|
||||
.setListener(object : AnimatorListenerAdapter() {
|
||||
override fun onAnimationEnd(animation: Animator) {
|
||||
behavior.setHidden(false)
|
||||
}
|
||||
})
|
||||
.start()
|
||||
}
|
||||
}
|
||||
|
||||
private fun viewFile(item: ExplorerItem) = IntentUtils.viewFile(GlobalAppContext.get(), item.path)
|
||||
|
||||
override fun onFabClick(fab: FloatingActionButton) {
|
||||
mFloatingActionMenu ?: let {
|
||||
mFloatingActionMenu = requireActivity().findViewById<FloatingActionMenu?>(R.id.floating_action_menu).also { menu ->
|
||||
menu.state
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(object : SimpleObserver<Boolean?>() {
|
||||
override fun onNext(expanding: Boolean) {
|
||||
fab.animate()
|
||||
.rotation((if (expanding) 45 else 0).toFloat())
|
||||
.setDuration(300)
|
||||
.start()
|
||||
}
|
||||
})
|
||||
menu.setOnFloatingActionButtonClickListener(this)
|
||||
initFloatingActionMenuIfNeeded(fab).run { if (isExpanded) collapse() else expand() }
|
||||
}
|
||||
|
||||
private fun initFloatingActionMenuIfNeeded(fab: FloatingActionButton): FloatingActionMenu {
|
||||
return mFloatingActionMenu ?: requireActivity().findViewById<FloatingActionMenu>(R.id.floating_action_menu).also { menu ->
|
||||
menu.state
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(object : SimpleObserver<Boolean?>() {
|
||||
override fun onNext(expanding: Boolean) {
|
||||
fab.animate()
|
||||
.rotation((if (expanding) 45 else 0).toFloat())
|
||||
.setDuration(300)
|
||||
.start()
|
||||
}
|
||||
})
|
||||
menu.setOnFloatingActionButtonClickListener(this)
|
||||
menu.layoutParams.runCatching {
|
||||
javaClass.getField("bottomMargin").setInt(this, fab.marginBottom)
|
||||
}
|
||||
mFloatingActionMenu = menu
|
||||
}
|
||||
mFloatingActionMenu!!.let { if (it.isExpanded) it.collapse() else it.expand() }
|
||||
}
|
||||
|
||||
override fun onBackPressed(activity: Activity): Boolean {
|
||||
@@ -101,9 +151,15 @@ open class ExplorerFragment : ViewPagerFragment(0), OnFloatingActionButtonClickL
|
||||
return false
|
||||
}
|
||||
|
||||
override fun onPageShow() {
|
||||
super.onPageShow()
|
||||
mIsCurrentPageFiles = true
|
||||
}
|
||||
|
||||
override fun onPageHide() {
|
||||
super.onPageHide()
|
||||
mFloatingActionMenu?.let { if (it.isExpanded) it.collapse() }
|
||||
mIsCurrentPageFiles = false
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
|
||||
@@ -11,6 +11,7 @@ import org.autojs.autojs.AutoJs
|
||||
import org.autojs.autojs.ui.main.ViewPagerFragment
|
||||
import org.autojs.autojs.ui.main.ViewStatesManageable
|
||||
import org.autojs.autojs.ui.widget.SimpleAdapterDataObserver
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs6.databinding.FragmentTaskManagerBinding
|
||||
|
||||
/**
|
||||
@@ -48,6 +49,7 @@ open class TaskManagerFragment : ViewPagerFragment(45), ViewStatesManageable {
|
||||
recyclerView.postDelayed({ refreshLayout.isRefreshing = false }, 800)
|
||||
}
|
||||
}
|
||||
ViewUtils.excludePaddingClippableViewFromNavigationBar(recyclerView)
|
||||
}
|
||||
restoreViewStates()
|
||||
}
|
||||
|
||||
@@ -282,6 +282,10 @@ public class BuildActivity extends BaseActivity implements ApkBuilder.ProgressCa
|
||||
mFlexboxPermissionsView = binding.flexboxPermissions;
|
||||
|
||||
binding.fab.setOnClickListener(v -> buildApk());
|
||||
ViewUtils.excludeFloatingActionButtonFromNavigationBar(binding.fab);
|
||||
|
||||
ViewUtils.excludePaddingClippableViewFromNavigationBar(binding.scrollView);
|
||||
|
||||
binding.selectSource.setOnClickListener(v -> selectSourceFilePath());
|
||||
binding.selectOutput.setOnClickListener(v -> selectOutputDirPath());
|
||||
binding.textAbis.setOnClickListener(v -> toggleAllFlexboxChildren(mFlexboxAbisView));
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.autojs.autojs.project.ProjectConfig
|
||||
import org.autojs.autojs.ui.BaseActivity
|
||||
import org.autojs.autojs.ui.shortcut.AppsIconSelectActivity
|
||||
import org.autojs.autojs.ui.widget.SimpleTextWatcher
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs.util.ViewUtils.showToast
|
||||
import org.autojs.autojs6.R
|
||||
import org.autojs.autojs6.databinding.ActivityProjectConfigBinding
|
||||
@@ -85,7 +86,14 @@ class ProjectConfigActivity : BaseActivity() {
|
||||
setOnClickListener { selectIcon() }
|
||||
}
|
||||
|
||||
binding.fab.setOnClickListener { commit() }
|
||||
binding.fab.apply {
|
||||
setOnClickListener { commit() }
|
||||
ViewUtils.excludeFloatingActionButtonFromNavigationBar(this)
|
||||
}
|
||||
|
||||
binding.scrollView.apply {
|
||||
ViewUtils.excludePaddingClippableViewFromNavigationBar(this)
|
||||
}
|
||||
|
||||
mNewProject = intent.getBooleanExtra(EXTRA_NEW_PROJECT, false)
|
||||
|
||||
|
||||
@@ -1,32 +1,38 @@
|
||||
package org.autojs.autojs.ui.settings;
|
||||
package org.autojs.autojs.ui.settings
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.autojs.autojs.ui.BaseActivity;
|
||||
import org.autojs.autojs.util.ViewUtils;
|
||||
import org.autojs.autojs6.R;
|
||||
import org.autojs.autojs6.databinding.ActivityDeveloperOptionsBinding;
|
||||
import android.os.Bundle
|
||||
import org.autojs.autojs.theme.ThemeColorManager
|
||||
import org.autojs.autojs.ui.BaseActivity
|
||||
import org.autojs.autojs.util.ViewUtils.setToolbarAsBack
|
||||
import org.autojs.autojs6.R
|
||||
import org.autojs.autojs6.databinding.ActivityDeveloperOptionsBinding
|
||||
|
||||
/**
|
||||
* Created by SuperMonster003 on Jun 2, 2022.
|
||||
*/
|
||||
public class DeveloperOptionsActivity extends BaseActivity {
|
||||
class DeveloperOptionsActivity : BaseActivity() {
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
private lateinit var binding: ActivityDeveloperOptionsBinding
|
||||
|
||||
ActivityDeveloperOptionsBinding binding = ActivityDeveloperOptionsBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
ViewUtils.setToolbarAsBack(this, R.string.text_developer_options);
|
||||
binding = ActivityDeveloperOptionsBinding.inflate(layoutInflater).also { binding ->
|
||||
setContentView(binding.root)
|
||||
binding.toolbar.setNavigationOnClickListener { finish() }
|
||||
}
|
||||
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.fragment_developer_options, new DeveloperOptionsFragment())
|
||||
.disallowAddToBackStack()
|
||||
.commit();
|
||||
setToolbarAsBack(this, R.string.text_developer_options)
|
||||
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.fragment_developer_options, DeveloperOptionsFragment())
|
||||
.disallowAddToBackStack()
|
||||
.commit()
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
binding.toolbar.navigationIcon?.setTint(ThemeColorManager.getDayOrNightColorByLuminance(this))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package org.autojs.autojs.ui.settings
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs6.R
|
||||
|
||||
class DeveloperOptionsFragment : PreferenceFragmentCompat() {
|
||||
@@ -10,4 +12,9 @@ class DeveloperOptionsFragment : PreferenceFragmentCompat() {
|
||||
setPreferencesFromResource(R.xml.fragment_developer_options, rootKey)
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
ViewUtils.excludePaddingClippableViewFromNavigationBar(listView)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,6 @@ package org.autojs.autojs.ui.settings
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.core.content.ContextCompat
|
||||
import org.autojs.autojs.app.GlobalAppContext
|
||||
import org.autojs.autojs.theme.ThemeColorManager
|
||||
import org.autojs.autojs.ui.BaseActivity
|
||||
@@ -16,7 +15,7 @@ import org.autojs.autojs6.databinding.ActivityPreferencesBinding
|
||||
*/
|
||||
open class PreferencesActivity : BaseActivity() {
|
||||
|
||||
private var binding: ActivityPreferencesBinding? = null
|
||||
private lateinit var binding: ActivityPreferencesBinding
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
@@ -38,18 +37,7 @@ open class PreferencesActivity : BaseActivity() {
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
binding!!.toolbar.navigationIcon?.let {
|
||||
val aimColor = when {
|
||||
ThemeColorManager.isThemeColorLuminanceLight() -> ContextCompat.getColor(this, R.color.day)
|
||||
else -> ContextCompat.getColor(this, R.color.night)
|
||||
}
|
||||
it.setTint(aimColor)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
binding = null
|
||||
binding.toolbar.navigationIcon?.setTint(ThemeColorManager.getDayOrNightColorByLuminance(this))
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.autojs.autojs.ui.settings
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs6.R
|
||||
|
||||
class PreferencesFragment : PreferenceFragmentCompat() {
|
||||
@@ -15,6 +16,7 @@ class PreferencesFragment : PreferenceFragmentCompat() {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
listView.isHorizontalScrollBarEnabled = false
|
||||
listView.isVerticalScrollBarEnabled = false
|
||||
ViewUtils.excludePaddingClippableViewFromNavigationBar(listView)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,6 +24,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
||||
import org.autojs.autojs.groundwork.WrapContentGridLayoutManger;
|
||||
import org.autojs.autojs.runtime.api.Mime;
|
||||
import org.autojs.autojs.ui.BaseActivity;
|
||||
import org.autojs.autojs.util.ViewUtils;
|
||||
import org.autojs.autojs6.R;
|
||||
import org.autojs.autojs6.databinding.ActivityAppsIconSelectBinding;
|
||||
|
||||
@@ -39,7 +40,7 @@ import io.reactivex.schedulers.Schedulers;
|
||||
*/
|
||||
public class AppsIconSelectActivity extends BaseActivity {
|
||||
|
||||
private RecyclerView mApps;
|
||||
private RecyclerView mAppsRecyclerView;
|
||||
|
||||
public static final String EXTRA_PACKAGE_NAME = "extra_package_name";
|
||||
private PackageManager mPackageManager;
|
||||
@@ -58,12 +59,14 @@ public class AppsIconSelectActivity extends BaseActivity {
|
||||
|
||||
setToolbarAsBack(R.string.text_select_icon);
|
||||
|
||||
mApps = binding.apps;
|
||||
mApps.setAdapter(new AppsAdapter());
|
||||
mAppsRecyclerView = binding.apps;
|
||||
mAppsRecyclerView.setAdapter(new AppsAdapter());
|
||||
|
||||
ViewUtils.excludePaddingClippableViewFromNavigationBar(mAppsRecyclerView);
|
||||
|
||||
WrapContentGridLayoutManger manager = new WrapContentGridLayoutManger(this, 5);
|
||||
manager.setDebugInfo("IconSelectView");
|
||||
mApps.setLayoutManager(manager);
|
||||
mAppsRecyclerView.setLayoutManager(manager);
|
||||
|
||||
loadApps();
|
||||
}
|
||||
@@ -80,7 +83,7 @@ public class AppsIconSelectActivity extends BaseActivity {
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(icon -> {
|
||||
mAppList.add(icon);
|
||||
mApps.getAdapter().notifyItemInserted(mAppList.size() - 1);
|
||||
mAppsRecyclerView.getAdapter().notifyItemInserted(mAppList.size() - 1);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -108,6 +108,8 @@ public class ShortcutCreateActivity extends AppCompatActivity {
|
||||
// ! can only accept String type data returned by getText().
|
||||
// ! If CharSequence type data is directly passed in, the shortcut will fail to create properly.
|
||||
// !
|
||||
// ! Refer to: http://issues.autojs6.com/221
|
||||
// !
|
||||
// ! zh-CN:
|
||||
// !
|
||||
// ! 此处需要转换为 String 类型, 而不能保留 getText() 方法得到的 CharSequence 类型.
|
||||
@@ -115,6 +117,8 @@ public class ShortcutCreateActivity extends AppCompatActivity {
|
||||
// ! ShortcutInfoCompat.Builder#setShortLabel 及 setLongLabel 只能接受 getText() 返回的 String 类型数据,
|
||||
// ! 如果直接传入 CharSequence 类型数据, 快捷方式将无法正常创建.
|
||||
// !
|
||||
// ! 参阅: http://issues.autojs6.com/221
|
||||
// !
|
||||
// # CharSequence name = mName.getText();
|
||||
String name = mName.getText().toString();
|
||||
|
||||
|
||||
@@ -4,10 +4,11 @@ import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.widget.LinearLayout
|
||||
import org.autojs.autojs.ui.BaseActivity
|
||||
import org.autojs.autojs.ui.floating.FloatyWindowManger
|
||||
import org.autojs.autojs.ui.main.MainActivity
|
||||
import org.autojs.autojs6.R
|
||||
import org.autojs.autojs6.databinding.ActivitySplashBinding
|
||||
|
||||
/**
|
||||
* Created by Stardust on Jul 7, 2017.
|
||||
@@ -19,6 +20,8 @@ class SplashActivity : BaseActivity() {
|
||||
|
||||
override val handleStatusBarThemeColorAutomatically = false
|
||||
|
||||
private var binding: ActivitySplashBinding? = null
|
||||
|
||||
private var mAlreadyEnterNextActivity = false
|
||||
private var mPaused = false
|
||||
|
||||
@@ -26,7 +29,9 @@ class SplashActivity : BaseActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_splash)
|
||||
|
||||
val binding = ActivitySplashBinding.inflate(layoutInflater).also { binding = it }
|
||||
setContentView(binding.root)
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
mHandler = Looper.myLooper()?.let { Handler(it) } ?: Handler()
|
||||
@@ -48,6 +53,11 @@ class SplashActivity : BaseActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
binding = null
|
||||
}
|
||||
|
||||
private fun enterNextActivity() {
|
||||
if (!mAlreadyEnterNextActivity && !mPaused) {
|
||||
mAlreadyEnterNextActivity = true
|
||||
|
||||
@@ -43,6 +43,7 @@ import org.autojs.autojs.timing.TimedTaskManager.removeTask
|
||||
import org.autojs.autojs.timing.TimedTaskManager.updateTask
|
||||
import org.autojs.autojs.tool.MapBuilder
|
||||
import org.autojs.autojs.ui.BaseActivity
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs.util.ViewUtils.showToast
|
||||
import org.autojs.autojs6.R
|
||||
import org.autojs.autojs6.databinding.ActivityTimedTaskSettingBinding
|
||||
@@ -138,6 +139,8 @@ class TimedTaskSettingActivity : BaseActivity() {
|
||||
mWeeklyTaskTimePicker.setIs24HourView(true)
|
||||
findDayOfWeekCheckBoxes(mWeeklyTaskContainer)
|
||||
setUpTaskSettings(this)
|
||||
|
||||
ViewUtils.excludePaddingClippableViewFromNavigationBar(binding.scrollView)
|
||||
}
|
||||
|
||||
private fun findDayOfWeekCheckBoxes(parent: ViewGroup) {
|
||||
|
||||
@@ -72,12 +72,7 @@ class FirstCharView : TextView {
|
||||
|
||||
fun setIconTextColorRes(@ColorRes colorRes: Int) = also { setTextColor(convertColorResToInt(colorRes)) }
|
||||
|
||||
fun setIconTextByThemeColorLuminance() = also {
|
||||
when {
|
||||
ThemeColorManager.isThemeColorLuminanceLight() -> setIconTextColorRes(R.color.day)
|
||||
else -> setIconTextColorRes(R.color.night)
|
||||
}
|
||||
}
|
||||
fun setIconTextColorByThemeColorLuminance() = also { setIconTextColorRes(ThemeColorManager.getDayOrNightColorResByLuminance()) }
|
||||
|
||||
fun setIconTextThemeColor() = setIconTextColor(ThemeColorManagerCompat.getColorPrimary())
|
||||
|
||||
|
||||
@@ -18,10 +18,11 @@ import android.view.View;
|
||||
*/
|
||||
public class ScrollAwareFABBehavior extends FloatingActionButton.Behavior {
|
||||
|
||||
private static final long DURATION = 200;
|
||||
private static final TimeInterpolator INTERPOLATOR = new FastOutSlowInInterpolator();
|
||||
private boolean mHidden = false;
|
||||
|
||||
public static final long DURATION = 200;
|
||||
|
||||
public ScrollAwareFABBehavior(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
@@ -59,7 +60,7 @@ public class ScrollAwareFABBehavior extends FloatingActionButton.Behavior {
|
||||
.setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
mHidden = false;
|
||||
setHidden(false);
|
||||
}
|
||||
})
|
||||
.start();
|
||||
@@ -80,10 +81,14 @@ public class ScrollAwareFABBehavior extends FloatingActionButton.Behavior {
|
||||
.setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
mHidden = true;
|
||||
setHidden(true);
|
||||
}
|
||||
})
|
||||
.start();
|
||||
}
|
||||
|
||||
public void setHidden(boolean b) {
|
||||
mHidden = b;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.mozilla.javascript.NativeArray
|
||||
import org.mozilla.javascript.NativeDate
|
||||
import org.mozilla.javascript.NativeJSON
|
||||
import org.mozilla.javascript.NativeObject
|
||||
import org.mozilla.javascript.RegExpLoader
|
||||
import org.mozilla.javascript.ScriptRuntime.emptyArgs
|
||||
import org.mozilla.javascript.ScriptRuntime.setBuiltinProtoAndParent
|
||||
import org.mozilla.javascript.ScriptRuntime.toObject
|
||||
|
||||
@@ -29,13 +29,18 @@ import androidx.annotation.IdRes
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import androidx.appcompat.widget.Toolbar
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import androidx.core.view.WindowInsetsControllerCompat
|
||||
import androidx.core.view.forEach
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import org.autojs.autojs.app.GlobalAppContext
|
||||
import org.autojs.autojs.core.pref.Pref
|
||||
import org.autojs.autojs.theme.ThemeColorManager
|
||||
import org.autojs.autojs.util.StringUtils.key
|
||||
import org.autojs.autojs6.R
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
/**
|
||||
* Created by Stardust on Jan 24, 2017.
|
||||
@@ -156,6 +161,11 @@ object ViewUtils {
|
||||
return activity.window.decorView.systemUiVisibility and flags == flags
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun addWindowFlags(activity: Activity, flags: Int) {
|
||||
activity.window.addFlags(flags)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun isStatusBarIconLight(activity: Activity): Boolean {
|
||||
return !isStatusBarIconDark(activity)
|
||||
@@ -180,7 +190,7 @@ object ViewUtils {
|
||||
val window = activity.window
|
||||
val decorView = window.decorView
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
|
||||
decorView.setOnApplyWindowInsetsListener { view, insets ->
|
||||
val statusBarInsets = insets.getInsets(WindowInsets.Type.statusBars())
|
||||
val contentView: ViewGroup? = activity.findViewById(android.R.id.content)
|
||||
@@ -204,7 +214,7 @@ object ViewUtils {
|
||||
val window = activity.window
|
||||
val decorView = window.decorView
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
|
||||
decorView.setOnApplyWindowInsetsListener { view, insets ->
|
||||
val navBarInsets = insets.getInsets(WindowInsets.Type.navigationBars())
|
||||
val contentView: ViewGroup? = activity.findViewById(android.R.id.content)
|
||||
@@ -224,6 +234,30 @@ object ViewUtils {
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
@JvmOverloads
|
||||
fun excludeFloatingActionButtonFromNavigationBar(fab: FloatingActionButton, extraMarginBottomDp: Float = 16F) {
|
||||
ViewCompat.setOnApplyWindowInsetsListener(fab) { view, insets ->
|
||||
val bottomInset = insets.getInsets(WindowInsetsCompat.Type.systemBars()).bottom
|
||||
view.layoutParams.runCatching {
|
||||
javaClass.getField("bottomMargin")
|
||||
.setInt(this, DisplayUtils.dpToPx(extraMarginBottomDp).roundToInt() + bottomInset)
|
||||
}
|
||||
insets
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
@JvmOverloads
|
||||
fun excludePaddingClippableViewFromNavigationBar(view: View, extraPaddingBottomDp: Float = 0F, clipToPadding: Boolean = false) {
|
||||
ViewCompat.setOnApplyWindowInsetsListener(view) { _, insets ->
|
||||
val bottomInset = insets.getInsets(WindowInsetsCompat.Type.systemBars()).bottom
|
||||
view.setPadding(0, 0, 0, DisplayUtils.dpToPx(extraPaddingBottomDp).roundToInt() + bottomInset)
|
||||
runCatching { view.javaClass.getMethod("setClipToPadding", Boolean::class.java).invoke(view, clipToPadding) }
|
||||
insets
|
||||
}
|
||||
}
|
||||
|
||||
private fun appendWindowFlags(activity: Activity, flags: Int) {
|
||||
activity.window.addFlags(flags)
|
||||
}
|
||||
@@ -296,13 +330,8 @@ object ViewUtils {
|
||||
toolbar.setNavigationOnClickListener { activity.finish() }
|
||||
actionBar.setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
toolbar.navigationIcon?.let { navigationIcon ->
|
||||
val navigationIconColor = when {
|
||||
ThemeColorManager.isThemeColorLuminanceLight() -> R.color.day
|
||||
else -> R.color.night
|
||||
}.let { activity.resources.getColor(it, null) }
|
||||
navigationIcon.colorFilter = PorterDuffColorFilter(navigationIconColor, PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
setToolbarMenuIconsColorByThemeColorLuminance(activity, toolbar)
|
||||
setToolbarNavigationIconColorByThemeColorLuminance(activity, toolbar)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
@@ -310,6 +339,26 @@ object ViewUtils {
|
||||
setToolbarAsBack(activity, activity.getString(titleRes))
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
@JvmOverloads
|
||||
fun setToolbarMenuIconsColorByThemeColorLuminance(activity: Activity, toolbar: Toolbar? = null) {
|
||||
val toolbarView = toolbar ?: activity.findViewById(R.id.toolbar) ?: return
|
||||
val aimColor = ThemeColorManager.getDayOrNightColorByLuminance(activity)
|
||||
toolbarView.menu.forEach { menuItem ->
|
||||
menuItem.icon?.colorFilter = PorterDuffColorFilter(aimColor, PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
@JvmOverloads
|
||||
fun setToolbarNavigationIconColorByThemeColorLuminance(activity: Activity, toolbar: Toolbar? = null) {
|
||||
val toolbarView = toolbar ?: activity.findViewById(R.id.toolbar) ?: return
|
||||
val aimColor = ThemeColorManager.getDayOrNightColorByLuminance(activity)
|
||||
toolbarView.navigationIcon?.let { navigationIcon ->
|
||||
navigationIcon.colorFilter = PorterDuffColorFilter(aimColor, PorterDuff.Mode.SRC_IN)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun showToast(context: Context, stringRes: Int) = showToast(context, stringRes, false)
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package org.mozilla.javascript;
|
||||
|
||||
import android.util.Log;
|
||||
import org.autojs.autojs.engine.RhinoJavaScriptEngine;
|
||||
import org.autojs.autojs.rhino.AutoJsContext;
|
||||
import org.mozilla.javascript.jdk18.VMBridge_jdk18;
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
android:paddingTop="6dp">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -21,26 +20,24 @@
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
<org.autojs.autojs.core.console.ConsoleView
|
||||
android:id="@+id/console"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="4dp"
|
||||
android:paddingEnd="2dp">
|
||||
android:paddingEnd="2dp"
|
||||
app:excludeFromNavigationBar="true"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<org.autojs.autojs.core.console.ConsoleView
|
||||
android:id="@+id/console"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
<org.autojs.autojs.theme.widget.ThemeColorFloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
android:tint="@color/toolbar_text"
|
||||
app:backgroundTint="?attr/colorPrimary"
|
||||
app:layout_behavior="org.autojs.autojs.ui.widget.ScrollAwareFABBehavior"
|
||||
app:srcCompat="@drawable/ic_clear_white_48dp" />
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorFloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="@dimen/fab_margin"
|
||||
app:srcCompat="@drawable/ic_clear_white_48dp"
|
||||
app:backgroundTint="?attr/colorPrimary"
|
||||
android:tint="@color/toolbar_text" />
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorFloatingActionButton
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:titleTextColor="@color/day_full"
|
||||
app:subtitleTextColor="@color/day_full"
|
||||
android:theme="@style/ToolBarStyleInrt"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:contentInsetEndWithActions="2dp"
|
||||
@@ -33,6 +35,7 @@
|
||||
android:id="@+id/console"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:excludeFromNavigationBar="true"
|
||||
app:color_verbose="#DFC0C0C0"
|
||||
app:color_debug="#CC000000"
|
||||
app:color_info="#FF43A047"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -8,51 +8,42 @@
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="13dp"
|
||||
android:theme="@style/ToolBarStyle" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
<FrameLayout
|
||||
<org.autojs.autojs.theme.widget.ThemeColorSwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="8dp">
|
||||
android:layout_marginTop="6dp"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorSwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh_layout"
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
</org.autojs.autojs.theme.widget.ThemeColorSwipeRefreshLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</ScrollView>
|
||||
<org.autojs.autojs.theme.widget.ThemeColorFloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="16dp"
|
||||
android:alpha="0.9"
|
||||
android:src="@drawable/ic_add_white_48dp"
|
||||
android:tint="@color/toolbar_text"
|
||||
app:backgroundTint="?attr/colorPrimary"
|
||||
app:layout_behavior="org.autojs.autojs.ui.widget.ScrollAwareFABBehavior" />
|
||||
|
||||
</org.autojs.autojs.theme.widget.ThemeColorSwipeRefreshLayout>
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorFloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="16dp"
|
||||
android:alpha="0.9"
|
||||
android:src="@drawable/ic_add_white_48dp"
|
||||
android:tint="@color/toolbar_text"
|
||||
app:backgroundTint="?attr/colorPrimary"
|
||||
app:layout_anchor="@id/viewpager"
|
||||
app:layout_anchorGravity="bottom|end"
|
||||
app:layout_behavior="org.autojs.autojs.ui.widget.ScrollAwareFABBehavior" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
android:paddingTop="6dp">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
@@ -1,30 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:clipToPadding="false"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@android:color/transparent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:clipToPadding="false"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:theme="@style/ToolBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay"
|
||||
app:title="@string/app_name" />
|
||||
android:id="@+id/toolbar"
|
||||
android:theme="@style/ToolBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay"
|
||||
app:title="@string/app_name" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<org.autojs.autojs.ui.explorer.ExplorerView
|
||||
android:id="@+id/script_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:id="@+id/script_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -17,8 +17,8 @@
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:titleTextColor="@color/md_black_1000"
|
||||
app:subtitleTextColor="@color/md_black_1000"
|
||||
app:titleTextColor="@color/day_full"
|
||||
app:subtitleTextColor="@color/day_full"
|
||||
android:theme="@style/ToolBarStyleInrt"
|
||||
android:background="@color/md_blue_grey_50"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
|
||||
@@ -1,25 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="128dp"
|
||||
android:layout_gravity="center|bottom"
|
||||
android:gravity="center"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="horizontal">
|
||||
android:gravity="center|bottom">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/autojs6_material" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:minHeight="128dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginStart="2dp"
|
||||
android:src="@drawable/autojs6" />
|
||||
<ImageView
|
||||
android:id="@+id/logo"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/autojs6_material" />
|
||||
|
||||
</LinearLayout>
|
||||
<ImageView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginStart="2dp"
|
||||
android:src="@drawable/autojs6" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -2,31 +2,39 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="128dp"
|
||||
android:layout_gravity="center|bottom"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:gravity="center|bottom">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/slug"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/text_powered_by_autojs"
|
||||
android:textColor="@color/day_night_full"
|
||||
android:textSize="16sp" />
|
||||
android:layout_marginBottom="16dp"
|
||||
android:gravity="center"
|
||||
android:minHeight="128dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/icon"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_width="72dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/slug"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/text_powered_by_autojs"
|
||||
android:textColor="@color/day_night_full"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,251 +1,252 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay"
|
||||
android:fitsSystemWindows="true">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorToolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/ToolBarStyle"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/ToolBarStyle"
|
||||
app:popupTheme="@style/AppTheme.PopupOverlay" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:id="@+id/scrollView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
app:cardCornerRadius="2dp"
|
||||
app:cardElevation="1dp"
|
||||
app:cardUseCompatPadding="true">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
app:cardCornerRadius="2dp"
|
||||
app:cardElevation="1dp"
|
||||
app:cardUseCompatPadding="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/text_timed_task_timing"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:textColor="?android:textColorSecondary" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="@string/text_timed_task_timing"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
|
||||
android:textColor="?android:textColorSecondary" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/timing_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:id="@+id/timing_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/daily_task_radio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/text_daily_task"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/daily_task_radio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/text_daily_task"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<com.github.aakira.expandablelayout.ExpandableRelativeLayout
|
||||
android:id="@+id/daily_task_relative_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:ael_expanded="false"
|
||||
app:ael_interpolator="fastOutSlowIn"
|
||||
app:ael_orientation="vertical">
|
||||
android:id="@+id/daily_task_relative_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:ael_expanded="false"
|
||||
app:ael_interpolator="fastOutSlowIn"
|
||||
app:ael_orientation="vertical">
|
||||
|
||||
<TimePicker
|
||||
android:id="@+id/daily_task_time_picker"
|
||||
android:id="@+id/daily_task_time_picker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:timePickerMode="spinner" />
|
||||
|
||||
</com.github.aakira.expandablelayout.ExpandableRelativeLayout>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/disposable_task_radio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/text_disposable_task"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<com.github.aakira.expandablelayout.ExpandableRelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="36dp"
|
||||
app:ael_expanded="false"
|
||||
app:ael_interpolator="fastOutSlowIn"
|
||||
app:ael_orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/disposable_task_time_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="?selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="6dp">
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorImageViewCompat
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/ic_schedule_black_48dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/disposable_task_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/disposable_task_date_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/disposable_task_time_container"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="?selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="6dp">
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorImageViewCompat
|
||||
android:id="@+id/disposable_task_date_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/ic_date_range_black_48dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/disposable_task_date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</com.github.aakira.expandablelayout.ExpandableRelativeLayout>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/weekly_task_radio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/text_weekly_task"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<com.github.aakira.expandablelayout.ExpandableRelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:ael_expanded="false"
|
||||
app:ael_interpolator="fastOutSlowIn"
|
||||
app:ael_orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/weekly_task_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TimePicker
|
||||
android:id="@+id/weekly_task_time_picker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:timePickerMode="spinner" />
|
||||
|
||||
</com.github.aakira.expandablelayout.ExpandableRelativeLayout>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/disposable_task_radio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/text_disposable_task"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<com.github.aakira.expandablelayout.ExpandableRelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="36dp"
|
||||
app:ael_expanded="false"
|
||||
app:ael_interpolator="fastOutSlowIn"
|
||||
app:ael_orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/disposable_task_time_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="?selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="6dp">
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorImageViewCompat
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/ic_schedule_black_48dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/disposable_task_time"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/disposable_task_date_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/disposable_task_time_container"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="?selectableItemBackground"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="6dp">
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorImageViewCompat
|
||||
android:id="@+id/disposable_task_date_icon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/ic_date_range_black_48dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/disposable_task_date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</com.github.aakira.expandablelayout.ExpandableRelativeLayout>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/weekly_task_radio"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/text_weekly_task"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<com.github.aakira.expandablelayout.ExpandableRelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:ael_expanded="false"
|
||||
app:ael_interpolator="fastOutSlowIn"
|
||||
app:ael_orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/weekly_task_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TimePicker
|
||||
android:id="@+id/weekly_task_time_picker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:timePickerMode="spinner" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="4">
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="4">
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_day1"
|
||||
tools:ignore="TooDeepLayout" />
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_day1"
|
||||
tools:ignore="TooDeepLayout" />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_day2" />
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_day2" />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_day3" />
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_day3" />
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_day4" />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_day4" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="4">
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="4">
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_day5" />
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_day5" />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_day6" />
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_day6" />
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_day7" />
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/text_day7" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -254,192 +255,192 @@
|
||||
</com.github.aakira.expandablelayout.ExpandableRelativeLayout>
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_broadcast"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/text_broadcast_task"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_broadcast"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/text_broadcast_task"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<com.github.aakira.expandablelayout.ExpandableRelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:ael_expanded="false"
|
||||
app:ael_interpolator="fastOutSlowIn"
|
||||
app:ael_orientation="vertical">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:ael_expanded="false"
|
||||
app:ael_interpolator="fastOutSlowIn"
|
||||
app:ael_orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:orientation="vertical">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/broadcast_group"
|
||||
android:id="@+id/broadcast_group"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_startup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_startup"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_startup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_startup"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_boot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_boot"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_boot"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_boot"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_screen_on"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_screen_on"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_screen_on"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_screen_on"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_screen_off"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_screen_off"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_screen_off"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_screen_off"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_screen_unlock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_screen_unlock"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_screen_unlock"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_screen_unlock"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_battery_change"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_battery_change"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_battery_change"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_battery_change"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_power_connect"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_power_connect"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_power_connect"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_power_connect"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_power_disconnect"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_power_disconnect"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_power_disconnect"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_power_disconnect"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_conn_change"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_conn_change"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_conn_change"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_conn_change"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_package_install"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_package_install"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_package_install"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_package_install"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_package_uninstall"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_package_uninstall"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_package_uninstall"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_package_uninstall"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_package_update"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_package_update"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_package_update"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_package_update"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_headset_plug"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_headset_plug"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_headset_plug"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_headset_plug"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_config_change"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_config_change"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_config_change"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_config_change"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_time_tick"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_time_tick"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_time_tick"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_time_tick"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/run_on_other_broadcast"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_user_defined_broadcast"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
android:id="@+id/run_on_other_broadcast"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/text_run_on_user_defined_broadcast"
|
||||
tools:ignore="RtlSymmetry" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="36dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:hint="@string/text_broadcast_action">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="36dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:hint="@string/text_broadcast_action">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/action"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="2"
|
||||
android:text="@string/text_broadcast_action_prefix" />
|
||||
android:id="@+id/action"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="2"
|
||||
android:text="@string/text_broadcast_action_prefix" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
@@ -1,66 +1,67 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="@style/AppTheme.AppBarOverlay"
|
||||
android:fitsSystemWindows="true">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fitsSystemWindows="true"
|
||||
android:theme="@style/AppTheme.AppBarOverlay">
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorToolbarEditor
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:theme="@style/ToolBarStyle"
|
||||
android:background="?attr/colorPrimary"
|
||||
tools:title="@string/app_name"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:contentInsetEndWithActions="2dp"
|
||||
app:titleTextAppearance="@style/TextAppearanceEditorTitle"
|
||||
app:popupTheme="@style/PopupMenuTheme">
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/ToolBarStyle"
|
||||
app:contentInsetEndWithActions="2dp"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:popupTheme="@style/PopupMenuTheme"
|
||||
tools:title="@string/app_name"
|
||||
app:titleTextAppearance="@style/TextAppearanceEditorTitle">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/toolbar_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end" />
|
||||
android:id="@+id/toolbar_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end" />
|
||||
|
||||
</org.autojs.autojs.theme.widget.ThemeColorToolbarEditor>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.drawerlayout.widget.DrawerLayout
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<org.autojs.autojs.ui.edit.editor.CodeEditor
|
||||
android:id="@+id/editor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
android:id="@+id/editor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/input_method_enhance_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:background="#77f2f3f7">
|
||||
android:id="@+id/input_method_enhance_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:background="#77f2f3f7">
|
||||
|
||||
<org.autojs.autojs.ui.edit.completion.CodeCompletionBar
|
||||
android:id="@+id/symbol_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:layout_alignParentBottom="true" />
|
||||
android:id="@+id/symbol_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:layout_alignParentBottom="true" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/functions"
|
||||
@@ -75,35 +76,35 @@
|
||||
app:tint="#222329" />
|
||||
|
||||
<org.autojs.autojs.ui.edit.completion.CodeCompletionBar
|
||||
android:id="@+id/code_completion_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:layout_above="@+id/symbol_bar"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toEndOf="@+id/functions" />
|
||||
android:id="@+id/code_completion_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:layout_above="@+id/symbol_bar"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_toEndOf="@+id/functions" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<org.autojs.autojs.ui.edit.keyboard.FunctionsKeyboardView
|
||||
android:id="@+id/functions_keyboard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone" />
|
||||
android:id="@+id/functions_keyboard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone" />
|
||||
|
||||
<org.autojs.autojs.ui.edit.debug.DebugBar
|
||||
android:id="@+id/debug_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
android:id="@+id/debug_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<org.autojs.autojs.ui.widget.EWebView
|
||||
android:id="@+id/docs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start" />
|
||||
android:id="@+id/docs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start" />
|
||||
|
||||
</androidx.drawerlayout.widget.DrawerLayout>
|
||||
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorSwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorSwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.autojs.autojs.ui.widget.NestedWebView
|
||||
android:id="@+id/web_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:id="@+id/web_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</org.autojs.autojs.theme.widget.ThemeColorSwipeRefreshLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:visibility="gone" />
|
||||
android:id="@+id/progress_bar"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</merge>
|
||||
@@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorSwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.autojs.autojs.theme.widget.ThemeColorSwipeRefreshLayout
|
||||
android:id="@+id/swipe_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.autojs.autojs.ui.main.task.TaskListRecyclerView
|
||||
android:id="@+id/task_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:id="@+id/task_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</org.autojs.autojs.theme.widget.ThemeColorSwipeRefreshLayout>
|
||||
|
||||
|
||||
@@ -4,10 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_margin="2dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
@@ -18,7 +15,8 @@
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="8dp">
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
@@ -28,20 +26,20 @@
|
||||
android:orientation="vertical"
|
||||
tools:ignore="RelativeOverlap">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/filename"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_color_primary"
|
||||
tools:text="filename" />
|
||||
tools:text="File name: foo" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/alias"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_color_primary"
|
||||
tools:text="filename" />
|
||||
tools:text="Alias: bar" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -76,6 +74,9 @@
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/ic_key_store_delete"
|
||||
app:tint="@color/md_red_500" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="android:windowBackground">@color/window_background</item>
|
||||
<item name="android:statusBarColor">@color/window_background</item>
|
||||
<item name="android:navigationBarColor">@color/window_background</item>
|
||||
</style>
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
<enum name="single" value="0" />
|
||||
<enum name="multiple" value="1" />
|
||||
</attr>
|
||||
|
||||
<attr name="alwaysExtended" format="boolean" />
|
||||
<attr name="list" format="reference" />
|
||||
</declare-styleable>
|
||||
@@ -27,10 +26,12 @@
|
||||
<attr name="positiveText" format="string" />
|
||||
<attr name="onConfirmPrompt" format="string" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="MaterialPreference">
|
||||
<attr name="longClickPrompt" format="string" />
|
||||
<attr name="longClickPromptMore" format="string" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="MaterialListPreference">
|
||||
<attr name="dialogTitle" />
|
||||
<attr name="dialogContent" />
|
||||
@@ -88,5 +89,7 @@
|
||||
<attr name="color_warn" format="reference|color" />
|
||||
<attr name="color_error" format="reference|color" />
|
||||
<attr name="color_assert" format="reference|color" />
|
||||
<attr name="excludeFromNavigationBar" format="boolean" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
@@ -22,6 +22,8 @@
|
||||
<color name="text_color_primary_full">@color/day_night_full</color>
|
||||
<color name="text_color_primary_alpha_70">@color/day_night_alpha_70</color>
|
||||
<color name="text_color_secondly">#9DA0A2</color>
|
||||
<color name="black_alpha_40">#66000000</color>
|
||||
<color name="black_alpha_44">#70000000</color>
|
||||
|
||||
<color name="colorAccent">#03A9F4</color>
|
||||
<color name="colorPrimary">@color/theme_color_default</color>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<item name="android:textColorPrimary">@color/text_color_primary</item>
|
||||
<item name="android:textColorSecondary">@color/text_color_secondly</item>
|
||||
<item name="android:windowBackground">@color/window_background</item>
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
@@ -108,6 +109,7 @@
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="MtAppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.DayNight.ActionBar" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#Sat Mar 08 23:27:39 CST 2025
|
||||
BUILD_TIME=1741447659779
|
||||
#Mon Mar 10 23:16:02 CST 2025
|
||||
BUILD_TIME=1741619762219
|
||||
COMPILE_SDK_VERSION=35
|
||||
JAVA_VERSION=23
|
||||
JAVA_VERSION_MIN_RADICAL=0
|
||||
@@ -17,6 +17,6 @@ RAPID_OCR_OPENCV_MOBILE_LABEL_VERSION=13
|
||||
RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3
|
||||
TARGET_SDK_VERSION=35
|
||||
TARGET_SDK_VERSION_INRT=29
|
||||
VERSION_BUILD=3001
|
||||
VERSION_NAME=6.6.2 Alpha3
|
||||
VERSION_BUILD=3009
|
||||
VERSION_NAME=6.6.2 Alpha4
|
||||
VSCODE_EXT_REQUIRED_VERSION=1.0.8
|
||||
|
||||
Reference in New Issue
Block a user