diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..609aa00
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2bdab58
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+gen
+bin/*
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..1f3d24e
--- /dev/null
+++ b/.project
@@ -0,0 +1,33 @@
+
+
+ ZPagedHScrollTable
+
+
+
+
+
+ com.android.ide.eclipse.adt.ResourceManagerBuilder
+
+
+
+
+ com.android.ide.eclipse.adt.PreCompilerBuilder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ com.android.ide.eclipse.adt.ApkBuilder
+
+
+
+
+
+ com.android.ide.eclipse.adt.AndroidNature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
new file mode 100644
index 0000000..11c5b79
--- /dev/null
+++ b/AndroidManifest.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.markdown b/README.markdown
index 0314a3b..ba2ee2a 100644
--- a/README.markdown
+++ b/README.markdown
@@ -2,9 +2,17 @@
ZPagedHScrollTable 是一个 Android 表格控件, 具备手势翻页功能, 并能支持对总宽度大于展现区域的数据列进行横向滚动, 实现移动设备上对大数据集的直观展示.
+# 使用方法
+
+1. 在界面 Layout XML 中添加 Custom & Library Views 组中的 ZPagedHScrollTable 控件
+1. 实现 ZPagedHScrollTableDataAdapter 数据适配器接口,完成其中各个数据获取回调方法
+1. 设置 ZPagedHScrollTable 控件的每页显示记录数和数据适配器对象,并调用其 refreshTable 方法完成内容显示. 后续翻页时, 控件会自行调用数据适配器完成数据加载, 不需要主控程序干预.
+
+demo/ 目录下为一个实际的例子, 可供参考.
+
# 授权信息
- 本项目为 BSD 授权. 以下为正式的授权说明文本:
+本项目为 BSD 授权. 以下为正式的授权说明文本:
Copyright (C) 2011 HandStar Co., Ltd. ( http://zhangxing.info ).
All rights reserved.
diff --git a/default.properties b/default.properties
new file mode 100644
index 0000000..e2e8061
--- /dev/null
+++ b/default.properties
@@ -0,0 +1,11 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "build.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-8
diff --git a/proguard.cfg b/proguard.cfg
new file mode 100644
index 0000000..12dd039
--- /dev/null
+++ b/proguard.cfg
@@ -0,0 +1,36 @@
+-optimizationpasses 5
+-dontusemixedcaseclassnames
+-dontskipnonpubliclibraryclasses
+-dontpreverify
+-verbose
+-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
+
+-keep public class * extends android.app.Activity
+-keep public class * extends android.app.Application
+-keep public class * extends android.app.Service
+-keep public class * extends android.content.BroadcastReceiver
+-keep public class * extends android.content.ContentProvider
+-keep public class * extends android.app.backup.BackupAgentHelper
+-keep public class * extends android.preference.Preference
+-keep public class com.android.vending.licensing.ILicensingService
+
+-keepclasseswithmembernames class * {
+ native ;
+}
+
+-keepclasseswithmembernames class * {
+ public (android.content.Context, android.util.AttributeSet);
+}
+
+-keepclasseswithmembernames class * {
+ public (android.content.Context, android.util.AttributeSet, int);
+}
+
+-keepclassmembers enum * {
+ public static **[] values();
+ public static ** valueOf(java.lang.String);
+}
+
+-keep class * implements android.os.Parcelable {
+ public static final android.os.Parcelable$Creator *;
+}
diff --git a/res/drawable-hdpi/icon.png b/res/drawable-hdpi/icon.png
new file mode 100644
index 0000000..8074c4c
Binary files /dev/null and b/res/drawable-hdpi/icon.png differ
diff --git a/res/drawable-ldpi/icon.png b/res/drawable-ldpi/icon.png
new file mode 100644
index 0000000..1095584
Binary files /dev/null and b/res/drawable-ldpi/icon.png differ
diff --git a/res/drawable-mdpi/icon.png b/res/drawable-mdpi/icon.png
new file mode 100644
index 0000000..a07c69f
Binary files /dev/null and b/res/drawable-mdpi/icon.png differ
diff --git a/res/drawable/zpaged_hscroll_table_down_arrow.png b/res/drawable/zpaged_hscroll_table_down_arrow.png
new file mode 100644
index 0000000..0545021
Binary files /dev/null and b/res/drawable/zpaged_hscroll_table_down_arrow.png differ
diff --git a/res/drawable/zpaged_hscroll_table_left_arrow.png b/res/drawable/zpaged_hscroll_table_left_arrow.png
new file mode 100644
index 0000000..c3e1f2f
Binary files /dev/null and b/res/drawable/zpaged_hscroll_table_left_arrow.png differ
diff --git a/res/drawable/zpaged_hscroll_table_right_arrow.png b/res/drawable/zpaged_hscroll_table_right_arrow.png
new file mode 100644
index 0000000..4369548
Binary files /dev/null and b/res/drawable/zpaged_hscroll_table_right_arrow.png differ
diff --git a/res/drawable/zpaged_hscroll_table_up_arrow.png b/res/drawable/zpaged_hscroll_table_up_arrow.png
new file mode 100644
index 0000000..f124616
Binary files /dev/null and b/res/drawable/zpaged_hscroll_table_up_arrow.png differ
diff --git a/res/layout/demo.xml b/res/layout/demo.xml
new file mode 100644
index 0000000..8a8c89b
--- /dev/null
+++ b/res/layout/demo.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
diff --git a/res/layout/zpaged_hscroll_table.xml b/res/layout/zpaged_hscroll_table.xml
new file mode 100644
index 0000000..d87a41b
--- /dev/null
+++ b/res/layout/zpaged_hscroll_table.xml
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/zpaged_hscroll_table_col_view_a.xml b/res/layout/zpaged_hscroll_table_col_view_a.xml
new file mode 100644
index 0000000..c91fe46
--- /dev/null
+++ b/res/layout/zpaged_hscroll_table_col_view_a.xml
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/res/layout/zpaged_hscroll_table_col_view_b.xml b/res/layout/zpaged_hscroll_table_col_view_b.xml
new file mode 100644
index 0000000..ad8253d
--- /dev/null
+++ b/res/layout/zpaged_hscroll_table_col_view_b.xml
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/res/layout/zpaged_hscroll_table_fixed_row.xml b/res/layout/zpaged_hscroll_table_fixed_row.xml
new file mode 100644
index 0000000..206e804
--- /dev/null
+++ b/res/layout/zpaged_hscroll_table_fixed_row.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/res/layout/zpaged_hscroll_table_head_view.xml b/res/layout/zpaged_hscroll_table_head_view.xml
new file mode 100644
index 0000000..7ca2494
--- /dev/null
+++ b/res/layout/zpaged_hscroll_table_head_view.xml
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/res/layout/zpaged_hscroll_table_scrollable_row.xml b/res/layout/zpaged_hscroll_table_scrollable_row.xml
new file mode 100644
index 0000000..8f25406
--- /dev/null
+++ b/res/layout/zpaged_hscroll_table_scrollable_row.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/res/values/strings.xml b/res/values/strings.xml
new file mode 100644
index 0000000..91bd4cb
--- /dev/null
+++ b/res/values/strings.xml
@@ -0,0 +1,5 @@
+
+
+ Hello World, ZPagedHScrollTableActivity!
+ ZPagedHScrollTable
+
diff --git a/res/values/zpaged_hscroll_table_colors.xml b/res/values/zpaged_hscroll_table_colors.xml
new file mode 100644
index 0000000..f606df7
--- /dev/null
+++ b/res/values/zpaged_hscroll_table_colors.xml
@@ -0,0 +1,4 @@
+
+
+ #ffcfe1f5
+
diff --git a/res/values/zpaged_hscroll_table_styles.xml b/res/values/zpaged_hscroll_table_styles.xml
new file mode 100644
index 0000000..b70bd82
--- /dev/null
+++ b/res/values/zpaged_hscroll_table_styles.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
diff --git a/src/demo/DemoActivity.java b/src/demo/DemoActivity.java
new file mode 100644
index 0000000..4a07a29
--- /dev/null
+++ b/src/demo/DemoActivity.java
@@ -0,0 +1,99 @@
+package demo;
+
+import info.zhangxing.R;
+import info.zhangxing.ZPagedHScrollTable;
+import info.zhangxing.ZPagedHScrollTableDataAdapter;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Toast;
+
+public class DemoActivity extends Activity {
+
+ /** Called when the activity is first created. */
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.demo);
+
+ ZPagedHScrollTable pht = (ZPagedHScrollTable) findViewById(R.id.pagedHScrollTable1);
+ pht.setPageSize(10); // 设置每页展现记录数
+ pht.setAdapter(new DataAdaptor());
+
+ // 刷新表格,展现数据
+ pht.refreshTable();
+ }
+
+ class DataAdaptor implements ZPagedHScrollTableDataAdapter {
+
+ Map colHeaders;
+
+ {
+ colHeaders = new HashMap();
+ colHeaders.put(ZPagedHScrollTableDataAdapter.FIXED_COLUMN,
+ new String[] { "固定列A", "固定列B" });
+ colHeaders.put(ZPagedHScrollTableDataAdapter.SCROLLABLE_COLUMN,
+ new String[] { "滑动列A1", "滑动列B1", "滑动列C1", "滑动列A2", "滑动列B2",
+ "滑动列C2", "滑动列A3", "滑动列B3", "滑动列C3" });
+ }
+
+ @Override
+ public Map getColHeaders() {
+ return colHeaders;
+ }
+
+ @Override
+ public int getTotalRows() {
+ // 整个数据集共30行
+ return 30;
+ }
+
+ @Override
+ public List