소스 검색

Add layout xml of PDF search

cooperku_kdanmobile 5 년 전
부모
커밋
ba1f942c83

BIN
reader/src/main/res/drawable-hdpi/ic_textfield_search.png


BIN
reader/src/main/res/drawable-hdpi/icon_line.webp


BIN
reader/src/main/res/drawable-xhdpi/ic_textfield_search.png


BIN
reader/src/main/res/drawable-xhdpi/icon_line.webp


+ 11 - 0
reader/src/main/res/drawable/rectangle_stroke_1_aaa_ffff.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle" >
+
+    <stroke
+        android:width="1dp"
+        android:color="#aaa" />
+
+    <solid android:color="#fff"/>
+    
+</shape>

+ 8 - 0
reader/src/main/res/drawable/selector_edittext.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:drawable="@drawable/rectangle_stroke_1_d5d5d5_ffff" android:state_pressed="true"/>
+    <item android:drawable="@drawable/rectangle_stroke_1_d5d5d5_ffff" android:state_enabled="true" android:state_focused="true"/>
+    <item android:drawable="@drawable/rectangle_stroke_1_aaa_ffff"/>
+
+</selector>

+ 46 - 0
reader/src/main/res/layout/item_search.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical" >
+
+    <RelativeLayout
+        android:id="@+id/rl_fragmentPdfReaderSearchLvItem_"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:background="@drawable/rectangle_stroke_1_d5d5d5_ffff"
+        android:orientation="vertical" >
+
+        <TextView
+            android:id="@+id/tv_fragmentPdfReaderSearchLvItem_result"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_margin="2dp"
+            android:maxLines="3"
+            android:minLines="3"
+            android:gravity="center_vertical"
+            android:text="ni hao"
+            android:textColor="#222"
+            android:textSize="12sp" />
+
+        <TextView
+            android:id="@+id/tv_fragmentPdfReaderSearchLvItem_page"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/tv_fragmentPdfReaderSearchLvItem_result"
+            android:background="#ffd5d5d5"
+            android:gravity="center_horizontal"
+            android:text="1"
+            android:textColor="#222"
+            android:textSize="12sp" />
+
+        <View
+            android:id="@+id/view_fragmentPdfReaderSearchLvItem_selected"
+            android:layout_width="fill_parent"
+            android:layout_height="fill_parent"
+            android:layout_alignBottom="@id/tv_fragmentPdfReaderSearchLvItem_page" />
+    </RelativeLayout>
+
+</LinearLayout>

+ 89 - 0
reader/src/main/res/layout/view_search.xml

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="match_parent"
+    android:background="#00000000"
+    android:orientation="vertical" >
+
+    <LinearLayout
+        android:id="@+id/ll_fragmentPdfReaderSearch"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:orientation="vertical" >
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="30dp" >
+
+            <TextView
+                android:id="@+id/tv_fragmentPdfReaderSearch_text"
+                android:layout_width="0dp"
+                android:layout_height="fill_parent"
+                android:layout_weight="1"
+                android:gravity="center"
+                android:text="@string/fragment_search_text"
+                android:textColor="#33b5e5"
+                android:textSize="15sp" />
+
+            <TextView
+                android:id="@+id/tv_fragmentPdfReaderSearch_page"
+                android:layout_width="0dp"
+                android:layout_height="fill_parent"
+                android:layout_weight="1"
+                android:gravity="center"
+                android:text="@string/fragment_search_page"
+                android:textColor="#afafaf"
+                android:textSize="15sp" />
+        </LinearLayout>
+
+        <View
+            android:layout_width="fill_parent"
+            android:layout_height="1dp"
+            android:layout_marginBottom="2dp"
+            android:background="#1a000000" />
+
+        <EditText
+            android:id="@+id/et_fragmentPdfReaderSearch_"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_margin="5dp"
+            android:background="@drawable/selector_edittext"
+            android:drawableLeft="@drawable/ic_textfield_search"
+            android:hint="@string/fragment_search_enter_page"
+            android:imeOptions="actionSearch"
+            android:padding="4dp"
+            android:singleLine="true"
+            android:textColor="#222"
+            android:textCursorDrawable="@drawable/icon_line"
+            android:textSize="14sp" >
+
+            <requestFocus />
+        </EditText>
+
+        <View
+            android:layout_width="fill_parent"
+            android:layout_height="1dp"
+            android:background="#1a000000" />
+
+        <ListView
+            android:id="@+id/lv_fragmentPdfReaderSearch_"
+            android:layout_width="match_parent"
+            android:layout_height="fill_parent"
+            android:divider="#0000"
+            android:dividerHeight="0dp"
+            android:fadeScrollbars="false"
+            android:listSelector="#0000" >
+        </ListView>
+
+        <TextView
+            android:id="@+id/tv_fragmentPdfReaderSearch_tishi"
+            android:layout_width="fill_parent"
+            android:layout_height="fill_parent"
+            android:gravity="center"
+            android:text="@string/fileManager_no_results"
+            android:textColor="#444"
+            android:visibility="gone"
+            android:textSize="18sp" />
+    </LinearLayout>
+
+</LinearLayout>