Explorar el Código

Add layout xml of PDF outline

cooperku_kdanmobile hace 5 años
padre
commit
2f34af5978

+ 7 - 0
reader/src/main/res/drawable/rectangle_0000.xml

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

+ 7 - 0
reader/src/main/res/drawable/rectangle_6633b5e5.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle" >
+
+    <solid android:color="#6633b5e5" />
+
+</shape>

+ 8 - 0
reader/src/main/res/drawable/selector_listview_item.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_6633b5e5" android:state_pressed="true"/>
+    <item android:drawable="@drawable/rectangle_6633b5e5" android:state_enabled="true" android:state_focused="true"/>
+    <item android:drawable="@drawable/rectangle_0000"/>
+
+</selector>

+ 45 - 0
reader/src/main/res/layout/outline_entry.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingLeft="4dp"
+    android:paddingRight="4dp">
+
+    <TextView
+        android:id="@+id/tv_outlineEntry_title"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_centerVertical="true"
+        android:layout_toLeftOf="@+id/tv_outlineEntry_page"
+        android:background="#0000"
+        android:ellipsize="end"
+        android:paddingTop="12dp"
+        android:paddingBottom="12dp"
+        android:maxLines="1"
+        android:minLines="1"
+        android:singleLine="true"
+        android:text="大纲选项内容"
+        android:textColor="#222"
+        android:textSize="10sp"/>
+
+    <TextView
+        android:id="@+id/tv_outlineEntry_page"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentRight="true"
+        android:layout_centerVertical="true"
+        android:gravity="center_vertical"
+        android:maxLines="1"
+        android:paddingLeft="5dp"
+        android:text="1"
+        android:textColor="#222"
+        android:textSize="8sp"/>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_alignParentBottom="true"
+        android:background="#1a000000"/>
+
+</RelativeLayout>

+ 34 - 0
reader/src/main/res/layout/view_outline.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/ll_viewPdfReaderOutline"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="#00000000"
+    android:gravity="center_horizontal"
+    android:orientation="vertical">
+
+    <TextView
+        android:id="@+id/textView1"
+        android:layout_width="wrap_content"
+        android:layout_height="30dp"
+        android:drawableLeft="@drawable/ic_pagelist_title_outine"
+        android:gravity="center_vertical"
+        android:text="@string/outline_title"
+        android:textColor="#afafaf"
+        android:textSize="12sp"/>
+
+    <View
+        android:layout_width="fill_parent"
+        android:layout_height="1dp"
+        android:background="#1a000000"/>
+
+    <ListView
+        android:id="@+id/lv_viewPdfReaderOutline_"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:divider="#0000"
+        android:dividerHeight="1px"
+        android:listSelector="@drawable/selector_listview_item"/>
+
+</LinearLayout>