Commit Test

This commit is contained in:
hyb1996
2017-04-29 21:23:45 +08:00
parent 6829c0659e
commit 51349356a7
65 changed files with 758 additions and 1751 deletions

View File

@@ -63,20 +63,6 @@
</android.support.design.widget.AppBarLayout>
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/content_edit"/>
<FrameLayout
android:id="@+id/fragment_edit_side_menu"
android:layout_width="280dp"
android:layout_height="match_parent"
android:layout_gravity="end"
android:background="@android:color/white"
android:clickable="true"/>
</android.support.v4.widget.DrawerLayout>
<include layout="@layout/content_edit"/>
</LinearLayout>

View File

@@ -0,0 +1,86 @@
<?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"
tools:context="com.stardust.scriptdroid.ui.edit.EditActivity">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<com.stardust.theme.widget.ThemeColorToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:title="@string/_app_name"
app:popupTheme="@style/AppTheme.PopupOverlay">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="right"
android:orientation="horizontal">
<com.stardust.widget.ToolbarMenuItem
android:id="@+id/run"
android:layout_width="40dp"
android:layout_height="match_parent"
app:icon="@drawable/ic_play_arrow_white_48dp"
app:icon_color="@android:color/white"
app:text="@string/text_run"/>
</LinearLayout>
</com.stardust.theme.widget.ThemeColorToolbar>
</android.support.design.widget.AppBarLayout>
<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:background="#ffffffff"
android:orientation="vertical"
tools:showIn="@layout/activity_edit">
<com.jecelyin.editor.v2.view.EditorView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/editor"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<com.jecelyin.editor.v2.core.widget.JecEditText
android:id="@+id/edit_text"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffffff"
android:enabled="true"
android:gravity="start|top"
android:inputType="textMultiLine"
android:padding="5dp"
android:scrollbarThumbVertical="@android:color/transparent"
android:scrollbarTrackVertical="@null"
android:scrollbars="vertical"/>
<me.zhanghai.android.materialprogressbar.MaterialProgressBar
android:id="@+id/progress_view"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="90dp"
android:indeterminate="true"
android:visibility="gone"/>
</com.jecelyin.editor.v2.view.EditorView>
</LinearLayout>
</LinearLayout>

View File

@@ -36,7 +36,7 @@
<android.support.v7.widget.Toolbar
android:id="@+id/air_toolbar"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"/>
android:layout_height="wrap_content"/>
</android.support.design.widget.AppBarLayout>
@@ -52,12 +52,12 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:orientation="vertical"
android:padding="@dimen/air_baseline_card"
android:clipToPadding="false">
android:padding="@dimen/air_baseline_card">
<include
layout="@layout/air_card_report"
layout="@layout/air_card_report_compat"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
@@ -82,8 +82,7 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/air_baseline"
app:srcCompat="@drawable/air_ic_send_light"
app:backgroundTint="?colorAccent"/>
app:srcCompat="@drawable/air_ic_send_light"/>
</FrameLayout>

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ MIT License
~
~ Copyright (c) 2017 Jan Heinrich Reimer
~
~ Permission is hereby granted, free of charge, to any person obtaining a copy
~ of this software and associated documentation files (the "Software"), to deal
~ in the Software without restriction, including without limitation the rights
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
~ copies of the Software, and to permit persons to whom the Software is
~ furnished to do so, subject to the following conditions:
~
~ The above copyright notice and this permission notice shall be included in all
~ copies or substantial portions of the Software.
~
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
~ SOFTWARE.
-->
<android.support.v7.widget.CardView 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"
app:cardBackgroundColor="?cardBackgroundColor">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="@dimen/air_baseline">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/air_title_issue"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="?android:textColorSecondary"/>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/air_baseline">
<android.support.design.widget.TextInputEditText
android:id="@+id/air_inputTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/air_label_issue_title"
android:inputType="textCapSentences"
android:maxLines="1"/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/air_baseline_half">
<android.support.design.widget.TextInputEditText
android:id="@+id/air_inputDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/air_label_issue_description"
android:inputType="textMultiLine|textCapSentences"
android:lines="2"
android:scrollbars="vertical"/>
</android.support.design.widget.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/air_baseline"
android:gravity="center_vertical">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/air_label_device_info"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"/>
<android.support.v7.widget.AppCompatImageButton
android:id="@+id/air_buttonDeviceInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?selectableItemBackgroundBorderless"
android:contentDescription="@string/air_label_device_info"
android:padding="@dimen/air_icon_padding"
android:tint="#ee000000"
app:srcCompat="@drawable/air_ic_expand_more"/>
</LinearLayout>
<com.github.aakira.expandablelayout.ExpandableRelativeLayout
android:id="@+id/air_layoutDeviceInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:ael_expanded="false"
app:ael_interpolator="fastOutSlowIn"
app:ael_orientation="vertical">
<android.support.v7.widget.AppCompatTextView
android:id="@+id/air_textDeviceInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/air_baseline_half"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="?android:textColorSecondary"/>
</com.github.aakira.expandablelayout.ExpandableRelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>

