dxh 6 gadi atpakaļ
vecāks
revīzija
33fbe0f2ff

+ 8 - 1
app/src/main/java/com/electric/chargingpile/activity/PublishPicTopicActivity.java

@ -232,7 +232,7 @@ public class PublishPicTopicActivity extends Activity implements OnClickListener
232 232
//                    ToastUtil.showToast(getApplicationContext(), "输入字数不能超过500", Toast.LENGTH_SHORT);
233 233
//                    return;
234 234
//                }
235
                if (!s.trim().isEmpty() && s.length() > 0) {
235
                if (!s.trim().isEmpty() && s.length() > 0 && null != Bimp.tempSelectBitmap && Bimp.tempSelectBitmap.size()>0) {
236 236
                    tv_right.setEnabled(true);
237 237
//					tv_right.setTextColor(getResources().getColor(R.color.lvse));
238 238
                    tv_right.setBackgroundColor(Color.parseColor("#02b637"));
@ -521,6 +521,13 @@ public class PublishPicTopicActivity extends Activity implements OnClickListener
521 521
                        subscriber.onNext(imagePath);
522 522
                    }
523 523
                    subscriber.onComplete();
524
                    if (null != photos && photos.size() > 0 && !TextUtils.isEmpty(et_context.getText().toString().trim())) {
525
                        tv_right.setEnabled(true);
526
                        tv_right.setBackgroundColor(Color.parseColor("#02b637"));
527
                    } else {
528
                        tv_right.setEnabled(false);
529
                        tv_right.setBackgroundColor(Color.parseColor("#9ed3ae"));
530
                    }
524 531
                } catch (Exception e) {
525 532
                    e.printStackTrace();
526 533
                    subscriber.onError(e);

+ 2 - 0
app/src/main/java/com/electric/chargingpile/adapter/LayoutAdapter.java

@ -65,7 +65,9 @@ public class LayoutAdapter extends RecyclerView.Adapter<IViewHolder> {
65 65
    }
66 66
67 67
    public void setHeaderData(ArrayList<TalkRecommendBean> datas) {
68
        talkRecommendBeans.clear();
68 69
        talkHeaderRecommendBeans = datas;
70
//        notifyDataSetChanged();
69 71
    }
70 72
71 73
    public void setOnRecyclerItemClickListener(RecyclerItemTypeClickListener onRecyclerItemClickListener) {

+ 12 - 12
app/src/main/java/com/electric/chargingpile/adapter/WaterFallAdapter.java

@ -83,18 +83,18 @@ public class WaterFallAdapter extends RecyclerView.Adapter<IViewHolder> {
83 83
    private void setListHolder(IViewHolder holder, int position) {
84 84
        SimpleViewHolder simpleViewHolder = (SimpleViewHolder) holder;
85 85
86
        RelativeLayout.LayoutParams lpImg = (RelativeLayout.LayoutParams) simpleViewHolder.info_bg_icon.getLayoutParams();
87
88
//        LinearLayout.LayoutParams linearParams =(LinearLayout.LayoutParams) simpleViewHolder.user_avater.getLayoutParams(); //取控件textView当前的布局参数 linearParams.height = 20;// 控件的高强制设成20
89
        if (position % 2 == 0) {
90
            lpImg.width = screenWidth / 2;
91
            lpImg.height = screenWidth * 2 / 3 - 100;
92
            simpleViewHolder.info_bg_icon.setLayoutParams(lpImg);
93
        } else {
94
            lpImg.width = screenWidth / 2;
95
            lpImg.height = screenWidth * 2 / 3;
96
            simpleViewHolder.info_bg_icon.setLayoutParams(lpImg);
97
        }
86
//        RelativeLayout.LayoutParams lpImg = (RelativeLayout.LayoutParams) simpleViewHolder.info_bg_icon.getLayoutParams();
87
//
88
////        LinearLayout.LayoutParams linearParams =(LinearLayout.LayoutParams) simpleViewHolder.user_avater.getLayoutParams(); //取控件textView当前的布局参数 linearParams.height = 20;// 控件的高强制设成20
89
//        if (position % 2 == 0) {
90
//            lpImg.width = screenWidth / 2;
91
//            lpImg.height = screenWidth * 2 / 3 - 100;
92
//            simpleViewHolder.info_bg_icon.setLayoutParams(lpImg);
93
//        } else {
94
//            lpImg.width = screenWidth / 2;
95
//            lpImg.height = screenWidth * 2 / 3;
96
//            simpleViewHolder.info_bg_icon.setLayoutParams(lpImg);
97
//        }
98 98
99 99
        TalkRecommendBean talkRecommendBean = talkRecommendBeans.get(position);
100 100
        simpleViewHolder.recycler_view_title.setText(talkRecommendBean.title);

+ 2 - 1
app/src/main/java/com/electric/chargingpile/fragment/TalkRecommendFragment.java

@ -74,7 +74,8 @@ public class TalkRecommendFragment extends Fragment implements View.OnClickListe
74 74
            @Override
75 75
            public void onRefresh(boolean isPullDown) {
76 76
                page = 1;
77
                requestData();
77
                requestHeaderData();
78
//                requestData();
78 79
//                new Handler().postDelayed(new Runnable() {
79 80
//                    @Override
80 81
//                    public void run() {