Skip to content

Commit 9627d93

Browse files
committed
book scan with zing IntentIntegrator
参考这篇文章实现的 http://mobile.tutsplus.com/tutorials/android/android-sdk-create-a-barcod e-reader/
1 parent ad2530e commit 9627d93

File tree

33 files changed

+1998
-0
lines changed

33 files changed

+1998
-0
lines changed

AndroidManifest.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="me.arganzheng.project.reading"
4+
android:versionCode="1"
5+
android:versionName="1.0" >
6+
7+
<uses-sdk
8+
android:minSdkVersion="10"
9+
android:targetSdkVersion="17" />
10+
11+
<uses-permission android:name="android.permission.INTERNET" >
12+
</uses-permission>
13+
14+
<application
15+
android:allowBackup="true"
16+
android:icon="@drawable/ic_launcher"
17+
android:label="@string/app_name"
18+
android:theme="@style/AppTheme" >
19+
<activity
20+
android:name="me.arganzheng.project.reading.MainActivity"
21+
android:label="@string/app_name" >
22+
<intent-filter>
23+
<action android:name="android.intent.action.MAIN" />
24+
25+
<category android:name="android.intent.category.LAUNCHER" />
26+
</intent-filter>
27+
</activity>
28+
</application>
29+
30+
</manifest>

ic_launcher-web.png

50.2 KB
Loading

libs/android-support-v4.jar

384 KB
Binary file not shown.

proguard-project.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# To enable ProGuard in your project, edit project.properties
2+
# to define the proguard.config property as described in that file.
3+
#
4+
# Add project specific ProGuard rules here.
5+
# By default, the flags in this file are appended to flags specified
6+
# in ${sdk.dir}/tools/proguard/proguard-android.txt
7+
# You can edit the include path and order by changing the ProGuard
8+
# include property in project.properties.
9+
#
10+
# For more details, see
11+
# http://developer.android.com/guide/developing/tools/proguard.html
12+
13+
# Add any project specific keep options here:
14+
15+
# If your project uses WebView with JS, uncomment the following
16+
# and specify the fully qualified class name to the JavaScript interface
17+
# class:
18+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19+
# public *;
20+
#}

project.properties

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system edit
7+
# "ant.properties", and override values to adapt the script to your
8+
# project structure.
9+
#
10+
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11+
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12+
13+
# Project target.
14+
target=android-17

res/drawable-hdpi/ic_launcher.png

7.48 KB
Loading

res/drawable-mdpi/ic_launcher.png

3.69 KB
Loading

res/drawable-xhdpi/ic_launcher.png

12.2 KB
Loading
24.2 KB
Loading

res/layout/activity_main.xml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:layout_width="fill_parent"
3+
android:layout_height="fill_parent"
4+
android:background="#ffffffff" >
5+
6+
<RelativeLayout
7+
android:layout_width="match_parent"
8+
android:layout_height="wrap_content"
9+
android:padding="10dp" >
10+
11+
<Button
12+
android:id="@+id/scan_btn"
13+
android:layout_width="wrap_content"
14+
android:layout_height="wrap_content"
15+
android:layout_centerHorizontal="true"
16+
android:background="#ff333333"
17+
android:padding="10dp"
18+
android:text="@string/scan"
19+
android:textColor="#ffcccccc" />
20+
21+
<LinearLayout
22+
android:layout_width="match_parent"
23+
android:layout_height="match_parent"
24+
android:layout_below="@id/scan_btn"
25+
android:orientation="vertical" >
26+
27+
<TextView
28+
android:id="@+id/book_title"
29+
android:layout_width="wrap_content"
30+
android:layout_height="wrap_content"
31+
android:textColor="#ff000000"
32+
android:textIsSelectable="true"
33+
android:textStyle="bold" />
34+
35+
<TextView
36+
android:id="@+id/book_author"
37+
android:layout_width="wrap_content"
38+
android:layout_height="wrap_content"
39+
android:textColor="#ffa13143"
40+
android:textIsSelectable="true" />
41+
42+
<ImageView
43+
android:id="@+id/thumb"
44+
android:layout_width="50dp"
45+
android:layout_height="80dp"
46+
android:contentDescription="@string/thumb" />
47+
48+
<TextView
49+
android:id="@+id/book_pubDate"
50+
android:layout_width="wrap_content"
51+
android:layout_height="wrap_content"
52+
android:textColor="#ff592d94"
53+
android:textIsSelectable="true" />
54+
55+
<TextView
56+
android:id="@+id/book_summary"
57+
android:layout_width="wrap_content"
58+
android:layout_height="wrap_content"
59+
android:textColor="#ff000000"
60+
android:textIsSelectable="true" />
61+
62+
<LinearLayout
63+
android:id="@+id/star_layout"
64+
android:layout_width="wrap_content"
65+
android:layout_height="wrap_content"
66+
android:orientation="horizontal" >
67+
</LinearLayout>
68+
69+
<TextView
70+
android:id="@+id/book_page_count"
71+
android:layout_width="wrap_content"
72+
android:layout_height="wrap_content"
73+
android:textColor="#ff2d6994"
74+
android:textIsSelectable="true"
75+
android:textStyle="italic" />
76+
77+
<TextView
78+
android:id="@+id/book_tag"
79+
android:layout_width="wrap_content"
80+
android:layout_height="wrap_content"
81+
android:textColor="#ff2d6994"
82+
android:textIsSelectable="true"
83+
android:textStyle="italic" />
84+
85+
<LinearLayout
86+
android:layout_width="wrap_content"
87+
android:layout_height="wrap_content"
88+
android:orientation="horizontal" >
89+
90+
<Button
91+
android:id="@+id/preview_btn"
92+
android:layout_width="wrap_content"
93+
android:layout_height="wrap_content"
94+
android:text="@string/pre" />
95+
96+
<Button
97+
android:id="@+id/link_btn"
98+
android:layout_width="wrap_content"
99+
android:layout_height="wrap_content"
100+
android:text="@string/link" />
101+
</LinearLayout>
102+
</LinearLayout>
103+
</RelativeLayout>
104+
105+
</ScrollView>

0 commit comments

Comments
 (0)