chatList = new ArrayList<>();
79 | for (int i = 0; i < 20; i++) {
80 | Chat chat = new Chat();
81 | chat.id = i;
82 | String[] name = new String[]{"Jake", "Eric", "Kenny", "Helen", "Carr"};
83 | String[] chats = new String[]{"message1", "message2", "message3", "message4",
84 | "message5"};
85 | chat.name = name[i % name.length];
86 | chat.message = chats[i % name.length];
87 | chatList.add(chat);
88 | }
89 | result.data = chatList;
90 | result.resultCode = 0;
91 | result.message = "";
92 | return Observable.just(result);
93 | }
94 |
95 | @Override
96 | public boolean canLoadMore() {
97 | return false;
98 | }
99 |
100 | @Override
101 | public boolean canPullToRefresh() {
102 | return true;
103 | }
104 |
105 | @Override
106 | protected int getLayoutId() {
107 | return R.layout.comm_recycler;
108 | }
109 |
110 | @Override
111 | public RefreshHeader getRefreshHeader() {
112 | return new DingDangHeader(mActivity);
113 | }
114 |
115 | @Override
116 | protected boolean loadOnShow() {
117 | return false;
118 | }
119 | }
120 |
--------------------------------------------------------------------------------
/app/src/main/java/com/meis/basemodule/utils/ListUtils.java:
--------------------------------------------------------------------------------
1 | package com.meis.basemodule.utils;
2 |
3 | import java.util.Collection;
4 |
5 | /**
6 | * author: ws4
7 | * created on: 2018/4/11 18:19
8 | * description:集合工具
9 | */
10 | public class ListUtils {
11 | public static boolean isEmpty(Collection> collection) {
12 | return collection == null || collection.size() == 0;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/app/src/main/java/com/meis/basemodule/widget/BottomBarTab.java:
--------------------------------------------------------------------------------
1 | package com.meis.basemodule.widget;
2 |
3 | import android.content.Context;
4 | import android.content.res.TypedArray;
5 | import android.graphics.drawable.Drawable;
6 | import android.support.annotation.DrawableRes;
7 | import android.support.v4.content.ContextCompat;
8 | import android.util.AttributeSet;
9 | import android.util.TypedValue;
10 | import android.view.Gravity;
11 | import android.widget.FrameLayout;
12 | import android.widget.ImageView;
13 |
14 | import com.meis.basemodule.R;
15 |
16 | /**
17 | * Created by YoKeyword on 16/6/3.
18 | */
19 | public class BottomBarTab extends FrameLayout {
20 | private ImageView mIcon;
21 | private Context mContext;
22 | private int mTabPosition = -1;
23 |
24 | public BottomBarTab(Context context, @DrawableRes int icon) {
25 | this(context, null, icon);
26 | }
27 |
28 | public BottomBarTab(Context context, AttributeSet attrs, int icon) {
29 | this(context, attrs, 0, icon);
30 | }
31 |
32 | public BottomBarTab(Context context, AttributeSet attrs, int defStyleAttr, int icon) {
33 | super(context, attrs, defStyleAttr);
34 | init(context, icon);
35 | }
36 |
37 | private void init(Context context, int icon) {
38 | mContext = context;
39 | TypedArray typedArray = context.obtainStyledAttributes(new int[]{R.attr
40 | .selectableItemBackgroundBorderless});
41 | Drawable drawable = typedArray.getDrawable(0);
42 | setBackgroundDrawable(drawable);
43 | typedArray.recycle();
44 |
45 | mIcon = new ImageView(context);
46 | int size = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 27, getResources
47 | ().getDisplayMetrics());
48 | LayoutParams params = new LayoutParams(size, size);
49 | params.gravity = Gravity.CENTER;
50 | mIcon.setImageResource(icon);
51 | mIcon.setLayoutParams(params);
52 | mIcon.setColorFilter(ContextCompat.getColor(context, R.color.tab_unselect));
53 | addView(mIcon);
54 | }
55 |
56 | @Override
57 | public void setSelected(boolean selected) {
58 | super.setSelected(selected);
59 | if (selected) {
60 | mIcon.setColorFilter(ContextCompat.getColor(mContext, R.color.colorPrimary));
61 | } else {
62 | mIcon.setColorFilter(ContextCompat.getColor(mContext, R.color.tab_unselect));
63 | }
64 | }
65 |
66 | public void setTabPosition(int position) {
67 | mTabPosition = position;
68 | if (position == 0) {
69 | setSelected(true);
70 | }
71 | }
72 |
73 | public int getTabPosition() {
74 | return mTabPosition;
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/comm_bottom_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/comm_bottom_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/live_btn_bottom_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
7 |
8 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/chatfrom_bg_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/drawable-hdpi/chatfrom_bg_normal.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/chatto_bg_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/drawable-hdpi/chatto_bg_normal.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/actionbar_shadow_up.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/drawable-xxhdpi/actionbar_shadow_up.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/bg_second.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/drawable-xxhdpi/bg_second.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_account_circle_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/drawable-xxhdpi/ic_account_circle_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/drawable-xxhdpi/ic_avatar.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_discover_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/drawable-xxhdpi/ic_discover_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_home_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/drawable-xxhdpi/ic_home_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_message_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/drawable-xxhdpi/ic_message_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_chat_input.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
10 |
11 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_chat_right.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/drawable/bg_chat_right.9.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/comm_btn_close_gray.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_create_live.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_create_shortvideo.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_custom_base_empty.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
17 |
18 |
27 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
19 |
20 |
26 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
17 |
18 |
28 |
29 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_module.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
26 |
27 |
37 |
38 |
46 |
47 |
57 |
58 |
67 |
68 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_translucent.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/comm_bottom_comment.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
20 |
21 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/comm_recycler.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/dialog_bottom_live.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
19 |
20 |
26 |
27 |
38 |
39 |
54 |
55 |
70 |
71 |
82 |
83 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_comm.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
19 |
20 |
26 |
27 |
35 |
36 |
40 |
41 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_image_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_section_content.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
20 |
21 |
29 |
30 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_text_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
21 |
22 |
30 |
31 |
39 |
40 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_zhihu_chat.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
18 |
19 |
27 |
28 |
35 |
36 |
44 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_zhihu_home_first.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
18 |
19 |
24 |
25 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_zhihu_msg.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
22 |
23 |
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/zhihu_activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/zhihu_fragment_first.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/zhihu_fragment_first_detail.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
20 |
21 |
28 |
29 |
34 |
35 |
36 |
37 |
38 |
39 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/zhihu_fragment_second.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
20 |
21 |
22 |
23 |
28 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/zhihu_fragment_tab_first_msg.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/zhihu_fragment_tab_second_pager.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/custime_type.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/refresh_type.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/type.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_arrow_back_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xhdpi/ic_arrow_back_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_btn_close_gray_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xhdpi/ic_btn_close_gray_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_btn_close_gray_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xhdpi/ic_btn_close_gray_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_create_live_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xhdpi/ic_create_live_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_create_live_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xhdpi/ic_create_live_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_create_shortvideo_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xhdpi/ic_create_shortvideo_normal.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_create_shortvideo_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xhdpi/ic_create_shortvideo_pressed.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_empty_page.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xhdpi/ic_empty_page.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/bg_fifth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xxhdpi/bg_fifth.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/bg_first.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xxhdpi/bg_first.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/bg_fourth.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xxhdpi/bg_fourth.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/bg_second.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xxhdpi/bg_second.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/bg_third.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xxhdpi/bg_third.webp
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_arrow_back_white_24dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xxhdpi/ic_arrow_back_white_24dp.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F44336
4 | #D32F2F
5 | #536DFE
6 | #FFFDFDFD
7 |
8 | #48495F
9 | #FFFFFF
10 | #c9c9c9
11 | #dadada
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 48dp
4 | 16dp
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | BaseModule
3 | Activity模块
4 | Fragment模块
5 | Dialog模块
6 | 类型
7 | 状态(网络错误,空数据,正在加载...)
8 | 自定义状态(空数据界面为例)
9 | 下拉刷新,上拉加载(支持自定义刷新样式)
10 | 单类型列表
11 | 多类型列表
12 | 透明状态栏
13 |
14 | 空界面
15 | 错误界面
16 | 加载界面
17 | 自定义空界面
18 | 不要这么高冷~快去增加新数据吧!
19 | 正在重新加载数据
20 | 我是自定义的空数据界面
21 | 请拖动我进行刷新哦
22 |
23 | 丁丁当
24 | 贝塞尔曲线类雷达
25 | 经典下拉
26 | 热门新闻
27 |
28 |
29 | - Andorid O Developer Preview
30 | - Build for a Multi-Screen World
31 | - Build Beautiful Apps
32 |
33 |
34 |
35 | - An early look at the next version of Android for testing, development, and feedback. Get your apps ready for Android O!
36 | - Android runs on billions of handheld devices around the world, and it now supports these exciting, new form-factors.
37 | - Resources to get you started with designing and developing for Android.
38 |
39 |
40 | 再按一次退出
41 | image_transition
42 |
43 | 首页
44 | 发现
45 | 商店
46 | 登录
47 | 消息
48 | 发送
49 | 个人中心
50 | 今天
51 | 和大家说点什么
52 | 头像被点击了
53 |
54 | 推荐
55 | 热门
56 | 收藏
57 | 更多
58 |
59 | 底部提示框
60 | 底部评论提示框
61 |
62 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
25 |
26 |
29 |
30 |
32 |
33 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/test/java/com/meis/basemodule/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.meis.basemodule;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/base/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | ### Android template
3 | # Built application files
4 | *.apk
5 | *.ap_
6 |
7 | # Files for the ART/Dalvik VM
8 | *.dex
9 |
10 | # Java class files
11 | *.class
12 |
13 | # Generated files
14 | bin/
15 | gen/
16 | out/
17 |
18 | # Gradle files
19 | .gradle/
20 | build/
21 |
22 | # Local configuration file (sdk path, etc)
23 | local.properties
24 |
25 | # Proguard folder generated by Eclipse
26 | proguard/
27 |
28 | # Log Files
29 | *.log
30 |
31 | # Android Studio Navigation editor temp files
32 | .navigation/
33 |
34 | # Android Studio captures folder
35 | captures/
36 |
37 | # IntelliJ
38 | *.iml
39 | .idea/workspace.xml
40 | .idea/tasks.xml
41 | .idea/gradle.xml
42 | .idea/dictionaries
43 | .idea/libraries
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 |
--------------------------------------------------------------------------------
/base/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 26
5 |
6 | defaultConfig {
7 | minSdkVersion 18
8 | targetSdkVersion 26
9 | versionCode 1
10 | versionName "1.0"
11 | }
12 |
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | implementation fileTree(include: ['*.jar'], dir: 'libs')
23 | implementation 'com.android.support:appcompat-v7:26.1.0'
24 | implementation 'com.android.support:design:26.1.0'
25 |
26 | //rx必选项
27 | compile "io.reactivex.rxjava2:rxjava:2.1.8"
28 | compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
29 | compile 'com.trello.rxlifecycle2:rxlifecycle-components:2.2.1'
30 | //recyclerView
31 | compile 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
32 | //下拉刷新库
33 | compile 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-1'
34 | //fragment碎片
35 | compile 'me.yokeyword:fragmentation-core:1.3.3'
36 | }
37 |
--------------------------------------------------------------------------------
/base/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/base/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/base/src/main/java/com/meis/base/mei/IMeiCompatActivity.java:
--------------------------------------------------------------------------------
1 | package com.meis.base.mei;
2 |
3 | import com.scwang.smartrefresh.layout.api.RefreshHeader;
4 |
5 | /**
6 | * desc:
7 | * author: ws
8 | * date: 2018/4/19.
9 | */
10 |
11 | public interface IMeiCompatActivity {
12 | /**
13 | * refreshing adding asynchronous processing
14 | *
15 | * loading refresh
16 | */
17 | void onRefreshing();
18 |
19 | /**
20 | * load more to add asynchronous processing
21 | *
22 | * loading more
23 | */
24 | void onLoadingMore();
25 |
26 | /**
27 | * 重写该方法
28 | *
29 | * @return 获取下拉刷新样式
30 | */
31 | RefreshHeader getRefreshHeader();
32 |
33 | /**
34 | * 返回false 状态界面会失效 刷新功能会失效
35 | *
36 | * @return
37 | */
38 | boolean canStatusHelper();
39 |
40 | /**
41 | * @param visibility true键盘的打开/false关闭
42 | */
43 | void onKeyboardVisibilityChanged(boolean visibility);
44 |
45 | /**
46 | * type 一行代码实现下拉刷新
47 | *
48 | * PullToRefresh inject class judge refresh
49 | *
50 | * @return true pull to refresh otherwise false
51 | */
52 | boolean canPullToRefresh();
53 |
54 | /**
55 | * type 一行代码实现上拉加载
56 | *
57 | * @return true pull load more otherwise false
58 | */
59 | boolean canPullToLoadMore();
60 | }
61 |
--------------------------------------------------------------------------------
/base/src/main/java/com/meis/base/mei/adapter/IUpdatable.java:
--------------------------------------------------------------------------------
1 | package com.meis.base.mei.adapter;
2 |
3 | public interface IUpdatable {
4 | void update(T other);
5 | }
6 |
--------------------------------------------------------------------------------
/base/src/main/java/com/meis/base/mei/adapter/ItemPresenter.java:
--------------------------------------------------------------------------------
1 | package com.meis.base.mei.adapter;
2 |
3 | import com.chad.library.adapter.base.BaseViewHolder;
4 |
5 | import java.lang.reflect.Type;
6 |
7 | public abstract class ItemPresenter {
8 |
9 | private Type mRawType;
10 |
11 | public ItemPresenter() {
12 | Type superclass = getClass().getGenericSuperclass();
13 | if (superclass instanceof Class) {
14 | throw new RuntimeException("ParameterizedType objects must be instantiated with a " +
15 | "type parameter. Ex: new ParameterizedType>() { }");
16 | }
17 | Type type = ((java.lang.reflect.ParameterizedType) superclass).getActualTypeArguments()[0];
18 | mRawType = type;
19 | }
20 |
21 | public Type getRawType() {
22 | return mRawType;
23 | }
24 |
25 | public int getItemType() {
26 | return mRawType.hashCode();
27 | }
28 |
29 | public void onViewDetached(BaseViewHolder holder) {
30 | }
31 |
32 | public abstract int getLayoutRes();
33 |
34 | public abstract void convert(BaseViewHolder holder, T item);
35 | }
36 |
--------------------------------------------------------------------------------
/base/src/main/java/com/meis/base/mei/adapter/MeiBaseAdapter.java:
--------------------------------------------------------------------------------
1 | package com.meis.base.mei.adapter;
2 |
3 | import android.support.annotation.NonNull;
4 | import android.support.annotation.Nullable;
5 |
6 | import com.chad.library.adapter.base.BaseQuickAdapter;
7 | import com.chad.library.adapter.base.BaseViewHolder;
8 |
9 | import java.util.Collection;
10 | import java.util.List;
11 |
12 | /**
13 | * author: ws4
14 | * created on: 2018/4/11 13:41
15 | * description:
16 | */
17 | public abstract class MeiBaseAdapter extends BaseQuickAdapter {
18 |
19 | /**
20 | * 当前页码
21 | * current page
22 | */
23 | private int mPageCount;
24 |
25 | public MeiBaseAdapter(int layoutResId, @Nullable List data) {
26 | super(layoutResId, data);
27 | }
28 |
29 | public MeiBaseAdapter(@Nullable List data) {
30 | super(data);
31 | }
32 |
33 | public MeiBaseAdapter(int layoutResId) {
34 | super(layoutResId);
35 | }
36 |
37 | public MeiBaseAdapter() {
38 | super(0);
39 | }
40 |
41 | @Override
42 | public void setNewData(@Nullable List data) {
43 | super.setNewData(data);
44 | mPageCount = 1;
45 | }
46 |
47 | @Override
48 | public void addData(@NonNull Collection extends T> newData) {
49 | super.addData(newData);
50 | mPageCount++;
51 | }
52 |
53 | public void clearData() {
54 | getData().clear();
55 | notifyDataSetChanged();
56 | mPageCount = 0;
57 | }
58 |
59 | public int getPageCount() {
60 | return mPageCount;
61 | }
62 |
63 | public int getDataCount() {
64 | return getData().size();
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/base/src/main/java/com/meis/base/mei/adapter/MultiItemPresenter.java:
--------------------------------------------------------------------------------
1 | package com.meis.base.mei.adapter;
2 |
3 |
4 | public abstract class MultiItemPresenter extends ItemPresenter {
5 |
6 | @Override
7 | public final int getLayoutRes() {
8 | return 0;
9 | }
10 |
11 | public abstract int getLayoutRes(int itemType);
12 |
13 | public abstract int getItemType(T item);
14 |
15 | public abstract int[] getItemTypes();
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/base/src/main/java/com/meis/base/mei/annotation/PullToLoadMore.java:
--------------------------------------------------------------------------------
1 | package com.meis.base.mei.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * author: ws4
10 | * created on: 2018/4/8 13:56
11 | * description: 一行代码实现加载更多
12 | */
13 | @Retention(RetentionPolicy.RUNTIME)
14 | @Target(ElementType.TYPE)
15 | public @interface PullToLoadMore {
16 | }
17 |
--------------------------------------------------------------------------------
/base/src/main/java/com/meis/base/mei/annotation/PullToRefresh.java:
--------------------------------------------------------------------------------
1 | package com.meis.base.mei.annotation;
2 |
3 | import java.lang.annotation.ElementType;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 | import java.lang.annotation.Target;
7 |
8 | /**
9 | * author: ws4
10 | * created on: 2018/4/8 13:56
11 | * description: 一行代码实现下拉刷新
12 | */
13 | @Retention(RetentionPolicy.RUNTIME)
14 | @Target(ElementType.TYPE)
15 | public @interface PullToRefresh {
16 | }
17 |
--------------------------------------------------------------------------------
/base/src/main/java/com/meis/base/mei/dialog/IMeiCompatDialog.java:
--------------------------------------------------------------------------------
1 | package com.meis.base.mei.dialog;
2 |
3 | /**
4 | * desc:
5 | * author: ws
6 | * date: 2018/4/19.
7 | */
8 |
9 | public interface IMeiCompatDialog {
10 | }
11 |
--------------------------------------------------------------------------------
/base/src/main/java/com/meis/base/mei/dialog/MeiCompatDialog.java:
--------------------------------------------------------------------------------
1 | package com.meis.base.mei.dialog;
2 |
3 | import android.app.Dialog;
4 | import android.content.DialogInterface;
5 | import android.os.Bundle;
6 | import android.support.annotation.IdRes;
7 | import android.support.annotation.NonNull;
8 | import android.support.v4.app.FragmentActivity;
9 | import android.support.v7.app.AppCompatDialogFragment;
10 | import android.view.View;
11 |
12 | /**
13 | * desc:
14 | * author: ws
15 | * date: 2018/4/19.
16 | */
17 |
18 | public class MeiCompatDialog extends AppCompatDialogFragment implements IMeiCompatDialog {
19 |
20 | final MeiCompatDialogDelegate mDelegate = new MeiCompatDialogDelegate(this);
21 |
22 | @NonNull
23 | @Override
24 | public Dialog onCreateDialog(Bundle savedInstanceState) {
25 | return mDelegate.onCreateDialog(super.onCreateDialog(savedInstanceState));
26 | }
27 |
28 | protected void setFullScreen() {
29 | mDelegate.setFullScreen();
30 | }
31 |
32 | public T findViewById(@IdRes int id) {
33 | return mDelegate.findViewById(id);
34 | }
35 |
36 | @Override
37 | public void onDismiss(DialogInterface dialog) {
38 | super.onDismiss(dialog);
39 | mDelegate.onDismiss(dialog);
40 | }
41 |
42 | /**
43 | * 沉浸模式下调用这个方法
44 | *
45 | * @param activity
46 | */
47 | public void showImmersive(FragmentActivity activity) {
48 | mDelegate.showImmersive(activity);
49 | }
50 |
51 | public void setOnDismissListener(DialogInterface.OnDismissListener onDismissListener) {
52 | mDelegate.setOnDismissListener(onDismissListener);
53 | }
54 |
55 | @Override
56 | public void dismiss() {
57 | mDelegate.dismiss();
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/base/src/main/java/com/meis/base/mei/dialog/MeiCompatDialogDelegate.java:
--------------------------------------------------------------------------------
1 | package com.meis.base.mei.dialog;
2 |
3 | import android.app.Dialog;
4 | import android.content.DialogInterface;
5 | import android.support.annotation.IdRes;
6 | import android.support.v4.app.DialogFragment;
7 | import android.support.v4.app.FragmentActivity;
8 | import android.support.v7.app.AppCompatDialogFragment;
9 | import android.view.View;
10 | import android.view.WindowManager;
11 |
12 | import com.meis.base.R;
13 |
14 | /**
15 | * desc:
16 | * author: ws
17 | * date: 2018/4/19.
18 | */
19 |
20 | public class MeiCompatDialogDelegate {
21 | private IMeiCompatDialog mMeiCompatDialog;
22 | private AppCompatDialogFragment mFragment;
23 |
24 | private boolean mImmersive = false;
25 |
26 | private DialogInterface.OnDismissListener mOnDismissListener;
27 |
28 | public MeiCompatDialogDelegate(IMeiCompatDialog meiCompatDialog) {
29 | if (!(meiCompatDialog instanceof AppCompatDialogFragment)) {
30 | throw new RuntimeException("Must extends Fragment");
31 | }
32 | mMeiCompatDialog = meiCompatDialog;
33 | mFragment = (AppCompatDialogFragment) meiCompatDialog;
34 | }
35 |
36 | public Dialog onCreateDialog(Dialog dialog) {
37 | if (mImmersive) {
38 | dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
39 | }
40 | return dialog;
41 | }
42 |
43 |
44 | public T findViewById(@IdRes int id) {
45 | return (T) mFragment.getView().findViewById(id);
46 | }
47 |
48 | /**
49 | * 沉浸模式下调用这个方法
50 | *
51 | * @param activity
52 | */
53 | public void showImmersive(FragmentActivity activity) {
54 | try {
55 | mImmersive = true;
56 | activity.getSupportFragmentManager().beginTransaction().add(mFragment, "dialog_" + mFragment.getClass()
57 | .getSimpleName()).commitNowAllowingStateLoss();
58 | mFragment.getDialog().getWindow().getDecorView().setSystemUiVisibility(
59 | mFragment.getActivity().getWindow().getDecorView().getSystemUiVisibility()
60 | );
61 | mFragment.getDialog().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
62 | } catch (Exception e) {
63 | e.printStackTrace();
64 | }
65 | }
66 |
67 | protected void setFullScreen() {
68 | mFragment.setStyle(DialogFragment.STYLE_NO_TITLE, R.style.MeiBaseDialog);
69 | }
70 |
71 | public void onDismiss(DialogInterface dialog) {
72 | if (mOnDismissListener != null) {
73 | mOnDismissListener.onDismiss(dialog);
74 | }
75 | }
76 |
77 | public void setOnDismissListener(DialogInterface.OnDismissListener onDismissListener) {
78 | mOnDismissListener = onDismissListener;
79 | }
80 |
81 | public void dismiss() {
82 | mFragment.dismissAllowingStateLoss();
83 | }
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/base/src/main/java/com/meis/base/mei/fragment/IMeiCompatFragment.java:
--------------------------------------------------------------------------------
1 | package com.meis.base.mei.fragment;
2 |
3 | import com.scwang.smartrefresh.layout.api.RefreshHeader;
4 |
5 | /**
6 | * desc:
7 | * author: ws
8 | * date: 2018/4/19.
9 | */
10 |
11 | public interface IMeiCompatFragment {
12 |
13 | /**
14 | * refreshing adding asynchronous processing
15 | *
16 | * loading refresh
17 | */
18 | void onRefreshing();
19 |
20 | /**
21 | * load more to add asynchronous processing
22 | *
23 | * loading more
24 | */
25 | void onLoadingMore();
26 |
27 | /**
28 | * 重写该方法
29 | *
30 | * @return 获取下拉刷新样式
31 | */
32 | RefreshHeader getRefreshHeader();
33 |
34 | /**
35 | * 返回false 状态界面会失效 刷新功能会失效
36 | *
37 | * @return
38 | */
39 | boolean canStatusHelper();
40 |
41 |
42 | boolean getKeyboardVisible();
43 |
44 | /**
45 | * @param visibility 软键盘的打开/关闭
46 | */
47 | void onKeyboardVisibilityChanged(boolean visibility);
48 |
49 | /**
50 | * type 一行代码实现下拉刷新
51 | *
52 | * PullToRefresh inject class judge refresh
53 | *
54 | * @return true pull to refresh otherwise false
55 | */
56 | boolean canPullToRefresh();
57 |
58 | /**
59 | * type 一行代码实现上拉加载
60 | *
61 | * @return true pull load more otherwise false
62 | */
63 | boolean canPullToLoadMore();
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/base/src/main/java/com/meis/base/mei/status/IStatusHelper.java:
--------------------------------------------------------------------------------
1 | package com.meis.base.mei.status;
2 |
3 | /**
4 | * author: ws4
5 | * created on: 2018/3/23 10:54
6 | * description:
7 | */
8 | public interface IStatusHelper {
9 |
10 | /**
11 | * call activity super.setContentView(layoutId);
12 | *
13 | * @param layoutId
14 | */
15 | void onSetContentView(int layoutId);
16 |
17 | /**
18 | * error view retry loading
19 | */
20 | void onErrorRetry();
21 | }
22 |
--------------------------------------------------------------------------------
/base/src/main/java/com/meis/base/mei/status/ViewState.java:
--------------------------------------------------------------------------------
1 | package com.meis.base.mei.status;
2 |
3 | import android.support.annotation.IntDef;
4 |
5 | public interface ViewState {
6 |
7 | int REST = 0x01;
8 | int LOADING = 0x02;
9 | int REFRESH = 0x03;
10 | int COMPLETED = 0x04;
11 | int ERROR = 0x05;
12 | int EMPTY = 0x06;
13 |
14 | @IntDef({REST, LOADING, REFRESH, COMPLETED, ERROR, EMPTY})
15 | @interface Val {
16 |
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/base/src/main/java/com/meis/base/mei/utils/SoftKeyboardUtils.java:
--------------------------------------------------------------------------------
1 | package com.meis.base.mei.utils;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.view.View;
6 | import android.view.inputmethod.InputMethodManager;
7 |
8 | /**
9 | * desc: 软键盘工具
10 | * author: ws
11 | * date: 2018/4/13.
12 | */
13 |
14 | public class SoftKeyboardUtils {
15 | public static void closeSoftKeyboard(Activity activity) {
16 | //隐藏软键盘
17 | View view = activity.getWindow().peekDecorView();
18 | if (view != null) {
19 | InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Context
20 | .INPUT_METHOD_SERVICE);
21 | inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/base/src/main/res/anim/mei_fade_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/base/src/main/res/drawable/mei_dingdang_refresh_loading_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/base/src/main/res/layout/mei_base.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
18 |
19 |
24 |
25 |
30 |
31 |
36 |
37 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/base/src/main/res/layout/mei_base_empty_stub.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
--------------------------------------------------------------------------------
/base/src/main/res/layout/mei_base_error_stub.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
--------------------------------------------------------------------------------
/base/src/main/res/layout/mei_base_loading_stub.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
17 |
18 |
--------------------------------------------------------------------------------
/base/src/main/res/layout/mei_base_with_refresh.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
19 |
20 |
25 |
26 |
31 |
32 |
37 |
38 |
42 |
43 |
44 |
45 |
46 |
47 |
51 |
52 |
--------------------------------------------------------------------------------
/base/src/main/res/layout/mei_dingdang_refresh_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
23 |
24 |
--------------------------------------------------------------------------------
/base/src/main/res/layout/mei_empty_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
--------------------------------------------------------------------------------
/base/src/main/res/layout/mei_toolbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_comm_ic_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_comm_ic_empty.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_comm_ic_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_comm_ic_error.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_01.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_02.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_03.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_04.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_05.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_06.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_07.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_07.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_08.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_09.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_09.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_10.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_11.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_12.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_13.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_14.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_15.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_16.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_17.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_18.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_19.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_20.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_21.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_22.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_23.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_24.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_25.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_25.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_26.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_26.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_27.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_28.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_28.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_29.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_30.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_31.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_31.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_32.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_33.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_33.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_34.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_34.png
--------------------------------------------------------------------------------
/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_35.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/base/src/main/res/mipmap-xhdpi/mei_refresh_loading_35.png
--------------------------------------------------------------------------------
/base/src/main/res/values-zh/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | 全翻过了,什么都没找到
3 | 加载中...
4 | 加载失败,点击重试~~
5 | 下拉可以刷新
6 | 数据更新中...
7 | 松开立即刷新
8 | 刷新完成
9 | 刷新失败
10 | 未添加相应的ItemPresenter类型
11 |
12 |
--------------------------------------------------------------------------------
/base/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #666666
4 |
--------------------------------------------------------------------------------
/base/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 48dp
5 | 64dp
6 | 100dp
7 |
8 | 14sp
9 |
--------------------------------------------------------------------------------
/base/src/main/res/values/mei_attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/base/src/main/res/values/mei_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
19 |
20 |
29 |
30 |
38 |
39 |
43 |
44 |
--------------------------------------------------------------------------------
/base/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | My Library
3 | all over, nothing was found
4 | loading ...
5 | failed to load , click retry ~~
6 | pull down to refresh
7 | data updating ...
8 | release refresh
9 | refresh success
10 | refresh failure
11 | no corresponding ItemPresenter type was added
12 |
13 |
--------------------------------------------------------------------------------
/base/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 |
5 | repositories {
6 | google()
7 | jcenter()
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.0.1'
11 |
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | jcenter()
22 | maven { url "https://jitpack.io" }
23 | }
24 | }
25 |
26 | task clean(type: Delete) {
27 | delete rootProject.buildDir
28 | }
29 |
--------------------------------------------------------------------------------
/gif/demo1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/gif/demo1.gif
--------------------------------------------------------------------------------
/gif/demo2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/gif/demo2.gif
--------------------------------------------------------------------------------
/gif/demo3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/gif/demo3.gif
--------------------------------------------------------------------------------
/gif/demo4.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/gif/demo4.gif
--------------------------------------------------------------------------------
/gif/demo5.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/gif/demo5.gif
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/HpWens/MeiBaseModule/5e1e38f91bba1b8e6dedd7ae1a84d064a5d4c9d6/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Mar 22 12:16:28 CST 2018
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':base'
2 |
--------------------------------------------------------------------------------