i don't know what I did

This commit is contained in:
hyb1996
2017-09-11 13:42:07 +08:00
parent 56920cd707
commit a64a92276c
34 changed files with 499 additions and 408 deletions

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:left="12dp">
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size
android:width="100dp"
android:height="0.9dp"/>
<solid android:color="#f3f5f9"/>
</shape>
</item>
</layer-list>

View File

@@ -53,99 +53,6 @@
app:layout_anchorGravity="bottom|right|end"
app:layout_behavior="com.stardust.widget.ScrollAwareFABBehavior"/>
<com.stardust.widget.SlidingUpPanel
android:id="@+id/bottom_menu"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="160dp"
android:background="@android:color/white"
android:baselineAligned="false"
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/create_new_file"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:orientation="vertical">
<com.stardust.theme.widget.ThemeColorImageViewCompat
android:layout_width="60dp"
android:layout_height="60dp"
android:padding="10dp"
android:src="@drawable/ic_add_file"/>
<com.stardust.theme.widget.ThemeColorTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/text_new_file"
android:textColor="@color/colorPrimary"
android:textSize="16sp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/create_new_directory"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:orientation="vertical">
<com.stardust.theme.widget.ThemeColorImageViewCompat
android:layout_width="60dp"
android:layout_height="60dp"
android:padding="10dp"
android:src="@drawable/ic_new_directory"/>
<com.stardust.theme.widget.ThemeColorTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/text_new_directory"
android:textColor="@color/colorPrimary"
android:textSize="16sp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/import_from_file"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?attr/selectableItemBackgroundBorderless"
android:gravity="center"
android:orientation="vertical">
<com.stardust.theme.widget.ThemeColorImageViewCompat
android:layout_width="60dp"
android:layout_height="60dp"
android:padding="10dp"
android:src="@drawable/ic_import"/>
<com.stardust.theme.widget.ThemeColorTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/text_import_from_file"
android:textColor="@color/colorPrimary"
android:textSize="16sp"/>
</LinearLayout>
</LinearLayout>
</com.stardust.widget.SlidingUpPanel>
</android.support.design.widget.CoordinatorLayout>

View File

@@ -24,7 +24,7 @@
</com.stardust.theme.widget.ThemeColorToolbar>
</android.support.design.widget.AppBarLayout>
<com.stardust.scriptdroid.ui.main.script_list.ScriptListWithProgressBarView
<com.stardust.scriptdroid.ui.main.scripts.ScriptListWithProgressBarView
android:id="@+id/script_list"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:fitsSystemWindows="true"
android:orientation="vertical">
@@ -24,5 +25,6 @@
<FrameLayout
android:id="@+id/fragment_setting"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent"
android:background="@android:color/white"/>
</LinearLayout>

View File

@@ -49,7 +49,7 @@
android:textSize="16sp"/>
</LinearLayout>
<com.stardust.scriptdroid.ui.main.script_list.ScriptListWithProgressBarView
<com.stardust.scriptdroid.ui.main.scripts.ScriptListWithProgressBarView
android:id="@+id/script_list"
android:layout_width="match_parent"
android:layout_height="match_parent"

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<com.stardust.widget.EWebView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/eweb_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

View File

@@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.stardust.scriptdroid.ui.main.script_list.ScriptListView
<com.stardust.scriptdroid.ui.main.scripts.ScriptListView
android:id="@+id/script_file_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

View File

@@ -0,0 +1,19 @@
<?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="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+android:id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingBottom="8dp"
android:paddingLeft="12dp"
android:paddingTop="8dp"
android:textColor="?attr/colorPrimary"
android:textSize="13sp"
tools:text="目录"/>
</LinearLayout>

View File

@@ -0,0 +1,70 @@
<?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="wrap_content"
android:baselineAligned="false"
android:gravity="center_vertical"
android:minHeight="52dp"
android:orientation="horizontal"
android:paddingEnd="?android:attr/scrollbarSize"
android:paddingRight="?android:attr/scrollbarSize"
tools:ignore="RtlSymmetry,UnusedAttribute">
<ImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/md_preference_content_inset"
android:layout_marginStart="@dimen/md_preference_content_inset"
tools:ignore="ContentDescription"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="left|start|center_vertical"
android:layout_marginBottom="12dip"
android:layout_marginEnd="6dip"
android:layout_marginLeft="12dp"
android:layout_marginRight="6dip"
android:layout_marginStart="12dp"
android:layout_marginTop="12dip"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@android:id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
android:fontFamily="sans-serif"
android:maxLines="1"
android:textColor="?android:textColorPrimary"
android:textSize="15sp"
tools:text="Title"/>
<TextView
android:id="@android:id/summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:fontFamily="sans-serif"
android:maxLines="4"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
tools:text=""/>
</LinearLayout>
<!-- Preference should place its actual preference widget here. -->
<LinearLayout
android:id="@android:id/widget_frame"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end|right|center_vertical"
android:gravity="center_vertical"
android:orientation="vertical"/>
</LinearLayout>

