浏览代码

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

dxh 6 年之前
父节点
当前提交
10ce0c6dcc

+ 1 - 0
.gitignore

14
bin/
14
bin/
15
gen/
15
gen/
16
out/
16
out/
17
bugly/
17
18
18
# Gradle files
19
# Gradle files
19
.gradle/
20
.gradle/

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

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

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

14
import com.electric.chargingpile.R;
14
import com.electric.chargingpile.R;
15
import com.electric.chargingpile.data.TalkRecommendBean;
15
import com.electric.chargingpile.data.TalkRecommendBean;
16
import com.electric.chargingpile.iview.RecyclerItemTypeClickListener;
16
import com.electric.chargingpile.iview.RecyclerItemTypeClickListener;
17
import com.electric.chargingpile.util.ScreenUtils;
17
import com.squareup.picasso.Picasso;
18
import com.squareup.picasso.Picasso;
18
19
19
import java.util.ArrayList;
20
import java.util.ArrayList;
24
    private LayoutInflater layoutInflater;
25
    private LayoutInflater layoutInflater;
25
    private RecyclerItemTypeClickListener onRecyclerItemClickListener;
26
    private RecyclerItemTypeClickListener onRecyclerItemClickListener;
26
    private ArrayList<TalkRecommendBean> lists;
27
    private ArrayList<TalkRecommendBean> lists;
28
    private int screenWidth;
27
29
28
30
29
    public TalkRecommendHeaderAdapter(Context context) {
31
    public TalkRecommendHeaderAdapter(Context context) {
30
        this.context = context;
32
        this.context = context;
31
        layoutInflater = LayoutInflater.from(context);
33
        layoutInflater = LayoutInflater.from(context);
32
        lists = new ArrayList<>();
34
        lists = new ArrayList<>();
35
        screenWidth = ScreenUtils.getScreenWidth(context);
33
    }
36
    }
34
37
35
38
101
        private ImageView iv_header_bg;
104
        private ImageView iv_header_bg;
102
        private TextView header_title;
105
        private TextView header_title;
103
        private TextView header_title_joinin;
106
        private TextView header_title_joinin;
107
        private RelativeLayout cardview;
104
108
105
        public CollectionCarsHolder(View itemView) {
109
        public CollectionCarsHolder(View itemView) {
106
            super(itemView);
110
            super(itemView);
107
            iv_header_bg = (ImageView) itemView.findViewById(R.id.iv_header_bg);
111
            iv_header_bg = (ImageView) itemView.findViewById(R.id.iv_header_bg);
108
            header_title = (TextView) itemView.findViewById(R.id.header_title);
112
            header_title = (TextView) itemView.findViewById(R.id.header_title);
109
            header_title_joinin = (TextView) itemView.findViewById(R.id.header_title_joinin);
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
            itemView.setOnClickListener(new View.OnClickListener() {
121
            itemView.setOnClickListener(new View.OnClickListener() {
112
                @Override
122
                @Override

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

87
	public static String password = "";
87
	public static String password = "";
88
//	public static String url = "http://123.57.6.131";
88
//	public static String url = "http://123.57.6.131";
89
	public static String url = "http://cdz.evcharge.cc";
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
	public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
91
	public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
92
//	public static String url = "https://cdz.d1ev.com";
92
//	public static String url = "https://cdz.d1ev.com";
93
	public static String build_flag = "0";
93
	public static String build_flag = "0";

二进制
app/src/main/res/drawable-hdpi/app_tab_chat_icon.png


二进制
app/src/main/res/drawable-hdpi/app_talk_video_icon.png


二进制
app/src/main/res/drawable-xxhdpi/mima.png


二进制
app/src/main/res/drawable-xxhdpi/tubiao1.png


二进制
app/src/main/res/drawable-xxhdpi/zhuangtailan.png


二进制
app/src/main/res/drawable-xxhdpi/zhucaozuolan.png


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

133
                android:layout_height="wrap_content"
133
                android:layout_height="wrap_content"
134
                android:layout_gravity="center_horizontal"
134
                android:layout_gravity="center_horizontal"
135
                android:layout_marginTop="8dp"
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
            <TextView
139
            <TextView
139
                android:layout_width="wrap_content"
140
                android:layout_width="wrap_content"

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

2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
3
    xmlns:app="http://schemas.android.com/apk/res-auto"
4
    android:id="@+id/cardview"
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
    android:layout_marginLeft="15dp"
7
    android:layout_marginLeft="15dp"
8
    >
8
    >
9

9

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

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

9
    android:minHeight="100dp"
9
    android:minHeight="100dp"
10
    android:paddingBottom="5dp">
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
        android:layout_width="wrap_content"
14
        android:layout_width="wrap_content"
15
        android:layout_height="wrap_content"
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
    <TextView
33
    <TextView
21
        android:id="@+id/is_top_view"
34
        android:id="@+id/is_top_view"
22
        android:layout_width="wrap_content"
35
        android:layout_width="wrap_content"
23
        android:layout_height="wrap_content"
36
        android:layout_height="wrap_content"
24
        android:layout_alignRight="@+id/info_bg_icon"
37
        android:layout_alignRight="@+id/info_bg_icon_bg"
25
        android:layout_marginRight="10dp"
38
        android:layout_marginRight="10dp"
26
        android:layout_marginTop="10dp"
39
        android:layout_marginTop="10dp"
27
        android:paddingTop="1dp"
40
        android:paddingTop="1dp"
37
        android:id="@+id/recycler_view_title"
50
        android:id="@+id/recycler_view_title"
38
        android:layout_width="wrap_content"
51
        android:layout_width="wrap_content"
39
        android:layout_height="wrap_content"
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
        android:layout_marginBottom="16dp"
56
        android:layout_marginBottom="16dp"
44
        android:paddingTop="11dp"
57
        android:paddingTop="11dp"
45
        android:paddingLeft="10dp"
58
        android:paddingLeft="10dp"
55
        android:layout_width="wrap_content"
68
        android:layout_width="wrap_content"
56
        android:layout_height="wrap_content"
69
        android:layout_height="wrap_content"
57
        android:layout_below="@+id/recycler_view_title"
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
        <TextView
74
        <TextView
62
            android:id="@+id/recycler_view_zan"
75
            android:id="@+id/recycler_view_zan"
81
            android:id="@+id/user_avater"
94
            android:id="@+id/user_avater"
82
            android:layout_width="20dp"
95
            android:layout_width="20dp"
83
            android:layout_height="20dp"
96
            android:layout_height="20dp"
84
            android:layout_centerVertical="true"
85
            android:background="@color/color_888888" />
97
            android:layout_centerVertical="true"/>
86
98
87
        <TextView
99
        <TextView
88
            android:id="@+id/user_avater_name"
100
            android:id="@+id/user_avater_name"

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

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