Skip to content

Commit f5532b3

Browse files
author
hujianfei
committed
初始化
1 parent d41f276 commit f5532b3

File tree

68 files changed

+1194
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1194
-0
lines changed

.classpath

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
4+
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
5+
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
6+
<classpathentry kind="src" path="src"/>
7+
<classpathentry kind="src" path="gen"/>
8+
<classpathentry kind="output" path="bin/classes"/>
9+
</classpath>

.project

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>ScrollOverListViewExample</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.jdt.core.javabuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
</buildSpec>
29+
<natures>
30+
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
31+
<nature>org.eclipse.jdt.core.javanature</nature>
32+
</natures>
33+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8

AndroidManifest.xml

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

bin/AndroidManifest.xml

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

bin/ScrollOverListViewExample.apk

294 KB
Binary file not shown.

bin/classes.dex

809 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
803 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

bin/jarlist.cache

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# cache for current jar dependency. DO NOT EDIT.
2+
# format is <lastModified> <length> <SHA-1> <path>
3+
# Encoding is UTF-8
1.04 KB
737 Bytes
806 Bytes
572 Bytes
1.33 KB
1008 Bytes
1.89 KB
2.22 KB

bin/resources.ap_

19 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** Automatically generated file. DO NOT MODIFY */
2+
package me.hujianfei.scrolloverlistview;
3+
4+
public final class BuildConfig {
5+
public final static boolean DEBUG = true;
6+
}
+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
/* AUTO-GENERATED FILE. DO NOT MODIFY.
2+
*
3+
* This class was automatically generated by the
4+
* aapt tool from the resource data it found. It
5+
* should not be modified by hand.
6+
*/
7+
8+
package me.hujianfei.scrolloverlistview;
9+
10+
public final class R {
11+
public static final class attr {
12+
}
13+
public static final class dimen {
14+
/** Default screen margins, per the Android Design guidelines.
15+
16+
Example customization of dimensions originally defined in res/values/dimens.xml
17+
(such as screen margins) for screens with more than 820dp of available width. This
18+
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
19+
20+
*/
21+
public static final int activity_horizontal_margin=0x7f040000;
22+
public static final int activity_vertical_margin=0x7f040001;
23+
}
24+
public static final class drawable {
25+
public static final int ic_github=0x7f020000;
26+
public static final int ic_launcher=0x7f020001;
27+
}
28+
public static final class id {
29+
public static final int btnNormalListView=0x7f080001;
30+
public static final int btnScrollOverListView=0x7f080002;
31+
public static final int list=0x7f080004;
32+
public static final int listviewNormal=0x7f080000;
33+
public static final int listview_item_text1=0x7f080005;
34+
public static final int menuLink=0x7f080007;
35+
public static final int scrollView=0x7f080003;
36+
public static final int scroll_listview_item_text1=0x7f080006;
37+
}
38+
public static final class layout {
39+
public static final int activity_listview=0x7f030000;
40+
public static final int activity_main=0x7f030001;
41+
public static final int activity_scrolloverlistview=0x7f030002;
42+
public static final int listview_item=0x7f030003;
43+
public static final int listview_item_top=0x7f030004;
44+
public static final int scrollover_listview_item=0x7f030005;
45+
}
46+
public static final class menu {
47+
public static final int main=0x7f070000;
48+
}
49+
public static final class string {
50+
public static final int action_settings=0x7f050002;
51+
public static final int app_name=0x7f050000;
52+
public static final int hello_world=0x7f050001;
53+
public static final int menu_github=0x7f050003;
54+
public static final int normal_listview=0x7f050004;
55+
}
56+
public static final class style {
57+
/**
58+
Base application theme, dependent on API level. This theme is replaced
59+
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
60+
61+
62+
Theme customizations available in newer API levels can go in
63+
res/values-vXX/styles.xml, while customizations related to
64+
backward-compatibility can go here.
65+
66+
67+
Base application theme for API 11+. This theme completely replaces
68+
AppBaseTheme from res/values/styles.xml on API 11+ devices.
69+
70+
API 11 theme customizations can go here.
71+
72+
Base application theme for API 14+. This theme completely replaces
73+
AppBaseTheme from BOTH res/values/styles.xml and
74+
res/values-v11/styles.xml on API 14+ devices.
75+
76+
API 14 theme customizations can go here.
77+
*/
78+
public static final int AppBaseTheme=0x7f060000;
79+
/** Application theme.
80+
All customizations that are NOT specific to a particular API-level can go here.
81+
*/
82+
public static final int AppTheme=0x7f060001;
83+
}
84+
}

libs/android-support-v4.jar

741 KB
Binary file not shown.

proguard-project.txt

+20
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

+14
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-19

res/drawable-hdpi/ic_github.png

3.59 KB

res/drawable-hdpi/ic_launcher.png

1.09 KB

res/drawable-mdpi/ic_github.png

3.29 KB

res/drawable-mdpi/ic_launcher.png

770 Bytes

