6 | * multitype
7 | */
8 | public interface MultiType {
9 |
10 | int getItemType();
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/circle_base_ui/src/main/java/razerdp/github/com/ui/widget/pullrecyclerview/mode/PullMode.java:
--------------------------------------------------------------------------------
1 | package razerdp.github.com.ui.widget.pullrecyclerview.mode;
2 |
3 | /**
4 | * Created by liushaoming on 2017/11/8.
5 | */
6 |
7 | public enum PullMode {
8 | NONE, FROM_START, FROM_BOTTOM
9 | }
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/appjishu/starzone/constant/UserProfileConstant.java:
--------------------------------------------------------------------------------
1 | package com.appjishu.starzone.constant;
2 |
3 | public class UserProfileConstant {
4 | public static final int SEX_UNSELECTED = 0;
5 | public static final int SEX_MALE = 1;
6 | public static final int SEX_FEMALE = 2;
7 | }
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/avatar_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 | * module的application 9 | */ 10 | 11 | public class ModuleApplication extends BaseModuleApplication { 12 | } 13 | -------------------------------------------------------------------------------- /circle_base_library/src/main/java/razerdp/github/com/lib/interfaces/ClearMemoryObject.java: -------------------------------------------------------------------------------- 1 | package razerdp.github.com.lib.interfaces; 2 | 3 | /** 4 | * Created by liushaoming on 2017/4/1. 5 | *
6 | * 标记清除用的obj 7 | */ 8 | 9 | public interface ClearMemoryObject { 10 | 11 | void clearMemroy(boolean setNull); 12 | } 13 | -------------------------------------------------------------------------------- /circle_photoselect/src/main/java/debug/ModuleApplication.java: -------------------------------------------------------------------------------- 1 | package debug; 2 | 3 | import razerdp.github.com.lib.base.BaseModuleApplication; 4 | 5 | /** 6 | * Created by liushaoming on 2017/3/22. 7 | *
8 | * module的application
9 | */
10 |
11 | public class ModuleApplication extends BaseModuleApplication {
12 | }
13 |
--------------------------------------------------------------------------------
/circle_photoselect/src/main/res/drawable-xhdpi/photo_count_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 | * 点赞callback
7 | */
8 |
9 | public interface OnLikeChangeCallback {
10 |
11 | void onLike(String likeinfoid);
12 |
13 | void onUnLike();
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/circle_base_ui/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
8 | * 评论控件点击
9 | */
10 |
11 | public interface OnCommentUserClickListener {
12 | void onCommentClicked(@NonNull IComment comment,CharSequence text);
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shape_button_red.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 | * 朋友圈类型
7 | */
8 |
9 | public interface MomentsType {
10 | //空内容,容错用
11 | int EMPTY_CONTENT = 0;
12 | //纯文字
13 | int TEXT_ONLY = 1;
14 | //多图
15 | int MULTI_IMAGES = 2;
16 | //网页
17 | int WEB = 4;
18 | // TODO: 2016/10/29 增加视频类型,广告类型等
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/com/appjishu/starzone/activity/splash/SplashActivity.java:
--------------------------------------------------------------------------------
1 | package com.appjishu.starzone.activity.splash;
2 |
3 |
4 | import android.content.Intent;
5 |
6 | import razerdp.github.com.lib.base.BaseActivity;
7 |
8 | /**
9 | * Created by liushaoming on 2016/10/28.
10 | *
11 | * 闪屏页
12 | */
13 |
14 | public class SplashActivity extends BaseActivity {
15 | @Override
16 | public void onHandleIntent(Intent intent) {
17 |
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/selector_comment_widget.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 | * 评论Callback
10 | */
11 |
12 | public interface OnCommentChangeCallback {
13 |
14 | void onAddComment(CommentInfo response);
15 |
16 | void onDeleteComment(String response);
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_chat_green_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 | * presenter基类接口
7 | */
8 |
9 | public interface IBasePresenter
6 | * 选择相册的event
7 | */
8 |
9 | public class EventSelectAlbum {
10 | private String albumName;
11 |
12 | public EventSelectAlbum(String albumName) {
13 | this.albumName = albumName;
14 | }
15 |
16 | public String getAlbumName() {
17 | return albumName;
18 | }
19 |
20 | public void setAlbumName(String albumName) {
21 | this.albumName = albumName;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/com/appjishu/starzone/model/UserProfileDetail.java:
--------------------------------------------------------------------------------
1 | package com.appjishu.starzone.model;
2 |
3 | public class UserProfileDetail extends UserProfile {
4 | private int checkInCount;
5 | private int score;
6 |
7 | public int getCheckInCount() {
8 | return checkInCount;
9 | }
10 |
11 | public void setCheckInCount(int checkInCount) {
12 | this.checkInCount = checkInCount;
13 | }
14 |
15 | public int getScore() {
16 | return score;
17 | }
18 |
19 | public void setScore(int score) {
20 | this.score = score;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/com/appjishu/starzone/util/TianapiUtil.java:
--------------------------------------------------------------------------------
1 | package com.appjishu.starzone.util;
2 |
3 | import com.appjishu.starzone.constant.StarSignConstant;
4 | import com.appjishu.starzone.constant.TianapiConstant;
5 |
6 | public class TianapiUtil {
7 | public static String getUrl(int meValue, int heValue) {
8 | String me = StarSignConstant.arrText[meValue];
9 | String he = StarSignConstant.arrText[heValue];
10 | String url = TianapiConstant.URL + "?key=" + TianapiConstant.APIKEY + "&me="
11 | + me + "&he="+ he;
12 | return url;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/appjishu/starzone/model/SaveImageResult.java:
--------------------------------------------------------------------------------
1 | package com.appjishu.starzone.model;
2 |
3 | public class SaveImageResult {
4 | private boolean success;
5 | private String absolutePath;
6 |
7 | public boolean isSuccess() {
8 | return success;
9 | }
10 |
11 | public void setSuccess(boolean success) {
12 | this.success = success;
13 | }
14 |
15 | public String getAbsolutePath() {
16 | return absolutePath;
17 | }
18 |
19 | public void setAbsolutePath(String absolutePath) {
20 | this.absolutePath = absolutePath;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/circle_base_ui/src/main/res/layout/view_recyclerview.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 | * 常量定义
12 | */
13 | @Retention(RetentionPolicy.SOURCE)
14 | public @interface Define {
15 |
16 | String BMOB_APPID = "7fc6618e5572b09c6055ef4d53d0017a";
17 |
18 |
19 | @Retention(RetentionPolicy.SOURCE)
20 | @IntDef({LikeState.LIKE, LikeState.UNLIKE})
21 | @interface LikeState {
22 | int LIKE = 0x10;
23 | int UNLIKE = 0x11;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/circle_base_library/src/main/java/razerdp/github/com/lib/base/BaseModuleApplication.java:
--------------------------------------------------------------------------------
1 | package razerdp.github.com.lib.base;
2 |
3 | import android.app.Application;
4 |
5 | import razerdp.github.com.lib.api.AppContext;
6 | import razerdp.github.com.lib.manager.localphoto.LocalPhotoManager;
7 |
8 | /**
9 | * Created by liushaoming on 2017/4/1.
10 | *
11 | * module的application父类..主要用来初始ARouter等
12 | */
13 |
14 | public class BaseModuleApplication extends Application {
15 |
16 | @Override
17 | public void onCreate() {
18 | super.onCreate();
19 | AppContext.initARouter();
20 | LocalPhotoManager.INSTANCE.registerContentObserver(null);
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/circle_base_library/src/main/java/razerdp/github/com/lib/interfaces/adapter/TextWatcherAdapter.java:
--------------------------------------------------------------------------------
1 | package razerdp.github.com.lib.interfaces.adapter;
2 |
3 | import android.text.Editable;
4 | import android.text.TextWatcher;
5 |
6 | /**
7 | * Created by liushaoming on 2017/10/12.
8 | */
9 |
10 | public abstract class TextWatcherAdapter implements TextWatcher {
11 | @Override
12 | public void beforeTextChanged(CharSequence s, int start, int count, int after) {
13 |
14 | }
15 |
16 | @Override
17 | public void onTextChanged(CharSequence s, int start, int before, int count) {
18 |
19 | }
20 |
21 | @Override
22 | public void afterTextChanged(Editable s) {
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/appjishu/starzone/model/FunctionData.java:
--------------------------------------------------------------------------------
1 | package com.appjishu.starzone.model;
2 |
3 | public class FunctionData {
4 | private String key;
5 | private String text;
6 | private int resId;
7 |
8 | public String getKey() {
9 | return key;
10 | }
11 |
12 | public void setKey(String key) {
13 | this.key = key;
14 | }
15 |
16 | public String getText() {
17 | return text;
18 | }
19 |
20 | public void setText(String text) {
21 | this.text = text;
22 | }
23 |
24 | public int getResId() {
25 | return resId;
26 | }
27 |
28 | public void setResId(int resId) {
29 | this.resId = resId;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_progress.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 | * 網頁vh
16 | *
17 | * @see MomentsType
18 | */
19 |
20 | @LayoutId(id = R.layout.moments_web)
21 | public class WebMomentsVH extends CircleBaseViewHolder {
22 |
23 |
24 | public WebMomentsVH(View itemView, int viewType) {
25 | super(itemView, viewType);
26 | }
27 |
28 | @Override
29 | public void onFindView(@NonNull View rootView) {
30 |
31 |
32 | }
33 |
34 | @Override
35 | public void onBindDataToView(@NonNull MomentInfo data, int position, int viewType) {
36 |
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/circle_base_library/src/androidTest/java/razerdp/github/com/baselibrary/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package razerdp.github.com.lib;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("razerdp.github.com.baselibrary.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/circle_base_ui/src/androidTest/java/razerdp/github/com/baseuilib/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package razerdp.github.com.baseuilib;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("razerdp.github.com.baseuilib.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/appjishu/starzone/ui/viewholder/TextOnlyMomentsVH.java:
--------------------------------------------------------------------------------
1 | package com.appjishu.starzone.ui.viewholder;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.view.View;
5 |
6 | import com.razerdp.github.com.common.entity.MomentInfo;
7 |
8 | import com.appjishu.starzone.R;
9 | import razerdp.github.com.ui.base.adapter.LayoutId;
10 |
11 |
12 | /**
13 | * Created by liushaoming on 2016/11/3.
14 | *
15 | * 衹有文字的vh
16 | *
17 | * @see MomentsType
18 | */
19 |
20 | @LayoutId(id = R.layout.moments_only_text)
21 | public class TextOnlyMomentsVH extends CircleBaseViewHolder {
22 |
23 | public TextOnlyMomentsVH(View itemView, int viewType) {
24 | super(itemView, viewType);
25 | }
26 |
27 | @Override
28 | public void onFindView(@NonNull View rootView) {
29 |
30 | }
31 |
32 | @Override
33 | public void onBindDataToView(@NonNull MomentInfo data, int position, int viewType) {
34 |
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/circle_publish/src/androidTest/java/extramessage/rekall/com/publish/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package extramessage.rekall.com.publish;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("extramessage.rekall.com.publish.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/appjishu/starzone/ui/viewholder/EmptyMomentsVH.java:
--------------------------------------------------------------------------------
1 | package com.appjishu.starzone.ui.viewholder;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.view.View;
5 |
6 | import com.razerdp.github.com.common.entity.MomentInfo;
7 |
8 | import com.appjishu.starzone.R;
9 | import razerdp.github.com.ui.base.adapter.LayoutId;
10 |
11 |
12 | /**
13 | * Created by liushaoming on 2016/11/3.
14 | *
15 | * 空内容的vh
16 | *
17 | * @see MomentsType
18 | */
19 |
20 | @LayoutId(id = R.layout.moments_empty_content)
21 | public class EmptyMomentsVH extends CircleBaseViewHolder {
22 |
23 |
24 | public EmptyMomentsVH(View itemView, int viewType) {
25 | super(itemView, viewType);
26 | }
27 |
28 | @Override
29 | public void onFindView(@NonNull View rootView) {
30 |
31 | }
32 |
33 | @Override
34 | public void onBindDataToView(@NonNull MomentInfo data, int position, int viewType) {
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/circle_photoselect/src/androidTest/java/razerdp/github/com/photoselect/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package razerdp.github.com.photoselect;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumentation test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("razerdp.github.com.photoselect.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_sign_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 | * 相册使用的bean
9 | */
10 |
11 | public class AlbumInfo implements Serializable {
12 | private String albumName;
13 | private int photoCounts;
14 | private String firstPhoto;
15 |
16 | public AlbumInfo() {
17 | }
18 |
19 | public String getAlbumName() {
20 | return albumName;
21 | }
22 |
23 | public void setAlbumName(String albumName) {
24 | this.albumName = albumName;
25 | }
26 |
27 | public int getPhotoCounts() {
28 | return photoCounts;
29 | }
30 |
31 | public void setPhotoCounts(int photoCounts) {
32 | this.photoCounts = photoCounts;
33 | }
34 |
35 | public String getFirstPhoto() {
36 | return firstPhoto;
37 | }
38 |
39 | public void setFirstPhoto(String firstPhoto) {
40 | this.firstPhoto = firstPhoto;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/circle_base_ui/src/main/res/anim/slide_out_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
8 | * 用于recyclerview的header和footer的view fix info
9 | */
10 |
11 | public class FixedViewInfo {
12 |
13 | /**
14 | * 不完美解决方法:添加一个header,则从-2开始减1
15 | * header:-2~-98
16 | */
17 | public static final int ITEM_VIEW_TYPE_HEADER_START = -2;
18 | /**
19 | * 不完美解决方法:添加一个header,则从-99开始减1
20 | * footer:-99~-无穷
21 | */
22 | public static final int ITEM_VIEW_TYPE_FOOTER_START = -99;
23 |
24 |
25 | /**
26 | * The view to add to the list
27 | */
28 | public final View view;
29 | /**
30 | * 因为onCreateViewHolder不包含位置信息,所以itemViewType需要包含位置信息
31 | *
32 | * 位置信息方法:将位置添加到高位
33 | */
34 | public final int itemViewType;
35 |
36 | public FixedViewInfo(View view, int itemViewType) {
37 | this.view = view;
38 | this.itemViewType = itemViewType;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/moments_empty_content.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 | * 针对权限与不同厂商适配
13 | *
14 | * 本类所有返回boolean的方法都有如下规定:
15 | *
16 | * 当返回true,外部{@link PermissionHelper}的对应方法才能继续执行
17 | * 当返回false,外部{@link PermissionHelper}的对应方法中断
18 | */
19 | class PermissionHelperCompat {
20 |
21 |
22 | void onRequestPermission(OnPermissionGrantListener listener, PermissionHelper.Permission... permissions) {
23 |
24 | }
25 |
26 | void onHandlePermissionResult(final int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
27 |
28 | }
29 |
30 | boolean onDontAskPermission(List
12 | * bmob文件链接工具类
13 | */
14 | public class BmobUrlUtil {
15 |
16 | private static final String thumbImage = "%s!/fxfn/%sx%s";
17 | private static final String scaleThumbImage = "%s!/scale/%s";//[1-1000]
18 |
19 | public static String getThumbImageUrl(String url, int width, int height) {
20 | // TODO 取消缩略图-1
21 | // if (StringUtil.noEmpty(url) && (url.endsWith(".jpg") || url.endsWith(".png"))) {
22 | // return String.format(Locale.getDefault(), thumbImage, url, String.valueOf(width), String.valueOf(height));
23 | // }
24 | return url;
25 | }
26 |
27 | public static String getThumbImageUrl(String url, @IntRange(from = 1, to = 1000) int scale) {
28 | // TODO 取消缩略图-2
29 | // if (StringUtil.noEmpty(url) && (url.endsWith(".jpg") || url.endsWith(".png"))) {
30 | // return String.format(Locale.getDefault(), scaleThumbImage, url, scale);
31 | // }
32 | return url;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Files for the ART/Dalvik VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # Generated files
12 | bin/
13 | gen/
14 | out/
15 |
16 | # Gradle files
17 | .gradle/
18 | build/
19 |
20 | # Local configuration file (sdk path, etc)
21 | local.properties
22 |
23 | # Proguard folder generated by Eclipse
24 | proguard/
25 |
26 | # Log Files
27 | *.log
28 |
29 | # Android Studio Navigation editor temp files
30 | .navigation/
31 |
32 | # Android Studio captures folder
33 | captures/
34 |
35 | # IntelliJ
36 | *.iml
37 | .idea/workspace.xml
38 | .idea/tasks.xml
39 | .idea/gradle.xml
40 | .idea/assetWizardSettings.xml
41 | .idea/dictionaries
42 | .idea/libraries
43 | .idea/caches
44 |
45 | # Keystore files
46 | # Uncomment the following line if you do not want to check your keystore files in.
47 | #*.jks
48 |
49 | # External native build folder generated in Android Studio 2.2 and later
50 | .externalNativeBuild
51 |
52 | # Google Services (e.g. APIs or Firebase)
53 | google-services.json
54 |
55 | # Freeline
56 | freeline.py
57 | freeline/
58 | freeline_project_description.json
59 |
60 | # fastlane
61 | fastlane/report.xml
62 | fastlane/Preview.html
63 | fastlane/screenshots
64 | fastlane/test_output
65 | fastlane/readme.md
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/appjishu/starzone/app/mvp/view/IMomentView.java:
--------------------------------------------------------------------------------
1 | package com.appjishu.starzone.app.mvp.view;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.support.annotation.Nullable;
5 | import android.view.View;
6 |
7 | import com.razerdp.github.com.common.entity.CommentInfo;
8 | import com.razerdp.github.com.common.entity.LikeInfo;
9 | import com.razerdp.github.com.common.entity.MomentInfo;
10 |
11 | import java.util.List;
12 |
13 | import razerdp.github.com.lib.mvp.IBaseView;
14 | import razerdp.github.com.ui.widget.commentwidget.CommentWidget;
15 |
16 |
17 | /**
18 | * Created by liushaoming on 2016/12/7.
19 | */
20 |
21 | public interface IMomentView extends IBaseView {
22 |
23 | void onLikeChange(int itemPos, List
18 | * 朋友圈adapter
19 | */
20 |
21 | public class CircleMomentsAdapter extends BaseMultiRecyclerViewAdapter
8 | * 简单的对象池
9 | */
10 |
11 | public class SimpleObjectPool
9 | * 跳转路由管理
10 | */
11 |
12 | public interface RouterList {
13 |
14 | @Retention(RetentionPolicy.SOURCE)
15 | @interface PhotoMultiBrowserActivity {
16 | String path = "/photo/browser";
17 | String key_browserinfo = "browserinfo";
18 | String key_maxSelectCount = "maxSelectCount";
19 | String key_result = "selectedphoto";
20 | int requestCode = 0x20;
21 | }
22 |
23 | @Retention(RetentionPolicy.SOURCE)
24 | @interface PublishActivity {
25 | String path = "/publish/edit";
26 | String key_mode = "mode";
27 | String key_photoList = "photoList";
28 | String key_userId = "userId";
29 | String key_token = "token";
30 | int MODE_TEXT = 0x10;
31 | int MODE_MULTI = 0x11;
32 | int requestCode = 0x21;
33 | }
34 |
35 | @Retention(RetentionPolicy.SOURCE)
36 | @interface PhotoSelectActivity {
37 | String path = "/photo/select";
38 | String key_maxSelectCount = "maxSelectCount";
39 | String key_result = "selectedphoto";
40 | int requestCode = 0x22;
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/circle_common/src/main/java/com/razerdp/github/com/common/model/ResponseData.java:
--------------------------------------------------------------------------------
1 | package com.razerdp.github.com.common.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class ResponseData implements Serializable {
6 | private static final long serialVersionUID = 1447339403407144621L;
7 | private int code;
8 | private String msg;
9 | private Object data;
10 |
11 | public ResponseData() {
12 | }
13 |
14 | public static ResponseData newOK() {
15 | ResponseData responseData = new ResponseData();
16 | responseData.setCode(0);
17 | responseData.setMsg("OK");
18 | return responseData;
19 | }
20 |
21 | public int getCode() {
22 | return this.code;
23 | }
24 |
25 | public void setCode(int code) {
26 | this.code = code;
27 | }
28 |
29 | public String getMsg() {
30 | return this.msg;
31 | }
32 |
33 | public void setMsg(String msg) {
34 | this.msg = msg;
35 | }
36 |
37 | public Object getData() {
38 | return this.data;
39 | }
40 |
41 | public void setData(Object data) {
42 | this.data = data;
43 | }
44 |
45 | @Override
46 | public String toString() {
47 | return "ResponseData{" +
48 | "code=" + code +
49 | ", msg='" + msg + '\'' +
50 | ", data=" + data +
51 | '}';
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/app/src/main/java/com/appjishu/starzone/app/manager/ServiceInfoManager.java:
--------------------------------------------------------------------------------
1 | package com.appjishu.starzone.app.manager;
2 |
3 | import android.support.annotation.Nullable;
4 |
5 | import com.razerdp.github.com.common.entity.other.ServiceInfo;
6 |
7 | import java.util.List;
8 |
9 | //import cn.bmob.v3.BmobQuery;
10 | //import cn.bmob.v3.exception.BmobException;
11 | //import cn.bmob.v3.listener.FindListener;
12 | import razerdp.github.com.lib.utils.ToolUtil;
13 |
14 | /**
15 | * Created by liushaoming on 2017/12/20.
16 | *
17 | * 服务器信息
18 | */
19 |
20 | public enum ServiceInfoManager {
21 | INSTANCE;
22 |
23 | public void check(final OnCheckServiceInfoListener onCheckServiceInfoListener) {
24 | // BmobQuery
12 | * 字符串工具类
13 | */
14 |
15 | public class StringUtil {
16 |
17 | public static boolean noEmpty(String originStr) {
18 | return !TextUtils.isEmpty(originStr);
19 | }
20 |
21 |
22 | public static boolean noEmpty(String... originStr) {
23 | boolean noEmpty = true;
24 | for (String s : originStr) {
25 | if (TextUtils.isEmpty(s)) {
26 | noEmpty = false;
27 | break;
28 | }
29 | }
30 | return noEmpty;
31 | }
32 |
33 | /**
34 | * 从资源文件拿到文字
35 | */
36 | public static String getResourceString(int strId) {
37 | String result = "";
38 | if (strId > 0) {
39 | result = AppContext.getResources().getString(strId);
40 | }
41 | return result;
42 | }
43 |
44 | /**
45 | * 从资源文件得到文字并format
46 | */
47 | public static String getResourceStringAndFormat(int strId, Object... objs) {
48 | String result = "";
49 | if (strId > 0) {
50 | result = String.format(Locale.getDefault(), AppContext.getResources().getString(strId), objs);
51 | }
52 | return result;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/circle_base_ui/src/main/res/layout/dialog_progress.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 | 
18 |
19 |
20 | * 界面
21 |
22 |
23 | 
24 |
25 |
26 |
27 | 
28 |
29 |
30 |
31 | 
32 |
33 |
34 |
35 | ## 开发主要事项
36 | 技术通讯使用了小米推送MiPush和腾讯免费的短信服务。
37 | 大家如果真的需要使用这些功能,需要自己去相关的官网上去注册小米开发者账号和腾讯云账号
38 | 获取相应的appid和key填入到com.appjishu.starzone.constant.MiSdkConstant
39 | 并修改Java后台的sms短信的开发者配置信息和misdk的开发者信息, 基本都是一些constant类,大家自己在代码中找找位置
40 | 命名基本是apikey, secret之类的。
41 |
42 |
--------------------------------------------------------------------------------
/circle_photoview/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion rootProject.ext.android.compileSdkVersion
5 |
6 | defaultConfig {
7 | minSdkVersion rootProject.ext.android.minSdkVersion
8 | targetSdkVersion rootProject.ext.android.targetSdkVersion
9 | versionCode rootProject.ext.android.versionCode
10 | versionName rootProject.ext.android.versionName
11 |
12 | javaCompileOptions {
13 | annotationProcessorOptions {
14 | arguments = [moduleName: project.getName()]
15 | }
16 | }
17 | }
18 |
19 | lintOptions {
20 | abortOnError false
21 | }
22 | }
23 |
24 | dependencies {
25 | api "com.android.support:support-core-utils:27.1.1"
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/circle_base_library/src/main/java/razerdp/github/com/lib/network/base/OnResponseListener.java:
--------------------------------------------------------------------------------
1 | package razerdp.github.com.lib.network.base;
2 |
3 | import razerdp.github.com.lib.base.AppjsException;
4 |
5 | /**
6 | * Created by liushaoming on 2016/10/27.
7 | */
8 |
9 | public interface OnResponseListener