add: about page, settings, notification switch

This commit is contained in:
hyb1996
2017-02-03 10:41:23 +08:00
parent 636ce6d889
commit 5640b47663
47 changed files with 1392 additions and 307 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 B

View File

@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.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">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f9f9f9"
android:fitsSystemWindows="true"
android:orientation="vertical">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay"
app:title="@string/text_about"/>
</android.support.design.widget.AppBarLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/icon_container"
android:layout_width="match_parent"
android:layout_height="200dp"
android:background="@android:color/white"
android:clickable="true"
android:foreground="?selectableItemBackgroundBorderless">
<ImageView
android:id="@+id/icon"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_centerInParent="true"
android:src="@drawable/script_droid"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/icon"
android:layout_centerHorizontal="true"
android:layout_marginTop="16dp"
android:gravity="center"
android:text="@string/version"
android:textColor="#777777"
android:textSize="14sp"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/activity_about_items"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="center"
android:text="@string/copyright"
android:textColor="#777777"
android:textSize="14sp"/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/share"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:clickable="true"
android:src="@drawable/ic_share_white_48dp"
app:layout_anchor="@id/icon_container"
app:layout_anchorGravity="bottom|right|end"/>
</android.support.design.widget.CoordinatorLayout>

View File

@@ -0,0 +1,143 @@
<?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="wrap_content"
android:layout_marginTop="12dp"
android:background="@android:color/white"
android:orientation="vertical">
<LinearLayout
android:id="@+id/developer"
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="?selectableItemBackground"
android:clickable="true"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="16dp">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginRight="16dp"
android:src="@drawable/ic_developer_512"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/developer"
android:textColor="@android:color/secondary_text_light"
android:textSize="16sp"/>
</LinearLayout>
<include layout="@layout/divider"/>
<LinearLayout
android:id="@+id/github"
android:layout_width="match_parent"
android:layout_height="52dp"
android:clickable="true"
android:foreground="?selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="16dp">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginRight="16dp"
android:src="@drawable/ic_github_mark"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/github"
android:textColor="@android:color/secondary_text_light"
android:textIsSelectable="true"
android:textSize="16sp"/>
</LinearLayout>
<include layout="@layout/divider"/>
<LinearLayout
android:id="@+id/email"
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="?selectableItemBackground"
android:clickable="true"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="16dp">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginRight="16dp"
android:src="@drawable/ic_email_black_48dp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/email"
android:textColor="@android:color/secondary_text_light"
android:textIsSelectable="true"
android:textSize="16sp"/>
</LinearLayout>
<include layout="@layout/divider"/>
<LinearLayout
android:id="@+id/qq"
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="?selectableItemBackground"
android:clickable="true"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="16dp">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginRight="16dp"
android:src="@drawable/ic_qq_black"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/qq"
android:textColor="@android:color/secondary_text_light"
android:textIsSelectable="true"
android:textSize="16sp"/>
</LinearLayout>
<include layout="@layout/divider"/>
<LinearLayout
android:id="@+id/donate"
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="?selectableItemBackground"
android:clickable="true"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="16dp">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginRight="16dp"
android:src="@drawable/ic_money_black"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/donate_developer"
android:textColor="@android:color/secondary_text_light"
android:textSize="16sp"/>
</LinearLayout>
<include layout="@layout/divider"/>
</LinearLayout>

View File

@@ -0,0 +1,23 @@
<?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">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay">
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
</LinearLayout>

View File

@@ -0,0 +1,28 @@
<?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:fitsSystemWindows="true"
android:orientation="vertical">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay"/>
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/fragment_setting"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<View xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#e4e4e4"
android:paddingEnd="16dp"
android:paddingStart="16dp"/>

View File

