Browse Source

分享提示修改完成

huyuguo 5 years ago
parent
commit
e3657ef367

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

@ -18,7 +18,7 @@ import com.umeng.analytics.MobclickAgent;
18 18
19 19
/**
20 20
 * @author dxh
21
 * @deprecated 发布类型选择页
21
 * 发布类型选择页
22 22
 */
23 23
public class PublishItemsActivity extends AppCompatActivity implements View.OnClickListener {
24 24

+ 12 - 4
app/src/main/java/com/electric/chargingpile/fragment/ChatRecommendFragment.java

@ -1,5 +1,6 @@
1 1
package com.electric.chargingpile.fragment;
2 2
3
import android.content.Intent;
3 4
import android.os.Bundle;
4 5
import android.support.v4.app.Fragment;
5 6
import android.support.v7.widget.RecyclerView;
@ -15,6 +16,8 @@ import android.widget.Toast;
15 16
16 17
import com.andview.refreshview.XRefreshView;
17 18
import com.electric.chargingpile.R;
19
import com.electric.chargingpile.activity.LoginActivity;
20
import com.electric.chargingpile.activity.PublishItemsActivity;
18 21
import com.electric.chargingpile.adapter.ChatRecommendAdapter;
19 22
import com.electric.chargingpile.adapter.ChatRecommendItemDecoration;
20 23
import com.electric.chargingpile.application.MainApplication;
@ -41,7 +44,7 @@ public class ChatRecommendFragment extends Fragment implements View.OnClickListe
41 44
    private RecyclerView recyclerView;
42 45
    private ChatRecommendAdapter chatRecommendAdapter;
43 46
    private StaggeredGridLayoutManager layoutManager;
44
    private LinearLayout chat_share_info_remind;
47
    private ImageView chat_share_info_remind;
45 48
    private boolean isFirst = false;
46 49
    private int page = 1;
47 50
@ -65,7 +68,6 @@ public class ChatRecommendFragment extends Fragment implements View.OnClickListe
65 68
        String isFirstComeIn = ProfileManager.getInstance().getIsFirstComeIn(getActivity());
66 69
        if (TextUtils.isEmpty(isFirstComeIn)) {
67 70
            isFirst = true;
68
            ProfileManager.getInstance().setFirstComeIn(getActivity(), "label");
69 71
            chat_share_info_remind.setVisibility(View.VISIBLE);
70 72
        } else {
71 73
            chat_share_info_remind.setVisibility(View.GONE);
@ -149,12 +151,18 @@ public class ChatRecommendFragment extends Fragment implements View.OnClickListe
149 151
    public void onClick(View view) {
150 152
        switch (view.getId()) {
151 153
            case R.id.iv_ask: // 推荐分享
152
                // TODO
154
                if (MainApplication.isLogin()){
155
                    chat_share_info_remind.setVisibility(View.GONE);
156
                    ProfileManager.getInstance().setFirstComeIn(getActivity(), "label");
157
                    startActivity(new Intent(getActivity(), PublishItemsActivity.class));
158
                } else {
159
                    startActivity(new Intent(getActivity().getApplicationContext(), LoginActivity.class));
160
                    ToastUtil.showToast(getActivity().getApplicationContext(),"请先登录", Toast.LENGTH_SHORT);
161
                }
153 162
                break;
154 163
        }
155 164
    }
156 165
157
158 166
    public void refreshList() {
159 167
        if (view == null)
160 168
            return;

+ 1 - 1
app/src/main/java/com/electric/chargingpile/util/CommonParams.java

@ -16,7 +16,7 @@ public class CommonParams {
16 16
            map.put("deviceOs", "android");
17 17
            map.put("appVer", BuildConfig.VERSION_NAME);
18 18
//            map.put("appToken", "");
19
            map.put("deviceOsVer", Build.VERSION.SDK_INT + "");
19
            map.put("deviceOsVer", Build.VERSION.RELEASE);
20 20
            map.put("deviceId", JPushInterface.getUdid(MainApplication.context));
21 21
//            map.put("tpToken", "");
22 22
            map.put("jpushId", JPushInterface.getRegistrationID(MainApplication.context));

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


BIN
app/src/main/res/drawable-mdpi/chat_share_info_remind.png


BIN
app/src/main/res/drawable-xhdpi/chat_share_info_remind.png


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


BIN
app/src/main/res/drawable-xxxhdpi/chat_share_info_remind.png


+ 14 - 2
app/src/main/res/layout/fragment_chat_recommend.xml

@ -3,10 +3,12 @@
3 3
    xmlns:tools="http://schemas.android.com/tools"
4 4
    android:layout_width="match_parent"
5 5
    android:layout_height="match_parent">
6
6 7
    <com.andview.refreshview.XRefreshView
7 8
        android:id="@+id/chat_x_refresh_view"
8 9
        android:layout_width="match_parent"
9 10
        android:layout_height="match_parent">
11
10 12
        <android.support.v7.widget.RecyclerView
11 13
            android:id="@+id/recycler_view_test_rv"
12 14
            android:layout_width="match_parent"
@ -24,16 +26,26 @@
24 26
        android:layout_marginBottom="22dp"
25 27
        android:src="@drawable/app_share_talk_icon" />
26 28
27
    <LinearLayout
29
    <ImageView
30
        android:layout_marginRight="3dp"
28 31
        android:id="@+id/chat_share_info_remind"
29 32
        android:layout_width="wrap_content"
33
        android:layout_height="wrap_content"
34
        android:layout_alignParentBottom="true"
35
        android:layout_marginBottom="24dp"
36
        android:layout_toLeftOf="@+id/iv_ask"
37
        android:src="@drawable/chat_share_info_remind" />
38
39
    <LinearLayout
40
        android:id="@+id/chat_share_info_remindxx"
41
        android:layout_width="wrap_content"
30 42
        android:layout_height="40dp"
31 43
        android:layout_alignParentBottom="true"
32 44
        android:layout_marginBottom="24dp"
33 45
        android:layout_toLeftOf="@+id/iv_ask"
34 46
        android:gravity="center_vertical"
35 47
        android:orientation="horizontal"
36
        android:visibility="visible">
48
        android:visibility="gone">
37 49
38 50
        <RelativeLayout
39 51
            android:layout_width="wrap_content"