View File

@@ -4,10 +4,17 @@
android:layout_height="match_parent"
android:background="#fefefe">
<com.stardust.scriptdroid.ui.main.script_list.ScriptAndFolderListRecyclerView
android:id="@+id/script_list_recycler_view"
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent">
<com.stardust.scriptdroid.ui.main.script_list.ScriptAndFolderListRecyclerView
android:id="@+id/script_list_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</android.support.v4.widget.SwipeRefreshLayout>
<FrameLayout
android:id="@+id/progressBar"

View File

@@ -1,14 +0,0 @@
<?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:background="@android:drawable/dialog_holo_light_frame"
android:orientation="vertical">
<view
android:id="@+id/operation_list"
class="com.stardust.scriptdroid.ui.main.operation.ScriptFileOperationPopupMenu$ScriptFileOperationListRecyclerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>

View File

@@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="?android:selectableItemBackground"
android:orientation="horizontal"
android:padding="16dp">
<com.stardust.theme.widget.ThemeColorImageView
android:id="@+id/icon"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:contentDescription="@string/_app_name"/>
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="16dp"
android:layout_toRightOf="@id/icon"
android:textColor="@android:color/secondary_text_light"
android:textSize="16sp"/>
</RelativeLayout>

View File

@@ -9,15 +9,21 @@
app:showAsAction="never"/>
<item
android:id="@+id/action_help"
android:id="@+id/action_console"
android:orderInCategory="200"
android:title="@string/text_console"
app:showAsAction="never"/>
<item
android:id="@+id/action_help"
android:orderInCategory="300"
android:title="@string/text_help"
app:showAsAction="never"/>
<item
android:id="@+id/action_console"
android:orderInCategory="300"
android:title="@string/text_console"
android:id="@+id/action_open_by_other_apps"
android:orderInCategory="400"
android:title="@string/text_open_by_other_apps"
app:showAsAction="never"/>
</menu>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_console"
android:orderInCategory="200"
android:title="@string/text_console"
app:showAsAction="never"/>
<item
android:id="@+id/action_help"
android:orderInCategory="300"
android:title="@string/text_help"
app:showAsAction="never"/>
<item
android:id="@+id/action_import"
android:orderInCategory="400"
android:title="@string/text_copy_to_my_scripts"
app:showAsAction="never"/>
</menu>

View File

