14 | * Necessary to resolve circular dependency between base CardView and platform implementations.
15 | */
16 | interface CardViewDelegate {
17 |
18 | void setBackgroundDrawable(Drawable paramDrawable);
19 |
20 | Drawable getBackground();
21 | }
22 |
--------------------------------------------------------------------------------
/src/com/wangjie/androidbucket/customviews/borderscrollview/OnScrollChangedListenerSimple.java:
--------------------------------------------------------------------------------
1 | package com.wangjie.androidbucket.customviews.borderscrollview;
2 |
3 | /**
4 | * Created with IntelliJ IDEA.
5 | * Author: wangjie email:tiantian.china.2@gmail.com
6 | * Date: 13-9-9
7 | * Time: 下午2:39
8 | */
9 | public class OnScrollChangedListenerSimple implements OnScrollChangedListener{
10 | @Override
11 | public void onScrollChanged(int l, int t, int oldl, int oldt) {
12 | }
13 |
14 | @Override
15 | public void onScrollTop() {
16 | }
17 |
18 | @Override
19 | public void onScrollBottom() {
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/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 | android.library=true
14 | # Project target.
15 | target=android-21
--------------------------------------------------------------------------------
/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | extends RequestListener {
10 |
11 | private R result;
12 |
13 | @Override
14 | public final void onResponseInBackground(P response) {
15 | result = onRunInBackground(response);
16 | }
17 |
18 | public abstract R onRunInBackground(P response);
19 |
20 | public abstract void onResponseParsed(R result);
21 |
22 | @Override
23 | public final void onResponse(P response) {
24 | onResponseParsed(result);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/com/wangjie/androidbucket/customviews/dropdownmenu/IDropMenu.java:
--------------------------------------------------------------------------------
1 | package com.wangjie.androidbucket.customviews.dropdownmenu;
2 |
3 | import android.view.View;
4 | import android.widget.AdapterView;
5 |
6 | /**
7 | * Created with IntelliJ IDEA.
8 | * Author: wangjie email:tiantian.china.2@gmail.com
9 | * Date: 13-11-27
10 | * Time: 下午4:44
11 | */
12 | public interface IDropMenu {
13 | /**
14 | * 设置下拉菜单的每一项名称
15 | * @return
16 | */
17 | public String[] getDropDownMenuItems();
18 |
19 | /**
20 | * 下拉菜单item点击回调方法
21 | * @param parent
22 | * @param view
23 | * @param position
24 | * @param id
25 | */
26 | public void onDropDownMenuItemClick(AdapterView> parent, View view, int position, long id);
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/com/wangjie/androidbucket/adapter/listener/OnAdapterScrollSampleListener.java:
--------------------------------------------------------------------------------
1 | package com.wangjie.androidbucket.adapter.listener;
2 |
3 | import android.widget.AbsListView;
4 |
5 | /**
6 | * Author: wangjie
7 | * Email: tiantian.china.2@gmail.com
8 | * Date: 12/3/14.
9 | */
10 | public class OnAdapterScrollSampleListener implements OnAdapterScrollListener{
11 | @Override
12 | public void onScrollStateChanged(AbsListView view, int scrollState) {}
13 |
14 | @Override
15 | public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {}
16 |
17 | @Override
18 | public void onTopWhenScrollIdle(AbsListView view) {}
19 |
20 | @Override
21 | public void onBottomWhenScrollIdle(AbsListView view) {}
22 | }
23 |
--------------------------------------------------------------------------------
/src/com/wangjie/androidbucket/services/network/exception/HippoException.java:
--------------------------------------------------------------------------------
1 | package com.wangjie.androidbucket.services.network.exception;
2 |
3 | /**
4 | * @author Hubert He
5 | * @version V1.0
6 | * @Description
7 | * @Createdate 14-9-24 14:19
8 | */
9 | public class HippoException extends Exception {
10 |
11 | private String errorMessage = null;
12 |
13 | private static final String TAG = HippoException.class.getSimpleName();
14 |
15 | public HippoException(String detailMessage) {
16 | super(TAG + ": " + detailMessage);
17 | errorMessage = detailMessage;
18 | }
19 |
20 | public HippoException(String detailMessage, Exception e) {
21 | super(TAG + ": " + detailMessage, e);
22 | errorMessage = detailMessage;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/com/wangjie/androidbucket/adapter/typeadapter/expand/ExpandGroupAdapterTypeRender.java:
--------------------------------------------------------------------------------
1 | package com.wangjie.androidbucket.adapter.typeadapter.expand;
2 |
3 | import android.view.View;
4 |
5 | /**
6 | * 用于对不同类型item的group数据到UI的渲染
7 | * Author: wangjie
8 | * Email: tiantian.china.2@gmail.com
9 | * Date: 9/14/14.
10 | */
11 | public interface ExpandGroupAdapterTypeRender {
12 |
13 | /**
14 | * 返回一个item的convertView,也就是BaseAdapter中getView方法中返回的convertView
15 | *
16 | * @return
17 | */
18 | View getConvertView();
19 |
20 | /**
21 | * 填充item中各个控件的事件,比如按钮点击事件等
22 | */
23 | void fitEvents();
24 |
25 | /**
26 | * 对指定position的item进行数据的适配
27 | *
28 | * @param groupPosition
29 | */
30 | void fitDatas(int groupPosition);
31 |
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/src/com/wangjie/androidbucket/support/cardview/CardViewJellybeanMr1.java:
--------------------------------------------------------------------------------
1 | package com.wangjie.androidbucket.support.cardview;
2 |
3 | import android.graphics.Canvas;
4 | import android.graphics.Paint;
5 | import android.graphics.RectF;
6 |
7 | /**
8 | * Author: wangjie
9 | * Email: tiantian.china.2@gmail.com
10 | * Date: 12/15/14.
11 | */
12 | class CardViewJellybeanMr1 extends CardViewEclairMr1 {
13 |
14 | @Override
15 | public void initStatic() {
16 | RoundRectDrawableWithShadow.sRoundRectHelper = new RoundRectDrawableWithShadow.RoundRectHelper() {
17 |
18 | @Override
19 | public void drawRoundRect(Canvas canvas, RectF bounds, float cornerRadius, Paint paint) {
20 | canvas.drawRoundRect(bounds, cornerRadius, cornerRadius, paint);
21 | }
22 | };
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/res/layout/ab_horizontial_edit_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |