Sfoglia il codice sorgente

Add layout xml of PDF Thumbnail

cooperku_kdanmobile 5 anni fa
parent
commit
c0db5ce1b1

+ 11 - 0
reader/src/main/res/drawable/rectangle_stroke_1_d5d5d5_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="#d5d5d5" />
+
+    <solid android:color="#fff"/>
+    
+</shape>

+ 11 - 0
reader/src/main/res/drawable/rectangle_stroke_4dp_33b5e5_0000.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="4dp"
+        android:color="#33b5e5" />
+
+    <solid android:color="#0000"/>
+    
+</shape>

+ 36 - 0
reader/src/main/res/layout/item_thumbnail.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/id_reader_thumb_fl"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:layout_margin="12dp">
+
+    <ImageView
+        android:id="@+id/iv_fragmentPdfReaderThumbLvItem_"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@drawable/rectangle_stroke_1_d5d5d5_ffff"
+        android:padding="1px"
+        android:scaleType="fitCenter"/>
+
+    <TextView
+        android:id="@+id/tv_fragmentPdfReaderThumbLvItem_page"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="bottom"
+        android:background="#99cccccc"
+        android:gravity="center"
+        android:paddingBottom="6dp"
+        android:paddingTop="6dp"
+        android:text="1"
+        android:textColor="@color/black_87"
+        android:textSize="12sp"/>
+
+    <View
+        android:id="@+id/v_pdfThumbGvItem_"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@drawable/rectangle_stroke_4dp_33b5e5_0000"
+        android:visibility="gone"/>
+</FrameLayout>

+ 35 - 0
reader/src/main/res/layout/view_km_thumb_layout.xml

@@ -0,0 +1,35 @@
+<?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="match_parent">
+
+    <TextView
+        android:id="@+id/id_km_thumb_title"
+        android:layout_width="wrap_content"
+        android:layout_height="30dp"
+        android:layout_centerHorizontal="true"
+        android:drawableLeft="@drawable/ic_pagelist_title_thumbnail"
+        android:gravity="center_vertical"
+        android:text="thumbnail_title"
+        android:textColor="#afafaf"
+        android:textSize="12sp"/>
+
+    <View
+        android:id="@+id/id_km_thumb_divider"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_below="@+id/id_km_thumb_title"
+        android:background="#1a000000"/>
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/id_km_thumb_recycler"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_below="@+id/id_km_thumb_divider"
+        android:layout_centerHorizontal="true"
+        android:layout_margin="10dp"
+        android:cacheColorHint="@null"
+        android:fadeScrollbars="true"
+        android:scrollbars="vertical"/>
+</RelativeLayout>