@@ -1,5 +1,5 @@
<resources>
<string name="_app_name">UiAutomator</string>
<string name="_app_name">AutoJs</string>
<string name="action_settings">Settings</string>
<string name="action_disable_service">Disable Service</string>
<string name="text_accessibility_service_description">Required by the script automatic operation (click, long press, slide, etc.).</string>
@@ -38,8 +38,6 @@
<string name="text_do_not_remind_again">Don\'t show again</string>
<string name="copyright">Copyright©2016 All right reserves.</string>
<string name="developer">Stardust</string>
<string name="qq">946994919</string>
<string name="email">hybbbb1996@gmail.com</string>
<string name="github">Source Code</string>
<string name="text_already_copy_to_clip">Copied</string>
<string name="donate_developer">Donate</string>
@@ -122,7 +120,7 @@
<string name="text_layout_hierarchy">View layout hierarchy</string>
<string name="text_layout_bounds">View layout bounds</string>
<string name="text_no_accessibility_permission_to_capture">Accessibility service is not activated</string>
<string name="text_sample_script">Sample Scripts</string>
<string name="text_sample_script">Samples</string>
<string name="text_my_script">My Scripts</string>
<string name="hint_no_script">Click ADD to create your first script~(。・・)</string>
<string name="text_reset_background">Reset background settings</string>
@@ -155,15 +153,15 @@
<string name="summary_command_run_mode">If the app responses slowly when running script, choose Thread Pool or Create Thread. But it may causes rebooting of the device</string>
<string name="text_on">ON</string>
<string name="text_off">OFF</string>
<string name="text_please_choose_file_to_import">请选择要导入的脚本</string>
<string name="text_refresh">刷新</string>
<string name="notice_no_running_script"><![CDATA[没有正在运行的脚本 φ(>ω<*)]]></string>
<string name="text_checking_update">正在检查更新</string>
<string name="text_new_version">新版本</string>
<string name="text_is_latest_version">已经是最新版本</string>
<string name="text_version_too_old">版本过低</string>
<string name="warning_version_too_old">这个版本已经不能再使用了哦</string>
<string name="text_release_notes">更新日志</string>
<string name="text_please_choose_file_to_import">Select script file to import</string>
<string name="text_refresh">Refresh</string>
<string name="notice_no_running_script"><![CDATA[No running script φ(>ω<*)]]></string>
<string name="text_checking_update">Checking for updates</string>
<string name="text_new_version">New Version</string>
<string name="text_is_latest_version">No newer version found</string>
<string name="text_version_too_old">Version too old</string>
<string name="warning_version_too_old">This version is deprecated</string>
<string name="text_release_notes">Release Notes</string>
<string-array name="record_control_keys">
<item>None</item>
<item>Volume Up</item>
@@ -176,5 +174,15 @@
<item>Create New Thread Every Time</item>
<item>Thread Pool</item>
</string-array>
<string name="text_update">Update</string>
<string name="text_task_manage">Tasks</string>
<string name="text_script">Script</string>
<string name="text_root_script_record"></string>
<string name="text_processing">Processing</string>
<string name="text_re_import_succeed"></string>
<string name="text_pre_execute_script">Pre-execute script</string>
<string name="text_check_update">Check for updates</string>
<string name="text_new_directory">New Directory</string>
<string name="text_already_reset">已重置</string>
</resources>

View File