res/drawable-xhdpi/ic_github.png

3.99 KB

res/drawable-xhdpi/ic_launcher.png

1.52 KB

res/drawable-xxhdpi/ic_github.png

4.63 KB

res/drawable-xxhdpi/ic_launcher.png

3.27 KB

res/layout/activity_listview.xml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:paddingBottom="@dimen/activity_vertical_margin"
6+
android:paddingLeft="@dimen/activity_horizontal_margin"
7+
android:paddingRight="@dimen/activity_horizontal_margin"
8+
android:paddingTop="@dimen/activity_vertical_margin" >
9+
10+
11+
<ListView
12+
android:id="@+id/listviewNormal"
13+
android:layout_width="match_parent"
14+
android:layout_height="wrap_content"
15+
android:layout_margin="5dp"/>
16+
17+
</LinearLayout>

res/layout/activity_main.xml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:orientation="vertical"
6+
android:paddingBottom="@dimen/activity_vertical_margin"
7+
android:paddingLeft="@dimen/activity_horizontal_margin"
8+
android:paddingRight="@dimen/activity_horizontal_margin"
9+
android:paddingTop="@dimen/activity_vertical_margin" >
10+
11+
12+
<TextView
13+
android:layout_width="match_parent"
14+
android:layout_height="wrap_content"
15+
android:layout_margin="20dp"
16+
android:text="现在我们需要一个ListView,比如放联系人列表,而且在这个ListView 的上方或者下方,我们还会放置View、TextView
17+
、Button的控件,一个或者多个,而且我们还不想它一直占据着屏幕空间,希望它能随着ListView的向上滑动,而滑到上面去,不显示,当ListView向下拉,拉到顶部的时候,上方的控件又能够显示出来。我们有这样一个需求,下面是两种实现方式。
18+
网上的解决方案http://www.apkbus.com/android-161576-1-1.html"/>
19+
20+
21+
22+
<TextView
23+
android:layout_width="match_parent"
24+
android:layout_height="wrap_content"
25+
android:text="当ListView上下的控件比较少的时候,比较适合这个方法."
26+
android:layout_marginLeft="20dp"
27+
android:layout_marginTop="20dp"
28+
android:layout_marginRight="20dp"/>
29+
<Button
30+
android:id="@+id/btnNormalListView"
31+
android:text="NormalListView"
32+
android:layout_width="match_parent"
33+
android:layout_height="wrap_content"
34+
android:layout_marginLeft="20dp"
35+
android:layout_marginBottom="20dp"
36+
android:layout_marginRight="20dp"/>
37+
38+
39+
<Button
40+
android:id="@+id/btnScrollOverListView"
41+
android:text="ScrollOverListView"
42+
android:layout_width="match_parent"
43+
android:layout_height="wrap_content"
44+
android:layout_margin="20dp"/>
45+
</LinearLayout>
+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
android:layout_width="match_parent"
4+
android:layout_height="match_parent"
5+
android:paddingBottom="@dimen/activity_vertical_margin"
6+
android:paddingLeft="@dimen/activity_horizontal_margin"
7+
android:paddingRight="@dimen/activity_horizontal_margin"
8+
android:paddingTop="@dimen/activity_vertical_margin"
9+
android:id="@+id/scrollView">
10+
11+
<LinearLayout
12+
android:layout_width="match_parent"
13+
android:layout_height="match_parent"
14+
android:orientation="vertical" >
15+
16+
<TextView
17+
android:layout_width="match_parent"
18+
android:layout_height="wrap_content"
19+
android:layout_margin="5dp"
20+
android:text="使用ScrollOverListView时。可以配合更复杂的布局,比如FrameLayout,实现控件悬停,或者固定某一控件在某一位置。" />
21+
22+
<TextView
23+
android:layout_width="match_parent"
24+
android:layout_height="30dp"
25+
android:layout_margin="5dp"
26+
android:text="这是第二个View" />
27+
28+
<TextView
29+
android:layout_width="match_parent"
30+
android:layout_height="30dp"
31+
android:layout_margin="5dp"
32+
android:text="这是第三个View" />
33+
34+
<TextView
35+
android:layout_width="match_parent"
36+
android:layout_height="30dp"
37+
android:layout_margin="5dp"
38+
android:text="这是第四个View" />
39+
40+
41+
<me.hujianfei.view.ScrollOverListView
42+
android:id="@+id/list"
43+
android:layout_margin="5dp"
44+
android:layout_width="match_parent"
45+
android:layout_height="wrap_content" />
46+
</LinearLayout>
47+
48+
</ScrollView>

res/layout/listview_item.xml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
android:layout_width="match_parent"
5+
android:layout_height="wrap_content"
6+
android:layout_marginLeft="20dp"
7+
android:orientation="horizontal" >
8+
9+
<TextView
10+
android:id="@+id/listview_item_text1"
11+
android:layout_width="match_parent"
12+
android:layout_height="30dp" />
13+
14+
</LinearLayout>

0 commit comments

Comments
 (0)