| | |
| | | * 动态--活动 |
| | | */ |
| | | |
| | | public class SendCircleFragmet extends RetainViewFragment implements AdapterEventActionListener, PermissionInterface { |
| | | public class SendCircleFragmet extends RetainViewFragment implements SendCircleAdapter.AdapterEventActionListener, PermissionInterface { |
| | | |
| | | |
| | | private RefreshLayout srl_send_circle; |
| | |
| | | ll_notice.setVisibility(View.GONE); |
| | | iv_close = contentView.findViewById(R.id.iv_left); |
| | | tv_no_data_hint = contentView.findViewById(R.id.tv_no_data_hint); |
| | | iv_no_data = contentView.findViewById(R.id.iv_no_data); |
| | | if ("7".equalsIgnoreCase(cate)) { |
| | | tv_no_data_hint.setText("哎呀,发圈内容都被抢光了~"); |
| | | } else if ("8".equalsIgnoreCase(cate)) { |
| | | tv_no_data_hint.setText("哎呀,素材正在赶来的路上~"); |
| | | } |
| | | iv_no_data.setImageDrawable(null); |
| | | iv_no_data.setBackground(getActivity().getResources().getDrawable(R.drawable.iv_no_send_circle)); |
| | | /**小黄条*/ |
| | | getAppPageNotification(); |
| | | |
| | |
| | | page++; |
| | | isLoad = false; |
| | | iv_loading.setVisibility(View.VISIBLE); |
| | | tv_loading.setText("正在加载更多数据"); |
| | | tv_loading.setText(getResources().getString(R.string.loading_more_text)); |
| | | getContentList(); |
| | | } |
| | | } |
| | |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 时间添加0 |
| | | * |
| | | * @param time |
| | | * @return |
| | | */ |
| | | private String setTimeSupplement(long time) { |
| | | String t = ""; |
| | | if (time < 10 && time > 0) { |
| | | t = "0" + time; |
| | | } else if (time == 0 || time >= 10) { |
| | | t = "" + time; |
| | | } |
| | | return t; |
| | | } |
| | | |
| | | private void resumeAction() { |
| | | if (actionParams != null) { |
| | |
| | | super.onStart(); |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (list.length() > 0) { |
| | | //保存图片 |
| | | String rootPath = android.os.Environment.getExternalStorageDirectory() |
| | | + "/blksapp"; |
| | | + "/tejiaapp"; |
| | | File rootFile = new File(rootPath); |
| | | if (!rootFile.exists()) { |
| | | rootFile.mkdirs(); |
| | |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | Long uid = UserUtil.getUid(getContext()); |
| | | ShoppingApi.getTaoBaoAuthInfo(getContext(), uid + "", null, "share", true, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTaoBaoAuthInfo(getContext(), uid , null, "share", true, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | } |
| | | } |
| | | |
| | | //adapter中的事件响应 |
| | | interface AdapterEventActionListener { |
| | | //复制评论 |
| | | public void copyComment(SendCircleContent content, SendCircleCommment comment); |
| | | |
| | | //生成二维码 |
| | | public void createERCode(SendCircleContent content, List<SendCircleImage> imgList, SendCircleImage img, int position); |
| | | |
| | | //分享 |
| | | public void share(SendCircleContent content); |
| | | |
| | | //批量存图 |
| | | public void saveImgs(SendCircleContent content); |
| | | |
| | | //复制推荐语 |
| | | public void copyRecommendText(SendCircleContent content); |
| | | |
| | | public void sendOrder(SendCircleContent content); |
| | | } |
| | | |
| | | interface IPrePareSuccessListener { |
| | | public void onSuccess(); |