@@ -1,5 +1,5 @@
<resources>
<string name="_app_name">免Root脚本精灵</string>
<string name="_app_name">AutoJs</string>
<string name="action_settings">设置</string>
<string name="action_disable_service">关闭服务</string>
<string name="text_accessibility_service_description">使脚本自动操作(点击、长按、滑动等)所需,若关闭则只能执行不涉及自动操作的脚本。</string>
@@ -12,7 +12,7 @@
<string name="text_please_input_name">请输入名称</string>
<string name="text_name">名称</string>
<string name="text_go_to_setting">去设置</string>
<string name="explain_accessibility_permission">软件需要打开\"自动操作服务\"才能运行,请在随后的设置中选择\"免Root脚本精灵\"并开启服务。\n您也可以稍后在侧拉菜单中设置。</string>
<string name="explain_accessibility_permission">软件需要打开\"自动操作服务\"才能运行,请在随后的设置中选择\"AutoJs\"并开启服务。\n您也可以稍后在侧拉菜单中设置。</string>
<string name="text_cancel">取消</string>
<string name="text_path_is_empty">路径为空</string>
<string name="text_file_not_exists">文件不存在</string>
@@ -42,14 +42,14 @@
<string name="text_sample_simple_calculator">示例:简单计算器</string>
<string name="copyright">Copyright©2016 All right reserves.</string>
<string name="developer">星尘幻影</string>
<string name="qq">946994919</string>
<string name="qq">2732014414</string>
<string name="email">hybbbb1996@gmail.com</string>
<string name="github">软件源代码</string>
<string name="text_already_copy_to_clip">已复制到剪贴板</string>
<string name="donate_developer">打赏作者</string>
<string name="text_email">邮箱</string>
<string name="my_github">https://github.com/hyb1996/NoRootScriptDroid</string>
<string name="share_app">[免Root脚本精灵]下载地址http://www.coolapk.com/apk/com.stardust.scriptdroid </string>
<string name="share_app">[AutoJs]下载地址http://www.coolapk.com/apk/com.stardust.scriptdroid </string>
<string name="text_floating_window">悬浮窗</string>
<string name="text_assist_service_notification">通知栏点击区域辅助开关</string>
<string name="text_others">其他</string>
@@ -165,7 +165,7 @@
<string name="key_stop_record_trigger">key_stop_record_trigger</string>
<string name="text_current_activity">当前活动:</string>
<string name="text_current_package">当前应用包名:</string>
<string name="go_to_accessibility_settings"><![CDATA[请打开设置->无障碍服务->免Root脚本精灵并开启]]></string>
<string name="go_to_accessibility_settings"><![CDATA[请打开设置->无障碍服务->AutoJs并开启]]></string>
<string name="text_script_running">脚本运行</string>
<string name="key_use_volume_control_running">key_use_volume_control_running</string>
<string name="text_use_volume_to_stop_running">每次音量键变化停止所有脚本</string>
@@ -210,6 +210,10 @@
<string name="text_do_not_ask_again_for_this_version">此版本不再提示</string>
<string name="text_code_beautify">格式化代码</string>
<string name="text_processing">处理中</string>
<string name="text_already_reset">已重置</string>
<string name="text_guard_mode">保护模式</string>
<string name="summary_guard_mode">在本软件界面无法运行自动操作命令以免误触</string>
<string name="key_guard_mode">key_guard_mode</string>
<string-array name="record_control_keys">
<item></item>

View File

@@ -35,6 +35,12 @@
android:defaultValue="false"
android:key="@string/key_use_volume_control_running"
android:title="@string/text_use_volume_to_stop_running"/>
<com.stardust.theme.preference.ThemeColorSwitchPreference
android:defaultValue="false"
android:key="@string/key_guard_mode"
android:summary="@string/summary_guard_mode"
android:title="@string/text_guard_mode"/>
</com.stardust.theme.preference.ThemeColorPreferenceCategory>
<com.stardust.theme.preference.ThemeColorPreferenceCategory android:title="@string/text_edit">
@@ -60,26 +66,12 @@
<Preference android:title="@string/text_reset_background"/>
</com.stardust.theme.preference.ThemeColorPreferenceCategory>
<com.stardust.theme.preference.ThemeColorPreferenceCategory android:title="@string/text_advanced">
<com.afollestad.materialdialogs.prefs.MaterialListPreference
android:defaultValue="@string/key_single_thread"
android:entries="@array/run_mode_keys"
android:entryValues="@array/run_mode_values"
android:key="@string/key_run_mode"
android:summary="@string/summary_command_run_mode"
android:title="@string/text_command_run_mode"
/>
</com.stardust.theme.preference.ThemeColorPreferenceCategory>
<com.stardust.theme.preference.ThemeColorPreferenceCategory android:title="@string/text_about">
<Preference android:title="@string/text_check_update"/>
<Preference android:title="@string/text_issue_report"/>
<Preference android:title="@string/text_join_qq_group"/>
<Preference android:title="@string/text_about"/>
<Preference android:title="@string/text_licenses"/>