Add: Sample Script Tab, EMCAScript Guide

This commit is contained in:
hyb1996
2017-03-14 16:59:45 +08:00
parent e81b661974
commit 85affed538
129 changed files with 7046 additions and 297 deletions

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@android:color/white"/>
<item
android:bottom="214dp"
android:drawable="@drawable/ic_android_eat_js"
android:gravity="center"
android:left="100dp"
android:right="100dp"
android:tileMode="repeat"
android:top="214dp">
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

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">
<com.stardust.theme.widget.ThemeColorToolbar
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>
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="@android:color/secondary_text_light"/>
</LinearLayout>

View File

@@ -10,19 +10,21 @@
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="128.5dp"
android:background="@drawable/toolbar_bg"
android:paddingTop="24dp"
android:theme="@style/AppTheme.AppBarOverlay">
<com.stardust.theme.widget.ThemeColorToolbar
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:onClick="OnAppBarClick"
android:title="@string/_app_name"
app:popupTheme="@style/AppTheme.PopupOverlay">
@@ -35,7 +37,16 @@
android:padding="12dp"
android:src="@drawable/ic_add_white_48dp"/>
</com.stardust.theme.widget.ThemeColorToolbar>
</android.support.v7.widget.Toolbar>
<android.support.design.widget.TabLayout
android:id="@+id/tab"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabGravity="fill"
app:tabIndicatorColor="#E91E63"
app:tabMode="fixed"
app:tabTextColor="@android:color/primary_text_dark"/>
</android.support.design.widget.AppBarLayout>

View File

@@ -10,10 +10,11 @@
tools:context="com.stardust.scriptdroid.ui.main.MainActivity"
tools:showIn="@layout/activity_main">
<com.stardust.scriptdroid.ui.main.ScriptListRecyclerView
android:id="@+id/script_list"
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</RelativeLayout>

View File

@@ -20,7 +20,7 @@
android:layout_height="match_parent"
android:clickable="true"
android:scaleType="fitXY"
android:src="@drawable/slide_menu_img_200px"/>
android:src="@drawable/side_menu_bg"/>
<TextView
android:id="@+id/version"

View File

@@ -34,4 +34,19 @@
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#c4c4c4"/>
<TextView
android:id="@+id/stop_all_running_scripts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:padding="16dp"
android:text="@string/text_close_all_running_scripts"
android:textColor="@android:color/primary_text_dark"
android:textSize="16sp"/>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#c4c4c4"/>
</LinearLayout>

View File

@@ -0,0 +1,21 @@
<?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"
android:orientation="vertical">
<com.stardust.scriptdroid.ui.main.my_script_list.ScriptListRecyclerView
android:id="@+id/script_list"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<TextView
android:id="@+id/hint_no_script"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/hint_no_script"
android:textColor="#adadad"
android:textSize="16sp"/>
</FrameLayout>

View File

@@ -0,0 +1,13 @@
<?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"
android:orientation="vertical">
<com.stardust.scriptdroid.ui.main.sample_list.SampleScriptListRecyclerView
android:id="@+id/script_list"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</FrameLayout>

View File

@@ -6,7 +6,7 @@
android:layout_height="32dp"
android:padding="5dp">
<com.stardust.scriptdroid.layout_inspector.view.LevelBeamView
<com.stardust.widget.LevelBeamView
android:id="@+id/dataItemLevelBeam"
android:layout_width="wrap_content"
android:layout_height="32dp"/>

View File

@@ -0,0 +1,24 @@
<?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:background="?selectableItemBackground"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="16dp">
<com.stardust.widget.LevelBeamView
android:id="@+id/level"
android:layout_width="wrap_content"
android:layout_height="match_parent"/>
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:textColor="@android:color/primary_text_light"
android:textSize="16sp"
tools:text="示例文件"/>
</LinearLayout>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="56dp"
android:gravity="center_vertical"
android:background="?selectableItemBackground"
android:orientation="horizontal"
android:padding="16dp">
<com.stardust.widget.LevelBeamView
android:id="@+id/level"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"/>
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_toRightOf="@id/level"
android:textColor="@android:color/primary_text_light"
android:textSize="16sp"
tools:text="示例文件"/>
</RelativeLayout>

