Browse Source

Merge branch 'master' of /Users/dxh/android_chargingpile with conflicts.

dxh 6 years ago
parent
commit
10ce0c6dcc

+ 1 - 0
.gitignore

@ -14,6 +14,7 @@
14 14
bin/
15 15
gen/
16 16
out/
17
bugly/
17 18
18 19
# Gradle files
19 20
.gradle/

+ 8 - 1
app/src/main/java/com/electric/chargingpile/adapter/LayoutAdapter.java

@ -151,6 +151,11 @@ public class LayoutAdapter extends RecyclerView.Adapter<IViewHolder> {
151 151
        else
152 152
            simpleViewHolder.is_top_view.setVisibility(View.VISIBLE);
153 153
154
        if (talkRecommendBean.targetType == 23)
155
            simpleViewHolder.info_id_video_icon.setVisibility(View.VISIBLE);
156
        else
157
            simpleViewHolder.info_id_video_icon.setVisibility(View.GONE);
158
154 159
//        Glide.with(context)
155 160
//                .load(talkRecommendBean.coverImgUrl)
156 161
//                .asBitmap()//强制Glide返回一个Bitmap对象
@ -187,7 +192,7 @@ public class LayoutAdapter extends RecyclerView.Adapter<IViewHolder> {
187 192
        // 最最关键一步,设置当前view占满列数,这样就可以占据两列实现头部了
188 193
        clp.setFullSpan(true);
189 194
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
190
        linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
195
        linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
191 196
        simpleHeaderViewHolder.header_recy.setLayoutManager(linearLayoutManager);
192 197
        TalkRecommendHeaderAdapter talkRecommendHeaderAdapter = new TalkRecommendHeaderAdapter(context);
193 198
        simpleHeaderViewHolder.header_recy.setAdapter(talkRecommendHeaderAdapter);
@ -202,6 +207,7 @@ public class LayoutAdapter extends RecyclerView.Adapter<IViewHolder> {
202 207
        TextView is_top_view;
203 208
        ImageView user_avater;
204 209
        ImageView info_bg_icon;
210
        ImageView info_id_video_icon;
205 211
        LinearLayout cardview;
206 212
207 213
        public SimpleViewHolder(View view) {
@ -212,6 +218,7 @@ public class LayoutAdapter extends RecyclerView.Adapter<IViewHolder> {
212 218
            recycler_view_zan = (TextView) view.findViewById(R.id.recycler_view_zan);
213 219
            user_avater = (ImageView) view.findViewById(R.id.user_avater);
214 220
            info_bg_icon = (ImageView) view.findViewById(R.id.info_bg_icon);
221
            info_id_video_icon = (ImageView) view.findViewById(R.id.info_id_video_icon);
215 222
            cardview = (LinearLayout) view.findViewById(R.id.cardview);
216 223
217 224
            RelativeLayout.LayoutParams lpImg = (RelativeLayout.LayoutParams) info_bg_icon.getLayoutParams();

+ 10 - 0
app/src/main/java/com/electric/chargingpile/adapter/TalkRecommendHeaderAdapter.java

@ -14,6 +14,7 @@ import com.aspsine.irecyclerview.IViewHolder;
14 14
import com.electric.chargingpile.R;
15 15
import com.electric.chargingpile.data.TalkRecommendBean;
16 16
import com.electric.chargingpile.iview.RecyclerItemTypeClickListener;
17
import com.electric.chargingpile.util.ScreenUtils;
17 18
import com.squareup.picasso.Picasso;
18 19
19 20
import java.util.ArrayList;
@ -24,12 +25,14 @@ public class TalkRecommendHeaderAdapter extends RecyclerView.Adapter<IViewHolder
24 25
    private LayoutInflater layoutInflater;
25 26
    private RecyclerItemTypeClickListener onRecyclerItemClickListener;
26 27
    private ArrayList<TalkRecommendBean> lists;
28
    private int screenWidth;
27 29
28 30
29 31
    public TalkRecommendHeaderAdapter(Context context) {
30 32
        this.context = context;
31 33
        layoutInflater = LayoutInflater.from(context);
32 34
        lists = new ArrayList<>();
35
        screenWidth = ScreenUtils.getScreenWidth(context);
33 36
    }
34 37
35 38
@ -101,12 +104,19 @@ public class TalkRecommendHeaderAdapter extends RecyclerView.Adapter<IViewHolder
101 104
        private ImageView iv_header_bg;
102 105
        private TextView header_title;
103 106
        private TextView header_title_joinin;
107
        private RelativeLayout cardview;
104 108
105 109
        public CollectionCarsHolder(View itemView) {
106 110
            super(itemView);
107 111
            iv_header_bg = (ImageView) itemView.findViewById(R.id.iv_header_bg);
108 112
            header_title = (TextView) itemView.findViewById(R.id.header_title);
109 113
            header_title_joinin = (TextView) itemView.findViewById(R.id.header_title_joinin);
114
            cardview = (RelativeLayout) itemView.findViewById(R.id.cardview);
115
116
            ViewGroup.LayoutParams rl = (ViewGroup.LayoutParams)cardview.getLayoutParams();
117
            rl.width = screenWidth/4+50;
118
            rl.height = screenWidth/4+10;
119
            cardview.setLayoutParams(rl);
110 120
111 121
            itemView.setOnClickListener(new View.OnClickListener() {
112 122
                @Override

+ 1 - 1
app/src/main/java/com/electric/chargingpile/application/MainApplication.java

@ -87,7 +87,7 @@ public class MainApplication extends MultiDexApplication {
87 87
	public static String password = "";
88 88
//	public static String url = "http://123.57.6.131";
89 89
	public static String url = "http://cdz.evcharge.cc";
90
	public static String urlNew = "http://123.56.67.7:84/api/0200";
90
	public static String urlNew = "http://123.56.67.7:83/api/0200";
91 91
	public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
92 92
//	public static String url = "https://cdz.d1ev.com";
93 93
	public static String build_flag = "0";

BIN
app/src/main/res/drawable-hdpi/app_tab_chat_icon.png


BIN
app/src/main/res/drawable-hdpi/app_talk_video_icon.png


BIN
app/src/main/res/drawable-xxhdpi/mima.png


BIN
app/src/main/res/drawable-xxhdpi/tubiao1.png


BIN
app/src/main/res/drawable-xxhdpi/zhuangtailan.png


BIN
app/src/main/res/drawable-xxhdpi/zhucaozuolan.png


+ 2 - 1
app/src/main/res/layout/activity_talk.xml

@ -133,7 +133,8 @@
133 133
                android:layout_height="wrap_content"
134 134
                android:layout_gravity="center_horizontal"
135 135
                android:layout_marginTop="8dp"
136
                android:src="@drawable/icon_main_qa_selected" />
136
                android:src="@drawable/app_tab_chat_icon" />
137
                <!--android:src="@drawable/icon_main_qa_selected" />-->
137 138
138 139
            <TextView
139 140
                android:layout_width="wrap_content"

+ 5 - 4
app/src/main/res/layout/activity_talkrecommend_header_item.xml

@ -2,15 +2,15 @@
2 2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4 4
    android:id="@+id/cardview"
5
    android:layout_width="wrap_content"
6
    android:layout_height="wrap_content"
5
    android:layout_width="match_parent"
6
    android:layout_height="match_parent"
7 7
    android:layout_marginLeft="15dp"
8 8
    >
9 9

10 10
    <ImageView
11 11
        android:id="@+id/iv_header_bg"
12
        android:layout_width="wrap_content"
13
        android:layout_height="wrap_content"
12
        android:layout_width="match_parent"
13
        android:layout_height="match_parent"
14 14
        android:minHeight="85dp"
15 15
        android:minWidth="94dp"
16 16
        android:background="#44000000"/>
@ -33,6 +33,7 @@
33 33
        android:layout_width="wrap_content"
34 34
        android:layout_height="wrap_content"
35 35
        android:layout_alignBottom="@+id/iv_header_bg"
36
        android:layout_marginBottom="5dp"
36 37
        android:padding="5dp"
37 38
        android:text="1111"
38 39
        android:singleLine="true"

+ 25 - 13
app/src/main/res/layout/app_talk_item_recylerview.xml

@ -9,19 +9,32 @@
9 9
    android:minHeight="100dp"
10 10
    android:paddingBottom="5dp">
11 11
12
    <ImageView
13
        android:id="@+id/info_bg_icon"
12
    <RelativeLayout
13
        android:id="@+id/info_bg_icon_bg"
14 14
        android:layout_width="wrap_content"
15 15
        android:layout_height="wrap_content"
16
        android:background="#999999"
17
        android:minWidth="200dp"
18
        android:minHeight="160dp" />
16
        android:gravity="center">
17
18
        <ImageView
19
            android:id="@+id/info_bg_icon"
20
            android:layout_width="wrap_content"
21
            android:layout_height="wrap_content"
22
            android:minWidth="200dp"
23
            android:minHeight="160dp" />
24
25
        <ImageView
26
            android:id="@+id/info_id_video_icon"
27
            android:layout_width="wrap_content"
28
            android:layout_height="wrap_content"
29
            android:layout_centerInParent="true"
30
            android:src="@drawable/app_talk_video_icon" />
31
    </RelativeLayout>
19 32
20 33
    <TextView
21 34
        android:id="@+id/is_top_view"
22 35
        android:layout_width="wrap_content"
23 36
        android:layout_height="wrap_content"
24
        android:layout_alignRight="@+id/info_bg_icon"
37
        android:layout_alignRight="@+id/info_bg_icon_bg"
25 38
        android:layout_marginRight="10dp"
26 39
        android:layout_marginTop="10dp"
27 40
        android:paddingTop="1dp"
@ -37,9 +50,9 @@
37 50
        android:id="@+id/recycler_view_title"
38 51
        android:layout_width="wrap_content"
39 52
        android:layout_height="wrap_content"
40
        android:layout_below="@+id/info_bg_icon"
41
        android:layout_alignLeft="@+id/info_bg_icon"
42
        android:layout_alignRight="@+id/info_bg_icon"
53
        android:layout_below="@+id/info_bg_icon_bg"
54
        android:layout_alignLeft="@+id/info_bg_icon_bg"
55
        android:layout_alignRight="@+id/info_bg_icon_bg"
43 56
        android:layout_marginBottom="16dp"
44 57
        android:paddingTop="11dp"
45 58
        android:paddingLeft="10dp"
@ -55,8 +68,8 @@
55 68
        android:layout_width="wrap_content"
56 69
        android:layout_height="wrap_content"
57 70
        android:layout_below="@+id/recycler_view_title"
58
        android:layout_alignLeft="@+id/info_bg_icon"
59
        android:layout_alignRight="@+id/info_bg_icon">
71
        android:layout_alignLeft="@+id/info_bg_icon_bg"
72
        android:layout_alignRight="@+id/info_bg_icon_bg">
60 73
61 74
        <TextView
62 75
            android:id="@+id/recycler_view_zan"
@ -81,8 +94,7 @@
81 94
            android:id="@+id/user_avater"
82 95
            android:layout_width="20dp"
83 96
            android:layout_height="20dp"
84
            android:layout_centerVertical="true"
85
            android:background="@color/color_888888" />
97
            android:layout_centerVertical="true"/>
86 98
87 99
        <TextView
88 100
            android:id="@+id/user_avater_name"

+ 1 - 1
app/src/main/res/values/strings.xml

@ -18,7 +18,7 @@
18 18
    <string name="updated_at">上次更新于%1$s前</string>
19 19
    <string name="updated_just_now">刚刚更新</string>
20 20
    <string name="time_error">时间有问题</string>
21
    <string name="string_tab_qa">互助</string>
21
    <string name="string_tab_qa">聊聊</string>
22 22
23 23
    <string name="app_name">充电桩</string>
24 24
    <string name="main_name">主界面</string>