View File

@@ -8,7 +8,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.stardust.scriptdroid.ui.main.script_list.ScriptListRecyclerView
<com.stardust.scriptdroid.ui.main.scripts.ScriptListRecyclerView
android:id="@+id/script_list_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

View File

@@ -67,16 +67,15 @@
</LinearLayout>
<LinearLayout
android:layout_width="108dp"
android:layout_width="wrap_content"
android:layout_height="34dp"
android:layout_gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/run"
android:layout_width="0dp"
android:layout_width="34dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:paddingBottom="8dp"
@@ -86,9 +85,8 @@
<ImageView
android:id="@+id/edit"
android:layout_width="0dp"
android:layout_width="34dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:paddingBottom="8dp"
@@ -98,9 +96,8 @@
<ImageView
android:id="@+id/more"
android:layout_width="0dp"
android:layout_width="24dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:paddingBottom="8dp"

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/rename"
android:title="@string/text_rename"/>
<item
android:id="@+id/delete"
android:title="@string/text_delete"/>
</menu>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/run_repeatedly"
android:title="@string/text_run_repeatedly"/>
<item
android:id="@+id/rename"
android:title="@string/text_rename"/>
<item
android:id="@+id/delete"
android:title="@string/text_delete"/>
<item
android:id="@+id/create_shortcut"
android:title="@string/text_send_shortcut"/>
<item
android:id="@+id/open_by_other_apps"
android:title="@string/text_open_by_other_apps"/>
</menu>

View File

@@ -7,4 +7,6 @@
<color name="bubble_bg">#eef2f3f9</color>
<color name="color_r">#FD999A</color>
<color name="color_j">#99CC99</color>
<color name="prefTextColorSecondary">#9DA0A2</color>
<color name="prefTextColorPrimary">#282C2F</color>
</resources>

View File

@@ -20,6 +20,14 @@
<item name="windowActionBar">false</item>
</style>
<style name="AppTheme.Settings" parent="AppTheme">
<item name="android:dividerHeight">6dp</item>
<item name="android:listDivider">@drawable/pref_divider</item>
<item name="android:textColorPrimary">@color/prefTextColorPrimary</item>
<item name="android:textColorSecondary">@color/prefTextColorSecondary</item>
</style>
<style name="AppTheme.Transparent" parent="AppTheme">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>

View File