@@ -5,6 +5,28 @@
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/syntax_and_api"
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="?selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_margin="16dp"
android:src="@drawable/ic_js"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/text_syntax_and_api"
android:textColor="@android:color/primary_text_light"/>
</LinearLayout>
<RelativeLayout
android:id="@+id/auto_operate_service"
android:layout_width="match_parent"
@@ -39,27 +61,71 @@
</RelativeLayout>
<LinearLayout
android:id="@+id/syntax_and_api"
<RelativeLayout
android:id="@+id/assist_service"
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="?selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal">
android:gravity="center_vertical">
<ImageView
android:id="@+id/icon_assist_service"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentLeft="true"
android:layout_margin="16dp"
android:src="@drawable/ic_js"/>
android:src="@drawable/ic_service_green"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_toRightOf="@id/icon_assist_service"
android:gravity="center"
android:text="@string/text_syntax_and_api"
android:text="@string/text_assist_service"
android:textColor="@android:color/primary_text_light"/>
</LinearLayout>
<android.support.v7.widget.SwitchCompat
android:id="@+id/sw_assist_service"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginRight="16dp"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/assist_service_notification"
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="?selectableItemBackground"
android:gravity="center_vertical">
<ImageView
android:id="@+id/icon_assist_service_notification"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentLeft="true"
android:layout_margin="16dp"
android:src="@drawable/ic_notifications_green_48dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_toRightOf="@id/icon_assist_service_notification"
android:gravity="center"
android:text="@string/text_assist_service_notification"
android:textColor="@android:color/primary_text_light"/>
<android.support.v7.widget.SwitchCompat
android:id="@+id/sw_assist_service_notification"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginRight="16dp"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/stop_all_running_scripts"
@@ -83,47 +149,4 @@
android:textColor="@android:color/primary_text_light"/>
</LinearLayout>
<LinearLayout
android:id="@+id/about_app"
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="?selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_margin="16dp"
android:src="@drawable/ic_about_us_green_100px"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/text_about"
android:textColor="@android:color/primary_text_light"/>
</LinearLayout>
<LinearLayout
android:id="@+id/licenses"
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="?selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_margin="16dp"
android:src="@drawable/ic_license_green"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/text_licenses"
android:textColor="@android:color/primary_text_light"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>

View File

@@ -12,4 +12,23 @@
<copyright>Copyright 2008 Google Inc.</copyright>
<license>Apache Software License 2.0</license>
</notice>
<notice>
<name>DuktapeJava</name>
<url>https://github.com/gubaojian/DuktapeJava</url>
<copyright/>
<license>MIT License</license>
</notice>
<notice>
<name>920 Text Editor</name>
<url>https://github.com/jecelyin/920-text-editor-v2</url>
<copyright/>
<license>Apache Software License 2.0</license>
</notice>
<notice>
<name>MarkDown</name>
<url>https://github.com/zzhoujay/Markdown</url>
<copyright>Copyright (c) 2015 zzhoujay</copyright>
<license>MIT License</license>
</notice>
</notices>

View File

@@ -1,5 +1,6 @@
<resources>
<string name="app_name">免Root脚本机器人</string>
<string name="version">Version 1.17.0202</string>
<string name="action_settings">设置</string>
<string name="action_disable_service">关闭服务</string>
<string name="text_accessibility_service_description">使脚本自动操作(点击、长按、滑动等)所需,若关闭则只能执行不涉及自动操作的脚本。</string>
@@ -32,7 +33,6 @@
<string name="text_setting">设置</string>
<string name="text_exit">退出</string>
<string name="text_auto_operate_service">自动操作服务</string>
<string name="version">Version 1.17.0130</string>
<string name="text_syntax_and_api">语法与API</string>
<string name="text_close_all_running_scripts">关闭所有正在运行的脚本</string>
<string name="text_about">关于</string>
@@ -41,4 +41,23 @@
<string name="text_sample_open_what_moment">示例:打开朋友圈</string>
<string name="text_sample_open_running_services">示例:打开正在运行的服务(安卓6.0+)</string>
<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="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脚本机器人]下载地址https://github.com/hyb1996/NoRootScriptDroid/releases</string>
<string name="text_assist_service">脚本辅助服务</string>
<string name="text_assist_serivce_notification">通知栏显示脚本辅助开关</string>
<string name="text_assist_service_notification">通知栏显示脚本辅助开关</string>
<string name="text_others">其他</string>
<string name="text_assist_mode_enabled">脚本辅助已开启(点击关闭)</string>
<string name="text_assist_mode_disabled">脚本辅助已关闭(点击开启)</string>
<string name="text_error_report">错误报告</string>
<string name="text_sample_hello_big_sister">大姐姐好</string>
<string name="text_press_again_to_exit">再按一次退出程序</string>
</resources>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="@string/text_about">
<Preference
android:title="@string/text_about"/>
<Preference
android:title="@string/text_licenses"/>
</PreferenceCategory>
</PreferenceScreen>