make autojs module more independent
BIN
autojs/src/main/res/drawable-hdpi/ic_close_white_24dp.png
Normal file
|
After Width: | Height: | Size: 221 B |
BIN
autojs/src/main/res/drawable-hdpi/ic_debug_console.png
Normal file
|
After Width: | Height: | Size: 548 B |
|
After Width: | Height: | Size: 367 B |
BIN
autojs/src/main/res/drawable-mdpi/ic_close_white_24dp.png
Normal file
|
After Width: | Height: | Size: 175 B |
BIN
autojs/src/main/res/drawable-mdpi/ic_debug_console.png
Normal file
|
After Width: | Height: | Size: 352 B |
|
After Width: | Height: | Size: 269 B |
BIN
autojs/src/main/res/drawable-xhdpi/ic_close_white_24dp.png
Normal file
|
After Width: | Height: | Size: 257 B |
BIN
autojs/src/main/res/drawable-xhdpi/ic_debug_console.png
Normal file
|
After Width: | Height: | Size: 726 B |
|
After Width: | Height: | Size: 456 B |
BIN
autojs/src/main/res/drawable-xxhdpi/ic_close_white_24dp.png
Normal file
|
After Width: | Height: | Size: 347 B |
BIN
autojs/src/main/res/drawable-xxhdpi/ic_debug_console.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 690 B |
BIN
autojs/src/main/res/drawable-xxxhdpi/ic_close_white_24dp.png
Normal file
|
After Width: | Height: | Size: 436 B |
BIN
autojs/src/main/res/drawable-xxxhdpi/ic_debug_console.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 930 B |
8
autojs/src/main/res/drawable/circle_cool_black.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:innerRadius="0dp"
|
||||
android:shape="ring"
|
||||
android:thicknessRatio="2"
|
||||
android:useLevel="false">
|
||||
<solid android:color="#161616"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="#99262626"/>
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="12dp"
|
||||
android:bottomRightRadius="12dp"/>
|
||||
</shape>
|
||||
9
autojs/src/main/res/drawable/floating_console_bg_top.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="#cc181818"/>
|
||||
|
||||
<corners
|
||||
android:topLeftRadius="12dp"
|
||||
android:topRightRadius="12dp"/>
|
||||
</shape>
|
||||
BIN
autojs/src/main/res/drawable/ic_move_cursor.png
Normal file
|
After Width: | Height: | Size: 905 B |
BIN
autojs/src/main/res/drawable/ic_remove_white_24dp.png
Normal file
|
After Width: | Height: | Size: 82 B |
BIN
autojs/src/main/res/drawable/ic_resizer.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
53
autojs/src/main/res/layout/console_view.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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="match_parent"
|
||||
android:animateLayoutChanges="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/content_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:paddingLeft="3dp"
|
||||
android:textIsSelectable="true"
|
||||
android:textSize="14sp"
|
||||
tools:text="12345\n678\n9\n0"/>
|
||||
</ScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/input_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:lines="1"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="14sp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/ok"
|
||||
android:textColor="@android:color/white"
|
||||
android:theme="@style/ConsoleTheme"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
106
autojs/src/main/res/layout/floating_console_expand.xml
Normal file
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="12dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/floating_console_bg_top"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical|left"
|
||||
android:maxLines="1"
|
||||
android:text="@string/text_console"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/minimize"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:paddingTop="24dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_remove_white_24dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/move_or_resize"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="8dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_settings_ethernet_white_24dp"
|
||||
android:tint="@android:color/white"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="8dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_close_white_24dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.stardust.autojs.runtime.console.ConsoleView
|
||||
android:id="@+id/console"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/floating_console_bg_bottom"
|
||||
android:minHeight="200dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/resizer"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="@drawable/circle_cool_black"
|
||||
android:padding="6dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_resizer"
|
||||
android:tint="@android:color/white"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/move_cursor"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="@drawable/circle_cool_black"
|
||||
android:padding="5dp"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/ic_move_cursor"
|
||||
android:tint="@android:color/white"
|
||||
android:visibility="gone"/>
|
||||
|
||||
</RelativeLayout>
|
||||
13
autojs/src/main/res/layout/floating_window_collapse.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="46dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="46dp"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_debug_console"/>
|
||||
</LinearLayout>
|
||||
@@ -8,5 +8,11 @@
|
||||
<string name="text_no_running_script">没有正在运行的脚本</string>
|
||||
<string name="text_already_stop_n_scripts">已停止%d个正在运行的脚本</string>
|
||||
<string name="text_requires_sdk_version_to_run_the_script">本脚本需要此安卓版本以上才能运行:</string>
|
||||
<string name="ok">确定</string>
|
||||
<string name="cancel">取消</string>
|
||||
<string name="text_console">控制台</string>
|
||||
<string name="text_no_floating_window_permission">没有悬浮窗权限</string>
|
||||
<string name="text_accessibility_service_description">使脚本自动操作(点击、长按、滑动等)所需,若关闭则只能执行不涉及自动操作的脚本。</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
8
autojs/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="ConsoleTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorButtonNormal">#cc181818</item>
|
||||
</style>
|
||||
</resources>
|
||||
10
autojs/src/main/res/xml/accessibility_service_config.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:accessibilityEventTypes="typeAllMask"
|
||||
android:accessibilityFeedbackType="feedbackGeneric"
|
||||
android:accessibilityFlags="flagReportViewIds|flagRequestEnhancedWebAccessibility|flagRequestFilterKeyEvents"
|
||||
android:canPerformGestures="true"
|
||||
android:canRequestEnhancedWebAccessibility="true"
|
||||
android:canRetrieveWindowContent="true"
|
||||
android:description="@string/text_accessibility_service_description"
|
||||
android:notificationTimeout="100"/>
|
||||