feat: java class searching and import; fix: editor crash on edit when file is too large

This commit is contained in:
hyb1996
2018-09-15 11:52:44 +08:00
parent fc0f5c479e
commit 02c64cd7b1
23 changed files with 697 additions and 30 deletions

View File

@@ -0,0 +1,35 @@
<?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.design.widget.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/keywords"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/text_class_or_package_name"/>
</android.support.design.widget.TextInputLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/result_list"
android:layout_width="match_parent"
android:layout_height="400dp"/>
<me.zhanghai.android.materialprogressbar.MaterialProgressBar
android:id="@+id/progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"/>
</FrameLayout>
</LinearLayout>

View File

@@ -0,0 +1,21 @@
<?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"
android:paddingBottom="10dp"
android:background="?selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:paddingLeft="6dp"
android:paddingRight="6dp"
android:paddingTop="10dp">
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="#B2B3B7"
android:textSize="15sp"/>
</LinearLayout>

View File

@@ -119,6 +119,12 @@
android:id="@+id/action_console"
android:title="@string/text_console"
app:showAsAction="never"/>
<item
android:id="@+id/action_import_java_class"
android:title="@string/text_search_java_class"
app:showAsAction="never"/>
<item
android:id="@+id/action_info"
android:title="@string/text_info"

View File

@@ -383,4 +383,8 @@
<string name="error_connect_to_remote">连接失败: %s</string>
<string name="text_are_you_sure_to_delete">确定要删除%s吗</string>
<string name="text_run_on_boot">开机时运行</string>
<string name="text_search_java_class">搜索Java包/类</string>
<string name="text_class_or_package_name">类/包名</string>
<string name="text_view_docs">查看文档</string>
<string name="text_en_import">import</string>
</resources>