├── LICENSE.txt
├── README.md
├── ScrollBarPanelLib
├── .classpath
├── .project
├── .settings
│ └── org.eclipse.jdt.core.prefs
├── AndroidManifest.xml
├── LICENSE
├── bin
│ ├── AndroidManifest.xml
│ ├── R.txt
│ ├── classes
│ │ └── com
│ │ │ └── learnNcode
│ │ │ └── android
│ │ │ ├── BuildConfig.class
│ │ │ ├── Clock.class
│ │ │ ├── ExtendedListView$1.class
│ │ │ ├── ExtendedListView$2.class
│ │ │ ├── ExtendedListView$OnPositionChangedListener.class
│ │ │ ├── ExtendedListView.class
│ │ │ ├── R$anim.class
│ │ │ ├── R$attr.class
│ │ │ ├── R$drawable.class
│ │ │ ├── R$layout.class
│ │ │ ├── R$string.class
│ │ │ ├── R$styleable.class
│ │ │ └── R.class
│ ├── res
│ │ ├── drawable-hdpi
│ │ │ ├── icon.png
│ │ │ └── scrollbarpanel_background.9.png
│ │ ├── drawable-ldpi
│ │ │ └── icon.png
│ │ ├── drawable-mdpi
│ │ │ └── icon.png
│ │ ├── drawable-xhdpi
│ │ │ └── icon.png
│ │ └── drawable
│ │ │ ├── ic_timer_clock_dialer.png
│ │ │ ├── ic_timer_clock_hour_hand.png
│ │ │ ├── ic_timer_clock_minute_hand.png
│ │ │ └── ic_timer_clock_second_hand.png
│ └── scrollbarpanellib.jar
├── gen
│ └── com
│ │ └── learnNcode
│ │ └── android
│ │ ├── BuildConfig.java
│ │ └── R.java
├── project.properties
├── res
│ ├── anim
│ │ ├── in.xml
│ │ └── out.xml
│ ├── drawable-hdpi
│ │ ├── icon.png
│ │ └── scrollbarpanel_background.9.png
│ ├── drawable-ldpi
│ │ └── icon.png
│ ├── drawable-mdpi
│ │ └── icon.png
│ ├── drawable-xhdpi
│ │ └── icon.png
│ ├── drawable
│ │ ├── background_scrollbarpanel.xml
│ │ ├── ic_timer_clock_dialer.png
│ │ ├── ic_timer_clock_hour_hand.png
│ │ ├── ic_timer_clock_minute_hand.png
│ │ └── ic_timer_clock_second_hand.png
│ ├── layout
│ │ └── list_item.xml
│ └── values
│ │ ├── attrs.xml
│ │ └── strings.xml
└── src
│ └── com
│ └── learnNcode
│ └── android
│ ├── Clock.java
│ └── ExtendedListView.java
└── com.learnNcode.sample
├── .classpath
├── .project
├── .settings
└── org.eclipse.jdt.core.prefs
├── AndroidManifest.xml
├── LICENSE
├── bin
├── AndroidManifest.xml
├── R.txt
├── classes.dex
├── classes
│ └── com
│ │ ├── example
│ │ └── com
│ │ │ └── learnncode
│ │ │ └── sample
│ │ │ ├── BuildConfig.class
│ │ │ ├── MainActivity$DummyAdapter.class
│ │ │ ├── MainActivity.class
│ │ │ ├── R$anim.class
│ │ │ ├── R$attr.class
│ │ │ ├── R$drawable.class
│ │ │ ├── R$id.class
│ │ │ ├── R$layout.class
│ │ │ ├── R$menu.class
│ │ │ ├── R$string.class
│ │ │ ├── R$style.class
│ │ │ ├── R$styleable.class
│ │ │ └── R.class
│ │ └── learnNcode
│ │ └── android
│ │ ├── R$anim.class
│ │ ├── R$attr.class
│ │ ├── R$drawable.class
│ │ ├── R$layout.class
│ │ ├── R$string.class
│ │ ├── R$styleable.class
│ │ └── R.class
├── com.learnNcode.sample.apk
├── dexedLibs
│ └── scrollbarpanellib-3630c636dafad10716e1ddd7b88ca891.jar
├── jarlist.cache
├── res
│ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ └── drawable-xxhdpi
│ │ └── ic_launcher.png
└── resources.ap_
├── gen
└── com
│ ├── example
│ └── com
│ │ └── learnncode
│ │ └── sample
│ │ ├── BuildConfig.java
│ │ └── R.java
│ └── learnNcode
│ └── android
│ └── R.java
├── ic_launcher-web.png
├── libs
└── android-support-v4.jar
├── proguard-project.txt
├── project.properties
├── res
├── drawable-hdpi
│ └── ic_launcher.png
├── drawable-mdpi
│ └── ic_launcher.png
├── drawable-xhdpi
│ └── ic_launcher.png
├── drawable-xxhdpi
│ └── ic_launcher.png
├── layout
│ ├── activity_main.xml
│ └── scrollbarpanel.xml
├── menu
│ └── activity_main.xml
├── values-v11
│ └── styles.xml
├── values-v14
│ └── styles.xml
└── values
│ ├── strings.xml
│ └── styles.xml
└── src
└── com
└── example
└── com
└── learnncode
└── sample
└── MainActivity.java
/LICENSE.txt:
--------------------------------------------------------------------------------
1 |
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
203 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ScrollBarPanelWithClock
2 | ==================
3 |
4 | Path 2.0 like scrollbar with clock widget for Android.
5 |
6 | This is an open source library which uses the scroll bar library. I have added a Clock widget inside the scroll bar panel which gives a Path 2.0 like effect and can be customised according to your needs. Please see the screenshots below to get a better idea.
7 |
8 | Screenshot
9 | =========
10 |
11 | 
12 |
13 |
14 | 
15 |
16 |
17 |
18 | [](https://android-arsenal.com/details/1/1029)
19 |
20 |
21 | Usage
22 | =====
23 |
24 | Check the attached demo sample app.
25 |
26 | Layout
27 | =====
28 |
29 | The ExtendedListView replaces a standard ListView widget and provides the ScrollBarPanel capability.
30 |
31 | ```xml
32 |
42 | ```
43 |
44 | You can use/edit the clock widget the following way, this should be done in the layout for scrollbar panel:
45 |
46 | ```xml
47 |
56 | ```
57 |
58 | Activity
59 | =====
60 |
61 | Set your scrollBarPanel
62 | ```java
63 | ExtendedListView mListView = (ExtendedListView) findViewById(android.R.id.list);
64 | ```
65 |
66 | You can attach a position changed listener on the listview and write your desired implementation.
67 |
68 | ```java
69 | mListView.setOnPositionChangedListener(new OnPositionChangedListener() {
70 |
71 | @Override
72 | public void onPositionChanged(ExtendedListView listView, int firstVisiblePosition, View scrollBarPanel) {
73 | Clock analogClockInstance = (Clock) scrollBarPanel.findViewById(R.id.analogClockScroller);
74 |
75 | Time time = new Time();
76 | analogClockInstance.setSecondHandVisibility(true); // to visible second hand
77 | time.set(position+3, position, 5, 0, 0, 0);
78 | analogClockInstance.onTimeChanged(time);
79 |
80 | }
81 | }
82 | ```
83 |
84 | You can also directly implement the OnPositionChangedListener, and write your implementation in the overridden method.
85 |
86 | ```java
87 | public class MainActivity extends Activity implements OnPositionChangedListener {
88 |
89 | @Override
90 | public void onPositionChanged(ExtendedListView listView, int position, View scrollBarPanel) {
91 | Clock analogClockInstance = (Clock) scrollBarPanel.findViewById(R.id.analogClockScroller);
92 |
93 | Time time = new Time();
94 | analogClockInstance.setSecondHandVisibility(true);
95 | time.set(position+3, position, 5, 0, 0, 0);
96 | analogClockInstance.onTimeChanged(time);
97 | }
98 | }
99 | ```
100 |
101 | This is how you initialize the clock widget, this should be done inside the OnPositionChanged().
102 | ```java
103 | Time timeObj = new Time();
104 | analogClockObj.setSecondHandVisibility(true);
105 | analogClockObj.setVisibility(View.VISIBLE);
106 | timeObj.set(position+3, position, 5, 0, 0, 0); //pass respective values to the clock here.
107 | analogClockObj.onTimeChanged(timeObj);
108 | ```
109 |
110 | NOTE :
111 | =====
112 |
113 | __1]__ You can set visibility for the seconds hand by using setSecondHandVisibility method.
114 | Example: `analogClockObj.setSecondHandVisibility(true); // To show second hand`
115 |
116 | __2]__ You can set visibility for the clock widget by using setVisibility method.
117 | Example: `analogClockObj.setVisibility(View.VISIBLE);`
118 |
119 |
120 | Acknowledgements
121 | ==============
122 | [Android-ScrollBarPanel](https://github.com/rno/Android-ScrollBarPanel)
123 |
124 | License
125 | ======
126 |
127 | Copyright 2013 learnNcode
128 |
129 | Licensed under the Apache License, Version 2.0 (the "License");
130 | you may not use this file except in compliance with the License.
131 | You may obtain a copy of the License at
132 |
133 | http://www.apache.org/licenses/LICENSE-2.0
134 |
135 | Unless required by applicable law or agreed to in writing, software
136 | distributed under the License is distributed on an "AS IS" BASIS,
137 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
138 | See the License for the specific language governing permissions and
139 | limitations under the License.
140 |
141 | Thankyou
142 | =======
143 |
144 | If you like our work say a hi :)
145 | Happy coding.
146 |
147 |
148 |
149 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | ScrollBarPanelLib
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 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=1.6
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11 | org.eclipse.jdt.core.compiler.source=1.6
12 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
14 |
15 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
14 |
15 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/R.txt:
--------------------------------------------------------------------------------
1 | int anim in 0x7f040000
2 | int anim out 0x7f040001
3 | int attr hand_dial 0x7f010000
4 | int attr hand_hour 0x7f010001
5 | int attr hand_minute 0x7f010002
6 | int attr hand_second 0x7f010003
7 | int attr scrollBarPanel 0x7f010004
8 | int attr scrollBarPanelInAnimation 0x7f010005
9 | int attr scrollBarPanelOutAnimation 0x7f010006
10 | int drawable background_scrollbarpanel 0x7f020000
11 | int drawable ic_timer_clock_dialer 0x7f020001
12 | int drawable ic_timer_clock_hour_hand 0x7f020002
13 | int drawable ic_timer_clock_minute_hand 0x7f020003
14 | int drawable ic_timer_clock_second_hand 0x7f020004
15 | int drawable icon 0x7f020005
16 | int drawable scrollbarpanel_background 0x7f020006
17 | int layout list_item 0x7f030000
18 | int string app_name 0x7f050001
19 | int string hello 0x7f050000
20 | int[] styleable Clock { 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006 }
21 | int styleable Clock_hand_dial 0
22 | int styleable Clock_hand_hour 1
23 | int styleable Clock_hand_minute 2
24 | int styleable Clock_hand_second 3
25 | int styleable Clock_scrollBarPanel 4
26 | int styleable Clock_scrollBarPanelInAnimation 5
27 | int styleable Clock_scrollBarPanelOutAnimation 6
28 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/classes/com/learnNcode/android/BuildConfig.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/classes/com/learnNcode/android/BuildConfig.class
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/classes/com/learnNcode/android/Clock.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/classes/com/learnNcode/android/Clock.class
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/classes/com/learnNcode/android/ExtendedListView$1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/classes/com/learnNcode/android/ExtendedListView$1.class
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/classes/com/learnNcode/android/ExtendedListView$2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/classes/com/learnNcode/android/ExtendedListView$2.class
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/classes/com/learnNcode/android/ExtendedListView$OnPositionChangedListener.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/classes/com/learnNcode/android/ExtendedListView$OnPositionChangedListener.class
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/classes/com/learnNcode/android/ExtendedListView.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/classes/com/learnNcode/android/ExtendedListView.class
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/classes/com/learnNcode/android/R$anim.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/classes/com/learnNcode/android/R$anim.class
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/classes/com/learnNcode/android/R$attr.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/classes/com/learnNcode/android/R$attr.class
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/classes/com/learnNcode/android/R$drawable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/classes/com/learnNcode/android/R$drawable.class
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/classes/com/learnNcode/android/R$layout.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/classes/com/learnNcode/android/R$layout.class
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/classes/com/learnNcode/android/R$string.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/classes/com/learnNcode/android/R$string.class
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/classes/com/learnNcode/android/R$styleable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/classes/com/learnNcode/android/R$styleable.class
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/classes/com/learnNcode/android/R.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/classes/com/learnNcode/android/R.class
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/res/drawable-hdpi/scrollbarpanel_background.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/res/drawable-hdpi/scrollbarpanel_background.9.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/res/drawable/ic_timer_clock_dialer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/res/drawable/ic_timer_clock_dialer.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/res/drawable/ic_timer_clock_hour_hand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/res/drawable/ic_timer_clock_hour_hand.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/res/drawable/ic_timer_clock_minute_hand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/res/drawable/ic_timer_clock_minute_hand.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/res/drawable/ic_timer_clock_second_hand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/res/drawable/ic_timer_clock_second_hand.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/bin/scrollbarpanellib.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/bin/scrollbarpanellib.jar
--------------------------------------------------------------------------------
/ScrollBarPanelLib/gen/com/learnNcode/android/BuildConfig.java:
--------------------------------------------------------------------------------
1 | /** Automatically generated file. DO NOT MODIFY */
2 | package com.learnNcode.android;
3 |
4 | public final class BuildConfig {
5 | public final static boolean DEBUG = true;
6 | }
--------------------------------------------------------------------------------
/ScrollBarPanelLib/gen/com/learnNcode/android/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.learnNcode.android;
9 |
10 | public final class R {
11 | public static final class anim {
12 | public static int in=0x7f040000;
13 | public static int out=0x7f040001;
14 | }
15 | public static final class attr {
16 | /**
Must be a reference to another resource, in the form "@[+][package:]type:name
"
17 | or to a theme attribute in the form "?[package:][type:]name
".
18 | */
19 | public static int hand_dial=0x7f010000;
20 | /**
Must be a reference to another resource, in the form "@[+][package:]type:name
"
21 | or to a theme attribute in the form "?[package:][type:]name
".
22 | */
23 | public static int hand_hour=0x7f010001;
24 | /**
Must be a reference to another resource, in the form "@[+][package:]type:name
"
25 | or to a theme attribute in the form "?[package:][type:]name
".
26 | */
27 | public static int hand_minute=0x7f010002;
28 | /**
Must be a reference to another resource, in the form "@[+][package:]type:name
"
29 | or to a theme attribute in the form "?[package:][type:]name
".
30 | */
31 | public static int hand_second=0x7f010003;
32 | /**
Must be a reference to another resource, in the form "@[+][package:]type:name
"
33 | or to a theme attribute in the form "?[package:][type:]name
".
34 | */
35 | public static int scrollBarPanel=0x7f010004;
36 | /**
Must be a reference to another resource, in the form "@[+][package:]type:name
"
37 | or to a theme attribute in the form "?[package:][type:]name
".
38 | */
39 | public static int scrollBarPanelInAnimation=0x7f010005;
40 | /**
Must be a reference to another resource, in the form "@[+][package:]type:name
"
41 | or to a theme attribute in the form "?[package:][type:]name
".
42 | */
43 | public static int scrollBarPanelOutAnimation=0x7f010006;
44 | }
45 | public static final class drawable {
46 | public static int background_scrollbarpanel=0x7f020000;
47 | public static int ic_timer_clock_dialer=0x7f020001;
48 | public static int ic_timer_clock_hour_hand=0x7f020002;
49 | public static int ic_timer_clock_minute_hand=0x7f020003;
50 | public static int ic_timer_clock_second_hand=0x7f020004;
51 | public static int icon=0x7f020005;
52 | public static int scrollbarpanel_background=0x7f020006;
53 | }
54 | public static final class layout {
55 | public static int list_item=0x7f030000;
56 | }
57 | public static final class string {
58 | public static int app_name=0x7f050001;
59 | public static int hello=0x7f050000;
60 | }
61 | public static final class styleable {
62 | /** Attributes that can be used with a Clock.
63 |
Includes the following attributes:
64 |
65 |
66 |
67 | Attribute | Description |
68 | {@link #Clock_hand_dial com.learnNcode.android:hand_dial} | |
69 | {@link #Clock_hand_hour com.learnNcode.android:hand_hour} | |
70 | {@link #Clock_hand_minute com.learnNcode.android:hand_minute} | |
71 | {@link #Clock_hand_second com.learnNcode.android:hand_second} | |
72 | {@link #Clock_scrollBarPanel com.learnNcode.android:scrollBarPanel} | |
73 | {@link #Clock_scrollBarPanelInAnimation com.learnNcode.android:scrollBarPanelInAnimation} | |
74 | {@link #Clock_scrollBarPanelOutAnimation com.learnNcode.android:scrollBarPanelOutAnimation} | |
75 |
76 | @see #Clock_hand_dial
77 | @see #Clock_hand_hour
78 | @see #Clock_hand_minute
79 | @see #Clock_hand_second
80 | @see #Clock_scrollBarPanel
81 | @see #Clock_scrollBarPanelInAnimation
82 | @see #Clock_scrollBarPanelOutAnimation
83 | */
84 | public static final int[] Clock = {
85 | 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003,
86 | 0x7f010004, 0x7f010005, 0x7f010006
87 | };
88 | /**
89 | This symbol is the offset where the {@link com.learnNcode.android.R.attr#hand_dial}
90 | attribute's value can be found in the {@link #Clock} array.
91 |
92 |
93 |
Must be a reference to another resource, in the form "@[+][package:]type:name
"
94 | or to a theme attribute in the form "?[package:][type:]name
".
95 | @attr name android:hand_dial
96 | */
97 | public static final int Clock_hand_dial = 0;
98 | /**
99 |
This symbol is the offset where the {@link com.learnNcode.android.R.attr#hand_hour}
100 | attribute's value can be found in the {@link #Clock} array.
101 |
102 |
103 |
Must be a reference to another resource, in the form "@[+][package:]type:name
"
104 | or to a theme attribute in the form "?[package:][type:]name
".
105 | @attr name android:hand_hour
106 | */
107 | public static final int Clock_hand_hour = 1;
108 | /**
109 |
This symbol is the offset where the {@link com.learnNcode.android.R.attr#hand_minute}
110 | attribute's value can be found in the {@link #Clock} array.
111 |
112 |
113 |
Must be a reference to another resource, in the form "@[+][package:]type:name
"
114 | or to a theme attribute in the form "?[package:][type:]name
".
115 | @attr name android:hand_minute
116 | */
117 | public static final int Clock_hand_minute = 2;
118 | /**
119 |
This symbol is the offset where the {@link com.learnNcode.android.R.attr#hand_second}
120 | attribute's value can be found in the {@link #Clock} array.
121 |
122 |
123 |
Must be a reference to another resource, in the form "@[+][package:]type:name
"
124 | or to a theme attribute in the form "?[package:][type:]name
".
125 | @attr name android:hand_second
126 | */
127 | public static final int Clock_hand_second = 3;
128 | /**
129 |
This symbol is the offset where the {@link com.learnNcode.android.R.attr#scrollBarPanel}
130 | attribute's value can be found in the {@link #Clock} array.
131 |
132 |
133 |
Must be a reference to another resource, in the form "@[+][package:]type:name
"
134 | or to a theme attribute in the form "?[package:][type:]name
".
135 | @attr name android:scrollBarPanel
136 | */
137 | public static final int Clock_scrollBarPanel = 4;
138 | /**
139 |
This symbol is the offset where the {@link com.learnNcode.android.R.attr#scrollBarPanelInAnimation}
140 | attribute's value can be found in the {@link #Clock} array.
141 |
142 |
143 |
Must be a reference to another resource, in the form "@[+][package:]type:name
"
144 | or to a theme attribute in the form "?[package:][type:]name
".
145 | @attr name android:scrollBarPanelInAnimation
146 | */
147 | public static final int Clock_scrollBarPanelInAnimation = 5;
148 | /**
149 |
This symbol is the offset where the {@link com.learnNcode.android.R.attr#scrollBarPanelOutAnimation}
150 | attribute's value can be found in the {@link #Clock} array.
151 |
152 |
153 |
Must be a reference to another resource, in the form "@[+][package:]type:name
"
154 | or to a theme attribute in the form "?[package:][type:]name
".
155 | @attr name android:scrollBarPanelOutAnimation
156 | */
157 | public static final int Clock_scrollBarPanelOutAnimation = 6;
158 | };
159 | }
160 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/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 use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-16
12 | android.library=true
13 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/anim/in.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
10 |
14 |
15 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/anim/out.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
10 |
14 |
15 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/drawable-hdpi/scrollbarpanel_background.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/res/drawable-hdpi/scrollbarpanel_background.9.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/drawable/background_scrollbarpanel.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/drawable/ic_timer_clock_dialer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/res/drawable/ic_timer_clock_dialer.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/drawable/ic_timer_clock_hour_hand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/res/drawable/ic_timer_clock_hour_hand.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/drawable/ic_timer_clock_minute_hand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/res/drawable/ic_timer_clock_minute_hand.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/drawable/ic_timer_clock_second_hand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/ScrollBarPanelLib/res/drawable/ic_timer_clock_second_hand.png
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/layout/list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello World!
5 | Android-ScrollBarPanel-Sample
6 |
7 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/src/com/learnNcode/android/Clock.java:
--------------------------------------------------------------------------------
1 |
2 |
3 | /*
4 | * Copyright 2013 - learnNcode (learnncode@gmail.com)
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not
7 | * use this file except in compliance with the License. You may obtain a copy of
8 | * the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15 | * License for the specific language governing permissions and limitations under
16 | * the License.
17 | */
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | package com.learnNcode.android;
26 |
27 | import android.content.Context;
28 | import android.content.res.Resources;
29 | import android.content.res.TypedArray;
30 | import android.graphics.Canvas;
31 | import android.graphics.drawable.Drawable;
32 | import android.text.format.Time;
33 | import android.util.AttributeSet;
34 | import android.view.View;
35 |
36 | /**
37 | *
38 | * @author learn and Code
39 | *
40 | */
41 | public class Clock extends View {
42 |
43 | public Clock(Context context) {
44 | super(context);
45 | }
46 |
47 | private Drawable mHourHand;
48 | private Drawable mMinuteHand;
49 | private Drawable mSecondHand;
50 | private Drawable mDial;
51 |
52 | private int mDialWidth;
53 | private int mDialHeight;
54 |
55 | private boolean mAttached;
56 |
57 | private float mMinutes;
58 | private float mHour;
59 | private float mSeconds;
60 | private boolean mChanged;
61 |
62 | Context mContext;
63 | boolean isSecondHandVisible = false;
64 |
65 | public Clock(Context context, AttributeSet attrs) {
66 | this(context, attrs, 0);
67 | }
68 |
69 | public Clock(Context context, AttributeSet attrs, int defStyle) {
70 | super(context, attrs, defStyle);
71 |
72 | mContext = context;
73 | Resources resource = mContext.getResources();
74 | final TypedArray a = mContext.obtainStyledAttributes(attrs, R.styleable.Clock);
75 |
76 | /*mDial = resource.getDrawable(R.drawable.ic_timer_clock_dialer);
77 | mHourHand = resource.getDrawable(R.drawable.ic_timer_clock_hour_hand);
78 | mMinuteHand = resource.getDrawable(R.drawable.ic_timer_clock_minute_hand);
79 | mSecondHand = resource.getDrawable(R.drawable.ic_timer_clock_minute_hand);*/
80 | final int scrollBarPanelLayoutId = a.getResourceId(R.styleable.Clock_scrollBarPanel, -1);
81 |
82 | System.out.println("***** scrollBarPanelLayoutId ***********"+scrollBarPanelLayoutId);
83 | /**
84 | * dialer background
85 | */
86 | int dialerRes = a.getResourceId(R.styleable.Clock_hand_dial, -1);
87 | if (dialerRes != -1) {
88 | setDialDrawable(dialerRes);
89 | }else{
90 | mDial = resource.getDrawable(R.drawable.ic_timer_clock_dialer);
91 | }
92 |
93 | /**
94 | * hour hand background
95 | */
96 | int hourRes = a.getResourceId(R.styleable.Clock_hand_hour, -1);
97 | if (hourRes != -1) {
98 | setHourDrawable(hourRes);
99 | }else{
100 | mHourHand = resource.getDrawable(R.drawable.ic_timer_clock_hour_hand);
101 | }
102 |
103 | /**
104 | * minute hand background
105 | */
106 | int minuteRes = a.getResourceId(R.styleable.Clock_hand_minute, -1);
107 | if (minuteRes != -1) {
108 | setMinuteDrawable(minuteRes);
109 | }else{
110 | mMinuteHand = resource.getDrawable(R.drawable.ic_timer_clock_minute_hand);
111 | }
112 |
113 | /**
114 | * second hand background
115 | */
116 | int secondRes = a.getResourceId(R.styleable.Clock_hand_second, -1);
117 | if (secondRes != -1) {
118 | System.out.println("+++++if +++++"+secondRes);
119 | setSecondDrawable(secondRes);
120 | }else{
121 | System.out.println("+++++ else +++++"+secondRes);
122 | mSecondHand = resource.getDrawable(R.drawable.ic_timer_clock_minute_hand);
123 | }
124 |
125 | mDialWidth = mDial.getIntrinsicWidth();
126 | mDialHeight = mDial.getIntrinsicHeight();
127 | }
128 |
129 | /**
130 | * to set drawable for a clock.
131 | *
132 | * @param dial
133 | * sets this drawable to clock's dial.
134 | *
135 | * @param hourHand
136 | * sets this drawable to clock's hour hand.
137 | *
138 | * @param minuteHand
139 | * sets this drawable to clock's minute hand.
140 | *
141 | * @param secondHand
142 | * sets this drawable to clock's second hand.
143 | *
144 | * @param isSeconeHandVisible
145 | * if true enabled second hand.
146 | */
147 | public void setImages(Drawable dial,Drawable hourHand,Drawable minuteHand,Drawable secondHand,boolean isSeconeHandVisible){
148 | mDial = dial;
149 | mHourHand = hourHand;
150 | mMinuteHand = minuteHand;
151 | mSecondHand = secondHand;
152 |
153 | isSecondHandVisible = isSeconeHandVisible;
154 |
155 | }
156 |
157 | /**
158 | * To enabled second hand
159 | *
160 | * @param isSeconeHandVisible
161 | * if true enabled second hand.
162 | */
163 | public void setSecondHandVisibility(boolean isSeconeHandVisible) {
164 | isSecondHandVisible = isSeconeHandVisible;
165 | }
166 |
167 | @Override
168 | protected void onAttachedToWindow() {
169 | super.onAttachedToWindow();
170 |
171 | if (!mAttached) {
172 | mAttached = true;
173 | }
174 | }
175 |
176 | @Override
177 | protected void onDetachedFromWindow() {
178 | super.onDetachedFromWindow();
179 | if (mAttached) {
180 | mAttached = false;
181 | }
182 | }
183 |
184 | @Override
185 | protected void onSizeChanged(int w, int h, int oldw, int oldh) {
186 | super.onSizeChanged(w, h, oldw, oldh);
187 | mChanged = true;
188 | }
189 |
190 | @Override
191 | protected void onDraw(Canvas canvas) {
192 | super.onDraw(canvas);
193 |
194 | boolean changed = mChanged;
195 | if (changed) {
196 | mChanged = false;
197 | }
198 |
199 | float density = mContext.getResources().getDisplayMetrics().density;
200 |
201 | float px = 20 * density;
202 |
203 | int availableWidth = (int) px;
204 | int availableHeight = (int) px;
205 |
206 | int x = availableWidth / 2;
207 | int y = availableHeight / 2;
208 |
209 | boolean scaled = false;
210 |
211 | if(availableWidth < mDialWidth || availableHeight < mDialHeight) {
212 | scaled = true;
213 | float scale = Math.min((float) availableWidth / (float) mDialWidth, (float) availableHeight / (float) mDialHeight);
214 | canvas.save();
215 | canvas.rotate(180, x, y);
216 | canvas.scale(scale, scale, x, y);
217 | }
218 |
219 | if(changed) {
220 | mDial.setBounds(x - (mDialWidth / 2), y - (mDialHeight / 2), x + (mDialWidth / 2), y + (mDialHeight / 2));
221 | }
222 |
223 | mDial.draw(canvas);
224 |
225 | canvas.save();
226 | canvas.rotate(mHour / 12.0f * 360.0f, x, y);
227 | final Drawable hourHand = mHourHand;
228 | if (changed) {
229 | int hourHandWidth = hourHand.getIntrinsicWidth();
230 | int hourHandHeight = hourHand.getIntrinsicHeight();
231 | hourHand.setBounds(x - (hourHandWidth / 2), y - (hourHandHeight / 2), x + (hourHandWidth / 2), y + (hourHandHeight / 2));
232 | }
233 | hourHand.draw(canvas);
234 | canvas.restore();
235 |
236 | canvas.save();
237 | canvas.rotate(mMinutes / 60.0f * 360.0f, x, y);
238 | final Drawable minuteHand = mMinuteHand;
239 | if (changed) {
240 | int minuteHandWidth = minuteHand.getIntrinsicWidth();
241 | int minuteHandHeight = minuteHand.getIntrinsicHeight();
242 | minuteHand.setBounds(x - (minuteHandWidth / 2), y - (minuteHandHeight / 2), x + (minuteHandWidth / 2), y + (minuteHandHeight / 2));
243 | }
244 | minuteHand.draw(canvas);
245 | canvas.restore();
246 | canvas.save();
247 | canvas.rotate(mSeconds, x, y);
248 |
249 | if(isSecondHandVisible){
250 | int secondHandWidth = mSecondHand.getIntrinsicWidth();
251 | int secondHandHeight = mSecondHand.getIntrinsicHeight();
252 | mSecondHand.setBounds(x - (secondHandWidth / 2), y - (secondHandHeight / 2), x + (secondHandWidth / 2), y + (secondHandHeight / 2));
253 | }
254 | mSecondHand.draw(canvas);
255 | canvas.restore();
256 | if(scaled) {
257 | canvas.restore();
258 | }
259 | }
260 |
261 | /**
262 | *
263 | * @param mCalendar
264 | */
265 | public void onTimeChanged(Time timeObject) {
266 | int hour = timeObject.hour;
267 | int minute = timeObject.minute;
268 | int second = timeObject.second;
269 |
270 | mSeconds = second;
271 | mMinutes = minute + second / 60.0f;
272 | mHour = hour + mMinutes / 60.0f;
273 | mChanged = true;
274 | }
275 |
276 |
277 | /**
278 | * Set a drawable that will be used for Dialer background.
279 | *
280 | * @param d Drawable to display between pages
281 | */
282 | public void setDialDrawable(Drawable dialer) {
283 | mDial = dialer;
284 | if (dialer != null) refreshDrawableState();
285 | setWillNotDraw(dialer == null);
286 | invalidate();
287 | }
288 |
289 | /**
290 | * Set a drawable that will be used for Dialer background.
291 | *
292 | * @param resId Resource ID of a drawable to display between pages
293 | */
294 | public void setDialDrawable(int resId) {
295 | setDialDrawable(getContext().getResources().getDrawable(resId));
296 | }
297 |
298 | /**
299 | * Set a drawable that will be used for Minute-hand background.
300 | *
301 | * @param d Drawable to display between pages
302 | */
303 | public void setMinuteDrawable(Drawable minute) {
304 | mMinuteHand = minute;
305 | if (minute != null) refreshDrawableState();
306 | setWillNotDraw(minute == null);
307 | invalidate();
308 | }
309 |
310 | /**
311 | * Set a drawable that will be used for Minute-hand background.
312 | *
313 | * @param resId Resource ID of a drawable to display between pages
314 | */
315 | public void setMinuteDrawable(int resId) {
316 | setMinuteDrawable(getContext().getResources().getDrawable(resId));
317 | }
318 |
319 | /**
320 | * Set a drawable that will be used for Hour-hand background.
321 | *
322 | * @param d Drawable to display between pages
323 | */
324 | public void setHourDrawable(Drawable hour) {
325 | mHourHand = hour;
326 | if (hour != null) refreshDrawableState();
327 | setWillNotDraw(hour == null);
328 | invalidate();
329 | }
330 |
331 | /**
332 | * Set a drawable that will be used for Hour-hand background.
333 | *
334 | * @param resId Resource ID of a drawable to display between pages
335 | */
336 | public void setHourDrawable(int resId) {
337 | setHourDrawable(getContext().getResources().getDrawable(resId));
338 | }
339 |
340 | /**
341 | * Set a drawable that will be used for Second-hand background.
342 | *
343 | * @param d Drawable to display between pages
344 | */
345 | public void setSecondDrawable(Drawable second) {
346 | mSecondHand = second;
347 | if (second != null) refreshDrawableState();
348 | setWillNotDraw(second == null);
349 | invalidate();
350 | }
351 |
352 | /**
353 | * Set a drawable that will be used for Second-hand background.
354 | *
355 | * @param resId Resource ID of a drawable to display between pages
356 | */
357 | public void setSecondDrawable(int resId) {
358 | setSecondDrawable(getContext().getResources().getDrawable(resId));
359 | }
360 | }
361 |
--------------------------------------------------------------------------------
/ScrollBarPanelLib/src/com/learnNcode/android/ExtendedListView.java:
--------------------------------------------------------------------------------
1 | package com.learnNcode.android;
2 |
3 |
4 | import android.content.Context;
5 | import android.content.res.TypedArray;
6 | import android.graphics.Canvas;
7 | import android.os.Handler;
8 | import android.util.AttributeSet;
9 | import android.view.LayoutInflater;
10 | import android.view.View;
11 | import android.view.ViewConfiguration;
12 | import android.view.animation.Animation;
13 | import android.view.animation.Animation.AnimationListener;
14 | import android.view.animation.AnimationUtils;
15 | import android.widget.AbsListView;
16 | import android.widget.AbsListView.OnScrollListener;
17 | import android.widget.ListView;
18 |
19 | public class ExtendedListView extends ListView implements OnScrollListener {
20 |
21 | public static interface OnPositionChangedListener {
22 |
23 | public void onPositionChanged(ExtendedListView listView, int position, View scrollBarPanel);
24 |
25 | }
26 |
27 | private OnScrollListener mOnScrollListener = null;
28 |
29 | private View mScrollBarPanel = null;
30 | private int mScrollBarPanelPosition = 0;
31 |
32 | private OnPositionChangedListener mPositionChangedListener;
33 | private int mLastPosition = -1;
34 |
35 | private Animation mInAnimation = null;
36 | private Animation mOutAnimation = null;
37 |
38 | private final Handler mHandler = new Handler();
39 |
40 | private final Runnable mScrollBarPanelFadeRunnable = new Runnable() {
41 |
42 | @Override
43 | public void run() {
44 | if (mOutAnimation != null) {
45 | mScrollBarPanel.startAnimation(mOutAnimation);
46 | }
47 | }
48 | };
49 |
50 | /*
51 | * keep track of Measure Spec
52 | */
53 | private int mWidthMeasureSpec;
54 | private int mHeightMeasureSpec;
55 |
56 | public ExtendedListView(Context context) {
57 | this(context, null);
58 | }
59 |
60 | public ExtendedListView(Context context, AttributeSet attrs) {
61 | this(context, attrs, android.R.attr.listViewStyle);
62 | }
63 |
64 | public ExtendedListView(Context context, AttributeSet attrs, int defStyle) {
65 | super(context, attrs, defStyle);
66 |
67 | super.setOnScrollListener(this);
68 |
69 | final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.Clock);
70 | final int scrollBarPanelLayoutId = a.getResourceId(R.styleable.Clock_scrollBarPanel, -1);
71 | final int scrollBarPanelInAnimation = a.getResourceId(R.styleable.Clock_scrollBarPanelInAnimation, R.anim.in);
72 | final int scrollBarPanelOutAnimation = a.getResourceId(R.styleable.Clock_scrollBarPanelOutAnimation, R.anim.out);
73 | a.recycle();
74 | if (scrollBarPanelLayoutId != -1) {
75 | setScrollBarPanel(scrollBarPanelLayoutId);
76 | }
77 |
78 | final int scrollBarPanelFadeDuration = ViewConfiguration.getScrollBarFadeDuration();
79 |
80 | if (scrollBarPanelInAnimation > 0) {
81 | mInAnimation = AnimationUtils.loadAnimation(getContext(), scrollBarPanelInAnimation);
82 | }
83 |
84 | if (scrollBarPanelOutAnimation > 0) {
85 | mOutAnimation = AnimationUtils.loadAnimation(getContext(), scrollBarPanelOutAnimation);
86 | mOutAnimation.setDuration(scrollBarPanelFadeDuration);
87 |
88 | mOutAnimation.setAnimationListener(new AnimationListener() {
89 |
90 | @Override
91 | public void onAnimationStart(Animation animation) {
92 | }
93 |
94 | @Override
95 | public void onAnimationRepeat(Animation animation) {
96 |
97 | }
98 |
99 | @Override
100 | public void onAnimationEnd(Animation animation) {
101 | if (mScrollBarPanel != null) {
102 | mScrollBarPanel.setVisibility(View.GONE);
103 | }
104 | }
105 | });
106 | }
107 | }
108 |
109 | @Override
110 | public void onScrollStateChanged(AbsListView view, int scrollState) {
111 | if (mOnScrollListener != null) {
112 | mOnScrollListener.onScrollStateChanged(view, scrollState);
113 | }
114 | }
115 |
116 | @Override
117 | public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
118 | if (null != mPositionChangedListener && null != mScrollBarPanel) {
119 |
120 | // Don't do anything if there is no itemviews
121 | if (totalItemCount > 0) {
122 | /*
123 | * from android source code (ScrollBarDrawable.java)
124 | */
125 | final int thickness = getVerticalScrollbarWidth();
126 | int height = Math.round((float) getMeasuredHeight() * computeVerticalScrollExtent() / computeVerticalScrollRange());
127 | int thumbOffset = Math.round((float) (getMeasuredHeight() - height) * computeVerticalScrollOffset() / (computeVerticalScrollRange() - computeVerticalScrollExtent()));
128 | final int minLength = thickness * 2;
129 | if (height < minLength) {
130 | height = minLength;
131 | }
132 | thumbOffset += height / 2;
133 |
134 | /*
135 | * find out which itemviews the center of thumb is on
136 | */
137 | final int count = getChildCount();
138 | for (int i = 0; i < count; ++i) {
139 | final View childView = getChildAt(i);
140 | if (childView != null) {
141 | if (thumbOffset > childView.getTop() && thumbOffset < childView.getBottom()) {
142 | /*
143 | * we have our candidate
144 | */
145 | if (mLastPosition != firstVisibleItem + i) {
146 | mLastPosition = firstVisibleItem + i;
147 |
148 | /*
149 | * inform the position of the panel has changed
150 | */
151 | mPositionChangedListener.onPositionChanged(this, mLastPosition, mScrollBarPanel);
152 |
153 | /*
154 | * measure panel right now since it has just changed
155 | *
156 | * INFO: quick hack to handle TextView has ScrollBarPanel (to wrap text in
157 | * case TextView's content has changed)
158 | */
159 | measureChild(mScrollBarPanel, mWidthMeasureSpec, mHeightMeasureSpec);
160 | }
161 | break;
162 | }
163 | }
164 | }
165 |
166 | /*
167 | * update panel position
168 | */
169 | mScrollBarPanelPosition = thumbOffset - mScrollBarPanel.getMeasuredHeight() / 2;
170 | final int x = getMeasuredWidth() - mScrollBarPanel.getMeasuredWidth() - getVerticalScrollbarWidth();
171 | mScrollBarPanel.layout(x, mScrollBarPanelPosition, x + mScrollBarPanel.getMeasuredWidth(),
172 | mScrollBarPanelPosition + mScrollBarPanel.getMeasuredHeight());
173 | }
174 | }
175 |
176 | if (mOnScrollListener != null) {
177 | mOnScrollListener.onScroll(view, firstVisibleItem, visibleItemCount, totalItemCount);
178 | }
179 | }
180 |
181 | public void setOnPositionChangedListener(OnPositionChangedListener onPositionChangedListener) {
182 | mPositionChangedListener = onPositionChangedListener;
183 | }
184 |
185 | @Override
186 | public void setOnScrollListener(OnScrollListener onScrollListener) {
187 | mOnScrollListener = onScrollListener;
188 | }
189 |
190 | public void setScrollBarPanel(View scrollBarPanel) {
191 | mScrollBarPanel = scrollBarPanel;
192 | mScrollBarPanel.setVisibility(View.GONE);
193 | requestLayout();
194 | }
195 |
196 | public void setScrollBarPanel(int resId) {
197 | setScrollBarPanel(LayoutInflater.from(getContext()).inflate(resId, this, false));
198 | }
199 |
200 | public View getScrollBarPanel() {
201 | return mScrollBarPanel;
202 | }
203 |
204 | @Override
205 | protected boolean awakenScrollBars(int startDelay, boolean invalidate) {
206 | final boolean isAnimationPlayed = super.awakenScrollBars(startDelay, invalidate);
207 | if (isAnimationPlayed == true && mScrollBarPanel != null) {
208 | if (mScrollBarPanel.getVisibility() == View.GONE) {
209 | mScrollBarPanel.setVisibility(View.VISIBLE);
210 | if (mInAnimation != null) {
211 | mScrollBarPanel.startAnimation(mInAnimation);
212 | }
213 | }
214 |
215 | mHandler.removeCallbacks(mScrollBarPanelFadeRunnable);
216 | mHandler.postAtTime(mScrollBarPanelFadeRunnable, AnimationUtils.currentAnimationTimeMillis() + startDelay);
217 | }
218 |
219 | return isAnimationPlayed;
220 | }
221 |
222 | @Override
223 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
224 | super.onMeasure(widthMeasureSpec, heightMeasureSpec);
225 |
226 | if (mScrollBarPanel != null && getAdapter() != null) {
227 | mWidthMeasureSpec = widthMeasureSpec;
228 | mHeightMeasureSpec = heightMeasureSpec;
229 | measureChild(mScrollBarPanel, widthMeasureSpec, heightMeasureSpec);
230 | }
231 | }
232 |
233 | @Override
234 | protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
235 | super.onLayout(changed, left, top, right, bottom);
236 |
237 | if (mScrollBarPanel != null) {
238 | final int x = getMeasuredWidth() - mScrollBarPanel.getMeasuredWidth() - getVerticalScrollbarWidth();
239 | mScrollBarPanel.layout(x, mScrollBarPanelPosition, x + mScrollBarPanel.getMeasuredWidth(),
240 | mScrollBarPanelPosition + mScrollBarPanel.getMeasuredHeight());
241 | }
242 | }
243 |
244 | @Override
245 | protected void dispatchDraw(Canvas canvas) {
246 | super.dispatchDraw(canvas);
247 |
248 | if (mScrollBarPanel != null && mScrollBarPanel.getVisibility() == View.VISIBLE) {
249 | drawChild(canvas, mScrollBarPanel, getDrawingTime());
250 | }
251 | }
252 |
253 | @Override
254 | public void onDetachedFromWindow() {
255 | super.onDetachedFromWindow();
256 |
257 | mHandler.removeCallbacks(mScrollBarPanelFadeRunnable);
258 | }
259 |
260 | public void setScrollBarPanelInAnimationDuration(int animationDuration){
261 | mInAnimation.setDuration(animationDuration);
262 | }
263 |
264 | public void setScrollBarPanelOutAnimationDuration(int animationDuration){
265 | mOutAnimation.setDuration(animationDuration);
266 | }
267 |
268 | /*public void setScrollBarPanelInAnimation(Animation inAnimation){
269 | mInAnimation = inAnimation;
270 | }*/
271 |
272 | }
273 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.learnNcode.sample
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 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/.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 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/R.txt:
--------------------------------------------------------------------------------
1 | int anim in 0x7f040000
2 | int anim out 0x7f040001
3 | int attr hand_dial 0x7f010000
4 | int attr hand_hour 0x7f010001
5 | int attr hand_minute 0x7f010002
6 | int attr hand_second 0x7f010003
7 | int attr scrollBarPanel 0x7f010004
8 | int attr scrollBarPanelInAnimation 0x7f010005
9 | int attr scrollBarPanelOutAnimation 0x7f010006
10 | int drawable background_scrollbarpanel 0x7f020000
11 | int drawable ic_launcher 0x7f020001
12 | int drawable ic_timer_clock_dialer 0x7f020002
13 | int drawable ic_timer_clock_hour_hand 0x7f020003
14 | int drawable ic_timer_clock_minute_hand 0x7f020004
15 | int drawable ic_timer_clock_second_hand 0x7f020005
16 | int drawable icon 0x7f020006
17 | int drawable scrollbarpanel_background 0x7f020007
18 | int id analogClockScroller 0x7f080002
19 | int id clock_layout 0x7f080001
20 | int id menu_settings 0x7f080004
21 | int id scrollbar_panel_layout 0x7f080000
22 | int id timeTextView 0x7f080003
23 | int layout activity_main 0x7f030000
24 | int layout list_item 0x7f030001
25 | int layout scrollbarpanel 0x7f030002
26 | int menu activity_main 0x7f070000
27 | int string app_name 0x7f050001
28 | int string hello 0x7f050000
29 | int string hello_world 0x7f050003
30 | int string menu_settings 0x7f050002
31 | int style AppBaseTheme 0x7f060000
32 | int style AppTheme 0x7f060001
33 | int[] styleable Clock { 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006 }
34 | int styleable Clock_hand_dial 0
35 | int styleable Clock_hand_hour 1
36 | int styleable Clock_hand_minute 2
37 | int styleable Clock_hand_second 3
38 | int styleable Clock_scrollBarPanel 4
39 | int styleable Clock_scrollBarPanelInAnimation 5
40 | int styleable Clock_scrollBarPanelOutAnimation 6
41 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes.dex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes.dex
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/BuildConfig.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/BuildConfig.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/MainActivity$DummyAdapter.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/MainActivity$DummyAdapter.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/MainActivity.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/MainActivity.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$anim.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$anim.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$attr.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$attr.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$drawable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$drawable.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$id.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$id.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$layout.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$layout.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$menu.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$menu.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$string.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$string.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$style.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$style.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$styleable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R$styleable.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/example/com/learnncode/sample/R.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/learnNcode/android/R$anim.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/learnNcode/android/R$anim.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/learnNcode/android/R$attr.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/learnNcode/android/R$attr.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/learnNcode/android/R$drawable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/learnNcode/android/R$drawable.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/learnNcode/android/R$layout.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/learnNcode/android/R$layout.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/learnNcode/android/R$string.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/learnNcode/android/R$string.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/learnNcode/android/R$styleable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/learnNcode/android/R$styleable.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/classes/com/learnNcode/android/R.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/classes/com/learnNcode/android/R.class
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/com.learnNcode.sample.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/com.learnNcode.sample.apk
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/dexedLibs/scrollbarpanellib-3630c636dafad10716e1ddd7b88ca891.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/dexedLibs/scrollbarpanellib-3630c636dafad10716e1ddd7b88ca891.jar
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/jarlist.cache:
--------------------------------------------------------------------------------
1 | # cache for current jar dependency. DO NOT EDIT.
2 | # format is
3 | # Encoding is UTF-8
4 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/com.learnNcode.sample/bin/resources.ap_:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/bin/resources.ap_
--------------------------------------------------------------------------------
/com.learnNcode.sample/gen/com/example/com/learnncode/sample/BuildConfig.java:
--------------------------------------------------------------------------------
1 | /** Automatically generated file. DO NOT MODIFY */
2 | package com.example.com.learnncode.sample;
3 |
4 | public final class BuildConfig {
5 | public final static boolean DEBUG = true;
6 | }
--------------------------------------------------------------------------------
/com.learnNcode.sample/gen/com/example/com/learnncode/sample/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.example.com.learnncode.sample;
9 |
10 | public final class R {
11 | public static final class anim {
12 | public static final int in=0x7f040000;
13 | public static final int out=0x7f040001;
14 | }
15 | public static final class attr {
16 | /** Must be a reference to another resource, in the form "@[+][package:]type:name
"
17 | or to a theme attribute in the form "?[package:][type:]name
".
18 | */
19 | public static final int hand_dial=0x7f010000;
20 | /**
Must be a reference to another resource, in the form "@[+][package:]type:name
"
21 | or to a theme attribute in the form "?[package:][type:]name
".
22 | */
23 | public static final int hand_hour=0x7f010001;
24 | /**
Must be a reference to another resource, in the form "@[+][package:]type:name
"
25 | or to a theme attribute in the form "?[package:][type:]name
".
26 | */
27 | public static final int hand_minute=0x7f010002;
28 | /**
Must be a reference to another resource, in the form "@[+][package:]type:name
"
29 | or to a theme attribute in the form "?[package:][type:]name
".
30 | */
31 | public static final int hand_second=0x7f010003;
32 | /**
Must be a reference to another resource, in the form "@[+][package:]type:name
"
33 | or to a theme attribute in the form "?[package:][type:]name
".
34 | */
35 | public static final int scrollBarPanel=0x7f010004;
36 | /**
Must be a reference to another resource, in the form "@[+][package:]type:name
"
37 | or to a theme attribute in the form "?[package:][type:]name
".
38 | */
39 | public static final int scrollBarPanelInAnimation=0x7f010005;
40 | /**
Must be a reference to another resource, in the form "@[+][package:]type:name
"
41 | or to a theme attribute in the form "?[package:][type:]name
".
42 | */
43 | public static final int scrollBarPanelOutAnimation=0x7f010006;
44 | }
45 | public static final class drawable {
46 | public static final int background_scrollbarpanel=0x7f020000;
47 | public static final int ic_launcher=0x7f020001;
48 | public static final int ic_timer_clock_dialer=0x7f020002;
49 | public static final int ic_timer_clock_hour_hand=0x7f020003;
50 | public static final int ic_timer_clock_minute_hand=0x7f020004;
51 | public static final int ic_timer_clock_second_hand=0x7f020005;
52 | public static final int icon=0x7f020006;
53 | public static final int scrollbarpanel_background=0x7f020007;
54 | }
55 | public static final class id {
56 | public static final int analogClockScroller=0x7f080002;
57 | public static final int clock_layout=0x7f080001;
58 | public static final int menu_settings=0x7f080004;
59 | public static final int scrollbar_panel_layout=0x7f080000;
60 | public static final int timeTextView=0x7f080003;
61 | }
62 | public static final class layout {
63 | public static final int activity_main=0x7f030000;
64 | public static final int list_item=0x7f030001;
65 | public static final int scrollbarpanel=0x7f030002;
66 | }
67 | public static final class menu {
68 | public static final int activity_main=0x7f070000;
69 | }
70 | public static final class string {
71 | public static final int app_name=0x7f050001;
72 | public static final int hello=0x7f050000;
73 | public static final int hello_world=0x7f050003;
74 | public static final int menu_settings=0x7f050002;
75 | }
76 | public static final class style {
77 | /**
78 | Base application theme, dependent on API level. This theme is replaced
79 | by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
80 |
81 |
82 | Theme customizations available in newer API levels can go in
83 | res/values-vXX/styles.xml, while customizations related to
84 | backward-compatibility can go here.
85 |
86 |
87 | Base application theme for API 11+. This theme completely replaces
88 | AppBaseTheme from res/values/styles.xml on API 11+ devices.
89 |
90 | API 11 theme customizations can go here.
91 |
92 | Base application theme for API 14+. This theme completely replaces
93 | AppBaseTheme from BOTH res/values/styles.xml and
94 | res/values-v11/styles.xml on API 14+ devices.
95 |
96 | API 14 theme customizations can go here.
97 | */
98 | public static final int AppBaseTheme=0x7f060000;
99 | /** Application theme.
100 | All customizations that are NOT specific to a particular API-level can go here.
101 | */
102 | public static final int AppTheme=0x7f060001;
103 | }
104 | public static final class styleable {
105 | /** Attributes that can be used with a Clock.
106 |
Includes the following attributes:
107 |
108 |
109 |
110 | Attribute | Description |
111 | {@link #Clock_hand_dial com.example.com.learnncode.sample:hand_dial} | |
112 | {@link #Clock_hand_hour com.example.com.learnncode.sample:hand_hour} | |
113 | {@link #Clock_hand_minute com.example.com.learnncode.sample:hand_minute} | |
114 | {@link #Clock_hand_second com.example.com.learnncode.sample:hand_second} | |
115 | {@link #Clock_scrollBarPanel com.example.com.learnncode.sample:scrollBarPanel} | |
116 | {@link #Clock_scrollBarPanelInAnimation com.example.com.learnncode.sample:scrollBarPanelInAnimation} | |
117 | {@link #Clock_scrollBarPanelOutAnimation com.example.com.learnncode.sample:scrollBarPanelOutAnimation} | |
118 |
119 | @see #Clock_hand_dial
120 | @see #Clock_hand_hour
121 | @see #Clock_hand_minute
122 | @see #Clock_hand_second
123 | @see #Clock_scrollBarPanel
124 | @see #Clock_scrollBarPanelInAnimation
125 | @see #Clock_scrollBarPanelOutAnimation
126 | */
127 | public static final int[] Clock = {
128 | 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003,
129 | 0x7f010004, 0x7f010005, 0x7f010006
130 | };
131 | /**
132 | This symbol is the offset where the {@link com.example.com.learnncode.sample.R.attr#hand_dial}
133 | attribute's value can be found in the {@link #Clock} array.
134 |
135 |
136 |
Must be a reference to another resource, in the form "@[+][package:]type:name
"
137 | or to a theme attribute in the form "?[package:][type:]name
".
138 | @attr name android:hand_dial
139 | */
140 | public static final int Clock_hand_dial = 0;
141 | /**
142 |
This symbol is the offset where the {@link com.example.com.learnncode.sample.R.attr#hand_hour}
143 | attribute's value can be found in the {@link #Clock} array.
144 |
145 |
146 |
Must be a reference to another resource, in the form "@[+][package:]type:name
"
147 | or to a theme attribute in the form "?[package:][type:]name
".
148 | @attr name android:hand_hour
149 | */
150 | public static final int Clock_hand_hour = 1;
151 | /**
152 |
This symbol is the offset where the {@link com.example.com.learnncode.sample.R.attr#hand_minute}
153 | attribute's value can be found in the {@link #Clock} array.
154 |
155 |
156 |
Must be a reference to another resource, in the form "@[+][package:]type:name
"
157 | or to a theme attribute in the form "?[package:][type:]name
".
158 | @attr name android:hand_minute
159 | */
160 | public static final int Clock_hand_minute = 2;
161 | /**
162 |
This symbol is the offset where the {@link com.example.com.learnncode.sample.R.attr#hand_second}
163 | attribute's value can be found in the {@link #Clock} array.
164 |
165 |
166 |
Must be a reference to another resource, in the form "@[+][package:]type:name
"
167 | or to a theme attribute in the form "?[package:][type:]name
".
168 | @attr name android:hand_second
169 | */
170 | public static final int Clock_hand_second = 3;
171 | /**
172 |
This symbol is the offset where the {@link com.example.com.learnncode.sample.R.attr#scrollBarPanel}
173 | attribute's value can be found in the {@link #Clock} array.
174 |
175 |
176 |
Must be a reference to another resource, in the form "@[+][package:]type:name
"
177 | or to a theme attribute in the form "?[package:][type:]name
".
178 | @attr name android:scrollBarPanel
179 | */
180 | public static final int Clock_scrollBarPanel = 4;
181 | /**
182 |
This symbol is the offset where the {@link com.example.com.learnncode.sample.R.attr#scrollBarPanelInAnimation}
183 | attribute's value can be found in the {@link #Clock} array.
184 |
185 |
186 |
Must be a reference to another resource, in the form "@[+][package:]type:name
"
187 | or to a theme attribute in the form "?[package:][type:]name
".
188 | @attr name android:scrollBarPanelInAnimation
189 | */
190 | public static final int Clock_scrollBarPanelInAnimation = 5;
191 | /**
192 |
This symbol is the offset where the {@link com.example.com.learnncode.sample.R.attr#scrollBarPanelOutAnimation}
193 | attribute's value can be found in the {@link #Clock} array.
194 |
195 |
196 |
Must be a reference to another resource, in the form "@[+][package:]type:name
"
197 | or to a theme attribute in the form "?[package:][type:]name
".
198 | @attr name android:scrollBarPanelOutAnimation
199 | */
200 | public static final int Clock_scrollBarPanelOutAnimation = 6;
201 | };
202 | }
203 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/gen/com/learnNcode/android/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 | package com.learnNcode.android;
8 |
9 | public final class R {
10 | public static final class anim {
11 | public static final int in = 0x7f040000;
12 | public static final int out = 0x7f040001;
13 | }
14 | public static final class attr {
15 | public static final int hand_dial = 0x7f010000;
16 | public static final int hand_hour = 0x7f010001;
17 | public static final int hand_minute = 0x7f010002;
18 | public static final int hand_second = 0x7f010003;
19 | public static final int scrollBarPanel = 0x7f010004;
20 | public static final int scrollBarPanelInAnimation = 0x7f010005;
21 | public static final int scrollBarPanelOutAnimation = 0x7f010006;
22 | }
23 | public static final class drawable {
24 | public static final int background_scrollbarpanel = 0x7f020000;
25 | public static final int ic_timer_clock_dialer = 0x7f020002;
26 | public static final int ic_timer_clock_hour_hand = 0x7f020003;
27 | public static final int ic_timer_clock_minute_hand = 0x7f020004;
28 | public static final int ic_timer_clock_second_hand = 0x7f020005;
29 | public static final int icon = 0x7f020006;
30 | public static final int scrollbarpanel_background = 0x7f020007;
31 | }
32 | public static final class layout {
33 | public static final int list_item = 0x7f030001;
34 | }
35 | public static final class string {
36 | public static final int app_name = 0x7f050001;
37 | public static final int hello = 0x7f050000;
38 | }
39 | public static final class styleable {
40 | public static final int[] Clock = { 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006 };
41 | public static final int Clock_hand_dial = 0;
42 | public static final int Clock_hand_hour = 1;
43 | public static final int Clock_hand_minute = 2;
44 | public static final int Clock_hand_second = 3;
45 | public static final int Clock_scrollBarPanel = 4;
46 | public static final int Clock_scrollBarPanelInAnimation = 5;
47 | public static final int Clock_scrollBarPanelOutAnimation = 6;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/ic_launcher-web.png
--------------------------------------------------------------------------------
/com.learnNcode.sample/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/com.learnNcode.sample/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 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/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-17
15 | android.library.reference.1=../ScrollBarPanelLib
16 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/com.learnNcode.sample/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/com.learnNcode.sample/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/com.learnNcode.sample/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/learnNcode/ScrollBarPanelWithClock/7123cee3287d5c8f19ba9cffacb4dec7a84ac8d8/com.learnNcode.sample/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/com.learnNcode.sample/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/res/layout/scrollbarpanel.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
22 |
23 |
29 |
30 |
39 |
40 |
49 |
50 |
51 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/res/menu/activity_main.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/res/values-v14/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | com.learnNcode.sample
5 | Settings
6 | Hello world!
7 |
8 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/com.learnNcode.sample/src/com/example/com/learnncode/sample/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.com.learnncode.sample;
2 |
3 | import android.app.Activity;
4 | import android.graphics.Color;
5 | import android.os.Bundle;
6 | import android.text.format.Time;
7 | import android.view.LayoutInflater;
8 | import android.view.View;
9 | import android.view.ViewGroup;
10 | import android.widget.BaseAdapter;
11 | import android.widget.TextView;
12 |
13 | import com.learnNcode.android.Clock;
14 | import com.learnNcode.android.ExtendedListView;
15 | import com.learnNcode.android.ExtendedListView.OnPositionChangedListener;
16 |
17 | public class MainActivity extends Activity implements OnPositionChangedListener {
18 |
19 | private ExtendedListView mListView;
20 |
21 | @Override
22 | public void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 |
25 | setContentView(com.example.com.learnncode.sample.R.layout.activity_main);
26 |
27 | mListView = (ExtendedListView) findViewById(android.R.id.list);
28 | mListView.setAdapter(new DummyAdapter());
29 | mListView.setCacheColorHint(Color.TRANSPARENT);
30 | mListView.setOnPositionChangedListener(this);
31 |
32 | // mListView.setScrollBarPanelInAnimationDuration(500);
33 | // mListView.setScrollBarPanelOutAnimationDuration(8000);
34 |
35 | }
36 |
37 | private class DummyAdapter extends BaseAdapter {
38 |
39 | private int mNumDummies = 100;
40 |
41 | @Override
42 | public int getCount() {
43 | return mNumDummies;
44 | }
45 |
46 | @Override
47 | public Object getItem(int position) {
48 | return position;
49 | }
50 |
51 | @Override
52 | public long getItemId(int position) {
53 | return position;
54 | }
55 |
56 | @Override
57 | public View getView(int position, View convertView, ViewGroup parent) {
58 | if (convertView == null) {
59 | convertView = LayoutInflater.from(MainActivity.this).inflate(R.layout.list_item, parent,
60 | false);
61 | }
62 | return convertView;
63 | }
64 | }
65 |
66 | @Override
67 | public void onPositionChanged(ExtendedListView listView, int position, View scrollBarPanel) {
68 | Clock analogClockObj = (Clock) scrollBarPanel.findViewById(R.id.analogClockScroller);
69 |
70 | TextView tv = (TextView) scrollBarPanel.findViewById(R.id.timeTextView);
71 | tv.setText(""+position);
72 |
73 | Time timeObj = new Time();
74 | analogClockObj.setSecondHandVisibility(false);
75 | analogClockObj.setVisibility(View.VISIBLE);
76 | timeObj.set(position+3, position, 5, 0, 0, 0);
77 | analogClockObj.onTimeChanged(timeObj);
78 |
79 | }
80 | }
81 |
--------------------------------------------------------------------------------