Your Name 7 years ago
parent
commit
297ded7fc9

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

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

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

86
     private BaseFragmentActivity activity;
86
     private BaseFragmentActivity activity;
87
     private ShareAction mShareAction;
87
     private ShareAction mShareAction;
88
     private UMShareListener mShareListener;
88
     private UMShareListener mShareListener;
89
+    String aaaa = "http://www.baidu.com";
90
+
91
+    UMWeb web;
89
     /**
92
     /**
90
      * 类别设置的点击事件
93
      * 类别设置的点击事件
91
      */
94
      */
115
         config.setMenuItemBackgroundShape(ShareBoardConfig.BG_SHAPE_NONE);
118
         config.setMenuItemBackgroundShape(ShareBoardConfig.BG_SHAPE_NONE);
116
         config.setTitleVisibility(false);
119
         config.setTitleVisibility(false);
117
         config.setCancelButtonText("取消");
120
         config.setCancelButtonText("取消");
118
-
119
         config.setIndicatorVisibility(false);
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
     @Override
160
     @Override
155
     public void initView() {
161
     public void initView() {
156
 
162
 
163
+
164
+
165
+
157
         EventBus.getDefault().register(this);
166
         EventBus.getDefault().register(this);
158
         cal= Calendar.getInstance();
167
         cal= Calendar.getInstance();
159
         activity = (BaseFragmentActivity) getActivity();
168
         activity = (BaseFragmentActivity) getActivity();
167
        mPresenter.getMineData();
176
        mPresenter.getMineData();
168
        mPresenter.getMineBill(year);
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
                         .into(mPortraitImage);
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
     @Override
271
     @Override