View File

@@ -54,12 +54,6 @@
<url>https://github.com/HeinrichReimer/android-issue-reporter</url>
<license>Apache Software License 2.0</license>
</notice>
<notice>
<name>Floaties</name>
<copyright/>
<url>https://github.com/ericbhatti/floaties</url>
<license>Apache Software License 2.0</license>
</notice>
<notice>
<name>SortableTableView</name>
<copyright>Copyright 2015 Ingo Schwarz</copyright>
@@ -78,4 +72,22 @@
<url>https://github.com/open-rnd/android-multi-level-listview</url>
<license>Apache Software License 2.0</license>
</notice>
<notice>
<name>hover</name>
<copyright>2016 (C) Copyright Open-RnD Sp. z o.o.</copyright>
<url>https://github.com/open-rnd/android-multi-level-listview</url>
<license>Apache Software License 2.0</license>
</notice>
<notice>
<name>event-bus</name>
<copyright>2016 (C) Copyright Open-RnD Sp. z o.o.</copyright>
<url>https://github.com/open-rnd/android-multi-level-listview</url>
<license>Apache Software License 2.0</license>
</notice>
<notice>
<name>Expandable RecyclerView</name>
<copyright>Copyright (c) 2014 Big Nerd Ranch</copyright>
<url>https://github.com/bignerdranch/expandable-recycler-view</url>
<license>MIT License</license>
</notice>
</notices>

View File

@@ -6,4 +6,12 @@
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
<style name="AppTheme.FullScreen" parent="AppTheme">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
</resources>

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#8ea22a</color>
<color name="colorPrimaryDark">#5e6b1e</color>
<color name="colorAccent">#8ea22a</color>
<color name="colorPrimary">#009688</color>
<color name="colorPrimaryOld">#8ea22a</color>
<color name="colorPrimaryDark">#00796B</color>
<color name="colorAccent">#FF4081</color>
<color name="sliding_up_panel_shadow_color">#99444444</color>
</resources>

View File

@@ -142,4 +142,9 @@
<string name="text_layout_hierarchy">布局层次分析</string>
<string name="text_layout_bounds">布局范围查看</string>
<string name="text_no_accessibility_permission_to_capture">无障碍服务未启动</string>
<string name="text_sample_script">示例脚本</string>
<string name="text_my_script">我的脚本</string>
<string name="hint_no_script">点击右上角新建第一个脚本吧~(。・・)</string>
<string name="text_reset_background">重置背景图片设置</string>
<string name="text_restart_app_to_apply">重启软件生效</string>
</resources>

View File

@@ -8,6 +8,26 @@
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.FullScreen" parent="AppTheme">
<!-- Customize your theme here. -->
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
</style>
<style name="AppTheme.Splash" parent="AppTheme">
<!-- Customize your theme here. -->
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowBackground">@drawable/background_splash</item>
</style>
<style name="MainToolbarTheme" parent="AppTheme">
<item name="android:textColorSecondary">#c4c4c4</item>
</style>
<style name="IssueReportTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="cardBackgroundColor">#FFFFFF</item>
<item name="colorButtonNormal">?colorAccent</item>

View File

@@ -30,11 +30,7 @@
<com.stardust.theme.preference.ThemeColorPreferenceCategory android:title="@string/text_appearance">
<Preference android:title="@string/text_theme_color"/>
</com.stardust.theme.preference.ThemeColorPreferenceCategory>
<com.stardust.theme.preference.ThemeColorPreferenceCategory android:title="@string/text_others">
<Preference android:title="@string/text_re_import_samples"/>
<Preference android:title="@string/text_reset_background"/>
</com.stardust.theme.preference.ThemeColorPreferenceCategory>
<com.stardust.theme.preference.ThemeColorPreferenceCategory android:title="@string/text_about">