Your Name 7 yıl önce
ebeveyn
işleme
297ded7fc9

+ 1 - 1
app/src/main/java/com/kuxuan/moneynote/receiver/AlarmReceiver.java

@@ -27,7 +27,7 @@ public  class AlarmReceiver extends BroadcastReceiver {
27 27
         Bitmap bmp= BitmapFactory.decodeResource(context.getResources(), R.mipmap.app_icon);
28 28
             Log.e(TAG,"闹钟已响");
29 29
             NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
30
-            builder.setSmallIcon(R.mipmap.ic_launcher);
30
+            builder.setSmallIcon(R.mipmap.icon_logo);
31 31
             RemoteViews contentView = new RemoteViews(getPackageName(),R.layout.notification);
32 32
             builder.setContent(contentView);
33 33
             builder.setAutoCancel(true);

+ 26 - 17
app/src/main/java/com/kuxuan/moneynote/ui/fragments/mine/MineFragment.java

@@ -86,6 +86,9 @@ public class MineFragment extends MVPFragment<MinePresent, MineModel> implements
86 86
     private BaseFragmentActivity activity;
87 87
     private ShareAction mShareAction;
88 88
     private UMShareListener mShareListener;
89
+    String aaaa = "http://www.baidu.com";
90
+
91
+    UMWeb web;
89 92
     /**
90 93
      * 类别设置的点击事件
91 94
      */
@@ -115,9 +118,12 @@ public class MineFragment extends MVPFragment<MinePresent, MineModel> implements
115 118
         config.setMenuItemBackgroundShape(ShareBoardConfig.BG_SHAPE_NONE);
116 119
         config.setTitleVisibility(false);
117 120
         config.setCancelButtonText("取消");
118
-
119 121
         config.setIndicatorVisibility(false);
120
-        mShareAction.open(config);
122
+
123
+        if(mShareAction!=null){
124
+            mShareAction.open(config);
125
+        }
126
+
121 127
     }
122 128
 
123 129
     /**
@@ -154,6 +160,9 @@ public class MineFragment extends MVPFragment<MinePresent, MineModel> implements
154 160
     @Override
155 161
     public void initView() {
156 162
 
163
+
164
+
165
+
157 166
         EventBus.getDefault().register(this);
158 167
         cal= Calendar.getInstance();
159 168
         activity = (BaseFragmentActivity) getActivity();
@@ -167,7 +176,21 @@ public class MineFragment extends MVPFragment<MinePresent, MineModel> implements
167 176
        mPresenter.getMineData();
168 177
        mPresenter.getMineBill(year);
169 178
 
179
+        mShareAction = new ShareAction(getActivity()).setDisplayList(
180
+                SHARE_MEDIA.WEIXIN, SHARE_MEDIA.WEIXIN_CIRCLE) .setShareboardclickCallback(new ShareBoardlistener() {
181
+            @Override
182
+            public void onclick(SnsPlatform snsPlatform, SHARE_MEDIA share_media) {
183
+                UMWeb  web  = new UMWeb(aaaa);
184
+                web.setTitle("钱多多随手记");
185
+                web.setDescription("钱多多记账,最简洁的随手记账软件,官方推荐,百万财富用户的记账首选App");
186
+                web.setThumb(new UMImage(getActivity(), R.mipmap.app_icon));
187
+                new ShareAction(getActivity()).withMedia(web)
188
+                        .setPlatform(share_media)
189
+                        .setCallback(mShareListener)
190
+                        .share();
170 191
 
192
+            }
193
+        });
171 194
 
172 195
     }
173 196
 
@@ -241,22 +264,8 @@ public class MineFragment extends MVPFragment<MinePresent, MineModel> implements
241 264
                         .into(mPortraitImage);
242 265
             }
243 266
         }
267
+        aaaa =  mineModel.getAndroid_share_url();
244 268
 
245
-        mShareAction = new ShareAction(getActivity()).setDisplayList(
246
-                SHARE_MEDIA.WEIXIN, SHARE_MEDIA.WEIXIN_CIRCLE) .setShareboardclickCallback(new ShareBoardlistener() {
247
-            @Override
248
-            public void onclick(SnsPlatform snsPlatform, SHARE_MEDIA share_media) {
249
-                UMWeb web = new UMWeb(mineModel.getAndroid_share_url());
250
-                web.setTitle("来自分享面板标题");
251
-                web.setDescription("来自分享面板内容");
252
-                web.setThumb(new UMImage(getActivity(), R.mipmap.app_icon));
253
-                new ShareAction(getActivity()).withMedia(web)
254
-                        .setPlatform(share_media)
255
-                        .setCallback(mShareListener)
256
-                        .share();
257
-
258
-            }
259
-        });
260 269
     }
261 270
 
262 271
     @Override