├── README.md
├── TimeLineDemo
├── .classpath
├── .project
├── .settings
│ └── org.eclipse.jdt.core.prefs
├── AndroidManifest.xml
├── bin
│ ├── AndroidManifest.xml
│ ├── TimeLineDemo.apk
│ ├── classes.dex
│ ├── classes
│ │ └── com
│ │ │ └── sdufe
│ │ │ └── thea
│ │ │ └── guo
│ │ │ ├── BuildConfig.class
│ │ │ ├── MainActivity.class
│ │ │ ├── R$attr.class
│ │ │ ├── R$dimen.class
│ │ │ ├── R$drawable.class
│ │ │ ├── R$id.class
│ │ │ ├── R$layout.class
│ │ │ ├── R$menu.class
│ │ │ ├── R$string.class
│ │ │ ├── R$style.class
│ │ │ ├── R.class
│ │ │ ├── adapter
│ │ │ ├── TimeLineAdapter$ViewHold.class
│ │ │ └── TimeLineAdapter.class
│ │ │ └── model
│ │ │ └── TimeLineModel.class
│ ├── dexedLibs
│ │ └── android-support-v4-3639c6944bc05425a5b532ec01db5982.jar
│ ├── res
│ │ └── crunch
│ │ │ ├── drawable-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── medicalcheck2.png
│ │ │ ├── nurse_visit2.png
│ │ │ └── nursingcareplan2.png
│ │ │ ├── drawable-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── drawable-xxhdpi
│ │ │ └── ic_launcher.png
│ └── resources.ap_
├── gen
│ └── com
│ │ └── sdufe
│ │ └── thea
│ │ └── guo
│ │ ├── BuildConfig.java
│ │ └── R.java
├── ic_launcher-web.png
├── libs
│ └── android-support-v4.jar
├── proguard-project.txt
├── project.properties
├── res
│ ├── drawable-hdpi
│ │ ├── ic_launcher.png
│ │ ├── medicalcheck2.png
│ │ ├── nurse_visit2.png
│ │ └── nursingcareplan2.png
│ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ ├── drawable-xxhdpi
│ │ └── ic_launcher.png
│ ├── layout
│ │ ├── activity_main.xml
│ │ └── timeline_item.xml
│ ├── menu
│ │ └── main.xml
│ ├── values-sw600dp
│ │ └── dimens.xml
│ ├── values-sw720dp-land
│ │ └── dimens.xml
│ ├── values-v11
│ │ └── styles.xml
│ ├── values-v14
│ │ └── styles.xml
│ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── src
│ └── com
│ └── sdufe
│ └── thea
│ └── guo
│ ├── MainActivity.java
│ ├── adapter
│ └── TimeLineAdapter.java
│ └── model
│ └── TimeLineModel.java
└── screenshots
└── timeline.jpg
/README.md:
--------------------------------------------------------------------------------
1 | 
--------------------------------------------------------------------------------
/TimeLineDemo/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/TimeLineDemo/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | TimeLineDemo
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/TimeLineDemo/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
3 | org.eclipse.jdt.core.compiler.compliance=1.6
4 | org.eclipse.jdt.core.compiler.source=1.6
5 |
--------------------------------------------------------------------------------
/TimeLineDemo/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/TimeLineDemo/bin/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/TimeLineDemo/bin/TimeLineDemo.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/TimeLineDemo.apk
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes.dex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes.dex
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes/com/sdufe/thea/guo/BuildConfig.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes/com/sdufe/thea/guo/BuildConfig.class
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes/com/sdufe/thea/guo/MainActivity.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes/com/sdufe/thea/guo/MainActivity.class
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$attr.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$attr.class
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$dimen.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$dimen.class
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$drawable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$drawable.class
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$id.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$id.class
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$layout.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$layout.class
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$menu.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$menu.class
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$string.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$string.class
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$style.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R$style.class
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes/com/sdufe/thea/guo/R.class
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes/com/sdufe/thea/guo/adapter/TimeLineAdapter$ViewHold.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes/com/sdufe/thea/guo/adapter/TimeLineAdapter$ViewHold.class
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes/com/sdufe/thea/guo/adapter/TimeLineAdapter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes/com/sdufe/thea/guo/adapter/TimeLineAdapter.class
--------------------------------------------------------------------------------
/TimeLineDemo/bin/classes/com/sdufe/thea/guo/model/TimeLineModel.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/classes/com/sdufe/thea/guo/model/TimeLineModel.class
--------------------------------------------------------------------------------
/TimeLineDemo/bin/dexedLibs/android-support-v4-3639c6944bc05425a5b532ec01db5982.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/dexedLibs/android-support-v4-3639c6944bc05425a5b532ec01db5982.jar
--------------------------------------------------------------------------------
/TimeLineDemo/bin/res/crunch/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/res/crunch/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TimeLineDemo/bin/res/crunch/drawable-hdpi/medicalcheck2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/res/crunch/drawable-hdpi/medicalcheck2.png
--------------------------------------------------------------------------------
/TimeLineDemo/bin/res/crunch/drawable-hdpi/nurse_visit2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/res/crunch/drawable-hdpi/nurse_visit2.png
--------------------------------------------------------------------------------
/TimeLineDemo/bin/res/crunch/drawable-hdpi/nursingcareplan2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/res/crunch/drawable-hdpi/nursingcareplan2.png
--------------------------------------------------------------------------------
/TimeLineDemo/bin/res/crunch/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/res/crunch/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TimeLineDemo/bin/res/crunch/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/res/crunch/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TimeLineDemo/bin/res/crunch/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/res/crunch/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TimeLineDemo/bin/resources.ap_:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/bin/resources.ap_
--------------------------------------------------------------------------------
/TimeLineDemo/gen/com/sdufe/thea/guo/BuildConfig.java:
--------------------------------------------------------------------------------
1 | /** Automatically generated file. DO NOT MODIFY */
2 | package com.sdufe.thea.guo;
3 |
4 | public final class BuildConfig {
5 | public final static boolean DEBUG = true;
6 | }
--------------------------------------------------------------------------------
/TimeLineDemo/gen/com/sdufe/thea/guo/R.java:
--------------------------------------------------------------------------------
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 com.sdufe.thea.guo;
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 | Customize dimensions originally defined in res/values/dimens.xml (such as
17 | screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
18 |
19 | */
20 | public static final int activity_horizontal_margin=0x7f040000;
21 | public static final int activity_vertical_margin=0x7f040001;
22 | }
23 | public static final class drawable {
24 | public static final int ic_launcher=0x7f020000;
25 | public static final int medicalcheck2=0x7f020001;
26 | public static final int nurse_visit2=0x7f020002;
27 | public static final int nursingcareplan2=0x7f020003;
28 | }
29 | public static final class id {
30 | public static final int action_settings=0x7f080004;
31 | public static final int left=0x7f080001;
32 | public static final int left_imageview=0x7f080002;
33 | public static final int listview=0x7f080000;
34 | public static final int right_textview=0x7f080003;
35 | }
36 | public static final class layout {
37 | public static final int activity_main=0x7f030000;
38 | public static final int timeline_item=0x7f030001;
39 | }
40 | public static final class menu {
41 | public static final int main=0x7f070000;
42 | }
43 | public static final class string {
44 | public static final int action_settings=0x7f050001;
45 | public static final int app_name=0x7f050000;
46 | public static final int hello_world=0x7f050002;
47 | }
48 | public static final class style {
49 | /**
50 | Base application theme, dependent on API level. This theme is replaced
51 | by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
52 |
53 |
54 | Theme customizations available in newer API levels can go in
55 | res/values-vXX/styles.xml, while customizations related to
56 | backward-compatibility can go here.
57 |
58 |
59 | Base application theme for API 11+. This theme completely replaces
60 | AppBaseTheme from res/values/styles.xml on API 11+ devices.
61 |
62 | API 11 theme customizations can go here.
63 |
64 | Base application theme for API 14+. This theme completely replaces
65 | AppBaseTheme from BOTH res/values/styles.xml and
66 | res/values-v11/styles.xml on API 14+ devices.
67 |
68 | API 14 theme customizations can go here.
69 | */
70 | public static final int AppBaseTheme=0x7f060000;
71 | /** Application theme.
72 | All customizations that are NOT specific to a particular API-level can go here.
73 | */
74 | public static final int AppTheme=0x7f060001;
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/TimeLineDemo/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/ic_launcher-web.png
--------------------------------------------------------------------------------
/TimeLineDemo/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/TimeLineDemo/proguard-project.txt:
--------------------------------------------------------------------------------
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 | #}
21 |
--------------------------------------------------------------------------------
/TimeLineDemo/project.properties:
--------------------------------------------------------------------------------
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
15 |
--------------------------------------------------------------------------------
/TimeLineDemo/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TimeLineDemo/res/drawable-hdpi/medicalcheck2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/res/drawable-hdpi/medicalcheck2.png
--------------------------------------------------------------------------------
/TimeLineDemo/res/drawable-hdpi/nurse_visit2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/res/drawable-hdpi/nurse_visit2.png
--------------------------------------------------------------------------------
/TimeLineDemo/res/drawable-hdpi/nursingcareplan2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/res/drawable-hdpi/nursingcareplan2.png
--------------------------------------------------------------------------------
/TimeLineDemo/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TimeLineDemo/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TimeLineDemo/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/TimeLineDemo/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/TimeLineDemo/res/layout/timeline_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
18 |
19 |
25 |
26 |
31 |
32 |
33 |
40 |
41 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/TimeLineDemo/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/TimeLineDemo/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/TimeLineDemo/res/values-sw720dp-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | 128dp
8 |
9 |
10 |
--------------------------------------------------------------------------------
/TimeLineDemo/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/TimeLineDemo/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/TimeLineDemo/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 16dp
5 | 16dp
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TimeLineDemo/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | TimeLineDemo
5 | Settings
6 | Hello world!
7 |
8 |
9 |
--------------------------------------------------------------------------------
/TimeLineDemo/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/TimeLineDemo/src/com/sdufe/thea/guo/MainActivity.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/TimeLineDemo/src/com/sdufe/thea/guo/MainActivity.java
--------------------------------------------------------------------------------
/TimeLineDemo/src/com/sdufe/thea/guo/adapter/TimeLineAdapter.java:
--------------------------------------------------------------------------------
1 | package com.sdufe.thea.guo.adapter;
2 |
3 | import java.util.List;
4 |
5 | import com.sdufe.thea.guo.R;
6 | import com.sdufe.thea.guo.model.TimeLineModel;
7 |
8 | import android.content.Context;
9 | import android.view.LayoutInflater;
10 | import android.view.View;
11 | import android.view.ViewGroup;
12 | import android.widget.BaseAdapter;
13 | import android.widget.ImageView;
14 | import android.widget.TextView;
15 |
16 | public class TimeLineAdapter extends BaseAdapter {
17 |
18 | Context context;
19 | List list;
20 |
21 | public TimeLineAdapter(Context context, List list) {
22 | super();
23 | this.context = context;
24 | this.list = list;
25 | }
26 |
27 | @Override
28 | public int getCount() {
29 | if (list!=null) {
30 | return list.size();
31 | }
32 | return 0;
33 | }
34 |
35 | @Override
36 | public Object getItem(int position) {
37 | if (list!=null) {
38 | return list.get(position);
39 | }
40 | return null;
41 | }
42 |
43 | @Override
44 | public long getItemId(int position) {
45 | return position;
46 | }
47 |
48 | @Override
49 | public View getView(int position, View convertView, ViewGroup parent) {
50 | ViewHold hold;
51 | if (convertView==null) {
52 | hold=new ViewHold();
53 | convertView=LayoutInflater.from(context).inflate(R.layout.timeline_item, null);
54 | convertView.setTag(hold);
55 | }else {
56 | hold=(ViewHold) convertView.getTag();
57 | }
58 | hold.imageView=(ImageView) convertView.findViewById(R.id.left_imageview);
59 | hold.show=(TextView) convertView.findViewById(R.id.right_textview);
60 |
61 | hold.imageView.setImageResource(list.get(position).getImageview());
62 | hold.show.setText(list.get(position).getText());
63 | return convertView;
64 | }
65 |
66 | static class ViewHold{
67 | public TextView show;
68 | public ImageView imageView;
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/TimeLineDemo/src/com/sdufe/thea/guo/model/TimeLineModel.java:
--------------------------------------------------------------------------------
1 | package com.sdufe.thea.guo.model;
2 |
3 |
4 | public class TimeLineModel {
5 |
6 | private int imageview;
7 | private String text;
8 |
9 | public int getImageview() {
10 | return imageview;
11 | }
12 |
13 | public void setImageview(int imageview) {
14 | this.imageview = imageview;
15 | }
16 |
17 | public String getText() {
18 | return text;
19 | }
20 |
21 | public void setText(String text) {
22 | this.text = text;
23 | }
24 |
25 | public TimeLineModel(int imageview, String text) {
26 | super();
27 | this.imageview = imageview;
28 | this.text = text;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/screenshots/timeline.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zimoguo/TimeLineDemo/a39092903c76adedec4f7833bc4f9772d191e587/screenshots/timeline.jpg
--------------------------------------------------------------------------------