@@ -1,22 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:widgetLayout="@layout/preference_custom">
<com.stardust.theme.preference.ThemeColorPreferenceCategory
android:layout="@layout/preference_category_custom"
android:title="@string/text_script_record"
android:widgetLayout="@layout/preference_custom">
<com.stardust.theme.preference.ThemeColorPreferenceCategory android:title="@string/text_script_record">
<com.stardust.theme.preference.ThemeColorSwitchPreference
android:defaultValue="false"
android:key="@string/key_use_volume_control_record"
android:layout="@layout/preference_custom"
android:summary="@string/summary_use_volume_control_record"
android:title="@string/text_use_volume_control_record"/>
<com.stardust.theme.preference.ThemeColorSwitchPreference
android:defaultValue="false"
android:key="@string/key_record_with_root"
android:layout="@layout/preference_custom"
android:title="@string/text_record_with_root"/>
<com.stardust.theme.preference.ThemeColorSwitchPreference
android:defaultValue="true"
android:key="@string/key_record_toast"
android:layout="@layout/preference_custom"
android:title="@string/text_record_msg"/>
<com.afollestad.materialdialogs.prefs.MaterialListPreference
@@ -24,76 +32,119 @@
android:entries="@array/root_record_out_file_type_keys"
android:entryValues="@array/root_record_out_file_type_values"
android:key="@string/key_root_record_out_file_type"
android:layout="@layout/preference_custom"
android:title="@string/text_root_record_out_file_type"
/>
</com.stardust.theme.preference.ThemeColorPreferenceCategory>
<com.stardust.theme.preference.ThemeColorPreferenceCategory android:title="@string/text_script_running">
<com.stardust.theme.preference.ThemeColorPreferenceCategory
android:layout="@layout/preference_category_custom"
android:title="@string/text_script_running">
<com.stardust.theme.preference.ThemeColorSwitchPreference
android:defaultValue="false"
android:key="@string/key_use_volume_control_running"
android:layout="@layout/preference_custom"
android:title="@string/text_use_volume_to_stop_running"/>
<com.stardust.theme.preference.ThemeColorSwitchPreference
android:defaultValue="false"
android:key="@string/key_guard_mode"
android:layout="@layout/preference_custom"
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">
<com.stardust.theme.preference.ThemeColorPreferenceCategory
android:layout="@layout/preference_category_custom"
android:title="@string/text_edit">
<com.afollestad.materialdialogs.prefs.MaterialEditTextPreference
android:defaultValue="2000"
android:inputType="number"
android:key="@string/key_max_length_for_code_completion"
android:layout="@layout/preference_custom"
android:title="@string/text_max_length_for_code_completion"/>
</com.stardust.theme.preference.ThemeColorPreferenceCategory>
<com.stardust.theme.preference.ThemeColorPreferenceCategory android:title="@string/text_accessibility_service">
<com.stardust.theme.preference.ThemeColorPreferenceCategory
android:layout="@layout/preference_category_custom"
android:title="@string/text_accessibility_service">
<com.stardust.theme.preference.ThemeColorSwitchPreference
android:defaultValue="false"
android:key="@string/key_enable_accessibility_service_by_root"
android:layout="@layout/preference_custom"
android:summary="@string/summary_enable_accessibility_service_by_root"
android:title="@string/text_enable_accessibility_service_by_root"/>
<com.stardust.theme.preference.ThemeColorSwitchPreference
android:defaultValue="false"
android:key="@string/key_stable_mode"
android:layout="@layout/preference_custom"
android:summary="@string/summary_stable_mode"
android:title="@string/text_stable_mode"/>
</com.stardust.theme.preference.ThemeColorPreferenceCategory>
<com.stardust.theme.preference.ThemeColorPreferenceCategory android:title="@string/text_appearance">
<Preference android:title="@string/text_theme_color"/>
<Preference android:title="@string/text_reset_background"/>
<com.stardust.theme.preference.ThemeColorPreferenceCategory
android:layout="@layout/preference_category_custom"
android:title="@string/text_appearance">
<Preference
android:layout="@layout/preference_custom"
android:title="@string/text_theme_color"
/>
<Preference
android:layout="@layout/preference_custom"
android:title="@string/text_reset_background"
/>
</com.stardust.theme.preference.ThemeColorPreferenceCategory>
<com.stardust.theme.preference.ThemeColorPreferenceCategory android:title="@string/text_ad">
<Preference android:title="@string/show_ad"/>
<com.stardust.theme.preference.ThemeColorPreferenceCategory
android:layout="@layout/preference_category_custom"
android:title="@string/text_ad">
<Preference
android:layout="@layout/preference_custom"
android:title="@string/show_ad"
/>
<com.afollestad.materialdialogs.prefs.MaterialListPreference
android:defaultValue="@string/text_default"
android:entries="@array/ad_showing_mode_keys"
android:entryValues="@array/ad_showing_mode_values"
android:key="@string/key_ad_showing_mode"
android:layout="@layout/preference_custom"
android:title="@string/text_ad_showing_settings"
/>
</com.stardust.theme.preference.ThemeColorPreferenceCategory>
<com.stardust.theme.preference.ThemeColorPreferenceCategory android:title="@string/text_about">
<com.stardust.theme.preference.ThemeColorPreferenceCategory
android:layout="@layout/preference_category_custom"
android:title="@string/text_about">
<Preference android:title="@string/text_check_for_updates"/>
<Preference
android:layout="@layout/preference_custom"
android:title="@string/text_check_for_updates"
/>
<Preference android:title="@string/text_join_qq_group"/>
<Preference
android:layout="@layout/preference_custom"
android:title="@string/text_join_qq_group"
/>
<Preference android:title="@string/text_issue_report"/>
<Preference
android:layout="@layout/preference_custom"
android:title="@string/text_issue_report"
/>
<Preference android:title="@string/text_about_me_and_repo"/>
<Preference
android:layout="@layout/preference_custom"
android:title="@string/text_about_me_and_repo"
/>
<Preference android:title="@string/text_licenses"/>
<Preference
android:layout="@layout/preference_custom"
android:title="@string/text_licenses"
/>
</com.stardust.theme.preference.ThemeColorPreferenceCategory>
</PreferenceScreen>