add: simple code generation

This commit is contained in:
hyb1996
2017-11-06 23:45:36 +08:00
parent 0b884f5747
commit 7c1decdc04
18 changed files with 822 additions and 40 deletions

View File

@@ -0,0 +1,7 @@
<?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="match_parent"
android:orientation="vertical">
</LinearLayout>

View File

@@ -0,0 +1,11 @@
<?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="match_parent"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/options"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>

View File

@@ -0,0 +1,22 @@
<?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:background="?selectableItemBackground"
android:orientation="horizontal"
android:padding="16dp">
<com.stardust.scriptdroid.ui.widget.CheckBoxCompat
android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="12dp"
android:textColor="#99000000"
android:textSize="16sp"/>
</LinearLayout>

View File

@@ -0,0 +1,24 @@
<?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:background="?selectableItemBackground"
android:orientation="horizontal"
android:padding="8dp">
<ImageView
android:id="@+id/icon"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginRight="4dp"
android:src="@drawable/ic_arrow_drop_down_black_36dp"
android:tint="#424349"/>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:textColor="#424349"
android:textSize="13sp"/>
</LinearLayout>

View File

@@ -313,4 +313,22 @@
<string name="text_select_all">全选</string>
<string name="text_cut">剪切</string>
<string name="text_copy">复制</string>
<string name="text_generate_code">生成代码</string>
<string name="text_action">动作</string>
<string name="text_click">点击(click)</string>
<string name="text_long_click">长按(longClick)</string>
<string name="text_set_text">设置文本(setText)</string>
<string name="text_scroll_forward">向前/右/下滑动(scrollForward)</string>
<string name="text_scroll_backward">向后/上/左滑动(scrollBackward)</string>
<string name="text_find_one">直到找到一个(findOne)</string>
<string name="text_until_find">直到找到所有(untilFind)</string>
<string name="text_wait_for">等待控件出现(waitFor)</string>
<string name="text_selector_exists">判断控件存在(exists)</string>
<string name="text_options">选项</string>
<string name="text_using_id_selector">使用id选择</string>
<string name="text_using_text_selector">使用文本选择(text)</string>
<string name="text_using_desc_selector">使用描述选择(desc)</string>
<string name="text_generate_and_copy">生成并复制</string>
<string name="text_generate_and_open_editor">生成并打开编辑器</string>
<string name="text_generate_fail">生成失败了o(╥﹏╥)o</string>
</resources>