new ui for script list

This commit is contained in:
hyb1996
2017-08-20 21:46:51 +08:00
parent 68de90b718
commit 5440788922
31 changed files with 783 additions and 337 deletions

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="32dp"/>
<size
android:width="64dp"
android:height="64dp"/>
<solid android:color="#5cab7d"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

View File

@@ -16,8 +16,7 @@
android:id="@+id/app_bar_bg"
android:layout_width="match_parent"
android:layout_height="128.5dp"
android:scaleType="fitXY"
android:src="@drawable/toolbar_bg"/>
android:scaleType="fitXY"/>
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"

View File

@@ -1,24 +1,11 @@
<?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">
<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.stardust.scriptdroid.ui.main.script_list.ScriptListWithProgressBarView
android:id="@+id/script_list"
<android.support.v7.widget.RecyclerView
android:id="@+id/script_file_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f2f3f5"/>
<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"
android:visibility="gone"/>
</FrameLayout>
android:layout_height="wrap_content"/>
</android.support.v4.widget.SwipeRefreshLayout>

View File

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

View File

@@ -0,0 +1,56 @@
<?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:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="?selectableItemBackground"
android:clickable="true"
android:orientation="horizontal"
android:paddingBottom="8dp"
android:paddingTop="8dp">
<ImageView
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:src="@drawable/ic_expanded"
android:tint="#828384"/>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/text_directory"
android:textColor="#828384"
android:textSize="12sp"/>
</LinearLayout>
<ImageView
android:layout_width="32dp"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:padding="9dp"
android:src="@drawable/ic_descending_order"
android:tint="#828384"/>
<ImageView
android:layout_width="32dp"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:padding="9dp"
android:src="@drawable/ic_sort"
android:tint="#828384"/>
</LinearLayout>

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView 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:id="@+id/item"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:foreground="?selectableItemBackground"
android:paddingLeft="6dp"
android:paddingRight="6dp"
app:cardBackgroundColor="#ffffff"
app:cardElevation="1dp"
app:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingBottom="16dp"
android:paddingTop="16dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:src="@drawable/ic_folder_yellow_100px"
android:tint="#ffde69"/>
<TextView
android:id="@+id/name"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="1"
android:paddingRight="16dp"
android:textColor="#484C4F"
android:textSize="14sp"
tools:text="正在运行的服务"/>
<ImageView
android:layout_width="52dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:src="@drawable/ic_more_vert_black_24dp"
android:tint="#A9AAAB"/>
</LinearLayout>
</android.support.v7.widget.CardView>

View File

@@ -0,0 +1,119 @@
<?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">
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="#EDEEEF"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
android:clickable="true"
android:foreground="?selectableItemBackground"
android:orientation="horizontal"
android:padding="8dp">
<TextView
android:id="@+id/first_char"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center_vertical"
android:layout_marginLeft="8dp"
android:background="@drawable/circle_green"
android:gravity="center"
android:textColor="@android:color/white"
android:textSize="24sp"
tools:text="J"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="16dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="1"
android:textColor="#484C4F"
android:textSize="14sp"
tools:text="正在运行的服务"/>
<TextView
android:id="@+id/desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginTop="4dp"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="1"
android:text="2017年2月3日11:56"
android:textColor="#9DA0A2"
android:textSize="11sp"
tools:text="正在运行的服务"/>
</LinearLayout>
<LinearLayout
android:layout_width="108dp"
android:layout_height="34dp"
android:layout_gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:id="@+id/run"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:src="@drawable/ic_run_gray"
android:tint="#A9AAAB"/>
<ImageView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:src="@drawable/ic_mode_edit_black_24dp"
android:tint="#A9AAAB"/>
<ImageView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:paddingBottom="8dp"
android:paddingTop="8dp"
android:src="@drawable/ic_more_vert_black_24dp"
android:tint="#A9AAAB"/>
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="#EDEEEF"/>
</LinearLayout>

View File

@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/text_directory"
android:textColor="#828384"
android:textSize="12sp"/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/directory_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="6dp"
android:paddingRight="6dp"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/text_file"
android:textColor="#828384"
android:textSize="12sp"/>
</LinearLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/script_file_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
</ScrollView>

View File

@@ -227,6 +227,8 @@
<string name="key_enable_observe_key">key_enable_observe_key</string>
<string name="summary_enable_observe_key">不启动则无法使用events的按键事件; 启用后软件崩溃等情况会造成按键失灵。重启无障碍服务生效</string>
<string name="text_enable_observe_key">启用按键监听</string>
<string name="text_directory">文件夹</string>
<string name="text_file">文件</string>
<string-array name="record_control_keys">