├── .gitignore
├── .idea
├── .name
├── codeStyleSettings.xml
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── inspectionProfiles
│ ├── Project_Default.xml
│ └── profiles_settings.xml
├── libraries
│ ├── ShareSDK_Core_2_3_1.xml
│ ├── ShareSDK_SinaWeibo_2_3_1.xml
│ ├── ShareSDK_Twitter_2_3_1.xml
│ ├── afinal_0_5_bin.xml
│ ├── appcompat_v7_19_0_1.xml
│ ├── disklrucache_2_0_2.xml
│ ├── nineoldandroids_2_4_0.xml
│ ├── okhttp_1_2_1_jar_with_dependencies.xml
│ ├── support_v4_19_0_1.xml
│ └── volley.xml
├── misc.xml
├── modules.xml
├── scopes
│ └── scope_settings.xml
└── vcs.xml
├── Dribbb
├── .gitignore
├── .idea
│ ├── .name
│ ├── compiler.xml
│ ├── copyright
│ │ └── profiles_settings.xml
│ ├── encodings.xml
│ ├── gradle.xml
│ ├── libraries
│ │ ├── ShareSDK_Core_2_3_1.xml
│ │ ├── ShareSDK_SinaWeibo_2_3_1.xml
│ │ ├── ShareSDK_Twitter_2_3_1.xml
│ │ ├── afinal_0_5_bin.xml
│ │ ├── appcompat_v7_19_0_1.xml
│ │ ├── disklrucache_2_0_2.xml
│ │ ├── nineoldandroids_2_4_0.xml
│ │ ├── okhttp_1_2_1_jar_with_dependencies.xml
│ │ ├── support_v4_19_0_1.xml
│ │ └── volley.xml
│ ├── misc.xml
│ ├── modules.xml
│ ├── scopes
│ │ └── scope_settings.xml
│ ├── vcs.xml
│ └── workspace.xml
├── Dribbb.iml
├── build.gradle
├── build
│ └── apk
│ │ └── Dribbb-debug-unaligned.apk
├── lib
│ ├── ShareSDK-Core-2.3.1.jar
│ ├── ShareSDK-Douban-2.3.1.jar
│ ├── ShareSDK-Dropbox-2.3.1.jar
│ ├── ShareSDK-Email-2.3.1.jar
│ ├── ShareSDK-Evernote-2.3.1.jar
│ ├── ShareSDK-Facebook-2.3.1.jar
│ ├── ShareSDK-Flickr-2.3.1.jar
│ ├── ShareSDK-Foursquare-2.3.1.jar
│ ├── ShareSDK-GooglePlus-2.3.1.jar
│ ├── ShareSDK-Instagram-2.3.1.jar
│ ├── ShareSDK-KaiXin-2.3.1.jar
│ ├── ShareSDK-Linkedin-2.3.1.jar
│ ├── ShareSDK-NetEaseMicroBlog-2.3.1.jar
│ ├── ShareSDK-Pinterest-2.3.1.jar
│ ├── ShareSDK-QQ-2.3.1.jar
│ ├── ShareSDK-QZone-2.3.1.jar
│ ├── ShareSDK-Renren-2.3.1.jar
│ ├── ShareSDK-ShortMessage-2.3.1.jar
│ ├── ShareSDK-SinaWeibo-2.3.1.jar
│ ├── ShareSDK-SohuSuishenkan-2.3.1.jar
│ ├── ShareSDK-SouhuMicroBlog-2.3.1.jar
│ ├── ShareSDK-TencentWeibo-2.3.1.jar
│ ├── ShareSDK-Tumblr-2.3.1.jar
│ ├── ShareSDK-Twitter-2.3.1.jar
│ ├── ShareSDK-VKontakte-2.3.1.jar
│ ├── ShareSDK-Wechat-2.3.1.jar
│ ├── ShareSDK-Wechat-Core-2.3.1.jar
│ ├── ShareSDK-Wechat-Favorite-2.3.1.jar
│ ├── ShareSDK-Wechat-Moments-2.3.1.jar
│ ├── ShareSDK-Yixin-2.3.1.jar
│ ├── ShareSDK-Yixin-Core-2.3.1.jar
│ ├── ShareSDK-Yixin-Moments-2.3.1.jar
│ ├── ShareSDK-YouDao-2.3.1.jar
│ ├── afinal_0.5_bin.jar
│ ├── disklrucache-2.0.2.jar
│ ├── nineoldandroids-2.4.0.jar
│ ├── okhttp-1.2.1-jar-with-dependencies.jar
│ └── volley.jar
├── local.properties
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── assets
│ ├── ShareSDK.conf
│ └── font
│ │ ├── Roboto-Light.ttf
│ │ ├── Roboto-Thin.ttf
│ │ └── Wendy.ttf
│ ├── ic_launcher-web.png
│ ├── java
│ ├── android
│ │ └── support
│ │ │ └── util
│ │ │ ├── Base64.java
│ │ │ └── LruCache.java
│ ├── cn
│ │ └── sharesdk
│ │ │ └── onekeyshare
│ │ │ ├── CustomerLogo.java
│ │ │ ├── EditPage.java
│ │ │ ├── FollowList.java
│ │ │ ├── OnekeyShare.java
│ │ │ ├── PicViewer.java
│ │ │ ├── PlatformGridView.java
│ │ │ ├── ShareContentCustomizeCallback.java
│ │ │ └── ShareCore.java
│ ├── com
│ │ ├── astuetz
│ │ │ └── PagerSlidingTabStrip.java
│ │ ├── fortysevendeg
│ │ │ └── swipelistview
│ │ │ │ ├── BaseSwipeListViewListener.java
│ │ │ │ ├── SwipeListView.java
│ │ │ │ ├── SwipeListViewListener.java
│ │ │ │ └── SwipeListViewTouchListener.java
│ │ ├── foxykeep
│ │ │ └── datadroid
│ │ │ │ ├── exception
│ │ │ │ ├── ConnectionException.java
│ │ │ │ ├── CustomRequestException.java
│ │ │ │ └── DataException.java
│ │ │ │ ├── internal
│ │ │ │ └── network
│ │ │ │ │ └── NetworkConnectionImpl.java
│ │ │ │ ├── network
│ │ │ │ ├── HttpUrlConnectionHelper.java
│ │ │ │ ├── NetworkConnection.java
│ │ │ │ └── UserAgentUtils.java
│ │ │ │ ├── requestmanager
│ │ │ │ ├── Request.java
│ │ │ │ └── RequestManager.java
│ │ │ │ ├── service
│ │ │ │ ├── MultiThreadedIntentService.java
│ │ │ │ └── RequestService.java
│ │ │ │ └── util
│ │ │ │ ├── DataDroidLog.java
│ │ │ │ └── ObjectUtils.java
│ │ └── jeremyfeinstein
│ │ │ └── slidingmenu
│ │ │ └── lib
│ │ │ ├── CanvasTransformerBuilder.java
│ │ │ ├── CustomViewAbove.java
│ │ │ ├── CustomViewBehind.java
│ │ │ ├── MenuInterface.java
│ │ │ ├── SlidingMenu.java
│ │ │ └── app
│ │ │ ├── SlidingActivity.java
│ │ │ ├── SlidingActivityBase.java
│ │ │ ├── SlidingActivityHelper.java
│ │ │ ├── SlidingFragmentActivity.java
│ │ │ ├── SlidingListActivity.java
│ │ │ └── SlidingPreferenceActivity.java
│ ├── me
│ │ └── imid
│ │ │ └── swipebacklayout
│ │ │ └── lib
│ │ │ ├── SwipeBackLayout.java
│ │ │ ├── ViewDragHelper.java
│ │ │ └── app
│ │ │ ├── SwipeBackActivity.java
│ │ │ ├── SwipeBackActivityBase.java
│ │ │ ├── SwipeBackActivityHelper.java
│ │ │ └── SwipeBackPreferenceActivity.java
│ ├── net
│ │ └── frakbot
│ │ │ ├── cache
│ │ │ └── CacheHelper.java
│ │ │ ├── imageviewex
│ │ │ ├── Converters.java
│ │ │ ├── ImageAlign.java
│ │ │ ├── ImageViewEx.java
│ │ │ ├── ImageViewNext.java
│ │ │ ├── broadcastreceiver
│ │ │ │ └── ConnectivityChangeBroadcastReceiver.java
│ │ │ ├── listener
│ │ │ │ └── ImageViewExRequestListener.java
│ │ │ ├── operation
│ │ │ │ ├── ImageDiskCacheOperation.java
│ │ │ │ ├── ImageDownloadOperation.java
│ │ │ │ └── ImageMemCacheOperation.java
│ │ │ ├── requestmanager
│ │ │ │ ├── ImageViewExRequestFactory.java
│ │ │ │ └── ImageViewExRequestManager.java
│ │ │ └── service
│ │ │ │ └── ImageViewExService.java
│ │ │ └── remote
│ │ │ └── RemoteHelper.java
│ └── nl.lance.dribbb
│ │ ├── activites
│ │ ├── ChoiceActivity.java
│ │ ├── ContentActivity.java
│ │ ├── DActivity.java
│ │ ├── LoadingActivity.java
│ │ ├── PlayerActivity.java
│ │ ├── ShotsDetail.java
│ │ ├── UActivity.java
│ │ └── welcome
│ │ │ ├── GuideActivity.java
│ │ │ └── WelcomeActivity.java
│ │ ├── adapter
│ │ ├── CommentsAdapter.java
│ │ ├── ContentShotsAdapter.java
│ │ ├── DetailAdapter.java
│ │ ├── DrawerAdapter.java
│ │ ├── PlayerCollectionAdapter.java
│ │ ├── PlayersAdapter.java
│ │ └── ShotsCollectionAdapter.java
│ │ ├── animation
│ │ ├── DepthPageTransformer.java
│ │ └── ZoomOutPageTransformer.java
│ │ ├── application
│ │ └── AppData.java
│ │ ├── models
│ │ ├── Player.java
│ │ └── Shots.java
│ │ ├── network
│ │ ├── BitmapLruCache.java
│ │ ├── DribbbleAPI.java
│ │ ├── PlayerData.java
│ │ └── ShotsData.java
│ │ ├── shots
│ │ └── fragment
│ │ │ ├── CommentsFragment.java
│ │ │ ├── Drawer.java
│ │ │ ├── PlayerCollection.java
│ │ │ ├── PlayerFragment.java
│ │ │ ├── ShotDetailFragment.java
│ │ │ ├── ShotsCollection.java
│ │ │ └── ShotsFragment.java
│ │ └── views
│ │ ├── FooterState.java
│ │ ├── ObservableScrollView.java
│ │ ├── ScrollGridView.java
│ │ └── ShareDialog.java
│ └── res
│ ├── anim
│ ├── alpha.xml
│ ├── alpha2.xml
│ ├── list_controller.xml
│ ├── trans.xml
│ └── trans2.xml
│ ├── drawable-hdpi
│ └── ic_launcher.png
│ ├── drawable-mdpi
│ └── ic_launcher.png
│ ├── drawable-xhdpi
│ ├── btn_cancel_back.9.png
│ ├── collect.png
│ ├── default_ptr_flip.png
│ ├── default_ptr_rotate.png
│ ├── delete.png
│ ├── ic_action.png
│ ├── ic_comment.png
│ ├── ic_drawer.png
│ ├── ic_launcher.png
│ ├── ic_like.png
│ ├── ic_likes.png
│ ├── ic_refresh.png
│ ├── ic_view.png
│ ├── ic_views.png
│ ├── nav_back.png
│ ├── shadow_bottom.png
│ ├── shadow_left.png
│ ├── shadow_right.png
│ ├── share_vp_back.9.png
│ ├── sinaweibo.png
│ ├── ssdk_auth_title_back.png
│ ├── ssdk_back_arr.png
│ ├── ssdk_logo.png
│ ├── ssdk_title_div.png
│ ├── twitter.png
│ ├── twitter2.png
│ ├── weibo.png
│ ├── welcome1.png
│ ├── welcome2.png
│ ├── welcome3.png
│ ├── welcome4.png
│ └── welcomeback.png
│ ├── drawable-xxhdpi
│ └── ic_launcher.png
│ ├── drawable
│ ├── actionbar_tab_indicator.xml
│ ├── auth_follow_cb_chd.png
│ ├── auth_follow_cb_unc.png
│ ├── auth_title_back.png
│ ├── background_tabs.xml
│ ├── btn_back_nor.9.png
│ ├── btn_cancel_back.9.png
│ ├── button_selector.xml
│ ├── drawer_shadow.9.png
│ ├── edittext_back.9.png
│ ├── gray_point.png
│ ├── ic_launcher.png
│ ├── img_cancel.png
│ ├── itembackground.9.png
│ ├── logo_douban.png
│ ├── logo_dropbox.png
│ ├── logo_email.png
│ ├── logo_evernote.png
│ ├── logo_facebook.png
│ ├── logo_flickr.png
│ ├── logo_foursquare.png
│ ├── logo_googleplus.png
│ ├── logo_kaixin.png
│ ├── logo_linkedin.png
│ ├── logo_neteasemicroblog.png
│ ├── logo_pinterest.png
│ ├── logo_qq.png
│ ├── logo_qzone.png
│ ├── logo_renren.png
│ ├── logo_shortmessage.png
│ ├── logo_sinaweibo.png
│ ├── logo_sohumicroblog.png
│ ├── logo_sohusuishenkan.png
│ ├── logo_tencentweibo.png
│ ├── logo_tumblr.png
│ ├── logo_twitter.png
│ ├── logo_wechat.png
│ ├── logo_wechatmoments.png
│ ├── logo_youdao.png
│ ├── pin.png
│ ├── player_back.png
│ ├── share_tb_back.9.png
│ ├── share_vp_back.9.png
│ ├── sidebar_shadow_right.xml
│ ├── title_back.png
│ ├── title_shadow.png
│ ├── view_selector.xml
│ └── white_point.png
│ ├── layout
│ ├── actioncar_view.xml
│ ├── activity_choice.xml
│ ├── activity_content.xml
│ ├── activity_d.xml
│ ├── activity_guide.xml
│ ├── activity_loading.xml
│ ├── activity_player.xml
│ ├── activity_shots_detail.xml
│ ├── activity_u.xml
│ ├── activity_welcome.xml
│ ├── dialog_connect.xml
│ ├── fragment_comments.xml
│ ├── fragment_drawer.xml
│ ├── fragment_player.xml
│ ├── fragment_player_collect.xml
│ ├── fragment_shots.xml
│ ├── fragment_shots_collect.xml
│ ├── fragment_shots_detail.xml
│ ├── item_collection_players.xml
│ ├── item_collection_shots.xml
│ ├── item_comments.xml
│ ├── item_others.xml
│ ├── item_shots_layout.xml
│ ├── item_user.xml
│ ├── loading_footer.xml
│ ├── menu_layout.xml
│ ├── share_dialog.xml
│ ├── slidingmenumain.xml
│ ├── swipeback_layout.xml
│ ├── views_four.xml
│ ├── views_one.xml
│ ├── views_three.xml
│ └── views_two.xml
│ ├── menu
│ ├── choice.xml
│ ├── content.xml
│ ├── d.xml
│ ├── guide.xml
│ ├── main.xml
│ ├── player.xml
│ ├── shots_detail.xml
│ └── u.xml
│ ├── values-w820dp
│ └── dimens.xml
│ └── values
│ ├── attribs.xml
│ ├── attrs.xml
│ ├── colors.xml
│ ├── dimens.xml
│ ├── ids.xml
│ ├── strings.xml
│ ├── styles.xml
│ └── swipelistview__attrs.xml
├── DribbbProject.iml
├── DribbbleProject.iml
├── README.md
├── build.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | .DS_Store
5 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | Dribbb
--------------------------------------------------------------------------------
/.idea/codeStyleSettings.xml:
--------------------------------------------------------------------------------
1 |
2 |
31 | * 注意:
4 | * Licensed under the Beerware License :
14 | * Subclass this class to create special exceptions for your needs.
15 | *
16 | * @author Foxykeep
17 | */
18 | public abstract class CustomRequestException extends Exception {
19 |
20 | private static final long serialVersionUID = 4658308128254827562L;
21 |
22 | /**
23 | * Constructs a new {@link com.foxykeep.datadroid.exception.CustomRequestException} that includes the current stack trace.
24 | */
25 | public CustomRequestException() {
26 | super();
27 | }
28 |
29 | /**
30 | * Constructs a new {@link com.foxykeep.datadroid.exception.CustomRequestException} that includes the current stack trace, the
31 | * specified detail message and the specified cause.
32 | *
33 | * @param detailMessage The detail message for this exception.
34 | * @param throwable The cause of this exception.
35 | */
36 | public CustomRequestException(final String detailMessage, final Throwable throwable) {
37 | super(detailMessage, throwable);
38 | }
39 |
40 | /**
41 | * Constructs a new {@link com.foxykeep.datadroid.exception.CustomRequestException} that includes the current stack trace and the
42 | * specified detail message.
43 | *
44 | * @param detailMessage The detail message for this exception.
45 | */
46 | public CustomRequestException(final String detailMessage) {
47 | super(detailMessage);
48 | }
49 |
50 | /**
51 | * Constructs a new {@link com.foxykeep.datadroid.exception.CustomRequestException} that includes the current stack trace and the
52 | * specified cause.
53 | *
54 | * @param throwable The cause of this exception.
55 | */
56 | public CustomRequestException(final Throwable throwable) {
57 | super(throwable);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/com/foxykeep/datadroid/exception/DataException.java:
--------------------------------------------------------------------------------
1 | /**
2 | * 2011 Foxykeep (http://datadroid.foxykeep.com)
3 | *
4 | * Licensed under the Beerware License :
4 | * Licensed under the Beerware License :
36 | * Mozilla/5.0 (Linux; U; Android {Build.VERSION.RELEASE}; {locale.toString()}[; {Build.MODEL}]
37 | * [; Build/{Build.ID}]) {getPackageName()}/{getVersionCode()}
38 | *
39 | * @param context The context to use to generate the User-Agent.
40 | * @return The User-Agent.
41 | */
42 | public synchronized static String get(Context context) {
43 | if (context == null) {
44 | throw new NullPointerException("Context cannot be null");
45 | }
46 | if (sUserAgent == null) {
47 | sUserAgent = generate(context);
48 | }
49 | return sUserAgent;
50 | }
51 |
52 | private static String generate(Context context) {
53 | StringBuilder sb = new StringBuilder();
54 |
55 | sb.append("Mozilla/5.0 (Linux; U; Android");
56 | sb.append(Build.VERSION.RELEASE);
57 | sb.append("; ");
58 | sb.append(Locale.getDefault().toString());
59 |
60 | String model = Build.MODEL;
61 | if (!TextUtils.isEmpty(model)) {
62 | sb.append("; ");
63 | sb.append(model);
64 | }
65 |
66 | String buildId = Build.ID;
67 | if (!TextUtils.isEmpty(buildId)) {
68 | sb.append("; Build/");
69 | sb.append(buildId);
70 | }
71 |
72 | sb.append(") ");
73 |
74 | int versionCode = 0;
75 | String packageName = context.getPackageName();
76 | try {
77 | PackageManager manager = context.getPackageManager();
78 | PackageInfo packageInfo = manager.getPackageInfo(packageName, 0);
79 | versionCode = packageInfo.versionCode;
80 | } catch (NameNotFoundException e) {
81 | // Keep the versionCode 0 as default.
82 | }
83 |
84 | sb.append(packageName);
85 | sb.append("/");
86 | sb.append(versionCode);
87 |
88 | return sb.toString();
89 | }
90 |
91 | }
92 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/com/foxykeep/datadroid/util/DataDroidLog.java:
--------------------------------------------------------------------------------
1 | /**
2 | * 2012 Foxykeep (http://datadroid.foxykeep.com)
3 | *
4 | * Licensed under the Beerware License :
18 | * To modify the log level, use the following command :
19 | *
20 | *
26 | * The default log level is DEBUG.
27 | *
28 | * Also the logs are disabled in a release build by default. If you want them to be enabled, modify
29 | * the value of {@link #ENABLE_LOGS_IN_RELEASE}.
30 | *
31 | * @author Foxykeep
32 | */
33 | public final class DataDroidLog {
34 |
35 | /**
36 | * Primary log tag for games output.
37 | */
38 | private static final String LOG_TAG = "DataDroid";
39 |
40 | /**
41 | * Whether the logs are enabled in release builds or not.
42 | */
43 | private static final boolean ENABLE_LOGS_IN_RELEASE = false;
44 |
45 | public static boolean canLog(int level) {
46 | return (ENABLE_LOGS_IN_RELEASE || BuildConfig.DEBUG) && Log.isLoggable(LOG_TAG, level);
47 | }
48 |
49 | public static void d(String tag, String message) {
50 | if (canLog(Log.DEBUG)) {
51 | Log.d(tag, message);
52 | }
53 | }
54 |
55 | public static void v(String tag, String message) {
56 | if (canLog(Log.VERBOSE)) {
57 | Log.v(tag, message);
58 | }
59 | }
60 |
61 | public static void i(String tag, String message) {
62 | if (canLog(Log.INFO)) {
63 | Log.i(tag, message);
64 | }
65 | }
66 |
67 | public static void i(String tag, String message, Throwable thr) {
68 | if (canLog(Log.INFO)) {
69 | Log.i(tag, message, thr);
70 | }
71 | }
72 |
73 | public static void w(String tag, String message) {
74 | if (canLog(Log.WARN)) {
75 | Log.w(tag, message);
76 | }
77 | }
78 |
79 | public static void w(String tag, String message, Throwable thr) {
80 | if (canLog(Log.WARN)) {
81 | Log.w(tag, message, thr);
82 | }
83 | }
84 |
85 | public static void e(String tag, String message) {
86 | if (canLog(Log.ERROR)) {
87 | Log.e(tag, message);
88 | }
89 | }
90 |
91 | public static void e(String tag, String message, Throwable thr) {
92 | if (canLog(Log.ERROR)) {
93 | Log.e(tag, message, thr);
94 | }
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/com/foxykeep/datadroid/util/ObjectUtils.java:
--------------------------------------------------------------------------------
1 | /**
2 | * 2012 Foxykeep (http://datadroid.foxykeep.com)
3 | *
4 | * Licensed under the Beerware License :
26 | * It manages the case where the first object is null and it would have resulted in a
27 | * {@link NullPointerException} if
4 | * Licensed under the Beerware License :
4 | * Licensed under the Beerware License :
4 | * Licensed under the Beerware License :
32 | * 参数data的键值需要严格按照{@link ShareParams}不同子类具体字段来命名,
33 | *否则无法反射此字段,也无法设置其值。
34 | */
35 | public boolean share(Platform plat, HashMap
5 | * As long as you retain this notice you can do whatever you want with this stuff. If we meet some
6 | * day, and you think this stuff is worth it, you can buy me a beer in return
7 | */
8 |
9 | package com.foxykeep.datadroid.exception;
10 |
11 | /**
12 | * Thrown to indicate that a custom exception occurred.
13 | *
5 | * As long as you retain this notice you can do whatever you want with this stuff. If we meet some
6 | * day, and you think this stuff is worth it, you can buy me a beer in return
7 | */
8 |
9 | package com.foxykeep.datadroid.exception;
10 |
11 | /**
12 | * Thrown to indicate that a compulsory parameter is missing.
13 | *
14 | * @author Foxykeep
15 | */
16 | public final class DataException extends Exception {
17 |
18 | private static final long serialVersionUID = -6031863210486494461L;
19 |
20 | /**
21 | * Constructs a new {@link com.foxykeep.datadroid.exception.DataException} that includes the current stack trace.
22 | */
23 | public DataException() {
24 | super();
25 | }
26 |
27 | /**
28 | * Constructs a new {@link com.foxykeep.datadroid.exception.DataException} that includes the current stack trace, the
29 | * specified detail message and the specified cause.
30 | *
31 | * @param detailMessage The detail message for this exception.
32 | * @param throwable The cause of this exception.
33 | */
34 | public DataException(final String detailMessage, final Throwable throwable) {
35 | super(detailMessage, throwable);
36 | }
37 |
38 | /**
39 | * Constructs a new {@link com.foxykeep.datadroid.exception.DataException} that includes the current stack trace and the
40 | * specified detail message.
41 | *
42 | * @param detailMessage The detail message for this exception.
43 | */
44 | public DataException(final String detailMessage) {
45 | super(detailMessage);
46 | }
47 |
48 | /**
49 | * Constructs a new {@link com.foxykeep.datadroid.exception.DataException} that includes the current stack trace and the
50 | * specified cause.
51 | *
52 | * @param throwable The cause of this exception.
53 | */
54 | public DataException(final Throwable throwable) {
55 | super(throwable);
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/com/foxykeep/datadroid/network/UserAgentUtils.java:
--------------------------------------------------------------------------------
1 | /**
2 | * 2012 Foxykeep (http://datadroid.foxykeep.com)
3 | *
5 | * As long as you retain this notice you can do whatever you want with this stuff. If we meet some
6 | * day, and you think this stuff is worth it, you can buy me a beer in return
7 | */
8 |
9 | package com.foxykeep.datadroid.network;
10 |
11 | import android.content.Context;
12 | import android.content.pm.PackageInfo;
13 | import android.content.pm.PackageManager;
14 | import android.content.pm.PackageManager.NameNotFoundException;
15 | import android.os.Build;
16 | import android.text.TextUtils;
17 |
18 | import java.util.Locale;
19 |
20 | /**
21 | * @author Foxykeep
22 | *
23 | * Utility class to generate and cache a User-Agent header for HTTP requests.
24 | */
25 | public final class UserAgentUtils {
26 |
27 | private static String sUserAgent;
28 |
29 | private UserAgentUtils() {
30 | // No public constructor
31 | }
32 |
33 | /**
34 | * Get the User-Agent with the following syntax:
35 | *
5 | * As long as you retain this notice you can do whatever you want with this stuff. If we meet some
6 | * day, and you think this stuff is worth it, you can buy me a beer in return
7 | */
8 |
9 | package com.foxykeep.datadroid.util;
10 |
11 | import android.util.Log;
12 |
13 | import nl.lance.dribbb.BuildConfig;
14 |
15 | /**
16 | * Centralized helper for logging information for DataDroid.
17 | *
21 | * adb shell setprop log.tag.DataDroid <LOGLEVEL>
22 | * with LOGLEVEL being one of the following :
23 | * VERBOSE, DEBUG, INFO, WARN or ERROR
24 | *
25 | *
5 | * As long as you retain this notice you can do whatever you want with this stuff. If we meet some
6 | * day, and you think this stuff is worth it, you can buy me a beer in return
7 | */
8 |
9 | package com.foxykeep.datadroid.util;
10 |
11 |
12 | /**
13 | * Utility methods for Objects
14 | *
15 | * @author Foxykeep
16 | */
17 | public final class ObjectUtils {
18 |
19 | private ObjectUtils() {
20 | // No public constructor
21 | }
22 |
23 | /**
24 | * Perform a safe equals between 2 objects.
25 | * o1.equals(o2)
was used.
28 | *
29 | * @param o1 First object to check.
30 | * @param o2 Second object to check.
31 | * @return true
if both objects are equal. false
otherwise
32 | * @see Object#equals(Object) uals()
33 | */
34 | public static boolean safeEquals(Object o1, Object o2) {
35 | if (o1 == null) {
36 | return o2 == null;
37 | } else {
38 | return o1.equals(o2);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/com/jeremyfeinstein/slidingmenu/lib/CanvasTransformerBuilder.java:
--------------------------------------------------------------------------------
1 | package com.jeremyfeinstein.slidingmenu.lib;
2 |
3 | import android.graphics.Canvas;
4 | import android.view.animation.Interpolator;
5 |
6 | import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer;
7 |
8 | public class CanvasTransformerBuilder {
9 |
10 | private CanvasTransformer mTrans;
11 |
12 | private static Interpolator lin = new Interpolator() {
13 | public float getInterpolation(float t) {
14 | return t;
15 | }
16 | };
17 |
18 | private void initTransformer() {
19 | if (mTrans == null)
20 | mTrans = new CanvasTransformer() {
21 | public void transformCanvas(Canvas canvas, float percentOpen) { }
22 | };
23 | }
24 |
25 | public CanvasTransformer zoom(final int openedX, final int closedX,
26 | final int openedY, final int closedY,
27 | final int px, final int py) {
28 | return zoom(openedX, closedX, openedY, closedY, px, py, lin);
29 | }
30 |
31 | public CanvasTransformer zoom(final int openedX, final int closedX,
32 | final int openedY, final int closedY,
33 | final int px, final int py, final Interpolator interp) {
34 | initTransformer();
35 | mTrans = new CanvasTransformer() {
36 | public void transformCanvas(Canvas canvas, float percentOpen) {
37 | mTrans.transformCanvas(canvas, percentOpen);
38 | float f = interp.getInterpolation(percentOpen);
39 | canvas.scale((openedX - closedX) * f + closedX,
40 | (openedY - closedY) * f + closedY, px, py);
41 | }
42 | };
43 | return mTrans;
44 | }
45 |
46 | public CanvasTransformer rotate(final int openedDeg, final int closedDeg,
47 | final int px, final int py) {
48 | return rotate(openedDeg, closedDeg, px, py, lin);
49 | }
50 |
51 | public CanvasTransformer rotate(final int openedDeg, final int closedDeg,
52 | final int px, final int py, final Interpolator interp) {
53 | initTransformer();
54 | mTrans = new CanvasTransformer() {
55 | public void transformCanvas(Canvas canvas, float percentOpen) {
56 | mTrans.transformCanvas(canvas, percentOpen);
57 | float f = interp.getInterpolation(percentOpen);
58 | canvas.rotate((openedDeg - closedDeg) * f + closedDeg,
59 | px, py);
60 | }
61 | };
62 | return mTrans;
63 | }
64 |
65 | public CanvasTransformer translate(final int openedX, final int closedX,
66 | final int openedY, final int closedY) {
67 | return translate(openedX, closedX, openedY, closedY, lin);
68 | }
69 |
70 | public CanvasTransformer translate(final int openedX, final int closedX,
71 | final int openedY, final int closedY, final Interpolator interp) {
72 | initTransformer();
73 | mTrans = new CanvasTransformer() {
74 | public void transformCanvas(Canvas canvas, float percentOpen) {
75 | mTrans.transformCanvas(canvas, percentOpen);
76 | float f = interp.getInterpolation(percentOpen);
77 | canvas.translate((openedX - closedX) * f + closedX,
78 | (openedY - closedY) * f + closedY);
79 | }
80 | };
81 | return mTrans;
82 | }
83 |
84 | public CanvasTransformer concatTransformer(final CanvasTransformer t) {
85 | initTransformer();
86 | mTrans = new CanvasTransformer() {
87 | public void transformCanvas(Canvas canvas, float percentOpen) {
88 | mTrans.transformCanvas(canvas, percentOpen);
89 | t.transformCanvas(canvas, percentOpen);
90 | }
91 | };
92 | return mTrans;
93 | }
94 |
95 | }
96 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/com/jeremyfeinstein/slidingmenu/lib/MenuInterface.java:
--------------------------------------------------------------------------------
1 | package com.jeremyfeinstein.slidingmenu.lib;
2 |
3 | import android.graphics.Canvas;
4 | import android.graphics.drawable.Drawable;
5 | import android.view.View;
6 |
7 | public interface MenuInterface {
8 |
9 | public abstract void scrollBehindTo(int x, int y,
10 | CustomViewBehind cvb, float scrollScale);
11 |
12 | public abstract int getMenuLeft(CustomViewBehind cvb, View content);
13 |
14 | public abstract int getAbsLeftBound(CustomViewBehind cvb, View content);
15 |
16 | public abstract int getAbsRightBound(CustomViewBehind cvb, View content);
17 |
18 | public abstract boolean marginTouchAllowed(View content, int x, int threshold);
19 |
20 | public abstract boolean menuOpenTouchAllowed(View content, int currPage, int x);
21 |
22 | public abstract boolean menuTouchInQuickReturn(View content, int currPage, int x);
23 |
24 | public abstract boolean menuClosedSlideAllowed(int x);
25 |
26 | public abstract boolean menuOpenSlideAllowed(int x);
27 |
28 | public abstract void drawShadow(Canvas canvas, Drawable shadow, int width);
29 |
30 | public abstract void drawFade(Canvas canvas, int alpha,
31 | CustomViewBehind cvb, View content);
32 |
33 | public abstract void drawSelector(View content, Canvas canvas, float percentOpen);
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/com/jeremyfeinstein/slidingmenu/lib/app/SlidingActivityBase.java:
--------------------------------------------------------------------------------
1 | package com.jeremyfeinstein.slidingmenu.lib.app;
2 |
3 | import android.view.View;
4 | import android.view.ViewGroup.LayoutParams;
5 |
6 | import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu;
7 |
8 | public interface SlidingActivityBase {
9 |
10 | /**
11 | * Set the behind view content to an explicit view. This view is placed directly into the behind view 's view hierarchy.
12 | * It can itself be a complex view hierarchy.
13 | *
14 | * @param view The desired content to display.
15 | * @param layoutParams Layout parameters for the view.
16 | */
17 | public void setBehindContentView(View view, LayoutParams layoutParams);
18 |
19 | /**
20 | * Set the behind view content to an explicit view. This view is placed directly into the behind view 's view hierarchy.
21 | * It can itself be a complex view hierarchy. When calling this method, the layout parameters of the specified
22 | * view are ignored. Both the width and the height of the view are set by default to MATCH_PARENT. To use your
23 | * own layout parameters, invoke setContentView(android.view.View, android.view.ViewGroup.LayoutParams) instead.
24 | *
25 | * @param view The desired content to display.
26 | */
27 | public void setBehindContentView(View view);
28 |
29 | /**
30 | * Set the behind view content from a layout resource. The resource will be inflated, adding all top-level views
31 | * to the behind view.
32 | *
33 | * @param layoutResID Resource ID to be inflated.
34 | */
35 | public void setBehindContentView(int layoutResID);
36 |
37 | /**
38 | * Gets the SlidingMenu associated with this activity.
39 | *
40 | * @return the SlidingMenu associated with this activity.
41 | */
42 | public SlidingMenu getSlidingMenu();
43 |
44 | /**
45 | * Toggle the SlidingMenu. If it is open, it will be closed, and vice versa.
46 | */
47 | public void toggle();
48 |
49 | /**
50 | * Close the SlidingMenu and show the content view.
51 | */
52 | public void showContent();
53 |
54 | /**
55 | * Open the SlidingMenu and show the menu view.
56 | */
57 | public void showMenu();
58 |
59 | /**
60 | * Open the SlidingMenu and show the secondary (right) menu view. Will default to the regular menu
61 | * if there is only one.
62 | */
63 | public void showSecondaryMenu();
64 |
65 | /**
66 | * Controls whether the ActionBar slides along with the above view when the menu is opened,
67 | * or if it stays in place.
68 | *
69 | * @param slidingActionBarEnabled True if you want the ActionBar to slide along with the SlidingMenu,
70 | * false if you want the ActionBar to stay in place
71 | */
72 | public void setSlidingActionBarEnabled(boolean slidingActionBarEnabled);
73 |
74 | }
75 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/me/imid/swipebacklayout/lib/app/SwipeBackActivity.java:
--------------------------------------------------------------------------------
1 |
2 | package me.imid.swipebacklayout.lib.app;
3 |
4 | import me.imid.swipebacklayout.lib.SwipeBackLayout;
5 | import android.os.Bundle;
6 | import android.support.v4.app.FragmentActivity;
7 | import android.view.View;
8 |
9 | public class SwipeBackActivity extends FragmentActivity implements SwipeBackActivityBase{
10 | private SwipeBackActivityHelper mHelper;
11 |
12 | @Override
13 | protected void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 | mHelper = new SwipeBackActivityHelper(this);
16 | mHelper.onActivityCreate();
17 | }
18 |
19 | @Override
20 | protected void onPostCreate(Bundle savedInstanceState) {
21 | super.onPostCreate(savedInstanceState);
22 | mHelper.onPostCreate();
23 | }
24 |
25 | @Override
26 | public View findViewById(int id) {
27 | View v = super.findViewById(id);
28 | if (v == null && mHelper != null)
29 | return mHelper.findViewById(id);
30 | return v;
31 | }
32 |
33 | @Override
34 | public SwipeBackLayout getSwipeBackLayout() {
35 | return mHelper.getSwipeBackLayout();
36 | }
37 | @Override
38 | public void setSwipeBackEnable(boolean enable) {
39 | getSwipeBackLayout().setEnableGesture(enable);
40 | }
41 |
42 | @Override
43 | public void scrollToFinishActivity() {
44 | getSwipeBackLayout().scrollToFinishActivity();
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/me/imid/swipebacklayout/lib/app/SwipeBackActivityBase.java:
--------------------------------------------------------------------------------
1 | package me.imid.swipebacklayout.lib.app;
2 |
3 | import me.imid.swipebacklayout.lib.SwipeBackLayout;
4 | /**
5 | * @author Yrom
6 | */
7 | public interface SwipeBackActivityBase {
8 | /**
9 | * @return the SwipeBackLayout associated with this activity.
10 | */
11 | public abstract SwipeBackLayout getSwipeBackLayout();
12 |
13 | public abstract void setSwipeBackEnable(boolean enable);
14 |
15 | /**
16 | * Scroll out contentView and finish the activity
17 | */
18 | public abstract void scrollToFinishActivity();
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/me/imid/swipebacklayout/lib/app/SwipeBackPreferenceActivity.java:
--------------------------------------------------------------------------------
1 |
2 | package me.imid.swipebacklayout.lib.app;
3 |
4 | import android.os.Bundle;
5 | import android.preference.PreferenceActivity;
6 | import android.view.View;
7 |
8 | import me.imid.swipebacklayout.lib.SwipeBackLayout;
9 |
10 | public class SwipeBackPreferenceActivity extends PreferenceActivity implements SwipeBackActivityBase {
11 | private SwipeBackActivityHelper mHelper;
12 |
13 | @Override
14 | protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | mHelper = new SwipeBackActivityHelper(this);
17 | mHelper.onActivityCreate();
18 | }
19 |
20 | @Override
21 | protected void onPostCreate(Bundle savedInstanceState) {
22 | super.onPostCreate(savedInstanceState);
23 | mHelper.onPostCreate();
24 | }
25 |
26 | @Override
27 | public View findViewById(int id) {
28 | View v = super.findViewById(id);
29 | if (v == null && mHelper != null)
30 | return mHelper.findViewById(id);
31 | return v;
32 | }
33 |
34 | @Override
35 | public SwipeBackLayout getSwipeBackLayout() {
36 | return mHelper.getSwipeBackLayout();
37 | }
38 | @Override
39 | public void setSwipeBackEnable(boolean enable) {
40 | getSwipeBackLayout().setEnableGesture(enable);
41 | }
42 |
43 | @Override
44 | public void scrollToFinishActivity() {
45 | getSwipeBackLayout().scrollToFinishActivity();
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/net/frakbot/imageviewex/ImageAlign.java:
--------------------------------------------------------------------------------
1 | package net.frakbot.imageviewex;
2 |
3 | /**
4 | * Enum that contains image alignments for ImageViewEx.
5 | *
6 | * @author Sebastiano Poggi, Francesco Pontillo
7 | *
8 | * @deprecated Use ScaleType.FIT_START and ScaleType.FIT_END instead.
9 | */
10 | public enum ImageAlign {
11 | /**
12 | * No forced alignment. Image will be placed where the
13 | * scaleType dictates it to.
14 | */
15 | NONE,
16 |
17 | /**
18 | * Force top alignment: the top edge is aligned with
19 | * the View top.
20 | */
21 | TOP
22 | }
23 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/net/frakbot/imageviewex/broadcastreceiver/ConnectivityChangeBroadcastReceiver.java:
--------------------------------------------------------------------------------
1 | package net.frakbot.imageviewex.broadcastreceiver;
2 |
3 | import net.frakbot.imageviewex.ImageViewNext;
4 | import android.content.BroadcastReceiver;
5 | import android.content.Context;
6 | import android.content.Intent;
7 | import android.net.ConnectivityManager;
8 | import android.net.NetworkInfo;
9 |
10 | /**
11 | * BroadcastReceiver for receiving information about the network state.
12 | *
13 | * @author Francesco Pontillo
14 | */
15 | public class ConnectivityChangeBroadcastReceiver extends BroadcastReceiver {
16 |
17 | private ImageViewNext mImageViewNext;
18 |
19 | /**
20 | * Constructor, initializes the ImageViewNext to be used to retry the
21 | * network operation after the connection is restored.
22 | *
23 | * @param imageViewNext
24 | * The ImageViewNext instance.
25 | */
26 | public ConnectivityChangeBroadcastReceiver(ImageViewNext imageViewNext) {
27 | mImageViewNext = imageViewNext;
28 | }
29 |
30 | @Override
31 | public void onReceive(Context context, Intent intent) {
32 | // Get the NetworkInfo Parcelable
33 | NetworkInfo networkInfo = intent
34 | .getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO);
35 |
36 | // Check for the connection
37 | boolean isConnected = networkInfo.isConnected();
38 | if (isConnected) {
39 | mImageViewNext.retryFromNetworkIfPossible();
40 | }
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/net/frakbot/imageviewex/listener/ImageViewExRequestListener.java:
--------------------------------------------------------------------------------
1 | package net.frakbot.imageviewex.listener;
2 |
3 | import com.foxykeep.datadroid.requestmanager.RequestManager.RequestListener;
4 |
5 | import net.frakbot.imageviewex.ImageViewNext;
6 |
7 | public abstract class ImageViewExRequestListener implements RequestListener {
8 | protected ImageViewNext mImageViewNext;
9 |
10 | public ImageViewExRequestListener(ImageViewNext imageViewNext) {
11 | this.mImageViewNext = imageViewNext;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/net/frakbot/imageviewex/operation/ImageDiskCacheOperation.java:
--------------------------------------------------------------------------------
1 | package net.frakbot.imageviewex.operation;
2 |
3 | import net.frakbot.cache.CacheHelper;
4 | import net.frakbot.imageviewex.Converters;
5 | import net.frakbot.imageviewex.ImageViewNext;
6 | import net.frakbot.imageviewex.requestmanager.ImageViewExRequestFactory;
7 | import android.content.Context;
8 | import android.os.Bundle;
9 | import android.support.v4.util.LruCache;
10 |
11 | import com.foxykeep.datadroid.exception.ConnectionException;
12 | import com.foxykeep.datadroid.exception.CustomRequestException;
13 | import com.foxykeep.datadroid.exception.DataException;
14 | import com.foxykeep.datadroid.requestmanager.Request;
15 | import com.foxykeep.datadroid.service.RequestService.Operation;
16 | import com.jakewharton.disklrucache.DiskLruCache;
17 | import com.jakewharton.disklrucache.DiskLruCache.Snapshot;
18 |
19 | /**
20 | * Operation to search for an image in the disk cache.
21 | * Requested input:
22 | * - ImageMemCacheOperation.PARAM_IMAGE_URL, the URL of the image
23 | * Given output:
24 | * - ImageViewExRequestFactory.BUNDLE_EXTRA_OBJECT, the byte array of the image
25 | * - ImageViewExRequestFactory.BUNDLE_EXTRA_IMAGE_URL, the requested URL of the image
26 | *
27 | * @author Francesco Pontillo
28 | *
29 | */
30 | public class ImageDiskCacheOperation implements Operation {
31 |
32 | public static final String PARAM_IMAGE_URL =
33 | "net.frakbot.imageviewex.extra.url";
34 |
35 | @Override
36 | public Bundle execute(Context context, Request request)
37 | throws ConnectionException, DataException, CustomRequestException {
38 |
39 | // Get the URL from the input Bundle
40 | String url = request.getString(PARAM_IMAGE_URL);
41 | if (url == null || url.equals("")) throw new DataException("No value for URL " + url);
42 |
43 | // Initializes the caches, if they're not initialized already
44 | ImageViewNext.initCaches(context);
45 |
46 | // Get the entry
47 | DiskLruCache diskCache = ImageViewNext.getDiskCache();
48 | Snapshot cacheEntry = null;
49 | try {
50 | cacheEntry = diskCache.get(CacheHelper.UriToDiskLruCacheString(url));
51 | } catch (Exception e) {
52 | throw new DataException("DISK CACHE: Error while getting value for URL " + url);
53 | }
54 |
55 | byte[] image = null;
56 |
57 | // If the object is not null, convert it
58 | if (cacheEntry != null) {
59 | // Convert the InputStream
60 | image = Converters.inputStreamToByteArray(
61 | cacheEntry.getInputStream(0),
62 | (int)cacheEntry.getLength(0));
63 |
64 | // Saves the image in the in-memory cache
65 | LruCache
5 | * As long as you retain this notice you can do whatever you want with this stuff. If we meet some
6 | * day, and you think this stuff is worth it, you can buy me a beer in return
7 | */
8 |
9 | package net.frakbot.imageviewex.requestmanager;
10 |
11 | import com.foxykeep.datadroid.requestmanager.Request;
12 |
13 | import net.frakbot.imageviewex.operation.ImageDiskCacheOperation;
14 | import net.frakbot.imageviewex.operation.ImageDownloadOperation;
15 | import net.frakbot.imageviewex.operation.ImageMemCacheOperation;
16 |
17 | /**
18 | * Class used to create the {@link com.foxykeep.datadroid.requestmanager.Request}s.
19 | *
20 | * @author Foxykeep, Francesco Pontillo
21 | */
22 | @SuppressWarnings("deprecation")
23 | public final class ImageViewExRequestFactory {
24 | // Request types
25 | public static final int REQUEST_TYPE_IMAGE_MEM_CACHE = 0;
26 | public static final int REQUEST_TYPE_IMAGE_DISK_CACHE = 1;
27 | public static final int REQUEST_TYPE_IMAGE_DOWNLOAD = 2;
28 |
29 | // Response data
30 | public static final String BUNDLE_EXTRA_OBJECT =
31 | "net.frakbot.imageviewex.extra.object";
32 | public static final String BUNDLE_EXTRA_IMAGE_URL =
33 | "net.frakbot.imageviewex.extra.imageUrl";
34 |
35 | private ImageViewExRequestFactory() {
36 | // no public constructor
37 | }
38 |
39 | /**
40 | * Create the request to get an image from the memory cache.
41 | *
42 | * @param url The URL of the image.
43 | * @return The request.
44 | */
45 | public static Request getImageMemCacheRequest(String url) {
46 | Request request = new Request(REQUEST_TYPE_IMAGE_MEM_CACHE);
47 | request.put(ImageMemCacheOperation.PARAM_IMAGE_URL, url);
48 | request.setMemoryCacheEnabled(true);
49 | return request;
50 | }
51 |
52 | /**
53 | * Create the request to get an image from the the disk cache.
54 | *
55 | * @param url The URL of the image.
56 | * @return The request.
57 | */
58 | public static Request getImageDiskCacheRequest(String url) {
59 | Request request = new Request(REQUEST_TYPE_IMAGE_DISK_CACHE);
60 | request.put(ImageDiskCacheOperation.PARAM_IMAGE_URL, url);
61 | request.setMemoryCacheEnabled(true);
62 | return request;
63 | }
64 |
65 | /**
66 | * Create the request to get an image from the network.
67 | *
68 | * @param url The URL of the image.
69 | * @return The request.
70 | */
71 | public static Request getImageDownloaderRequest(String url) {
72 | Request request = new Request(REQUEST_TYPE_IMAGE_DOWNLOAD);
73 | request.put(ImageDownloadOperation.PARAM_IMAGE_URL, url);
74 | request.setMemoryCacheEnabled(true);
75 | return request;
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/net/frakbot/imageviewex/requestmanager/ImageViewExRequestManager.java:
--------------------------------------------------------------------------------
1 | /**
2 | * 2011 Foxykeep (http://datadroid.foxykeep.com)
3 | *
5 | * As long as you retain this notice you can do whatever you want with this stuff. If we meet some
6 | * day, and you think this stuff is worth it, you can buy me a beer in return
7 | */
8 |
9 | package net.frakbot.imageviewex.requestmanager;
10 |
11 | import net.frakbot.imageviewex.service.ImageViewExService;
12 |
13 | import com.foxykeep.datadroid.requestmanager.RequestManager;
14 |
15 | import android.content.Context;
16 |
17 | /**
18 | * This class is used as a proxy to call the Service. It provides easy-to-use methods to call the
19 | * service and manages the Intent creation. It also assures that a request will not be sent again if
20 | * an exactly identical one is already in progress.
21 | *
22 | * @author Foxykeep, Francesco Pontillo
23 | */
24 | public final class ImageViewExRequestManager extends RequestManager {
25 |
26 | // Singleton management
27 | private static ImageViewExRequestManager sInstance;
28 |
29 | public synchronized static ImageViewExRequestManager from(Context context) {
30 | if (sInstance == null) {
31 | sInstance = new ImageViewExRequestManager(context);
32 | }
33 |
34 | return sInstance;
35 | }
36 |
37 | private ImageViewExRequestManager(Context context) {
38 | super(context, ImageViewExService.class);
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/net/frakbot/imageviewex/service/ImageViewExService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * 2011 Foxykeep (http://datadroid.foxykeep.com)
3 | *
5 | * As long as you retain this notice you can do whatever you want with this stuff. If we meet some
6 | * day, and you think this stuff is worth it, you can buy me a beer in return
7 | */
8 |
9 | package net.frakbot.imageviewex.service;
10 |
11 | import android.os.Bundle;
12 |
13 | import com.foxykeep.datadroid.exception.CustomRequestException;
14 | import com.foxykeep.datadroid.requestmanager.Request;
15 | import com.foxykeep.datadroid.service.RequestService;
16 |
17 | import net.frakbot.imageviewex.ImageViewNext;
18 | import net.frakbot.imageviewex.operation.ImageDiskCacheOperation;
19 | import net.frakbot.imageviewex.operation.ImageDownloadOperation;
20 | import net.frakbot.imageviewex.operation.ImageMemCacheOperation;
21 | import net.frakbot.imageviewex.requestmanager.ImageViewExRequestFactory;
22 |
23 | /**
24 | * This class is called by the {@link ImageViewExRequestManager}
25 | * through the {@link Intent} system.
26 | *
27 | * @author Foxykeep, Francesco Pontillo
28 | */
29 | @SuppressWarnings("deprecation")
30 | public class ImageViewExService extends RequestService {
31 |
32 | @Override
33 | protected int getMaximumNumberOfThreads() {
34 | return ImageViewNext.getMaximumNumberOfThreads();
35 | }
36 |
37 | @Override
38 | public Operation getOperationForType(int requestType) {
39 | switch (requestType) {
40 | case ImageViewExRequestFactory.REQUEST_TYPE_IMAGE_MEM_CACHE:
41 | return new ImageMemCacheOperation();
42 | case ImageViewExRequestFactory.REQUEST_TYPE_IMAGE_DISK_CACHE:
43 | return new ImageDiskCacheOperation();
44 | case ImageViewExRequestFactory.REQUEST_TYPE_IMAGE_DOWNLOAD:
45 | return new ImageDownloadOperation();
46 | }
47 | return null;
48 | }
49 |
50 | @Override
51 | protected Bundle onCustomRequestException(Request request, CustomRequestException exception) {
52 | return super.onCustomRequestException(request, exception);
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/net/frakbot/remote/RemoteHelper.java:
--------------------------------------------------------------------------------
1 | package net.frakbot.remote;
2 |
3 | import android.util.Log;
4 |
5 | import java.io.BufferedInputStream;
6 | import java.io.ByteArrayOutputStream;
7 | import java.io.IOException;
8 | import java.net.HttpURLConnection;
9 | import java.net.URL;
10 |
11 | import com.squareup.okhttp.OkHttpClient;
12 |
13 | /**
14 | * Helper class that exposes some utility methods for retrieving
15 | * objects from the network.
16 | *
17 | * @author Francesco Pontillo
18 | */
19 | public class RemoteHelper {
20 | private static final String LOG_TAG = "Loader";
21 |
22 | private static final int defaultBufferSize = 2048;
23 |
24 | /**
25 | * Download an object from the network.
26 | *
27 | * @param resourceUrl The URL of then rsource.
28 | *
29 | * @throws java.io.IOException If the connection cannot be established.
30 | * @return Byte array of the downloaded object.
31 | */
32 | public static byte[] download(String resourceUrl) throws IOException {
33 | OkHttpClient client = new OkHttpClient();
34 | URL url = new URL(resourceUrl);
35 | HttpURLConnection connection = client.open(url);
36 |
37 | final int responseCode = connection.getResponseCode();
38 | if (responseCode != HttpURLConnection.HTTP_OK) {
39 | Log.w(LOG_TAG, "Downloading from URL " + resourceUrl + " failed with response code " + responseCode);
40 | return null;
41 | }
42 |
43 | // determine the image size and allocate a buffer
44 | int fileSize = connection.getContentLength();
45 | Log.d(LOG_TAG, "fetching " + resourceUrl
46 | + " (" + (fileSize <= 0 ? "size unknown" : Integer.toString(fileSize)) + ")");
47 |
48 | BufferedInputStream istream = new BufferedInputStream(connection.getInputStream());
49 |
50 | try {
51 | if (fileSize <= 0) {
52 | Log.w(LOG_TAG,
53 | "Server did not set a Content-Length header, will default to buffer size of "
54 | + defaultBufferSize + " bytes");
55 | ByteArrayOutputStream buf = new ByteArrayOutputStream(defaultBufferSize);
56 | byte[] buffer = new byte[defaultBufferSize];
57 | int bytesRead = 0;
58 | while (bytesRead != -1) {
59 | bytesRead = istream.read(buffer, 0, defaultBufferSize);
60 | if (bytesRead > 0) {
61 | buf.write(buffer, 0, bytesRead);
62 | }
63 | }
64 | return buf.toByteArray();
65 | }
66 | else {
67 | byte[] data = new byte[fileSize];
68 |
69 | int bytesRead = 0;
70 | int offset = 0;
71 | while (bytesRead != -1 && offset < fileSize) {
72 | bytesRead = istream.read(data, offset, fileSize - offset);
73 | offset += bytesRead;
74 | }
75 | return data;
76 | }
77 | }
78 | finally {
79 | // clean up
80 | try {
81 | istream.close();
82 | connection.disconnect();
83 | }
84 | catch (Exception ignore) {
85 | }
86 | }
87 | }
88 |
89 | }
90 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/nl.lance.dribbb/activites/ChoiceActivity.java:
--------------------------------------------------------------------------------
1 | package nl.lance.dribbb.activites;
2 |
3 | import android.content.Intent;
4 | import android.graphics.Typeface;
5 | import android.os.Bundle;
6 | import android.view.View;
7 | import android.widget.Button;
8 | import android.widget.TextView;
9 |
10 | import me.imid.swipebacklayout.lib.app.SwipeBackActivity;
11 | import nl.lance.dribbb.R;
12 |
13 | public class ChoiceActivity extends SwipeBackActivity {
14 |
15 | Typeface typeface;
16 |
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | setContentView(R.layout.activity_choice);
21 |
22 | typeface = Typeface.createFromAsset(getAssets(), "font/Roboto-Thin.ttf");
23 |
24 | Button shotsButton = (Button)findViewById(R.id.choice_shots);
25 | Button playerButton = (Button)findViewById(R.id.choice_player);
26 | TextView textView = (TextView)findViewById(R.id.collection_label);
27 |
28 | shotsButton.setOnClickListener(new View.OnClickListener() {
29 | @Override
30 | public void onClick(View v) {
31 | Intent intent = new Intent(ChoiceActivity.this, DActivity.class);
32 | Bundle bundle = new Bundle();
33 | bundle.putString("is", "Shots");
34 | intent.putExtras(bundle);
35 | startActivity(intent);
36 | overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);
37 | }
38 | });
39 |
40 | shotsButton.setTypeface(typeface);
41 |
42 | playerButton.setOnClickListener(new View.OnClickListener() {
43 | @Override
44 | public void onClick(View v) {
45 | Intent intent = new Intent(ChoiceActivity.this, DActivity.class);
46 | Bundle bundle = new Bundle();
47 | bundle.putString("is", "Player");
48 | intent.putExtras(bundle);
49 | startActivity(intent);
50 | overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);
51 | }
52 | });
53 |
54 | playerButton.setTypeface(typeface);
55 |
56 | typeface = Typeface.createFromAsset(getAssets(), "font/Roboto-Light.ttf");
57 | textView.setTypeface(typeface);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/nl.lance.dribbb/activites/DActivity.java:
--------------------------------------------------------------------------------
1 | package nl.lance.dribbb.activites;
2 |
3 | import android.os.Bundle;
4 |
5 | import me.imid.swipebacklayout.lib.app.SwipeBackActivity;
6 | import nl.lance.dribbb.R;
7 | import nl.lance.dribbb.shots.fragment.PlayerCollection;
8 | import nl.lance.dribbb.shots.fragment.ShotsCollection;
9 |
10 | public class DActivity extends SwipeBackActivity {
11 |
12 | @Override
13 | protected void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 | setContentView(R.layout.activity_d);
16 |
17 | String s = getIntent().getExtras().getString("is");
18 |
19 | if(s.equals("Shots")) {
20 | getSupportFragmentManager().beginTransaction()
21 | .replace(R.id.container, new ShotsCollection()).commit();
22 | } else if (s.equals("Player")) {
23 | getSupportFragmentManager().beginTransaction()
24 | .replace(R.id.container, new PlayerCollection()).commit();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/nl.lance.dribbb/activites/LoadingActivity.java:
--------------------------------------------------------------------------------
1 | package nl.lance.dribbb.activites;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.os.Bundle;
6 | import android.os.Handler;
7 |
8 | import nl.lance.dribbb.R;
9 |
10 | public class LoadingActivity extends Activity {
11 |
12 | Intent intent;
13 |
14 | @Override
15 | protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setContentView(R.layout.activity_loading);
18 | intent = getIntent();
19 | new Handler().postDelayed(new Runnable() {
20 |
21 | @Override
22 | public void run() {
23 | if (intent.getIntExtra("ct", -1) == 1) {
24 | Intent intent = new Intent(LoadingActivity.this, DActivity.class);
25 | Bundle bundle = new Bundle();
26 | bundle.putString("is", "Player");
27 | intent.putExtras(bundle);
28 | startActivity(intent);
29 | } else {
30 | Intent intent = new Intent(LoadingActivity.this, DActivity.class);
31 | Bundle bundle = new Bundle();
32 | bundle.putString("is", "Shots");
33 | intent.putExtras(bundle);
34 | startActivity(intent);
35 | }
36 | LoadingActivity.this.finish();
37 | overridePendingTransition(R.anim.abc_fade_in, R.anim.abc_fade_out);
38 | }
39 | }, 1000);
40 |
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/nl.lance.dribbb/activites/PlayerActivity.java:
--------------------------------------------------------------------------------
1 | package nl.lance.dribbb.activites;
2 |
3 | import android.app.ActionBar;
4 | import android.content.res.Resources;
5 | import android.graphics.Typeface;
6 | import android.os.Bundle;
7 | import android.view.MenuItem;
8 | import android.widget.TextView;
9 |
10 | import me.imid.swipebacklayout.lib.app.SwipeBackActivity;
11 | import nl.lance.dribbb.R;
12 | import nl.lance.dribbb.shots.fragment.PlayerFragment;
13 |
14 | public class PlayerActivity extends SwipeBackActivity {
15 |
16 | @Override
17 | protected void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | setContentView(R.layout.activity_player);
20 |
21 | getSupportFragmentManager().beginTransaction()
22 | .replace(R.id.player_container, new PlayerFragment(PlayerActivity.this)).commit();
23 |
24 | setActionBarStyle();
25 | }
26 |
27 | @Override
28 | public boolean onOptionsItemSelected(MenuItem item) {
29 | int id = item.getItemId();
30 | if(id == android.R.id.home) {
31 | this.finish();
32 | overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);
33 | }
34 | return super.onOptionsItemSelected(item);
35 | }
36 |
37 | private void setActionBarStyle() {
38 | this.getActionBar().setTitle("dribbble");
39 | getActionBar().setIcon(R.drawable.ic_action);
40 | getActionBar().setBackgroundDrawable(this.getBaseContext().getResources().getDrawable(R.drawable.actionbar_back));
41 | getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
42 | int titleId = Resources.getSystem().getIdentifier("action_bar_title", "id", "android");
43 | TextView textView = (TextView) findViewById(titleId);
44 | textView.setTypeface(Typeface.createFromAsset(getAssets(), "font/Wendy.ttf"));
45 | textView.setTextColor(0xFFdfdfdf);
46 | textView.setTextSize(32);
47 | getActionBar().setDisplayHomeAsUpEnabled(true);
48 | getActionBar().setHomeButtonEnabled(true);
49 |
50 | }
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/nl.lance.dribbb/activites/ShotsDetail.java:
--------------------------------------------------------------------------------
1 | package nl.lance.dribbb.activites;
2 |
3 | import android.os.Bundle;
4 | import android.view.Display;
5 | import android.view.Menu;
6 | import android.view.MenuItem;
7 | import android.view.WindowManager;
8 |
9 | import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu;
10 |
11 | import cn.sharesdk.framework.ShareSDK;
12 | import me.imid.swipebacklayout.lib.SwipeBackLayout;
13 | import me.imid.swipebacklayout.lib.app.SwipeBackActivity;
14 | import nl.lance.dribbb.R;
15 | import nl.lance.dribbb.shots.fragment.CommentsFragment;
16 | import nl.lance.dribbb.shots.fragment.ShotDetailFragment;
17 |
18 | public class ShotsDetail extends SwipeBackActivity implements ShotDetailFragment.DrawerListener{
19 |
20 | private SwipeBackLayout mSwipeBackLayout;
21 | public SlidingMenu sm;
22 |
23 | @Override
24 | protected void onCreate(Bundle savedInstanceState) {
25 | super.onCreate(savedInstanceState);
26 | setContentView(R.layout.activity_shots_detail);
27 |
28 | ShareSDK.initSDK(this);
29 |
30 | mSwipeBackLayout = getSwipeBackLayout();
31 | mSwipeBackLayout.setEdgeTrackingEnabled(SwipeBackLayout.EDGE_LEFT);
32 |
33 | getSupportFragmentManager().beginTransaction()
34 | .replace(R.id.container, new ShotDetailFragment(ShotsDetail.this)).commit();
35 |
36 | getSupportFragmentManager().beginTransaction()
37 | .replace(R.id.comments_list_container, new CommentsFragment(ShotsDetail.this)).commit();
38 |
39 | initSlidingMenu();
40 | }
41 |
42 | private void initSlidingMenu() {
43 | WindowManager manager = getWindowManager();
44 | Display display = manager.getDefaultDisplay();
45 |
46 | sm = new SlidingMenu(ShotsDetail.this);
47 | sm.setMode(SlidingMenu.RIGHT);
48 | sm.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
49 | sm.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
50 | sm.setBehindOffset(display.getWidth() * 1 / 4);
51 | sm.setShadowDrawable(R.drawable.sidebar_shadow_right);
52 | sm.setShadowWidth(30);
53 | sm.setMenu(R.layout.menu_layout);
54 |
55 | sm.setOnOpenedListener(new SlidingMenu.OnOpenedListener() {
56 | @Override
57 | public void onOpened() {
58 | mSwipeBackLayout.setEnableGesture(false);
59 | }
60 | });
61 | sm.setOnClosedListener(new SlidingMenu.OnClosedListener() {
62 | @Override
63 | public void onClosed() {
64 | mSwipeBackLayout.setEnableGesture(true);
65 | }
66 | });
67 | }
68 |
69 | @Override
70 | public boolean onCreateOptionsMenu(Menu menu) {
71 |
72 | getMenuInflater().inflate(R.menu.shots_detail, menu);
73 | return true;
74 | }
75 |
76 | @Override
77 | public boolean onOptionsItemSelected(MenuItem item) {
78 | switch (item.getItemId()) {
79 | case R.id.action_settings:
80 | return true;
81 | }
82 | return super.onOptionsItemSelected(item);
83 | }
84 |
85 | @Override
86 | public void onIconSelected() {
87 | sm.toggle();
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/nl.lance.dribbb/activites/UActivity.java:
--------------------------------------------------------------------------------
1 | package nl.lance.dribbb.activites;
2 |
3 | import android.app.ActionBar;
4 | import android.content.res.Resources;
5 | import android.graphics.Typeface;
6 | import android.os.Bundle;
7 | import android.view.Menu;
8 | import android.view.MenuItem;
9 | import android.widget.TextView;
10 |
11 | import nl.lance.dribbb.R;
12 |
13 | import me.imid.swipebacklayout.lib.app.SwipeBackActivity;
14 | import nl.lance.dribbb.shots.fragment.ShotsFragment;
15 | import nl.lance.dribbb.views.FooterState;
16 |
17 | public class UActivity extends SwipeBackActivity {
18 |
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | setContentView(R.layout.activity_u);
23 |
24 | setActionBarStyle();
25 |
26 | if(getIntent() != null) {
27 | getSupportFragmentManager().beginTransaction()
28 | .add(R.id.container, new ShotsFragment(UActivity.this, getIntent().getExtras().getString("url"), 120))
29 | .commit();
30 | }
31 | }
32 |
33 | @Override
34 | public boolean onCreateOptionsMenu(Menu menu) {
35 | getMenuInflater().inflate(R.menu.u, menu);
36 | return true;
37 | }
38 |
39 | @Override
40 | public boolean onOptionsItemSelected(MenuItem item) {
41 | int id = item.getItemId();
42 | if(id == android.R.id.home) {
43 | this.finish();
44 | overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);
45 | }
46 | return super.onOptionsItemSelected(item);
47 | }
48 |
49 | private void setActionBarStyle() {
50 | this.getActionBar().setTitle("dribbble");
51 | getActionBar().setIcon(R.drawable.ic_action);
52 | getActionBar().setBackgroundDrawable(this.getBaseContext().getResources().getDrawable(R.drawable.actionbar_back));
53 | getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
54 | int titleId = Resources.getSystem().getIdentifier("action_bar_title", "id", "android");
55 | TextView textView = (TextView) findViewById(titleId);
56 | textView.setTypeface(Typeface.createFromAsset(getAssets(), "font/Wendy.ttf"));
57 | textView.setTextColor(0xFFdfdfdf);
58 | textView.setTextSize(32);
59 | getActionBar().setDisplayHomeAsUpEnabled(true);
60 | getActionBar().setHomeButtonEnabled(true);
61 |
62 | }
63 |
64 | @Override
65 | protected void onStop() {
66 | super.onStop();
67 | FooterState state = new FooterState();
68 | state.setState(nl.lance.dribbb.views.FooterState.State.TheEnd);
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/nl.lance.dribbb/activites/welcome/WelcomeActivity.java:
--------------------------------------------------------------------------------
1 | package nl.lance.dribbb.activites.welcome;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.content.SharedPreferences;
6 | import android.os.Bundle;
7 | import android.os.Handler;
8 | import android.os.Message;
9 |
10 | import nl.lance.dribbb.R;
11 |
12 | import nl.lance.dribbb.activites.ContentActivity;
13 |
14 | public class WelcomeActivity extends Activity {
15 |
16 | private static final int GO_HOME = 100;
17 | private static final int GO_GUIDE = 200;
18 | boolean isFirst = false;
19 | private Handler mHandler = new Handler() {
20 | @Override
21 | public void handleMessage(Message msg) {
22 | switch (msg.what) {
23 | case GO_HOME:
24 | goHome();
25 | break;
26 | case GO_GUIDE:
27 | goGuide();
28 | break;
29 | }
30 | }
31 | };
32 |
33 | @Override
34 | protected void onCreate(Bundle savedInstanceState) {
35 | super.onCreate(savedInstanceState);
36 | setContentView(R.layout.activity_welcome);
37 | init();
38 | }
39 |
40 | private void init() {
41 | SharedPreferences preferences = getSharedPreferences("first_pref", MODE_PRIVATE);
42 | isFirst = preferences.getBoolean("isFirst", true);
43 | if (!isFirst) {
44 | mHandler.sendEmptyMessageDelayed(GO_HOME, 150);
45 | } else {
46 | mHandler.sendEmptyMessageDelayed(GO_GUIDE, 150);
47 | }
48 | }
49 |
50 | private void goHome() {
51 | Intent intent = new Intent(WelcomeActivity.this, ContentActivity.class);
52 | startActivity(intent);
53 | overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
54 | this.finish();
55 | }
56 |
57 | private void goGuide() {
58 | Intent intent = new Intent(WelcomeActivity.this, GuideActivity.class);
59 | startActivity(intent);
60 | overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
61 | this.finish();
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Dribbb/src/main/java/nl.lance.dribbb/adapter/CommentsAdapter.java:
--------------------------------------------------------------------------------
1 | package nl.lance.dribbb.adapter;
2 |
3 | import android.app.Activity;
4 | import android.graphics.Typeface;
5 | import android.text.Html;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 | import android.widget.BaseAdapter;
10 | import android.widget.TextView;
11 |
12 | import com.android.volley.RequestQueue;
13 | import com.android.volley.toolbox.ImageLoader;
14 | import com.android.volley.toolbox.NetworkImageView;
15 | import com.android.volley.toolbox.Volley;
16 |
17 | import java.util.ArrayList;
18 | import java.util.List;
19 | import java.util.Map;
20 |
21 | import nl.lance.dribbb.R;
22 | import nl.lance.dribbb.network.BitmapLruCache;
23 |
24 | /**
25 | * Created by Novelance on 1/28/14.
26 | */
27 | public class CommentsAdapter extends BaseAdapter {
28 |
29 | private Activity mActivity;
30 | List