Showing
100 changed files
with
2138 additions
and
0 deletions
Too many changes to show.
To preserve performance only 100 of 100+ files are displayed.
| @@ -62,6 +62,8 @@ dependencies { | @@ -62,6 +62,8 @@ dependencies { | ||
| 62 | implementation project(':lib_base') | 62 | implementation project(':lib_base') |
| 63 | implementation project(path: ':wdinterfaceimpl') | 63 | implementation project(path: ':wdinterfaceimpl') |
| 64 | implementation project(path: ':module_home') | 64 | implementation project(path: ':module_home') |
| 65 | + implementation project(path: ':module_videoplayer') | ||
| 66 | + implementation project(path: ':module_personalcenter') | ||
| 65 | // annotationProcessor 'com.alibaba:arouter-compiler:1.5.2' | 67 | // annotationProcessor 'com.alibaba:arouter-compiler:1.5.2' |
| 66 | 68 | ||
| 67 | } | 69 | } |
module_personalcenter/.gitignore
0 → 100644
| 1 | +/build |
module_personalcenter/README.md
0 → 100644
module_personalcenter/build.gradle
0 → 100644
| 1 | +plugins { | ||
| 2 | + id 'com.android.library' | ||
| 3 | + id 'kotlin-android' | ||
| 4 | + id 'kotlin-parcelize' | ||
| 5 | +} | ||
| 6 | +android { | ||
| 7 | + compileSdkVersion var.compileSdkVersion | ||
| 8 | + buildToolsVersion var.buildToolsVersion | ||
| 9 | + | ||
| 10 | + defaultConfig { | ||
| 11 | + minSdkVersion var.minSdkVersion | ||
| 12 | + targetSdkVersion var.targetSdkVersion | ||
| 13 | + versionCode var.versionCode | ||
| 14 | + versionName var.versionName | ||
| 15 | + | ||
| 16 | + consumerProguardFiles "consumer-rules.pro" | ||
| 17 | + javaCompileOptions { | ||
| 18 | + annotationProcessorOptions { | ||
| 19 | + arguments = [AROUTER_MODULE_NAME: project.getName()] | ||
| 20 | + } | ||
| 21 | + } | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + buildTypes { | ||
| 25 | + release { | ||
| 26 | + minifyEnabled false | ||
| 27 | + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
| 28 | + } | ||
| 29 | + } | ||
| 30 | + compileOptions { | ||
| 31 | + sourceCompatibility JavaVersion.VERSION_1_8 | ||
| 32 | + targetCompatibility JavaVersion.VERSION_1_8 | ||
| 33 | + } | ||
| 34 | +} | ||
| 35 | + | ||
| 36 | +dependencies { | ||
| 37 | + implementation project(path: ':wdbean') | ||
| 38 | + implementation project(path: ':wdlayout') | ||
| 39 | + annotationProcessor rootProject.ext.dependencies["arouter-compiler"] | ||
| 40 | + implementation rootProject.ext.dependencies["TagTextView"] | ||
| 41 | + implementation rootProject.ext.dependencies["banner"] | ||
| 42 | +// implementation 'com.google.android.flexbox:flexbox:3.0.0' | ||
| 43 | +} |
module_personalcenter/consumer-rules.pro
0 → 100644
module_personalcenter/proguard-rules.pro
0 → 100644
| 1 | +# Add project specific ProGuard rules here. | ||
| 2 | +# You can control the set of applied configuration files using the | ||
| 3 | +# proguardFiles setting in build.gradle. | ||
| 4 | +# | ||
| 5 | +# For more details, see | ||
| 6 | +# http://developer.android.com/guide/developing/tools/proguard.html | ||
| 7 | + | ||
| 8 | +# If your project uses WebView with JS, uncomment the following | ||
| 9 | +# and specify the fully qualified class name to the JavaScript interface | ||
| 10 | +# class: | ||
| 11 | +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
| 12 | +# public *; | ||
| 13 | +#} | ||
| 14 | + | ||
| 15 | +# Uncomment this to preserve the line number information for | ||
| 16 | +# debugging stack traces. | ||
| 17 | +#-keepattributes SourceFile,LineNumberTable | ||
| 18 | + | ||
| 19 | +# If you keep the line number information, uncomment this to | ||
| 20 | +# hide the original source file name. | ||
| 21 | +#-renamesourcefileattribute SourceFile |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | + package="com.wd.personalcenter"> | ||
| 4 | + | ||
| 5 | + <application> | ||
| 6 | + <!-- <activity--> | ||
| 7 | + <!-- android:name=".activity.AboutActivity"--> | ||
| 8 | + <!-- android:launchMode="singleTask"--> | ||
| 9 | + <!-- android:screenOrientation="portrait" />--> | ||
| 10 | +<!-- <activity--> | ||
| 11 | +<!-- android:name=".activity.SettingActivity"--> | ||
| 12 | +<!-- android:configChanges="uiMode"--> | ||
| 13 | +<!-- android:exported="false"--> | ||
| 14 | +<!-- android:screenOrientation="portrait" />--> | ||
| 15 | +<!-- <!– <activity–>--> | ||
| 16 | +<!-- <!– android:name=".activity.FeedBackActivity"–>--> | ||
| 17 | +<!-- <!– android:launchMode="singleTask"–>--> | ||
| 18 | +<!-- <!– android:screenOrientation="portrait"–>--> | ||
| 19 | +<!-- <!– android:fitsSystemWindows="true"–>--> | ||
| 20 | +<!-- <!– android:windowSoftInputMode="adjustPan" />–>--> | ||
| 21 | +<!-- <activity--> | ||
| 22 | +<!-- android:name=".history.activity.HistoryFavoriteDisplayActivity"--> | ||
| 23 | +<!-- android:launchMode="singleTask"--> | ||
| 24 | +<!-- android:screenOrientation="portrait" />--> | ||
| 25 | +<!-- <activity--> | ||
| 26 | +<!-- android:name=".activity.AddAppWidgetActivity"--> | ||
| 27 | +<!-- android:launchMode="singleTask"--> | ||
| 28 | +<!-- android:screenOrientation="portrait" />--> | ||
| 29 | +<!-- <activity--> | ||
| 30 | +<!-- android:name=".history.activity.HistoryFavoriteEditActivity"--> | ||
| 31 | +<!-- android:launchMode="singleTask"--> | ||
| 32 | +<!-- android:screenOrientation="portrait" />--> | ||
| 33 | + | ||
| 34 | +<!-- <activity--> | ||
| 35 | +<!-- android:name=".userinfo.activity.EditProfileActivity"--> | ||
| 36 | +<!-- android:exported="false"--> | ||
| 37 | +<!-- android:launchMode="singleTask"--> | ||
| 38 | +<!-- android:screenOrientation="portrait" />--> | ||
| 39 | + | ||
| 40 | +<!-- <activity--> | ||
| 41 | +<!-- android:name=".userinfo.activity.EditNickNameActivity"--> | ||
| 42 | +<!-- android:exported="false"--> | ||
| 43 | +<!-- android:launchMode="singleTask"--> | ||
| 44 | +<!-- android:screenOrientation="portrait" />--> | ||
| 45 | + | ||
| 46 | +<!-- <activity--> | ||
| 47 | +<!-- android:name=".userinfo.activity.EditIntroductionActivity"--> | ||
| 48 | +<!-- android:exported="false"--> | ||
| 49 | +<!-- android:launchMode="singleTask"--> | ||
| 50 | +<!-- android:screenOrientation="portrait" />--> | ||
| 51 | + | ||
| 52 | +<!-- <activity--> | ||
| 53 | +<!-- android:name=".activity.PermissionManagementActivity"--> | ||
| 54 | +<!-- android:launchMode="singleTask"--> | ||
| 55 | +<!-- android:screenOrientation="portrait" />--> | ||
| 56 | + | ||
| 57 | +<!-- <activity--> | ||
| 58 | +<!-- android:name=".activity.FocusListActivity"--> | ||
| 59 | +<!-- android:launchMode="singleTask"--> | ||
| 60 | +<!-- android:screenOrientation="portrait" />--> | ||
| 61 | + | ||
| 62 | +<!-- <activity--> | ||
| 63 | +<!-- android:name=".usercenter.index.view.PersonalCenterActivity"--> | ||
| 64 | +<!-- android:screenOrientation="portrait" />--> | ||
| 65 | + | ||
| 66 | + | ||
| 67 | +<!-- <activity--> | ||
| 68 | +<!-- android:name=".trends.view.TrendsDetailActivity"--> | ||
| 69 | +<!-- android:configChanges="orientation|keyboardHidden|screenSize|smallestScreenSize|screenLayout|uiMode"--> | ||
| 70 | +<!-- android:resizeableActivity="true"--> | ||
| 71 | +<!-- android:screenOrientation="portrait"--> | ||
| 72 | +<!-- android:supportsPictureInPicture="true" />--> | ||
| 73 | + | ||
| 74 | +<!-- <activity--> | ||
| 75 | +<!-- android:name=".activity.AccountSafetyActivity"--> | ||
| 76 | +<!-- android:configChanges="uiMode"--> | ||
| 77 | +<!-- android:screenOrientation="portrait" />--> | ||
| 78 | +<!-- <activity--> | ||
| 79 | +<!-- android:name=".activity.FeedBackActivity"--> | ||
| 80 | +<!-- android:configChanges="uiMode"--> | ||
| 81 | +<!-- android:screenOrientation="portrait"--> | ||
| 82 | +<!-- android:windowSoftInputMode="adjustPan"--> | ||
| 83 | +<!-- android:exported="false"/>--> | ||
| 84 | +<!-- <activity--> | ||
| 85 | +<!-- android:name=".activity.AboutActivity"--> | ||
| 86 | +<!-- android:configChanges="uiMode"--> | ||
| 87 | +<!-- android:screenOrientation="portrait" />--> | ||
| 88 | + | ||
| 89 | +<!-- <activity--> | ||
| 90 | +<!-- android:name=".activity.ModifyPasswordActivity"--> | ||
| 91 | +<!-- android:configChanges="uiMode"--> | ||
| 92 | +<!-- android:screenOrientation="portrait" />--> | ||
| 93 | + | ||
| 94 | +<!-- <activity--> | ||
| 95 | +<!-- android:name=".activity.VisitorCommentActivity"--> | ||
| 96 | +<!-- android:configChanges="uiMode"--> | ||
| 97 | +<!-- android:screenOrientation="portrait" />--> | ||
| 98 | + | ||
| 99 | +<!-- <activity--> | ||
| 100 | +<!-- android:name=".usercenter.index.view.PictureShowActivity"--> | ||
| 101 | +<!-- android:launchMode="singleTask"--> | ||
| 102 | +<!-- android:screenOrientation="portrait" />--> | ||
| 103 | +<!-- <activity--> | ||
| 104 | +<!-- android:name=".message.activity.MailGroupActivity"--> | ||
| 105 | +<!-- android:exported="false"--> | ||
| 106 | +<!-- android:screenOrientation="portrait" />--> | ||
| 107 | +<!-- <activity--> | ||
| 108 | +<!-- android:name=".message.activity.PushMsgListActivity"--> | ||
| 109 | +<!-- android:exported="false"--> | ||
| 110 | +<!-- android:screenOrientation="portrait" />--> | ||
| 111 | +<!-- <activity--> | ||
| 112 | +<!-- android:name=".message.activity.SystemMsgListActivity"--> | ||
| 113 | +<!-- android:exported="false"--> | ||
| 114 | +<!-- android:screenOrientation="portrait" />--> | ||
| 115 | +<!-- <activity--> | ||
| 116 | +<!-- android:name=".message.activity.SystemMsgDetailActivity"--> | ||
| 117 | +<!-- android:exported="false"--> | ||
| 118 | +<!-- android:screenOrientation="portrait" />--> | ||
| 119 | +<!-- <activity--> | ||
| 120 | +<!-- android:name=".message.activity.ReplyMsgListActivity"--> | ||
| 121 | +<!-- android:exported="false"--> | ||
| 122 | +<!-- android:screenOrientation="portrait" />--> | ||
| 123 | +<!-- <activity--> | ||
| 124 | +<!-- android:name=".message.activity.ReservationListActivity"--> | ||
| 125 | +<!-- android:exported="false"--> | ||
| 126 | +<!-- android:screenOrientation="portrait" />--> | ||
| 127 | + | ||
| 128 | +<!-- <activity--> | ||
| 129 | +<!-- android:name=".incentive.level.UserLevelActivity"--> | ||
| 130 | +<!-- android:exported="false"--> | ||
| 131 | +<!-- android:screenOrientation="portrait" />--> | ||
| 132 | + | ||
| 133 | +<!-- <activity--> | ||
| 134 | +<!-- android:name=".incentive.integral.IntegralCenterActivity"--> | ||
| 135 | +<!-- android:exported="false"--> | ||
| 136 | +<!-- android:screenOrientation="portrait" />--> | ||
| 137 | + | ||
| 138 | +<!-- <activity--> | ||
| 139 | +<!-- android:name=".incentive.integral.IntegralDetailActivity"--> | ||
| 140 | +<!-- android:exported="false"--> | ||
| 141 | +<!-- android:screenOrientation="portrait" />--> | ||
| 142 | + | ||
| 143 | +<!-- <activity--> | ||
| 144 | +<!-- android:name=".activity.FontSizeSettingActivity"--> | ||
| 145 | +<!-- android:exported="false"--> | ||
| 146 | +<!-- android:screenOrientation="portrait" />--> | ||
| 147 | + | ||
| 148 | + </application> | ||
| 149 | + | ||
| 150 | +</manifest> |
| 1 | +package com.people.personalcenter; | ||
| 2 | + | ||
| 3 | +import android.app.Dialog; | ||
| 4 | +import android.graphics.Color; | ||
| 5 | +import android.text.TextUtils; | ||
| 6 | +import android.view.View; | ||
| 7 | +import android.view.ViewGroup; | ||
| 8 | +import android.widget.FrameLayout; | ||
| 9 | +import android.widget.ImageView; | ||
| 10 | +import android.widget.LinearLayout; | ||
| 11 | +import android.widget.RelativeLayout; | ||
| 12 | +import android.widget.ScrollView; | ||
| 13 | +import android.widget.TextView; | ||
| 14 | + | ||
| 15 | +import androidx.lifecycle.Observer; | ||
| 16 | + | ||
| 17 | +import com.alibaba.android.arouter.facade.annotation.Route; | ||
| 18 | +import com.wd.capability.layout.constant.PageNameConstants; | ||
| 19 | +import com.wd.capability.layout.uitls.PDUtils; | ||
| 20 | +import com.wd.capability.network.constant.EventConstants; | ||
| 21 | +import com.wd.common.base.BaseLazyFragment; | ||
| 22 | +import com.wd.common.imageglide.ImageUtils; | ||
| 23 | +import com.wd.foundation.bean.analytics.TrackContentBean; | ||
| 24 | +import com.wd.foundation.bean.live.LiveExistNotWatchBean; | ||
| 25 | +import com.wd.foundation.bean.live.LiveSubscribeBean; | ||
| 26 | +import com.wd.foundation.bean.response.PersonalInfoBean; | ||
| 27 | +import com.wd.foundation.wdkit.constant.BaseConstants; | ||
| 28 | +import com.wd.foundation.wdkit.constant.Constants; | ||
| 29 | +import com.wd.foundation.wdkit.constant.IntentConstants; | ||
| 30 | +import com.wd.foundation.wdkit.constant.RouterConstants; | ||
| 31 | +import com.wd.foundation.wdkit.utils.SafeBundleUtil; | ||
| 32 | +import com.wd.foundation.wdkit.utils.ScreenUtils; | ||
| 33 | +import com.wd.foundation.wdkit.utils.SpUtils; | ||
| 34 | +import com.wd.foundation.wdkit.utils.ViewUtils; | ||
| 35 | +import com.wd.foundation.wdkit.view.CircleImageView; | ||
| 36 | +import com.wd.foundation.wdkit.view.RoundImageView; | ||
| 37 | +import com.wd.foundation.wdkit.view.customtextview.StrokeWidthTextView; | ||
| 38 | +import com.wd.foundation.wdkitcore.livedata.LiveDataBus; | ||
| 39 | +import com.wd.foundation.wdkitcore.tools.ArrayUtils; | ||
| 40 | +import com.wd.foundation.wdkitcore.tools.ResUtils; | ||
| 41 | +import com.wd.foundation.wdkitcore.tools.StringUtils; | ||
| 42 | +import com.wd.personalcenter.R; | ||
| 43 | + | ||
| 44 | +import java.util.List; | ||
| 45 | + | ||
| 46 | +/** | ||
| 47 | + * 我的页面 | ||
| 48 | + * | ||
| 49 | + * @author baozhaoxin | ||
| 50 | + * @version [V1.0.0, 2023/4/25] | ||
| 51 | + * @since V1.0.0 | ||
| 52 | + */ | ||
| 53 | +@Route(path = RouterConstants.PATH_MODULE_MY_FRAGMENT) | ||
| 54 | +public class MineFragment extends BaseLazyFragment implements View.OnClickListener { | ||
| 55 | + | ||
| 56 | + //**************************我的页面**************************** | ||
| 57 | + /** | ||
| 58 | + * 用户头像 | ||
| 59 | + */ | ||
| 60 | + public final String MY_PAGE_USER_HEAD = "myPageUserHead"; | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * 用户昵称 | ||
| 64 | + */ | ||
| 65 | + public final String MY_PAGE_USER_NAME = "myPageUserName"; | ||
| 66 | + | ||
| 67 | + /** | ||
| 68 | + * 登录/注册 | ||
| 69 | + */ | ||
| 70 | + public final String MY_PAGE_USER_LOGIN = "myPageUserLogin"; | ||
| 71 | + | ||
| 72 | + /** | ||
| 73 | + * 签到入口点击 | ||
| 74 | + */ | ||
| 75 | + public final String MY_PAGE_USER_SIGN_IN = "myPageUserSignIn"; | ||
| 76 | + | ||
| 77 | + /** | ||
| 78 | + * 评论入口点击 | ||
| 79 | + */ | ||
| 80 | + public final String MY_PAGE_USER_COMMENT = "myPageUserComment"; | ||
| 81 | + | ||
| 82 | + /** | ||
| 83 | + * 关注入口点击 | ||
| 84 | + */ | ||
| 85 | + public final String MY_PAGE_USER_FOLLOW = "myPageUserFollow"; | ||
| 86 | + | ||
| 87 | + /** | ||
| 88 | + * 收藏入口点击 | ||
| 89 | + */ | ||
| 90 | + public final String MY_PAGE_USER_COLLECTION = "myPageUserCollection"; | ||
| 91 | + | ||
| 92 | + /** | ||
| 93 | + * 历史入口点击 | ||
| 94 | + */ | ||
| 95 | + public final String MY_PAGE_USER_HISTORY = "myPageUserHistory"; | ||
| 96 | + | ||
| 97 | + /** | ||
| 98 | + * 消息入口点击 | ||
| 99 | + */ | ||
| 100 | + public final String MY_PAGE_USER_NOTICE = "myPageUserNotice"; | ||
| 101 | + | ||
| 102 | + /** | ||
| 103 | + * 问政入口点击 | ||
| 104 | + */ | ||
| 105 | + public final String MY_PAGE_MESSAGE_BOARD = "myPageMessageBoard"; | ||
| 106 | + | ||
| 107 | + /** | ||
| 108 | + * 预约入口点击 | ||
| 109 | + */ | ||
| 110 | + public final String MY_PAGE_USER_SUBSCRIBE = "myPageUserSubscribe"; | ||
| 111 | + | ||
| 112 | + | ||
| 113 | + /** | ||
| 114 | + * 取消预约 | ||
| 115 | + */ | ||
| 116 | + public final String MY_PAGE_SAVEDLIVEPAGEUNSUBSCRIBE = "mySavedLivePageUnSubscribe"; | ||
| 117 | + | ||
| 118 | + /** | ||
| 119 | + * 积分商城点击 | ||
| 120 | + */ | ||
| 121 | + public final String MY_PAGE_USER_POINTS_MALL = "myPageUserPointsMall"; | ||
| 122 | + | ||
| 123 | + /** | ||
| 124 | + * 数字藏品点击 | ||
| 125 | + */ | ||
| 126 | + public final String MY_PAGE_USER_DIGITAL_COLLECTIBLES = "myPageUserDigitalCollectibles"; | ||
| 127 | + | ||
| 128 | + /** | ||
| 129 | + * 意见反馈点击 | ||
| 130 | + */ | ||
| 131 | + public final String MY_PAGE_USER_FEED_BACK = "myPageUserFeedBack"; | ||
| 132 | + | ||
| 133 | + /** | ||
| 134 | + * 设置点击 | ||
| 135 | + */ | ||
| 136 | + public final String MY_PAGE_USER_SETTING = "myPageUserSetting"; | ||
| 137 | + | ||
| 138 | + /** | ||
| 139 | + * 关于点击 | ||
| 140 | + */ | ||
| 141 | + public final String MY_PAGE_USER_ABOUT = "myPageUserAbout"; | ||
| 142 | + | ||
| 143 | + /** | ||
| 144 | + * 扫一扫点击 | ||
| 145 | + */ | ||
| 146 | + public final String MY_PAGE_SCANCODE = "myPageScanCode"; | ||
| 147 | + | ||
| 148 | + /** | ||
| 149 | + * 夜间模式点击 | ||
| 150 | + */ | ||
| 151 | + public final String MY_PAGE_USER_LIGHT_MODE = "myPageUserLightMode"; | ||
| 152 | + | ||
| 153 | + /** | ||
| 154 | + * 内容管理 点击 | ||
| 155 | + */ | ||
| 156 | + public final String MY_PAGE_CONTENT_MANAGEMENT = "myPageContentManagement"; | ||
| 157 | + | ||
| 158 | + /** | ||
| 159 | + * 发布文章 点击 | ||
| 160 | + */ | ||
| 161 | + public final String MY_PAGE_PUBLISH_ARTICLE = "myPagePublishArticle"; | ||
| 162 | + | ||
| 163 | + /** | ||
| 164 | + * 发布视频 点击 | ||
| 165 | + */ | ||
| 166 | + public final String MY_PAGE_PUBLISH_VIDEO = "myPagePublishVideo"; | ||
| 167 | + | ||
| 168 | + /** | ||
| 169 | + * 发布动态 点击 | ||
| 170 | + */ | ||
| 171 | + public final String MY_PAGE_PUBLISH_DYNAMIC = "myPagePublishDynamic"; | ||
| 172 | + | ||
| 173 | + /** | ||
| 174 | + * 发布图集 点击 | ||
| 175 | + */ | ||
| 176 | + public final String MY_PAGE_PUBLISH_ATLAS = "myPagePublishAtlas"; | ||
| 177 | + | ||
| 178 | + /** | ||
| 179 | + * tag | ||
| 180 | + */ | ||
| 181 | + private static final String TAG = "MineFragment"; | ||
| 182 | + | ||
| 183 | + /** | ||
| 184 | + * 测试入口 | ||
| 185 | + */ | ||
| 186 | + private TextView testTv; | ||
| 187 | + | ||
| 188 | + /** | ||
| 189 | + * 滑动控件 | ||
| 190 | + */ | ||
| 191 | + private ScrollView mScrollView; | ||
| 192 | + | ||
| 193 | + /** | ||
| 194 | + * 顶部背景图 | ||
| 195 | + */ | ||
| 196 | + private ImageView topBgImg; | ||
| 197 | + | ||
| 198 | + /** | ||
| 199 | + * 顶部布局-未登录状态 | ||
| 200 | + */ | ||
| 201 | + private LinearLayout unLoginTopLayout; | ||
| 202 | + | ||
| 203 | + /** | ||
| 204 | + * 头像-未登录状态 | ||
| 205 | + */ | ||
| 206 | + private CircleImageView unLoginHeadImg; | ||
| 207 | + | ||
| 208 | + /** | ||
| 209 | + * 昵称布局-未登录状态 | ||
| 210 | + */ | ||
| 211 | + private LinearLayout unLoginNameLayout; | ||
| 212 | + | ||
| 213 | + /** | ||
| 214 | + * 签到布局-未登录状态 | ||
| 215 | + */ | ||
| 216 | + private FrameLayout unLoginSignInLayout; | ||
| 217 | + | ||
| 218 | + /** | ||
| 219 | + * 评论布局-未登录状态 | ||
| 220 | + */ | ||
| 221 | + private FrameLayout unLoginCommentLayout; | ||
| 222 | + | ||
| 223 | + /** | ||
| 224 | + * 关注布局-未登录状态 | ||
| 225 | + */ | ||
| 226 | + private FrameLayout unLoginAttentionLayout; | ||
| 227 | + | ||
| 228 | + /** | ||
| 229 | + * 收藏布局-未登录状态 | ||
| 230 | + */ | ||
| 231 | + private FrameLayout unLoginCollectLayout; | ||
| 232 | + | ||
| 233 | + /** | ||
| 234 | + * 历史布局-未登录状态 | ||
| 235 | + */ | ||
| 236 | + private FrameLayout unLoginhistoryLayout; | ||
| 237 | + | ||
| 238 | + /** | ||
| 239 | + * 消息布局-未登录状态 | ||
| 240 | + */ | ||
| 241 | + private FrameLayout unLoginMessageLayout; | ||
| 242 | + | ||
| 243 | + /** | ||
| 244 | + * 问政布局-未登录状态 | ||
| 245 | + */ | ||
| 246 | + private FrameLayout unLoginAskPoliticsLayout; | ||
| 247 | + | ||
| 248 | + /** | ||
| 249 | + * 预约布局-未登录状态 | ||
| 250 | + */ | ||
| 251 | + private FrameLayout unLoginSubscribeLayout; | ||
| 252 | + | ||
| 253 | + /** | ||
| 254 | + * 活动投稿布局-未登录状态 | ||
| 255 | + */ | ||
| 256 | + private FrameLayout unLoginEventSubmissionLayout; | ||
| 257 | + | ||
| 258 | + /** | ||
| 259 | + * 顶部登录状态布局 | ||
| 260 | + */ | ||
| 261 | + private LinearLayout topLoginLayout; | ||
| 262 | + | ||
| 263 | + /** | ||
| 264 | + * 头像框 | ||
| 265 | + */ | ||
| 266 | + private ImageView avatarFrameImg; | ||
| 267 | + | ||
| 268 | + /** | ||
| 269 | + * 头像 | ||
| 270 | + */ | ||
| 271 | + private CircleImageView headImg; | ||
| 272 | + | ||
| 273 | + /** | ||
| 274 | + * 认证布局 | ||
| 275 | + */ | ||
| 276 | + private FrameLayout vipLayout; | ||
| 277 | + | ||
| 278 | + /** | ||
| 279 | + * 头像加V | ||
| 280 | + */ | ||
| 281 | + private RoundImageView vipIV; | ||
| 282 | + | ||
| 283 | + /** | ||
| 284 | + * 昵称布局 | ||
| 285 | + */ | ||
| 286 | + private LinearLayout nameLayout; | ||
| 287 | + | ||
| 288 | + /** | ||
| 289 | + * 昵称 | ||
| 290 | + */ | ||
| 291 | + private StrokeWidthTextView nameTv; | ||
| 292 | + | ||
| 293 | + private TextView tv_name_un_login; | ||
| 294 | + | ||
| 295 | + private ImageView tvNameArrow,tv_name_un_login_arrow; | ||
| 296 | + | ||
| 297 | + /** | ||
| 298 | + * 等级 | ||
| 299 | + */ | ||
| 300 | + private TextView lvTv; | ||
| 301 | + | ||
| 302 | + /** | ||
| 303 | + * 签到布局 | ||
| 304 | + */ | ||
| 305 | + private FrameLayout signInLayout; | ||
| 306 | + | ||
| 307 | + /** | ||
| 308 | + * 签到 | ||
| 309 | + */ | ||
| 310 | + private TextView signInTv; | ||
| 311 | + | ||
| 312 | + /** | ||
| 313 | + * 评论布局 | ||
| 314 | + */ | ||
| 315 | + private FrameLayout commentLayout; | ||
| 316 | + | ||
| 317 | + /** | ||
| 318 | + * 关注布局 | ||
| 319 | + */ | ||
| 320 | + private FrameLayout attentionLayout; | ||
| 321 | + | ||
| 322 | + /** | ||
| 323 | + * 收藏布局 | ||
| 324 | + */ | ||
| 325 | + private FrameLayout collectLayout; | ||
| 326 | + | ||
| 327 | + /** | ||
| 328 | + * 历史布局 | ||
| 329 | + */ | ||
| 330 | + private FrameLayout historyLayout; | ||
| 331 | + | ||
| 332 | + /** | ||
| 333 | + * 消息布局 | ||
| 334 | + */ | ||
| 335 | + private FrameLayout messageLayout; | ||
| 336 | + | ||
| 337 | + /** | ||
| 338 | + * 消息红点 | ||
| 339 | + */ | ||
| 340 | + private CircleImageView messageRedView; | ||
| 341 | + | ||
| 342 | + /** | ||
| 343 | + * 问政布局 | ||
| 344 | + */ | ||
| 345 | + private FrameLayout askPoliticsLayout; | ||
| 346 | + | ||
| 347 | + /** | ||
| 348 | + * 问政红点 | ||
| 349 | + */ | ||
| 350 | + private CircleImageView askRedView; | ||
| 351 | + | ||
| 352 | + /** | ||
| 353 | + * 预约布局 | ||
| 354 | + */ | ||
| 355 | + private FrameLayout subscribeLayout; | ||
| 356 | + | ||
| 357 | + /** | ||
| 358 | + * 预约红点 | ||
| 359 | + */ | ||
| 360 | + private CircleImageView subscribeRedView; | ||
| 361 | + | ||
| 362 | + /** | ||
| 363 | + * 活动投稿布局 | ||
| 364 | + */ | ||
| 365 | + private FrameLayout eventSubmissionLayout; | ||
| 366 | + | ||
| 367 | + /** | ||
| 368 | + * 金刚区布局 | ||
| 369 | + */ | ||
| 370 | + private RelativeLayout secLayout; | ||
| 371 | + | ||
| 372 | + /** | ||
| 373 | + * 金刚区-左边背景图 | ||
| 374 | + */ | ||
| 375 | + private ImageView secLeftImg; | ||
| 376 | + | ||
| 377 | + /** | ||
| 378 | + * 金刚区-右边背景图 | ||
| 379 | + */ | ||
| 380 | + private ImageView secRightImg; | ||
| 381 | + | ||
| 382 | + /** | ||
| 383 | + * 金刚区-单个图片 | ||
| 384 | + */ | ||
| 385 | + private ImageView secSingleImg; | ||
| 386 | + | ||
| 387 | + /** | ||
| 388 | + * 创作者中心布局 | ||
| 389 | + */ | ||
| 390 | + private LinearLayout creatorCenterLayout; | ||
| 391 | + | ||
| 392 | + /** | ||
| 393 | + * 创作者中心-内容管理布局 | ||
| 394 | + */ | ||
| 395 | + private LinearLayout contentManagementLayout; | ||
| 396 | + | ||
| 397 | + /** | ||
| 398 | + * 创作者中心-发布入口布局 | ||
| 399 | + */ | ||
| 400 | + private LinearLayout publishEntranceLayout; | ||
| 401 | + | ||
| 402 | + /** | ||
| 403 | + * 创作者中心-发布文章布局 | ||
| 404 | + */ | ||
| 405 | + private LinearLayout publishArticleLayout; | ||
| 406 | + | ||
| 407 | + /** | ||
| 408 | + * 创作者中心-发布视频布局 | ||
| 409 | + */ | ||
| 410 | + private LinearLayout publishVideoLayout; | ||
| 411 | + | ||
| 412 | + /** | ||
| 413 | + * 创作者中心-发布动态布局 | ||
| 414 | + */ | ||
| 415 | + private LinearLayout publishDynamicLayout; | ||
| 416 | + | ||
| 417 | + /** | ||
| 418 | + * 创作者中心-发布图集布局 | ||
| 419 | + */ | ||
| 420 | + private LinearLayout publishAtlasLayout; | ||
| 421 | + | ||
| 422 | + /** | ||
| 423 | + * 更多功能布局 | ||
| 424 | + */ | ||
| 425 | + private LinearLayout moreFunctionsLayout; | ||
| 426 | + | ||
| 427 | + /** | ||
| 428 | + * 更多功能-积分商城布局 | ||
| 429 | + */ | ||
| 430 | + private RelativeLayout pointsMallLayout; | ||
| 431 | + | ||
| 432 | + /** | ||
| 433 | + * 更多功能-夜间模式布局 | ||
| 434 | + */ | ||
| 435 | + private RelativeLayout nightModeLayout; | ||
| 436 | + | ||
| 437 | + /** | ||
| 438 | + * 日间模式、夜间模式、跟随系统 | ||
| 439 | + */ | ||
| 440 | + private TextView nightModeTv; | ||
| 441 | + | ||
| 442 | + /** | ||
| 443 | + * 更多功能-我的奖品布局 | ||
| 444 | + */ | ||
| 445 | + private RelativeLayout myPrizeLayout; | ||
| 446 | + | ||
| 447 | + /** | ||
| 448 | + * 更多功能-意见反馈布局 | ||
| 449 | + */ | ||
| 450 | + private RelativeLayout feedBackLayout; | ||
| 451 | + | ||
| 452 | + /** | ||
| 453 | + * 更多功能-扫一扫布局 | ||
| 454 | + */ | ||
| 455 | + private RelativeLayout scanLayout; | ||
| 456 | + | ||
| 457 | + /** | ||
| 458 | + * 更多功能-桌面小组就布局 | ||
| 459 | + */ | ||
| 460 | + private RelativeLayout layoutWidget; | ||
| 461 | + | ||
| 462 | + /** | ||
| 463 | + * 更多功能-设置布局 | ||
| 464 | + */ | ||
| 465 | + private RelativeLayout settingLayout; | ||
| 466 | + | ||
| 467 | + /** | ||
| 468 | + * 更多功能-关于布局 | ||
| 469 | + */ | ||
| 470 | + private RelativeLayout aboutLayout; | ||
| 471 | + | ||
| 472 | + /** | ||
| 473 | + * pageId | ||
| 474 | + */ | ||
| 475 | + private String mPageId; | ||
| 476 | + | ||
| 477 | + /** | ||
| 478 | + * tab名称 | ||
| 479 | + */ | ||
| 480 | + private String pageName; | ||
| 481 | + /** | ||
| 482 | + * 背景url | ||
| 483 | + */ | ||
| 484 | + private String backgroundUrl; | ||
| 485 | + | ||
| 486 | + /** | ||
| 487 | + * 页面顶部状态栏颜色 | ||
| 488 | + */ | ||
| 489 | + private int pageStatusBarColor = 0; | ||
| 490 | + | ||
| 491 | + private String pageHomeColor; | ||
| 492 | + | ||
| 493 | + private String noticeHomeColor; | ||
| 494 | + | ||
| 495 | + /** | ||
| 496 | + * PersonalCenterViewModel | ||
| 497 | + */ | ||
| 498 | +// private LoginViewModel loginViewModel; | ||
| 499 | + | ||
| 500 | + /** | ||
| 501 | + * 查询是否存在已预约且未观看且直播中的直播 (客户端个人页 预约小红点) | ||
| 502 | + */ | ||
| 503 | +// private GetLiveNotWatchExistViewModel getLiveNotWatchExistViewModel; | ||
| 504 | + | ||
| 505 | + /** | ||
| 506 | + * 问政-我的留言小红点 | ||
| 507 | + */ | ||
| 508 | +// private MyAskMarkViewModel myAskMarkViewModel; | ||
| 509 | + | ||
| 510 | + /** | ||
| 511 | + * 我的消息-小红点 | ||
| 512 | + */ | ||
| 513 | +// private MailGroupViewModel mailGroupViewModel; | ||
| 514 | + | ||
| 515 | + /** | ||
| 516 | + * 用户等级相关接口 | ||
| 517 | + */ | ||
| 518 | +// private UserLevelViewModel userLevelViewModel; | ||
| 519 | + | ||
| 520 | + /** | ||
| 521 | + * 个人中心配置信息查询 | ||
| 522 | + */ | ||
| 523 | +// private AppPersonalConfigViewModel appPersonalConfigViewModel; | ||
| 524 | + | ||
| 525 | + /** | ||
| 526 | + * 是否已经设置头像框 | ||
| 527 | + */ | ||
| 528 | + private boolean avatarFrameHasSet = false; | ||
| 529 | + | ||
| 530 | + /** | ||
| 531 | + * 等级头像框 | ||
| 532 | + */ | ||
| 533 | + private String levelHeadUrl = ""; | ||
| 534 | + | ||
| 535 | + /** | ||
| 536 | + * 积分商城地址 | ||
| 537 | + */ | ||
| 538 | + private String pointMallLinkUrl; | ||
| 539 | + | ||
| 540 | + /** | ||
| 541 | + * 我的奖品跳转地址 | ||
| 542 | + */ | ||
| 543 | + private String awardsLinkUrl; | ||
| 544 | + | ||
| 545 | + /** | ||
| 546 | + * 夜间模式切换弹窗 | ||
| 547 | + */ | ||
| 548 | + private Dialog nightModeDialog; | ||
| 549 | + | ||
| 550 | + /** | ||
| 551 | + * 夜间模式列表adapter | ||
| 552 | + */ | ||
| 553 | +// private NightModeAdapter nightModeAdapter = null; | ||
| 554 | + | ||
| 555 | + /** | ||
| 556 | + * 记录开启页面时间 | ||
| 557 | + */ | ||
| 558 | + private long startTime; | ||
| 559 | + | ||
| 560 | + /** | ||
| 561 | + * 浏览时长 | ||
| 562 | + */ | ||
| 563 | + public long mDuration = 0; | ||
| 564 | + | ||
| 565 | + @Override | ||
| 566 | + protected void lazyLoadData() { | ||
| 567 | + | ||
| 568 | + } | ||
| 569 | + | ||
| 570 | + @Override | ||
| 571 | + protected String getLogTag() { | ||
| 572 | + return TAG; | ||
| 573 | + } | ||
| 574 | + | ||
| 575 | + @Override | ||
| 576 | + protected int getLayout() { | ||
| 577 | + return R.layout.fragment_mine; | ||
| 578 | + } | ||
| 579 | + | ||
| 580 | + @Override | ||
| 581 | + protected void initView(View rootView) { | ||
| 582 | + testTv = ViewUtils.findViewById(rootView, R.id.iv_test); | ||
| 583 | + creatorCenterLayout = ViewUtils.findViewById(rootView, R.id.layout_creator_center); | ||
| 584 | + mScrollView = ViewUtils.findViewById(rootView, R.id.scroll_view); | ||
| 585 | + topBgImg = ViewUtils.findViewById(rootView, R.id.img_top_bg); | ||
| 586 | + //未登录布局 | ||
| 587 | + unLoginTopLayout = ViewUtils.findViewById(rootView, R.id.layout_mine_top_un_login); | ||
| 588 | + unLoginHeadImg = ViewUtils.findViewById(rootView, R.id.img_head_un_login); | ||
| 589 | + unLoginNameLayout = ViewUtils.findViewById(rootView, R.id.layout_name_un_login); | ||
| 590 | + unLoginSignInLayout = ViewUtils.findViewById(rootView, R.id.layout_sign_in__un_login); | ||
| 591 | + unLoginCommentLayout = ViewUtils.findViewById(rootView, R.id.layout_comment_un_login); | ||
| 592 | + unLoginAttentionLayout = ViewUtils.findViewById(rootView, R.id.layout_attention_un_login); | ||
| 593 | + unLoginCollectLayout = ViewUtils.findViewById(rootView, R.id.layout_collect_un_login); | ||
| 594 | + unLoginhistoryLayout = ViewUtils.findViewById(rootView, R.id.layout_history_un_login); | ||
| 595 | + unLoginMessageLayout = ViewUtils.findViewById(rootView, R.id.layout_message_un_login); | ||
| 596 | + unLoginAskPoliticsLayout = ViewUtils.findViewById(rootView, R.id.layout_ask_politics_un_login); | ||
| 597 | + unLoginSubscribeLayout = ViewUtils.findViewById(rootView, R.id.layout_subscribe_un_login); | ||
| 598 | + unLoginEventSubmissionLayout = ViewUtils.findViewById(rootView, R.id.layout_event_submission_un_login); | ||
| 599 | + //登录布局 | ||
| 600 | + topLoginLayout = ViewUtils.findViewById(rootView, R.id.layout_mine_top_login); | ||
| 601 | + avatarFrameImg = ViewUtils.findViewById(rootView, R.id.img_avatar_frame); | ||
| 602 | + headImg = ViewUtils.findViewById(rootView, R.id.img_head); | ||
| 603 | + vipLayout = ViewUtils.findViewById(rootView, R.id.layout_vip); | ||
| 604 | + vipIV = ViewUtils.findViewById(rootView, R.id.iv_vip); | ||
| 605 | + nameLayout = ViewUtils.findViewById(rootView, R.id.layout_name); | ||
| 606 | + nameTv = ViewUtils.findViewById(rootView, R.id.tv_name); | ||
| 607 | + nameTv.setTextColor(SpUtils.isNightMode()? ResUtils.getColor(R.color.res_color_general_DDDDDD): | ||
| 608 | + ResUtils.getColor(R.color.res_color_common_C1_keep)); | ||
| 609 | + tv_name_un_login = ViewUtils.findViewById(rootView,R.id.tv_name_un_login); | ||
| 610 | + tvNameArrow = ViewUtils.findViewById(rootView,R.id.tvNameArrow); | ||
| 611 | + tv_name_un_login_arrow = ViewUtils.findViewById(rootView,R.id.tv_name_un_login_arrow); | ||
| 612 | + lvTv = ViewUtils.findViewById(rootView, R.id.tv_lv); | ||
| 613 | + signInLayout = ViewUtils.findViewById(rootView, R.id.layout_sign_in); | ||
| 614 | + signInTv = ViewUtils.findViewById(rootView, R.id.tv_sign_in); | ||
| 615 | + commentLayout = ViewUtils.findViewById(rootView, R.id.layout_comment); | ||
| 616 | + attentionLayout = ViewUtils.findViewById(rootView, R.id.layout_attention); | ||
| 617 | + collectLayout = ViewUtils.findViewById(rootView, R.id.layout_collect); | ||
| 618 | + historyLayout = ViewUtils.findViewById(rootView, R.id.layout_history); | ||
| 619 | + messageLayout = ViewUtils.findViewById(rootView, R.id.layout_message); | ||
| 620 | + messageRedView = ViewUtils.findViewById(rootView, R.id.view_message_red); | ||
| 621 | + askPoliticsLayout = ViewUtils.findViewById(rootView, R.id.layout_ask_politics); | ||
| 622 | + askRedView = ViewUtils.findViewById(rootView, R.id.view_ask_red); | ||
| 623 | + subscribeLayout = ViewUtils.findViewById(rootView, R.id.layout_subscribe); | ||
| 624 | + subscribeRedView = ViewUtils.findViewById(rootView, R.id.view_subscribe_red); | ||
| 625 | + eventSubmissionLayout = ViewUtils.findViewById(rootView, R.id.layout_event_submission); | ||
| 626 | + secLayout = ViewUtils.findViewById(rootView, R.id.mine_second_layout); | ||
| 627 | + secLeftImg = ViewUtils.findViewById(rootView, R.id.img_sec_left); | ||
| 628 | + secRightImg = ViewUtils.findViewById(rootView, R.id.img_sec_right); | ||
| 629 | + secSingleImg = ViewUtils.findViewById(rootView, R.id.img_sec_single); | ||
| 630 | + //创作者中心 | ||
| 631 | + contentManagementLayout = ViewUtils.findViewById(rootView, R.id.layout_content_management); | ||
| 632 | + publishEntranceLayout = ViewUtils.findViewById(rootView, R.id.layout_publish_entrance); | ||
| 633 | + publishArticleLayout = ViewUtils.findViewById(rootView, R.id.layout_publish_article); | ||
| 634 | + publishVideoLayout = ViewUtils.findViewById(rootView, R.id.layout_publish_video); | ||
| 635 | + publishDynamicLayout = ViewUtils.findViewById(rootView, R.id.layout_publish_dynamic); | ||
| 636 | + publishAtlasLayout = ViewUtils.findViewById(rootView, R.id.layout_publish_atlas); | ||
| 637 | + //动态设置发布入口宽度 | ||
| 638 | + int screenWidth = ScreenUtils.getScreenWidth(); | ||
| 639 | + publishArticleLayout.getLayoutParams().width = screenWidth * 88 / 375; | ||
| 640 | + publishVideoLayout.getLayoutParams().width = screenWidth * 88 / 375; | ||
| 641 | + publishDynamicLayout.getLayoutParams().width = screenWidth * 88 / 375; | ||
| 642 | + publishAtlasLayout.getLayoutParams().width = screenWidth * 88 / 375; | ||
| 643 | + | ||
| 644 | + //更多 | ||
| 645 | + moreFunctionsLayout = ViewUtils.findViewById(rootView, R.id.layout_more_functions); | ||
| 646 | + pointsMallLayout = ViewUtils.findViewById(rootView, R.id.layout_points_mall); | ||
| 647 | + nightModeLayout = ViewUtils.findViewById(rootView, R.id.layout_night_mode); | ||
| 648 | + nightModeTv = ViewUtils.findViewById(rootView, R.id.tv_night_mode); | ||
| 649 | + myPrizeLayout = ViewUtils.findViewById(rootView, R.id.layout_my_prize); | ||
| 650 | + feedBackLayout = ViewUtils.findViewById(rootView, R.id.layout_feed_back); | ||
| 651 | + settingLayout = ViewUtils.findViewById(rootView, R.id.layout_setting); | ||
| 652 | + aboutLayout = ViewUtils.findViewById(rootView, R.id.layout_about); | ||
| 653 | + scanLayout = ViewUtils.findViewById(rootView, R.id.layout_scan); | ||
| 654 | + layoutWidget = ViewUtils.findViewById(rootView, R.id.layout_widget); | ||
| 655 | + | ||
| 656 | + mPageId = SafeBundleUtil.getString(getArguments(), IntentConstants.PARAM_PAGE_ID, ""); | ||
| 657 | + pageName = SafeBundleUtil.getString(getArguments(), IntentConstants.TAB_NEWS_TITLE, ""); | ||
| 658 | + | ||
| 659 | + backgroundUrl = SafeBundleUtil.getString(getArguments(), IntentConstants.PAGE_BACKGROUND_URL, ""); | ||
| 660 | + pageStatusBarColor = SafeBundleUtil.getInt(getArguments(), IntentConstants.PAGE_STATUS_COLOR, 0); | ||
| 661 | + pageHomeColor = SafeBundleUtil.getString(getArguments(), IntentConstants.PAGE_HOME_COLOR, "#FFFFFF"); | ||
| 662 | + noticeHomeColor = SafeBundleUtil.getString(getArguments(), IntentConstants.PAGE_NOTICE_COLOR, "#ED2800"); | ||
| 663 | + topBgImg.setBackgroundResource(R.mipmap.bg_mine_top_default); | ||
| 664 | + changeThemeColor(); | ||
| 665 | + | ||
| 666 | + String nightmode = SpUtils.getNightMode(); | ||
| 667 | + String nightText = "日间模式"; | ||
| 668 | + if(StringUtils.isEqual(SpUtils.NIGHT_MODE,nightmode)){ | ||
| 669 | + nightText = "夜间模式"; | ||
| 670 | + }else if(StringUtils.isEqual(SpUtils.FOLLOWUP_SYSTEM,nightmode)){ | ||
| 671 | + nightText = "跟随系统"; | ||
| 672 | + } | ||
| 673 | + nightModeTv.setText(nightText); | ||
| 674 | + | ||
| 675 | + initListener(); | ||
| 676 | + if (PDUtils.isLogin()) { | ||
| 677 | + //头像 | ||
| 678 | + if (!"1".equals(SpUtils.getUserType())){ | ||
| 679 | + ImageUtils.getInstance(). | ||
| 680 | + loadImageCircle(headImg, SpUtils.getHeadPhotoUrl(), R.mipmap.icon_default_head_mater); | ||
| 681 | + }else { | ||
| 682 | + ImageUtils.getInstance(). | ||
| 683 | + loadImageCircle(headImg, SpUtils.getHeadPhotoUrl(), R.mipmap.icon_default_head); | ||
| 684 | + } | ||
| 685 | + if (StringUtils.isEmpty(SpUtils.getUserName())) { | ||
| 686 | + nameLayout.setVisibility(View.GONE); | ||
| 687 | + } else { | ||
| 688 | + nameLayout.setVisibility(View.VISIBLE); | ||
| 689 | + //名称 | ||
| 690 | + nameTv.setText(SpUtils.getUserName()); | ||
| 691 | + } | ||
| 692 | + } | ||
| 693 | + } | ||
| 694 | + | ||
| 695 | + /** | ||
| 696 | + * 修改主题颜色 | ||
| 697 | + */ | ||
| 698 | + private void changeThemeColor() { | ||
| 699 | + if (!TextUtils.isEmpty(backgroundUrl)) { | ||
| 700 | + ImageUtils.getInstance().homeThemeImageLoadAndSave(topBgImg, 0, | ||
| 701 | + backgroundUrl, R.mipmap.bg_mine_top_default); | ||
| 702 | + } | ||
| 703 | + | ||
| 704 | + int size = topLoginLayout.getChildCount(); | ||
| 705 | + updateTopColor(size, topLoginLayout, false); | ||
| 706 | + | ||
| 707 | + int sizeb = unLoginTopLayout.getChildCount(); | ||
| 708 | + updateTopColor(sizeb, unLoginTopLayout, false); | ||
| 709 | + | ||
| 710 | + | ||
| 711 | + if(!TextUtils.isEmpty(pageHomeColor)){ | ||
| 712 | + nameTv.setTextColor(Color.parseColor(pageHomeColor)); | ||
| 713 | + tvNameArrow.setColorFilter(Color.parseColor(pageHomeColor)); | ||
| 714 | + | ||
| 715 | + tv_name_un_login.setTextColor(Color.parseColor(pageHomeColor)); | ||
| 716 | + tv_name_un_login_arrow.setColorFilter(Color.parseColor(pageHomeColor)); | ||
| 717 | + } | ||
| 718 | + | ||
| 719 | + if (!TextUtils.isEmpty(noticeHomeColor)) { | ||
| 720 | + messageRedView.setColorFilter(Color.parseColor(noticeHomeColor)); | ||
| 721 | + askRedView.setColorFilter(Color.parseColor(noticeHomeColor)); | ||
| 722 | + subscribeRedView.setColorFilter(Color.parseColor(noticeHomeColor)); | ||
| 723 | + } | ||
| 724 | + | ||
| 725 | + } | ||
| 726 | + | ||
| 727 | + /** | ||
| 728 | + * @param size | ||
| 729 | + * @param view | ||
| 730 | + * @param isRl | ||
| 731 | + */ | ||
| 732 | + private void updateTopColor(int size, ViewGroup view, boolean isRl) { | ||
| 733 | + | ||
| 734 | + ViewGroup parent = view; | ||
| 735 | + | ||
| 736 | + if (size > 0 && !TextUtils.isEmpty(pageHomeColor)) { | ||
| 737 | + for (int i = 0; i < size; i++) { | ||
| 738 | + View childViewA = parent.getChildAt(i); | ||
| 739 | + if (childViewA instanceof LinearLayout) { | ||
| 740 | + int aSize = ((LinearLayout) childViewA).getChildCount(); | ||
| 741 | + updateTopColor(aSize, (ViewGroup) childViewA, true); | ||
| 742 | + } else if (childViewA instanceof FrameLayout) { | ||
| 743 | + int aSize = ((FrameLayout) childViewA).getChildCount(); | ||
| 744 | + updateTopColor(aSize, (ViewGroup) childViewA, true); | ||
| 745 | + } else if (childViewA instanceof RelativeLayout && isRl) { | ||
| 746 | + int aSize = ((RelativeLayout) childViewA).getChildCount(); | ||
| 747 | + updateTopColor(aSize, (ViewGroup) childViewA, true); | ||
| 748 | + } else if (childViewA instanceof ImageView) { | ||
| 749 | + ImageView childIv = (ImageView) childViewA; | ||
| 750 | + childIv.setColorFilter(Color.parseColor(pageHomeColor)); | ||
| 751 | + | ||
| 752 | + } else if (childViewA instanceof TextView) { | ||
| 753 | + TextView childIv = (TextView) childViewA; | ||
| 754 | + childIv.setTextColor(Color.parseColor(pageHomeColor)); | ||
| 755 | + | ||
| 756 | + } | ||
| 757 | + } | ||
| 758 | + | ||
| 759 | + } | ||
| 760 | + | ||
| 761 | + } | ||
| 762 | + | ||
| 763 | + /** | ||
| 764 | + * 监听 | ||
| 765 | + */ | ||
| 766 | + private void initListener() { | ||
| 767 | + testTv.setOnClickListener(this); | ||
| 768 | + | ||
| 769 | + //未登录部分 | ||
| 770 | + unLoginHeadImg.setOnClickListener(unLoginClickListener); | ||
| 771 | + unLoginNameLayout.setOnClickListener(unLoginClickListener); | ||
| 772 | + unLoginSignInLayout.setOnClickListener(unLoginClickListener); | ||
| 773 | + unLoginCommentLayout.setOnClickListener(this); | ||
| 774 | + unLoginAttentionLayout.setOnClickListener(unLoginClickListener); | ||
| 775 | + unLoginCollectLayout.setOnClickListener(unLoginClickListener); | ||
| 776 | + unLoginhistoryLayout.setOnClickListener(this); | ||
| 777 | + unLoginMessageLayout.setOnClickListener(this); | ||
| 778 | + unLoginAskPoliticsLayout.setOnClickListener(unLoginClickListener); | ||
| 779 | + unLoginSubscribeLayout.setOnClickListener(unLoginClickListener); | ||
| 780 | + unLoginEventSubmissionLayout.setOnClickListener(unLoginClickListener); | ||
| 781 | + | ||
| 782 | + headImg.setOnClickListener(this); | ||
| 783 | + nameLayout.setOnClickListener(this); | ||
| 784 | + lvTv.setOnClickListener(this); | ||
| 785 | + signInLayout.setOnClickListener(this); | ||
| 786 | + commentLayout.setOnClickListener(this); | ||
| 787 | + attentionLayout.setOnClickListener(this); | ||
| 788 | + collectLayout.setOnClickListener(this); | ||
| 789 | + historyLayout.setOnClickListener(this); | ||
| 790 | + messageLayout.setOnClickListener(this); | ||
| 791 | + askPoliticsLayout.setOnClickListener(this); | ||
| 792 | + subscribeLayout.setOnClickListener(this); | ||
| 793 | + eventSubmissionLayout.setOnClickListener(this); | ||
| 794 | + secLeftImg.setOnClickListener(this); | ||
| 795 | + secRightImg.setOnClickListener(this); | ||
| 796 | + secSingleImg.setOnClickListener(this); | ||
| 797 | + | ||
| 798 | + contentManagementLayout.setOnClickListener(this); | ||
| 799 | + publishArticleLayout.setOnClickListener(this); | ||
| 800 | + publishVideoLayout.setOnClickListener(this); | ||
| 801 | + publishDynamicLayout.setOnClickListener(this); | ||
| 802 | + publishAtlasLayout.setOnClickListener(this); | ||
| 803 | + | ||
| 804 | + pointsMallLayout.setOnClickListener(this); | ||
| 805 | + nightModeLayout.setOnClickListener(this); | ||
| 806 | + myPrizeLayout.setOnClickListener(this); | ||
| 807 | + feedBackLayout.setOnClickListener(this); | ||
| 808 | + settingLayout.setOnClickListener(this); | ||
| 809 | + aboutLayout.setOnClickListener(this); | ||
| 810 | + scanLayout.setOnClickListener(this); | ||
| 811 | + layoutWidget.setOnClickListener(this); | ||
| 812 | + | ||
| 813 | + initViewModel(); | ||
| 814 | + receiveLiveDataMsg(); | ||
| 815 | + } | ||
| 816 | + | ||
| 817 | + /** | ||
| 818 | + * 注册LiveDataBus | ||
| 819 | + */ | ||
| 820 | + private void receiveLiveDataMsg() { | ||
| 821 | + //单击"ME"tab,刷新数据 | ||
| 822 | +// LiveDataBus.getInstance() | ||
| 823 | +// .with(EventConstants.HOME_TAB_REFRESH + mPageId, Boolean.class) | ||
| 824 | +// .observe(this, new Observer<Boolean>() { | ||
| 825 | +// @Override | ||
| 826 | +// public void onChanged(Boolean flag) { | ||
| 827 | +// if (PDUtils.isLogin()) { | ||
| 828 | +// //查询用户信息 | ||
| 829 | +//// loginViewModel.queryUserDetail(); | ||
| 830 | +// } | ||
| 831 | +// } | ||
| 832 | +// }); | ||
| 833 | + | ||
| 834 | + //退出登录清除资源 | ||
| 835 | + LiveDataBus.getInstance() | ||
| 836 | + .with(EventConstants.CLEAR_MINE_USER_TYPE, Boolean.class) | ||
| 837 | + .observe(this, new Observer<Boolean>() { | ||
| 838 | + @Override | ||
| 839 | + public void onChanged(Boolean aBoolean) { | ||
| 840 | + if (aBoolean) { | ||
| 841 | + if (!PDUtils.isLogin()) { | ||
| 842 | + doUnLogin(); | ||
| 843 | + } | ||
| 844 | + } | ||
| 845 | + } | ||
| 846 | + }); | ||
| 847 | + | ||
| 848 | + //游客一键合并通知 | ||
| 849 | + LiveDataBus.getInstance() | ||
| 850 | + .with(EventConstants.VISTOR_ONE_CLICK_MERGE, Boolean.class) | ||
| 851 | + .observe(this, new Observer<Boolean>() { | ||
| 852 | + @Override | ||
| 853 | + public void onChanged(Boolean aBoolean) { | ||
| 854 | + showLevelUpGradeGuideDialog(); | ||
| 855 | + } | ||
| 856 | + }); | ||
| 857 | + } | ||
| 858 | + | ||
| 859 | + /** | ||
| 860 | + * 初始化ViewModel | ||
| 861 | + */ | ||
| 862 | + private void initViewModel() { | ||
| 863 | +// loginViewModel = getViewModelThis(LoginViewModel.class); | ||
| 864 | +// loginViewModel.observeMyDetailListener(this, new MyDetailListener() { | ||
| 865 | +// @Override | ||
| 866 | +// public void onGetMyDetailSuccess(PersonalInfoBean myDetailBean) { | ||
| 867 | +// if (myDetailBean == null) { | ||
| 868 | +// return; | ||
| 869 | +// } | ||
| 870 | +// Logger.d(TAG, "observeUserInfoListener========>onGetUserInfoSuccess:" + myDetailBean.toString()); | ||
| 871 | +// seUserData(myDetailBean); | ||
| 872 | +// } | ||
| 873 | +// | ||
| 874 | +// @Override | ||
| 875 | +// public void onGetMyDetailFailed(String error) { | ||
| 876 | +// Logger.d(TAG, "observeUserInfoListener========>onGetUserInfoFailed:" + error); | ||
| 877 | +// userLevelViewModel.queryUserLevel(); | ||
| 878 | +// } | ||
| 879 | +// }); | ||
| 880 | +// | ||
| 881 | +// getLiveNotWatchExistViewModel = getViewModelThis(GetLiveNotWatchExistViewModel.class); | ||
| 882 | +// getLiveNotWatchExistViewModel.observeGetLiveNotWatchExistListener(this, | ||
| 883 | +// new IGetLiveNotWatchExistListener() { | ||
| 884 | +// @Override | ||
| 885 | +// public void onGetLiveNotWatchExistSuccess( | ||
| 886 | +// LiveExistNotWatchBean liveExistNotWatchBean) { | ||
| 887 | +// getLiveNotWatchExistSuccess(liveExistNotWatchBean); | ||
| 888 | +// } | ||
| 889 | +// | ||
| 890 | +// @Override | ||
| 891 | +// public void onGetLiveNotWatchExistFailed(String msg) { | ||
| 892 | +// | ||
| 893 | +// } | ||
| 894 | +// }); | ||
| 895 | +// | ||
| 896 | +// myAskMarkViewModel = getViewModelThis(MyAskMarkViewModel.class); | ||
| 897 | +// myAskMarkViewModel.observeIMyAskMarkListener(this, new IMyAskMarkListener() { | ||
| 898 | +// @Override | ||
| 899 | +// public void onMyAskMarkSuccess(MyAskMarkBean myAskMarkBean, MetaBean metaBean) { | ||
| 900 | +// if (metaBean != null && !StringUtils.isEmpty(metaBean.getMd5())) { | ||
| 901 | +// String askMd5 = metaBean.getMd5(); | ||
| 902 | +// String localMd5 = SpUtils.getAskMarkMD5(); | ||
| 903 | +// if (StringUtils.isEmpty(localMd5)) { | ||
| 904 | +// askRedView.setVisibility(View.GONE); | ||
| 905 | +// SpUtils.saveAskMarkMD5(askMd5); | ||
| 906 | +// return; | ||
| 907 | +// } | ||
| 908 | +// if (!StringUtils.isEqual(askMd5, localMd5)) { | ||
| 909 | +// askRedView.setVisibility(View.VISIBLE); | ||
| 910 | +// } else { | ||
| 911 | +// askRedView.setVisibility(View.GONE); | ||
| 912 | +// } | ||
| 913 | +// } | ||
| 914 | +// } | ||
| 915 | +// | ||
| 916 | +// @Override | ||
| 917 | +// public void onMyAskMarkFailed(String msg) { | ||
| 918 | +// askRedView.setVisibility(View.GONE); | ||
| 919 | +// } | ||
| 920 | +// }); | ||
| 921 | +// | ||
| 922 | +// mailGroupViewModel = getViewModelThis(MailGroupViewModel.class); | ||
| 923 | +// mailGroupViewModel.observeMailListener(this, new IGetMailGroupListener() { | ||
| 924 | +// @Override | ||
| 925 | +// public void onGetMailSuccess(MailBean mailbean) { | ||
| 926 | +// getMessageRedView(mailbean); | ||
| 927 | +// } | ||
| 928 | +// | ||
| 929 | +// @Override | ||
| 930 | +// public void onGetMailError(String msg) { | ||
| 931 | +// | ||
| 932 | +// } | ||
| 933 | +// }); | ||
| 934 | +// | ||
| 935 | +// userLevelViewModel = new UserLevelViewModel(); | ||
| 936 | +// //获取用户等级回调 | ||
| 937 | +// userLevelViewModel.observeQueryUserLevelListener(this, new IQueryUserLevelListener() { | ||
| 938 | +// @Override | ||
| 939 | +// public void onQueryUserLevelSuccess(UserLevelBean userLevelBean) { | ||
| 940 | +// updateUserLevel(userLevelBean); | ||
| 941 | +// } | ||
| 942 | +// | ||
| 943 | +// @Override | ||
| 944 | +// public void onQueryUserLevelFailed(String error) { | ||
| 945 | +// | ||
| 946 | +// } | ||
| 947 | +// }); | ||
| 948 | +// | ||
| 949 | +// appPersonalConfigViewModel = new AppPersonalConfigViewModel(); | ||
| 950 | +// appPersonalConfigViewModel.observeAppPersonalConfigListener(this, new IAppPersonalConfigListener() { | ||
| 951 | +// @Override | ||
| 952 | +// public void onAppPersonalConfigSuccess(PersonalConfigBean personalConfigBean) { | ||
| 953 | +// setAppPersonalConfigData(personalConfigBean); | ||
| 954 | +// } | ||
| 955 | +// | ||
| 956 | +// @Override | ||
| 957 | +// public void onAppPersonalConfigFailed(String msg) { | ||
| 958 | +// | ||
| 959 | +// } | ||
| 960 | +// }); | ||
| 961 | + } | ||
| 962 | + | ||
| 963 | + /** | ||
| 964 | + * | ||
| 965 | + * @param personalConfigBean | ||
| 966 | + */ | ||
| 967 | +// private void setAppPersonalConfigData(PersonalConfigBean personalConfigBean){ | ||
| 968 | +// if(personalConfigBean == null){ | ||
| 969 | +// return; | ||
| 970 | +// } | ||
| 971 | +// //设置我的奖品跳转链接 | ||
| 972 | +// awardsLinkUrl = personalConfigBean.getAwardsLinkUrl(); | ||
| 973 | +// | ||
| 974 | +// //积分商城跳转链接 | ||
| 975 | +// pointMallLinkUrl = personalConfigBean.getPointLinkUrl(); | ||
| 976 | +// //设置积分商城、数字藏品入口 todo 先隐藏 | ||
| 977 | +//// setPointDigitalData(personalConfigBean); | ||
| 978 | +// } | ||
| 979 | + | ||
| 980 | + /** | ||
| 981 | + * 设置积分商城、数字藏品数据 | ||
| 982 | + * @param personalConfigBean | ||
| 983 | + */ | ||
| 984 | +// private void setPointDigitalData(PersonalConfigBean personalConfigBean){ | ||
| 985 | +// String pointDisplayImg = personalConfigBean.getPointDisplayImg(); | ||
| 986 | +// String digitalDisplayImg = personalConfigBean.getDigitalDisplayImg(); | ||
| 987 | +// if(StringUtils.isEmpty(pointDisplayImg) && StringUtils.isEmpty(digitalDisplayImg)){ | ||
| 988 | +// //积分商城和数字藏品入口图片都为空,不展示入口 | ||
| 989 | +// secLayout.setVisibility(View.GONE); | ||
| 990 | +// return; | ||
| 991 | +// } | ||
| 992 | +// String show = personalConfigBean.getShow(); | ||
| 993 | +// if(StringUtils.isEqual("0",show)){ | ||
| 994 | +// secLayout.setVisibility(View.VISIBLE); | ||
| 995 | +// secLeftImg.setVisibility(View.VISIBLE); | ||
| 996 | +// secRightImg.setVisibility(View.VISIBLE); | ||
| 997 | +// secSingleImg.setVisibility(View.GONE); | ||
| 998 | +// //设置积分商城图 | ||
| 999 | +// ImageUtils.getInstance(). | ||
| 1000 | +// loadImage(secLeftImg, pointDisplayImg, 0); | ||
| 1001 | +// String pointLinkUrl = personalConfigBean.getPointLinkUrl(); | ||
| 1002 | +// secLeftImg.setTag(R.id.personal_config,pointLinkUrl); | ||
| 1003 | +// //设置数字藏品图 | ||
| 1004 | +// ImageUtils.getInstance(). | ||
| 1005 | +// loadImage(secRightImg, digitalDisplayImg, 0); | ||
| 1006 | +// String digitalLinkUrl = personalConfigBean.getDigitalLinkUrl(); | ||
| 1007 | +// secRightImg.setTag(R.id.personal_config,digitalLinkUrl); | ||
| 1008 | +// }else if(StringUtils.isEqual("1",show) && !StringUtils.isEmpty(pointDisplayImg)){ | ||
| 1009 | +// //1-仅展示积分商城 | ||
| 1010 | +// secLayout.setVisibility(View.VISIBLE); | ||
| 1011 | +// secLeftImg.setVisibility(View.GONE); | ||
| 1012 | +// secRightImg.setVisibility(View.GONE); | ||
| 1013 | +// secSingleImg.setVisibility(View.VISIBLE); | ||
| 1014 | +// //设置积分商城图 | ||
| 1015 | +// ImageUtils.getInstance(). | ||
| 1016 | +// loadImage(secSingleImg, pointDisplayImg, 0); | ||
| 1017 | +// secSingleImg.setTag(R.id.personal_config,personalConfigBean); | ||
| 1018 | +// }else if(StringUtils.isEqual("2",show) && !StringUtils.isEmpty(digitalDisplayImg)){ | ||
| 1019 | +// //2-仅展示数字藏品 | ||
| 1020 | +// secLayout.setVisibility(View.VISIBLE); | ||
| 1021 | +// secLeftImg.setVisibility(View.GONE); | ||
| 1022 | +// secRightImg.setVisibility(View.GONE); | ||
| 1023 | +// secSingleImg.setVisibility(View.VISIBLE); | ||
| 1024 | +// //设置数字藏品图 | ||
| 1025 | +// ImageUtils.getInstance(). | ||
| 1026 | +// loadImage(secSingleImg, digitalDisplayImg, 0); | ||
| 1027 | +// secSingleImg.setTag(R.id.personal_config,personalConfigBean); | ||
| 1028 | +// }else { | ||
| 1029 | +// //3-全隐藏 | ||
| 1030 | +// secLayout.setVisibility(View.GONE); | ||
| 1031 | +// } | ||
| 1032 | +// } | ||
| 1033 | + | ||
| 1034 | + /** | ||
| 1035 | + * 更新用户等级 | ||
| 1036 | + */ | ||
| 1037 | +// private void updateUserLevel(UserLevelBean userLevelBean) { | ||
| 1038 | +// if (userLevelBean == null) { | ||
| 1039 | +// return; | ||
| 1040 | +// } | ||
| 1041 | +// //用户等级 | ||
| 1042 | +// int levelId = userLevelBean.getLevelId(); | ||
| 1043 | +// if(levelId < 1){ | ||
| 1044 | +// levelId = 1; | ||
| 1045 | +// } | ||
| 1046 | +// lvTv.setText("等级" + levelId); | ||
| 1047 | +// lvTv.setVisibility(View.VISIBLE); | ||
| 1048 | +// | ||
| 1049 | +// int userType = SpUtils.getUserType(); | ||
| 1050 | +// | ||
| 1051 | +// if (userType != 1 || avatarFrameHasSet) { | ||
| 1052 | +// return; | ||
| 1053 | +// } | ||
| 1054 | +// //等级头像框 | ||
| 1055 | +// String levelHead = userLevelBean.getLevelHead(); | ||
| 1056 | +// if(StringUtils.isEmpty(levelHead)){ | ||
| 1057 | +// avatarFrameImg.setVisibility(View.GONE); | ||
| 1058 | +// }else { | ||
| 1059 | +// ImageUtils.getInstance(). | ||
| 1060 | +// loadImage(avatarFrameImg, levelHead, 0); | ||
| 1061 | +// avatarFrameImg.setVisibility(View.VISIBLE); | ||
| 1062 | +// avatarFrameHasSet = true; | ||
| 1063 | +// levelHeadUrl = levelHead; | ||
| 1064 | +// //处理等级升级引导 | ||
| 1065 | +// handleLevelUpgradeGuide(); | ||
| 1066 | +// } | ||
| 1067 | +// } | ||
| 1068 | + | ||
| 1069 | + /** | ||
| 1070 | + * 获取我的消息小红点 | ||
| 1071 | + * | ||
| 1072 | + * @param mailBean | ||
| 1073 | + */ | ||
| 1074 | +// private void getMessageRedView(MailBean mailBean) { | ||
| 1075 | +// //四种类型有一种有数据就有红点 | ||
| 1076 | +// if (mailBean.getSystemCount() != 0 || | ||
| 1077 | +// mailBean.getSubscribeCount() != 0 || | ||
| 1078 | +// mailBean.getActiveCount() != 0 || SpUtils.getPushMsgCount() != 0) { | ||
| 1079 | +// messageRedView.setVisibility(View.VISIBLE); | ||
| 1080 | +// } else { | ||
| 1081 | +// messageRedView.setVisibility(View.GONE); | ||
| 1082 | +// } | ||
| 1083 | +// } | ||
| 1084 | + | ||
| 1085 | + @Override | ||
| 1086 | + public void onClick(View v) { | ||
| 1087 | +// if (FastClickUtil.isFastClick()) { | ||
| 1088 | +// return; | ||
| 1089 | +// } | ||
| 1090 | +// int id = v.getId(); | ||
| 1091 | +// if (id == R.id.iv_test) { | ||
| 1092 | +// //测试入口 | ||
| 1093 | +// ProcessUtils.goTestPage(); | ||
| 1094 | +//// ProcessUtils.goLiveTwo(); | ||
| 1095 | +// } else if (id == R.id.img_head || id == R.id.layout_name) { | ||
| 1096 | +// //跳转个人详情页 | ||
| 1097 | +// ProcessUtils.jumpToPersonalCenterActivity(0,"1", SpUtils.getUserId(), | ||
| 1098 | +// String.valueOf(SpUtils.getUserType()), SpUtils.getCreatorId()); | ||
| 1099 | +// if (id == R.id.img_head) { | ||
| 1100 | +// //埋点:普通按钮点击,用户头像 | ||
| 1101 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1102 | +// MY_PAGE_USER_HEAD, | ||
| 1103 | +// PageNameConstants.MY_PAGE, | ||
| 1104 | +// PageNameConstants.MY_PAGE); | ||
| 1105 | +// } else { | ||
| 1106 | +// //埋点:普通按钮点击,昵称 | ||
| 1107 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1108 | +// MY_PAGE_USER_NAME, | ||
| 1109 | +// PageNameConstants.MY_PAGE, | ||
| 1110 | +// PageNameConstants.MY_PAGE); | ||
| 1111 | +// } | ||
| 1112 | +// } else if (id == R.id.tv_lv) { | ||
| 1113 | +// //等级 | ||
| 1114 | +// ProcessUtils.jumpUserLevelPage(); | ||
| 1115 | +// } else if (id == R.id.layout_sign_in) { | ||
| 1116 | +// //埋点:普通按钮点击,评论 | ||
| 1117 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1118 | +// MY_PAGE_USER_SIGN_IN, | ||
| 1119 | +// PageNameConstants.MY_PAGE, | ||
| 1120 | +// PageNameConstants.MY_PAGE); | ||
| 1121 | +// //签到 | ||
| 1122 | +// ProcessUtils.jumpIntegralCenterPage(1); | ||
| 1123 | +// } else if (id == R.id.layout_comment_un_login || id == R.id.layout_comment) { | ||
| 1124 | +// //埋点:普通按钮点击,评论 | ||
| 1125 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1126 | +// MY_PAGE_USER_COMMENT, | ||
| 1127 | +// PageNameConstants.MY_PAGE, | ||
| 1128 | +// PageNameConstants.MY_PAGE); | ||
| 1129 | +// if (PDUtils.isLogin()) { | ||
| 1130 | +// ProcessUtils.jumpToPersonalCenterActivityFromMine(SpUtils.getUserId(), | ||
| 1131 | +// String.valueOf(SpUtils.getUserType()), SpUtils.getCreatorId(), | ||
| 1132 | +// Constants.FROM_MINE_TYPE_COMMENT); | ||
| 1133 | +// } else { | ||
| 1134 | +// ProcessUtils.goVisitorComment(); | ||
| 1135 | +// } | ||
| 1136 | +// } else if (id == R.id.layout_attention) { | ||
| 1137 | +// //关注 | ||
| 1138 | +// //埋点:普通按钮点击,关注 | ||
| 1139 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1140 | +// MY_PAGE_USER_FOLLOW, | ||
| 1141 | +// PageNameConstants.MY_PAGE, | ||
| 1142 | +// PageNameConstants.MY_PAGE); | ||
| 1143 | +// ProcessUtils.goFocusListPage(0); | ||
| 1144 | +// } else if (id == R.id.layout_collect) { | ||
| 1145 | +// //收藏 | ||
| 1146 | +// //埋点:普通按钮点击,收藏 | ||
| 1147 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1148 | +// MY_PAGE_USER_COLLECTION, | ||
| 1149 | +// PageNameConstants.MY_PAGE, | ||
| 1150 | +// PageNameConstants.MY_PAGE); | ||
| 1151 | +// if (PDUtils.isLogin()) { | ||
| 1152 | +// ProcessUtils.goHistoryFavoriteEditActivity(HistoryFavoriteDisplayActivity.PAGE_TYPE_COLLECTION); | ||
| 1153 | +// } else { | ||
| 1154 | +// ProcessUtils.toOneKeyLoginActivity(); | ||
| 1155 | +// } | ||
| 1156 | +// } else if (id == R.id.layout_history || id == R.id.layout_history_un_login) { | ||
| 1157 | +// //历史 | ||
| 1158 | +// //埋点:普通按钮点击,历史 | ||
| 1159 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1160 | +// MY_PAGE_USER_HISTORY, | ||
| 1161 | +// PageNameConstants.MY_PAGE, | ||
| 1162 | +// PageNameConstants.MY_PAGE); | ||
| 1163 | +// ProcessUtils.goHistoryFavoriteEditActivity(HistoryFavoriteDisplayActivity.PAGE_TYPE_HISTORY); | ||
| 1164 | +// } else if (id == R.id.layout_message || id == R.id.layout_message_un_login) { | ||
| 1165 | +// //消息 | ||
| 1166 | +// //埋点:普通按钮点击,消息 | ||
| 1167 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1168 | +// MY_PAGE_USER_NOTICE, | ||
| 1169 | +// PageNameConstants.MY_PAGE, | ||
| 1170 | +// PageNameConstants.MY_PAGE); | ||
| 1171 | +// ProcessUtils.goMailGroupPage(); | ||
| 1172 | +// } else if (id == R.id.layout_ask_politics) { | ||
| 1173 | +// //留言板 | ||
| 1174 | +// //埋点:普通按钮点击,留言板 | ||
| 1175 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1176 | +// MY_PAGE_MESSAGE_BOARD, | ||
| 1177 | +// PageNameConstants.MY_PAGE, | ||
| 1178 | +// PageNameConstants.MY_PAGE); | ||
| 1179 | +// ProcessUtils.goLeaveWordActivity(IntentConstants.PAGETYPE_MYLEVEWORD); | ||
| 1180 | +// } else if (id == R.id.layout_subscribe) { | ||
| 1181 | +// //预约 | ||
| 1182 | +// //埋点:普通按钮点击,预约 | ||
| 1183 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1184 | +// MY_PAGE_USER_SUBSCRIBE, | ||
| 1185 | +// PageNameConstants.MY_PAGE, | ||
| 1186 | +// PageNameConstants.MY_PAGE); | ||
| 1187 | +// ProcessUtils.toSubscribeLiveListActivity(); | ||
| 1188 | +// } else if (id == R.id.layout_event_submission) { | ||
| 1189 | +// //活动投稿 | ||
| 1190 | +// ProcessUtils.jumpToPersonalCenterActivityFromMine(SpUtils.getUserId(), | ||
| 1191 | +// String.valueOf(SpUtils.getUserType()), SpUtils.getCreatorId(), | ||
| 1192 | +// Constants.FROM_MINE_TYPE_ACTIVITY); | ||
| 1193 | +// } else if (id == R.id.img_sec_left) { | ||
| 1194 | +// //金刚区左边区域 | ||
| 1195 | +// try { | ||
| 1196 | +// String url = (String) v.getTag(R.id.personal_config); | ||
| 1197 | +// if(!StringUtils.isEmpty(url)){ | ||
| 1198 | +// ProcessUtils.goToH5Page(new ContentBean(url)); | ||
| 1199 | +// } | ||
| 1200 | +// } catch (Exception e) { | ||
| 1201 | +// e.printStackTrace(); | ||
| 1202 | +// } | ||
| 1203 | +// } else if (id == R.id.img_sec_right) { | ||
| 1204 | +// //金刚区右边区域 | ||
| 1205 | +// try { | ||
| 1206 | +// String url = (String) v.getTag(R.id.personal_config); | ||
| 1207 | +// if(!StringUtils.isEmpty(url)){ | ||
| 1208 | +// ProcessUtils.goToH5Page(new ContentBean(url)); | ||
| 1209 | +// } | ||
| 1210 | +// } catch (Exception e) { | ||
| 1211 | +// e.printStackTrace(); | ||
| 1212 | +// } | ||
| 1213 | +// } else if (id == R.id.img_sec_single) { | ||
| 1214 | +// //单个图片 | ||
| 1215 | +// try { | ||
| 1216 | +// PersonalConfigBean personalConfigBean = (PersonalConfigBean) v.getTag(R.id.personal_config); | ||
| 1217 | +// if(personalConfigBean == null){ | ||
| 1218 | +// return; | ||
| 1219 | +// } | ||
| 1220 | +// String show = personalConfigBean.getShow(); | ||
| 1221 | +// String url = ""; | ||
| 1222 | +// if(StringUtils.isEqual("1",show)){ | ||
| 1223 | +// //1-仅展示数字藏品 | ||
| 1224 | +// url = personalConfigBean.getDigitalLinkUrl(); | ||
| 1225 | +// }else if(StringUtils.isEqual("2",show)){ | ||
| 1226 | +// //2-仅展示积分商城 | ||
| 1227 | +// url = personalConfigBean.getPointLinkUrl(); | ||
| 1228 | +// } | ||
| 1229 | +// if(!StringUtils.isEmpty(url)){ | ||
| 1230 | +// ProcessUtils.goToH5Page(new ContentBean(url)); | ||
| 1231 | +// } | ||
| 1232 | +// } catch (Exception e) { | ||
| 1233 | +// e.printStackTrace(); | ||
| 1234 | +// } | ||
| 1235 | +// try { | ||
| 1236 | +// String url = (String) v.getTag(R.id.personal_config); | ||
| 1237 | +// if(!StringUtils.isEmpty(url)){ | ||
| 1238 | +// ProcessUtils.goToH5Page(new ContentBean(url)); | ||
| 1239 | +// } | ||
| 1240 | +// } catch (Exception e) { | ||
| 1241 | +// e.printStackTrace(); | ||
| 1242 | +// } | ||
| 1243 | +// } else if (id == R.id.img_sec_single) { | ||
| 1244 | +// //单个图片 | ||
| 1245 | +// try { | ||
| 1246 | +// PersonalConfigBean personalConfigBean = (PersonalConfigBean) v.getTag(R.id.personal_config); | ||
| 1247 | +// if(personalConfigBean == null){ | ||
| 1248 | +// return; | ||
| 1249 | +// } | ||
| 1250 | +// String show = personalConfigBean.getShow(); | ||
| 1251 | +// String url = ""; | ||
| 1252 | +// if(StringUtils.isEqual("1",show)){ | ||
| 1253 | +// //1-仅展示积分商城 | ||
| 1254 | +// url = personalConfigBean.getPointLinkUrl(); | ||
| 1255 | +// }else if(StringUtils.isEqual("2",show)){ | ||
| 1256 | +// //2-仅展示数字藏品 | ||
| 1257 | +// url = personalConfigBean.getDigitalLinkUrl(); | ||
| 1258 | +// } | ||
| 1259 | +// if(!StringUtils.isEmpty(url)){ | ||
| 1260 | +// ProcessUtils.goToH5Page(new ContentBean(url)); | ||
| 1261 | +// } | ||
| 1262 | +// } catch (Exception e) { | ||
| 1263 | +// e.printStackTrace(); | ||
| 1264 | +// } | ||
| 1265 | +// } else if (id == R.id.layout_content_management) { | ||
| 1266 | +// //内容管理 | ||
| 1267 | +// //埋点:普通按钮点击,内容管理 | ||
| 1268 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1269 | +// MY_PAGE_CONTENT_MANAGEMENT, | ||
| 1270 | +// PageNameConstants.MY_PAGE, | ||
| 1271 | +// PageNameConstants.MY_PAGE); | ||
| 1272 | +// if (PDUtils.isLogin()) { | ||
| 1273 | +// ProcessUtils.jumpToPersonalCenterActivityFromMine(SpUtils.getUserId(), String.valueOf(SpUtils.getUserType()), SpUtils.getCreatorId(), Constants.FROM_MINE_TYPE_WORKS); | ||
| 1274 | +// } else { | ||
| 1275 | +// ProcessUtils.toOneKeyLoginActivity(); | ||
| 1276 | +// } | ||
| 1277 | +// } else if (id == R.id.layout_publish_article) { | ||
| 1278 | +// //发布文章 | ||
| 1279 | +// //埋点:普通按钮点击,发布文章 | ||
| 1280 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1281 | +// MY_PAGE_PUBLISH_ARTICLE, | ||
| 1282 | +// PageNameConstants.MY_PAGE, | ||
| 1283 | +// PageNameConstants.MY_PAGE); | ||
| 1284 | +// getRemainingDispatchNum(ContentTypeConstant.URL_TYPE_EIGHT); | ||
| 1285 | +// } else if (id == R.id.layout_publish_video) { | ||
| 1286 | +// //发布视频 | ||
| 1287 | +// //埋点:普通按钮点击,发布视频 | ||
| 1288 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1289 | +// MY_PAGE_PUBLISH_VIDEO, | ||
| 1290 | +// PageNameConstants.MY_PAGE, | ||
| 1291 | +// PageNameConstants.MY_PAGE); | ||
| 1292 | +// if (SpUtils.isPublishUploading()) { | ||
| 1293 | +// ToastNightUtil.showShort(ResUtils.getString(com.people.daily.common.R.string.res_publish_uploading)); | ||
| 1294 | +// return; | ||
| 1295 | +// } | ||
| 1296 | +// getRemainingDispatchNum(ContentTypeConstant.URL_TYPE_NINE); | ||
| 1297 | +//// ProcessUtils.toPublishVideoActivity(); | ||
| 1298 | +// } else if (id == R.id.layout_publish_dynamic) { | ||
| 1299 | +// //发布动态 | ||
| 1300 | +// //埋点:普通按钮点击,发布动态 | ||
| 1301 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1302 | +// MY_PAGE_PUBLISH_DYNAMIC, | ||
| 1303 | +// PageNameConstants.MY_PAGE, | ||
| 1304 | +// PageNameConstants.MY_PAGE); | ||
| 1305 | +// getRemainingDispatchNum(ContentTypeConstant.URL_TYPE_FIFTEEN); | ||
| 1306 | +// } else if (id == R.id.layout_publish_atlas) { | ||
| 1307 | +// //发布图集 | ||
| 1308 | +// //埋点:普通按钮点击,发布图集 | ||
| 1309 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1310 | +// MY_PAGE_PUBLISH_ATLAS, | ||
| 1311 | +// PageNameConstants.MY_PAGE, | ||
| 1312 | +// PageNameConstants.MY_PAGE); | ||
| 1313 | +// getRemainingDispatchNum(ContentTypeConstant.URL_TYPE_ONE); | ||
| 1314 | +// } else if (id == R.id.layout_points_mall) { | ||
| 1315 | +// //积分商城 | ||
| 1316 | +// //埋点:普通按钮点击,积分商城 | ||
| 1317 | +// /*GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1318 | +// MY_PAGE_USER_POINTS_MALL, | ||
| 1319 | +// PageNameConstants.MY_PAGE, | ||
| 1320 | +// PageNameConstants.MY_PAGE);*/ | ||
| 1321 | +// ProcessUtils.goToH5Page(new ContentBean(StringUtils.isEmpty(pointMallLinkUrl)? | ||
| 1322 | +// UrlConstants.getPointsMallUrl(): pointMallLinkUrl)); | ||
| 1323 | +// } else if (id == R.id.layout_night_mode) { | ||
| 1324 | +// //夜间模式 | ||
| 1325 | +// //埋点:普通按钮点击,夜间模式 | ||
| 1326 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1327 | +// MY_PAGE_USER_LIGHT_MODE, | ||
| 1328 | +// PageNameConstants.MY_PAGE, | ||
| 1329 | +// PageNameConstants.MY_PAGE); | ||
| 1330 | +// switchNightMode(); | ||
| 1331 | +// } else if (id == R.id.layout_my_prize) { | ||
| 1332 | +// //我的奖品 | ||
| 1333 | +// if (PDUtils.isLogin()) { | ||
| 1334 | +//// ToastNightUtil.showShort("敬请期待"); | ||
| 1335 | +// ProcessUtils.goToH5Page(new ContentBean(StringUtils.isEmpty(awardsLinkUrl)? | ||
| 1336 | +// UrlConstants.getMyPrizeUrl():awardsLinkUrl)); | ||
| 1337 | +// } else { | ||
| 1338 | +// ProcessUtils.toOneKeyLoginActivity(); | ||
| 1339 | +// } | ||
| 1340 | +// } else if (id == R.id.layout_feed_back) { | ||
| 1341 | +// //意见反馈 | ||
| 1342 | +// //埋点:普通按钮点击,意见反馈 | ||
| 1343 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1344 | +// MY_PAGE_USER_FEED_BACK, | ||
| 1345 | +// PageNameConstants.MY_PAGE, | ||
| 1346 | +// PageNameConstants.MY_PAGE); | ||
| 1347 | +// if (PDUtils.isLogin()) { | ||
| 1348 | +// ProcessUtils.goFeekBackPage(); | ||
| 1349 | +// } else { | ||
| 1350 | +// ProcessUtils.toOneKeyLoginActivity(); | ||
| 1351 | +// } | ||
| 1352 | +// } else if (id == R.id.layout_setting) { | ||
| 1353 | +// //设置 | ||
| 1354 | +// //埋点:普通按钮点击,设置 | ||
| 1355 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1356 | +// MY_PAGE_USER_SETTING, | ||
| 1357 | +// PageNameConstants.MY_PAGE, | ||
| 1358 | +// PageNameConstants.MY_PAGE); | ||
| 1359 | +// ProcessUtils.goSettingPage(); | ||
| 1360 | +// } else if (id == R.id.layout_about) { | ||
| 1361 | +// //关于 | ||
| 1362 | +// //埋点:普通按钮点击,关于 | ||
| 1363 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1364 | +// MY_PAGE_USER_ABOUT, | ||
| 1365 | +// PageNameConstants.MY_PAGE, | ||
| 1366 | +// PageNameConstants.MY_PAGE); | ||
| 1367 | +// ProcessUtils.goAboutPage(); | ||
| 1368 | +// } else if (id == R.id.layout_scan) { | ||
| 1369 | +// //扫一扫 | ||
| 1370 | +// //埋点:普通按钮点击,扫一扫 | ||
| 1371 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1372 | +// MY_PAGE_SCANCODE, | ||
| 1373 | +// PageNameConstants.MY_PAGE, | ||
| 1374 | +// PageNameConstants.MY_PAGE); | ||
| 1375 | +// if (PDUtils.isLogin()) { | ||
| 1376 | +// ScanHelper.getScanHelper().scanCode(getActivity()); | ||
| 1377 | +// } else { | ||
| 1378 | +// ProcessUtils.toOneKeyLoginActivity(); | ||
| 1379 | +// } | ||
| 1380 | +// } else if (id == R.id.layout_widget){ | ||
| 1381 | +// // 跳转桌面组件页面 | ||
| 1382 | +// ProcessUtils.goAddWidgetPage(); | ||
| 1383 | +// } | ||
| 1384 | + } | ||
| 1385 | + | ||
| 1386 | + /** | ||
| 1387 | + * 获取当日发文次数 | ||
| 1388 | + * @param type | ||
| 1389 | + */ | ||
| 1390 | +// private void getRemainingDispatchNum(int type){ | ||
| 1391 | +// final boolean[] startLoading = {true}; | ||
| 1392 | +// CommonNetUtils.getInstance().getRemainingDispatchNum(new BaseObserver<Integer>() { | ||
| 1393 | +// @Override | ||
| 1394 | +// protected void dealSpecialCode(int code, String message) { | ||
| 1395 | +// stopLoading(); | ||
| 1396 | +// startLoading[0] = false; | ||
| 1397 | +// jumpPublish(type); | ||
| 1398 | +// } | ||
| 1399 | +// | ||
| 1400 | +// @Override | ||
| 1401 | +// protected void onSuccess(Integer integer) { | ||
| 1402 | +// stopLoading(); | ||
| 1403 | +// startLoading[0] = false; | ||
| 1404 | +// if(integer == 0){ | ||
| 1405 | +// //已达到今日发文篇数限制 | ||
| 1406 | +// ToastNightUtil.showShort(ResUtils.getString(R.string.res_get_remaining_dispatch_num_limit)); | ||
| 1407 | +// }else { | ||
| 1408 | +// jumpPublish(type); | ||
| 1409 | +// } | ||
| 1410 | +// } | ||
| 1411 | +// | ||
| 1412 | +// @Override | ||
| 1413 | +// public void onError(Throwable e) { | ||
| 1414 | +// stopLoading(); | ||
| 1415 | +// startLoading[0] = false; | ||
| 1416 | +// jumpPublish(type); | ||
| 1417 | +// } | ||
| 1418 | +// }); | ||
| 1419 | +// //延迟1秒,出现loading加载动画 | ||
| 1420 | +// contentManagementLayout.postDelayed(new Runnable() { | ||
| 1421 | +// @Override | ||
| 1422 | +// public void run() { | ||
| 1423 | +// if(startLoading[0]){ | ||
| 1424 | +// startLoading(); | ||
| 1425 | +// } | ||
| 1426 | +// } | ||
| 1427 | +// },1000); | ||
| 1428 | +// } | ||
| 1429 | + | ||
| 1430 | + /** | ||
| 1431 | + * 跳转发布页 | ||
| 1432 | + * @param type | ||
| 1433 | + */ | ||
| 1434 | + private void jumpPublish(int type){ | ||
| 1435 | +// if(type == ContentTypeConstant.URL_TYPE_EIGHT){ | ||
| 1436 | +// //文章 | ||
| 1437 | +// ProcessUtils.jumpPublishArticlePage(); | ||
| 1438 | +// }else if(type == ContentTypeConstant.URL_TYPE_NINE){ | ||
| 1439 | +// //视频 | ||
| 1440 | +// Intent intent = new Intent(getActivity(), RecordActivity.class); | ||
| 1441 | +// startActivity(intent); | ||
| 1442 | +// }else if(type == ContentTypeConstant.URL_TYPE_ONE){ | ||
| 1443 | +// //多图 | ||
| 1444 | +// ProcessUtils.jumpPublishAtlasPage(); | ||
| 1445 | +// }else if(type == ContentTypeConstant.URL_TYPE_FIFTEEN){ | ||
| 1446 | +// //动态 | ||
| 1447 | +// ProcessUtils.toPublishActivity(); | ||
| 1448 | +// } | ||
| 1449 | + } | ||
| 1450 | + | ||
| 1451 | + /** | ||
| 1452 | + * 未登录点击 | ||
| 1453 | + */ | ||
| 1454 | + View.OnClickListener unLoginClickListener = new View.OnClickListener() { | ||
| 1455 | + @Override | ||
| 1456 | + public void onClick(View view) { | ||
| 1457 | +// ProcessUtils.toOneKeyLoginActivity(); | ||
| 1458 | +// int id = view.getId(); | ||
| 1459 | +// if (id == R.id.layout_name_un_login) { | ||
| 1460 | +// //埋点:普通按钮点击,登录 | ||
| 1461 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1462 | +// MY_PAGE_USER_LOGIN, | ||
| 1463 | +// PageNameConstants.MY_PAGE, | ||
| 1464 | +// PageNameConstants.MY_PAGE); | ||
| 1465 | +// } else if (id == R.id.img_head_un_login) { | ||
| 1466 | +// //埋点:普通按钮点击,头像 | ||
| 1467 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1468 | +// MY_PAGE_USER_HEAD, | ||
| 1469 | +// PageNameConstants.MY_PAGE, | ||
| 1470 | +// PageNameConstants.MY_PAGE); | ||
| 1471 | +// } else if (id == R.id.layout_attention_un_login) { | ||
| 1472 | +// //埋点:普通按钮点击,关注 | ||
| 1473 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1474 | +// MY_PAGE_USER_FOLLOW, | ||
| 1475 | +// PageNameConstants.MY_PAGE, | ||
| 1476 | +// PageNameConstants.MY_PAGE); | ||
| 1477 | +// } else if (id == R.id.layout_collect_un_login) { | ||
| 1478 | +// //埋点:普通按钮点击,收藏 | ||
| 1479 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1480 | +// MY_PAGE_USER_COLLECTION, | ||
| 1481 | +// PageNameConstants.MY_PAGE, | ||
| 1482 | +// PageNameConstants.MY_PAGE); | ||
| 1483 | +// } else if (id == R.id.layout_ask_politics_un_login) { | ||
| 1484 | +// //埋点:普通按钮点击,留言板 | ||
| 1485 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1486 | +// MY_PAGE_MESSAGE_BOARD, | ||
| 1487 | +// PageNameConstants.MY_PAGE, | ||
| 1488 | +// PageNameConstants.MY_PAGE); | ||
| 1489 | +// } else if (id == R.id.layout_subscribe_un_login) { | ||
| 1490 | +// //埋点:普通按钮点击,预约 | ||
| 1491 | +// GeneralTrack.getInstance().commonBtnClickTrack( | ||
| 1492 | +// MY_PAGE_USER_SUBSCRIBE, | ||
| 1493 | +// PageNameConstants.MY_PAGE, | ||
| 1494 | +// PageNameConstants.MY_PAGE); | ||
| 1495 | +// } | ||
| 1496 | + } | ||
| 1497 | + }; | ||
| 1498 | + | ||
| 1499 | + @Override | ||
| 1500 | + public void onResume() { | ||
| 1501 | + super.onResume(); | ||
| 1502 | + startTime = System.currentTimeMillis(); | ||
| 1503 | + //设置状态栏文字为白色 | ||
| 1504 | + boolean isWhite = pageStatusBarColor == 0; | ||
| 1505 | + changePhoneStatusBarWhiteOrBlack(SpUtils.isNightMode()? !isWhite : isWhite); | ||
| 1506 | + if(SpUtils.isNightMode() && StringUtils.isEmpty(backgroundUrl)){ | ||
| 1507 | + topBgImg.setBackgroundResource(R.mipmap.bg_mine_top_default_night); | ||
| 1508 | + } | ||
| 1509 | + //设置我的奖品入口是否展示 | ||
| 1510 | + if(Constants.atvHideSwitch){ | ||
| 1511 | + myPrizeLayout.setVisibility(View.GONE); | ||
| 1512 | + unLoginEventSubmissionLayout.setVisibility(View.INVISIBLE); | ||
| 1513 | + eventSubmissionLayout.setVisibility(View.INVISIBLE); | ||
| 1514 | + }else { | ||
| 1515 | + myPrizeLayout.setVisibility(View.VISIBLE); | ||
| 1516 | + unLoginEventSubmissionLayout.setVisibility(View.VISIBLE); | ||
| 1517 | + eventSubmissionLayout.setVisibility(View.VISIBLE); | ||
| 1518 | + } | ||
| 1519 | + //个人中心配置信息查询 | ||
| 1520 | +// appPersonalConfigViewModel.getAppPersonalConfig(); | ||
| 1521 | +// if (PDUtils.isLogin()) { | ||
| 1522 | +// doLogin(); | ||
| 1523 | +// } else { | ||
| 1524 | +// doUnLogin(); | ||
| 1525 | +// } | ||
| 1526 | + LiveDataBus.getInstance().with(EventConstants.HOME_TAB_BACKGROUND_THEME).postValue(false); | ||
| 1527 | + } | ||
| 1528 | + | ||
| 1529 | + @Override | ||
| 1530 | + public void onPause() { | ||
| 1531 | + super.onPause(); | ||
| 1532 | + long endTime = System.currentTimeMillis(); | ||
| 1533 | + mDuration = (int) (endTime - startTime); | ||
| 1534 | + mDuration = mDuration/1000; | ||
| 1535 | + //页面浏览埋点 | ||
| 1536 | + TrackContentBean trackContentBean = new TrackContentBean(); | ||
| 1537 | + trackContentBean.setPage_name(PageNameConstants.MY_PAGE); | ||
| 1538 | + trackContentBean.setPage_id(PageNameConstants.MY_PAGE); | ||
| 1539 | + trackContentBean.setExposure(mDuration); | ||
| 1540 | +// CommonTrack.getInstance().channelExposureTrack(trackContentBean); | ||
| 1541 | + } | ||
| 1542 | + | ||
| 1543 | + /** | ||
| 1544 | + * 登录后页面 | ||
| 1545 | + */ | ||
| 1546 | +// private void doLogin() { | ||
| 1547 | +// avatarFrameHasSet = false; | ||
| 1548 | +// levelHeadUrl = ""; | ||
| 1549 | +// topLoginLayout.setVisibility(View.VISIBLE); | ||
| 1550 | +// unLoginTopLayout.setVisibility(View.GONE); | ||
| 1551 | +// loginViewModel.getMyDetail(); | ||
| 1552 | +// String paramsJson; | ||
| 1553 | +// List<SubscribeLivingModel> subscribeLivingModelList = SubscribeLivingHelper. | ||
| 1554 | +// getInstance(getContext()).getAllByUserId(SpUtils.getUserId()); | ||
| 1555 | +// if (!ArrayUtil.isEmpty(subscribeLivingModelList)) { | ||
| 1556 | +// paramsJson = GsonUtils.objectToJson(subscribeLivingModelList); | ||
| 1557 | +// } else { | ||
| 1558 | +// JSONArray jsonArray = new JSONArray(); | ||
| 1559 | +// paramsJson = jsonArray.toString(); | ||
| 1560 | +// } | ||
| 1561 | +// Logger.t(TAG).d("getLiveNotWatchExistData=======>" + paramsJson); | ||
| 1562 | +// getLiveNotWatchExistViewModel.getLiveNotWatchExistData(paramsJson); | ||
| 1563 | +// myAskMarkViewModel.getMyAskMarkData(); | ||
| 1564 | +// mailGroupViewModel.getMailList(); | ||
| 1565 | +// } | ||
| 1566 | + | ||
| 1567 | + /** | ||
| 1568 | + * 未登录状态 | ||
| 1569 | + */ | ||
| 1570 | + private void doUnLogin() { | ||
| 1571 | + unLoginTopLayout.setVisibility(View.VISIBLE); | ||
| 1572 | + topLoginLayout.setVisibility(View.GONE); | ||
| 1573 | + lvTv.setVisibility(View.GONE); | ||
| 1574 | + askRedView.setVisibility(View.GONE); | ||
| 1575 | + avatarFrameImg.setVisibility(View.GONE); | ||
| 1576 | + avatarFrameHasSet = false; | ||
| 1577 | + levelHeadUrl = ""; | ||
| 1578 | + secLayout.setVisibility(View.GONE); | ||
| 1579 | + hiddenCreatorCenterLayout(); | ||
| 1580 | + } | ||
| 1581 | + | ||
| 1582 | + /** | ||
| 1583 | + * 处理等级升级引导 | ||
| 1584 | + */ | ||
| 1585 | +// private void handleLevelUpgradeGuide(){ | ||
| 1586 | +// boolean levelUpgradeGuideIsShow = SpUtils.getLevelUpgradeGuideIsShow(); | ||
| 1587 | +// if(levelUpgradeGuideIsShow){ | ||
| 1588 | +// return; | ||
| 1589 | +// } | ||
| 1590 | +// String vistorMergeDataTag = SpUtils.getVistorMergeDataTag(); | ||
| 1591 | +// if(StringUtils.isEqual("0",vistorMergeDataTag)){ | ||
| 1592 | +// //没有合并过 | ||
| 1593 | +// boolean isShowDataDialog = false; | ||
| 1594 | +// //游客评论 | ||
| 1595 | +// String touristFirstCommentTime = SpUtils.getTouristFirstCommentTime(); | ||
| 1596 | +// if (!StringUtils.isEmpty(touristFirstCommentTime)) { | ||
| 1597 | +// isShowDataDialog = true; | ||
| 1598 | +// } | ||
| 1599 | +// //直播的评论时间 | ||
| 1600 | +// if (!StringUtils.isEmpty(SpUtils.getLiveFirstCommentTime())) { | ||
| 1601 | +// isShowDataDialog = true; | ||
| 1602 | +// } | ||
| 1603 | +// // 检测是否有已读数据 | ||
| 1604 | +// if (!isShowDataDialog) { | ||
| 1605 | +// List<ReadContentModel> readContentModelList = ReadContentHelper.getInstance(AppContext.getContext()).queryAll(); | ||
| 1606 | +// if (readContentModelList.size() > 0) { | ||
| 1607 | +// isShowDataDialog = true; | ||
| 1608 | +// } | ||
| 1609 | +// } | ||
| 1610 | +// if (isShowDataDialog) { | ||
| 1611 | +// //有游客数据需要合并 | ||
| 1612 | +// return; | ||
| 1613 | +// } | ||
| 1614 | +// } | ||
| 1615 | +// showLevelUpGradeGuideDialog(); | ||
| 1616 | +// } | ||
| 1617 | + | ||
| 1618 | + /** | ||
| 1619 | + * 展示等级升级引导弹框 | ||
| 1620 | + */ | ||
| 1621 | + private void showLevelUpGradeGuideDialog(){ | ||
| 1622 | +// if(!isRealVisible()){ | ||
| 1623 | +// return; | ||
| 1624 | +// } | ||
| 1625 | +// boolean levelUpgradeGuideIsShow = SpUtils.getLevelUpgradeGuideIsShow(); | ||
| 1626 | +// if(!levelUpgradeGuideIsShow && StringUtils.isNotBlank(levelHeadUrl)){ | ||
| 1627 | +// if(mScrollView != null){ | ||
| 1628 | +// mScrollView.scrollTo(0,0); | ||
| 1629 | +// } | ||
| 1630 | +// SpUtils.setLevelUpgradeGuideIsShow(true); | ||
| 1631 | +// new LevelUpGradeGuideDialog(activity).builder(levelHeadUrl).show(); | ||
| 1632 | +// } | ||
| 1633 | + } | ||
| 1634 | + | ||
| 1635 | + /** | ||
| 1636 | + * 设置个人中心第二部分数据:评论关注数据等 | ||
| 1637 | + */ | ||
| 1638 | + private void seUserData(PersonalInfoBean user) { | ||
| 1639 | + if (user == null) { | ||
| 1640 | + return; | ||
| 1641 | + } | ||
| 1642 | + String userType = StringUtils.getStringValue(user.getUserType()); | ||
| 1643 | + try { | ||
| 1644 | + //更新用户类型 | ||
| 1645 | + int mUserType = Integer.parseInt(userType); | ||
| 1646 | + if(mUserType != SpUtils.getUserType()){ | ||
| 1647 | + SpUtils.saveUserType(mUserType); | ||
| 1648 | + } | ||
| 1649 | + } catch (NumberFormatException e) { | ||
| 1650 | + e.printStackTrace(); | ||
| 1651 | + } | ||
| 1652 | + | ||
| 1653 | + //更新性别 | ||
| 1654 | + String sex = user.getSex(); | ||
| 1655 | + if(StringUtils.isNotBlank(sex) && !StringUtils.isEqual(sex,SpUtils.getSex())){ | ||
| 1656 | + SpUtils.saveSex(sex); | ||
| 1657 | + } | ||
| 1658 | + | ||
| 1659 | + String userHeadPhoto = user.getRmhHeadUrl(); | ||
| 1660 | + if (!StringUtils.isBlank(userHeadPhoto)) { | ||
| 1661 | + SpUtils.saveHeadPhotoUrl(userHeadPhoto); | ||
| 1662 | + } | ||
| 1663 | + //头像 | ||
| 1664 | + if (!"1".equals(userType)){ | ||
| 1665 | + ImageUtils.getInstance(). | ||
| 1666 | + loadImageCircle(headImg, userHeadPhoto, R.mipmap.icon_default_head_mater); | ||
| 1667 | + }else { | ||
| 1668 | + ImageUtils.getInstance(). | ||
| 1669 | + loadImageCircle(headImg, userHeadPhoto, R.mipmap.icon_default_head); | ||
| 1670 | + } | ||
| 1671 | + | ||
| 1672 | + | ||
| 1673 | + //认证图标 | ||
| 1674 | + String authIcon = user.getAuthIcon(); | ||
| 1675 | + if (StringUtils.isEmpty(authIcon)) { | ||
| 1676 | + vipLayout.setVisibility(View.GONE); | ||
| 1677 | + } else { | ||
| 1678 | + vipLayout.setVisibility(View.VISIBLE); | ||
| 1679 | + ImageUtils.getInstance(). | ||
| 1680 | + loadImageCircle(vipIV, authIcon, 0); | ||
| 1681 | + } | ||
| 1682 | + | ||
| 1683 | + //荣誉头像框 | ||
| 1684 | + String honoraryIcon = user.getHonoraryIcon(); | ||
| 1685 | + if (!StringUtils.isBlank(honoraryIcon)) { | ||
| 1686 | + ImageUtils.getInstance(). | ||
| 1687 | + loadImage(avatarFrameImg, honoraryIcon, 0); | ||
| 1688 | + avatarFrameImg.setVisibility(View.VISIBLE); | ||
| 1689 | + avatarFrameHasSet = true; | ||
| 1690 | + } else if (StringUtils.isEmpty(authIcon)){ | ||
| 1691 | + //最佳评论员头像框(有加V,则不展示最佳评论员头像框) | ||
| 1692 | + String avatarFrame = user.getAvatarFrame(); | ||
| 1693 | + if (!StringUtils.isBlank(avatarFrame)) { | ||
| 1694 | + //头像 | ||
| 1695 | + ImageUtils.getInstance(). | ||
| 1696 | + loadImage(avatarFrameImg, avatarFrame, 0); | ||
| 1697 | + avatarFrameImg.setVisibility(View.VISIBLE); | ||
| 1698 | + avatarFrameHasSet = true; | ||
| 1699 | + } | ||
| 1700 | + } | ||
| 1701 | + | ||
| 1702 | + if (!Constants.USER_TYPE_COMMON.equals(userType) && !avatarFrameHasSet) { | ||
| 1703 | + //是创作者且没有设置头像框 | ||
| 1704 | + avatarFrameImg.setVisibility(View.GONE); | ||
| 1705 | + } | ||
| 1706 | + | ||
| 1707 | +// userLevelViewModel.queryUserLevel(); | ||
| 1708 | + | ||
| 1709 | + if (StringUtils.isEmpty(user.getRmhName())) { | ||
| 1710 | + nameLayout.setVisibility(View.GONE); | ||
| 1711 | + } else { | ||
| 1712 | + nameLayout.setVisibility(View.VISIBLE); | ||
| 1713 | + //名称 | ||
| 1714 | + nameTv.setText(user.getRmhName()); | ||
| 1715 | + //更新sp中userName | ||
| 1716 | + SpUtils.saveUserName(user.getRmhName()); | ||
| 1717 | + } | ||
| 1718 | + | ||
| 1719 | + if (!StringUtils.isBlank(userType) && !Constants.USER_TYPE_COMMON.equals(userType) && !StringUtils.isBlank(user.getRmhId())) { | ||
| 1720 | + SpUtils.saveCreatorId(user.getRmhId()); | ||
| 1721 | + } | ||
| 1722 | + //普通用户没有扫一扫 | ||
| 1723 | + if (Constants.USER_TYPE_COMMON.equals(userType)){ | ||
| 1724 | +// scanLayout.setVisibility(View.GONE); | ||
| 1725 | + } | ||
| 1726 | + | ||
| 1727 | + //创作者中心模块 | ||
| 1728 | + hiddenCreatorCenterLayout(); | ||
| 1729 | + if(Constants.publishHideSwitch){ | ||
| 1730 | + //“移动生产隐藏“开关为关 | ||
| 1731 | + return; | ||
| 1732 | + } | ||
| 1733 | + if (StringUtils.isBlank(userType) || StringUtils.isEqual("1", userType)) { | ||
| 1734 | + //不是创作者,不展示创作者模块 | ||
| 1735 | + return; | ||
| 1736 | + } | ||
| 1737 | + if ("1".equals(BaseConstants.speakControl)) { | ||
| 1738 | + //禁止发稿 | ||
| 1739 | + return; | ||
| 1740 | + } | ||
| 1741 | + | ||
| 1742 | + String cnContentPublish = StringUtils.getStringValue(user.getCnContentPublish()); | ||
| 1743 | + if (StringUtils.isEqual("1",cnContentPublish)) { | ||
| 1744 | + //中文版内容分发权限 0:正常,1:关闭 | ||
| 1745 | + return; | ||
| 1746 | + } | ||
| 1747 | + | ||
| 1748 | + int count = 0; | ||
| 1749 | + if (StringUtils.isEqual("0", user.getVideoCreation())) { | ||
| 1750 | + //视频 | ||
| 1751 | + count++; | ||
| 1752 | + ViewUtils.setVisible(publishVideoLayout, true); | ||
| 1753 | + } | ||
| 1754 | + if (StringUtils.isEqual("0", user.getVideoCollectionCreation())) { | ||
| 1755 | + //视频合集 | ||
| 1756 | + } | ||
| 1757 | + if (StringUtils.isEqual("0", user.getArticleCreation())) { | ||
| 1758 | + //图文 | ||
| 1759 | + count++; | ||
| 1760 | + ViewUtils.setVisible(publishArticleLayout, true); | ||
| 1761 | + } | ||
| 1762 | + if (StringUtils.isEqual("0", user.getPictureCollectionCreation())) { | ||
| 1763 | + //图集 | ||
| 1764 | + count++; | ||
| 1765 | + ViewUtils.setVisible(publishAtlasLayout, true); | ||
| 1766 | + } | ||
| 1767 | + if (StringUtils.isEqual("0", user.getDynamicCreation())) { | ||
| 1768 | + //动态 | ||
| 1769 | + count++; | ||
| 1770 | + ViewUtils.setVisible(publishDynamicLayout, true); | ||
| 1771 | + } | ||
| 1772 | + if (count > 0) { | ||
| 1773 | + ViewUtils.setVisible(creatorCenterLayout, true); | ||
| 1774 | + } | ||
| 1775 | + } | ||
| 1776 | + | ||
| 1777 | + /** | ||
| 1778 | + * 隐藏创作者中心相关布局 | ||
| 1779 | + */ | ||
| 1780 | + private void hiddenCreatorCenterLayout() { | ||
| 1781 | + if (ViewUtils.isVisible(creatorCenterLayout)) { | ||
| 1782 | + creatorCenterLayout.setVisibility(View.GONE); | ||
| 1783 | + } | ||
| 1784 | + if (ViewUtils.isVisible(publishVideoLayout)) { | ||
| 1785 | + publishVideoLayout.setVisibility(View.GONE); | ||
| 1786 | + } | ||
| 1787 | + if (ViewUtils.isVisible(publishArticleLayout)) { | ||
| 1788 | + publishArticleLayout.setVisibility(View.GONE); | ||
| 1789 | + } | ||
| 1790 | + if (ViewUtils.isVisible(publishDynamicLayout)) { | ||
| 1791 | + publishDynamicLayout.setVisibility(View.GONE); | ||
| 1792 | + } | ||
| 1793 | + if (ViewUtils.isVisible(publishAtlasLayout)) { | ||
| 1794 | + publishAtlasLayout.setVisibility(View.GONE); | ||
| 1795 | + } | ||
| 1796 | + } | ||
| 1797 | + | ||
| 1798 | + /** | ||
| 1799 | + * 直播预约小红点 | ||
| 1800 | + * | ||
| 1801 | + * @param liveExistNotWatchBean | ||
| 1802 | + */ | ||
| 1803 | + private void getLiveNotWatchExistSuccess(LiveExistNotWatchBean liveExistNotWatchBean) { | ||
| 1804 | + if (liveExistNotWatchBean == null) { | ||
| 1805 | + return; | ||
| 1806 | + } | ||
| 1807 | + if (liveExistNotWatchBean.isExistNotWatch()) { | ||
| 1808 | + //存在 已预约且未观看且直播中的直播 | ||
| 1809 | + subscribeRedView.setVisibility(View.VISIBLE); | ||
| 1810 | + } else { | ||
| 1811 | + //不存在 已预约且未观看且直播中的直播 | ||
| 1812 | + subscribeRedView.setVisibility(View.GONE); | ||
| 1813 | + } | ||
| 1814 | + List<LiveSubscribeBean> endLiveList = liveExistNotWatchBean.getEndLiveList(); | ||
| 1815 | + if (ArrayUtils.isEmpty(endLiveList)) { | ||
| 1816 | + return; | ||
| 1817 | + } | ||
| 1818 | + for (int i = 0; i < endLiveList.size(); i++) { | ||
| 1819 | + //删除缓存中结束的直播数据 | ||
| 1820 | + LiveSubscribeBean liveSubscribeBean = endLiveList.get(i); | ||
| 1821 | + String keys = SpUtils.getUserId() + "_" + liveSubscribeBean.getLiveId() + "_" + | ||
| 1822 | + liveSubscribeBean.getRelationId(); | ||
| 1823 | +// SubscribeLivingHelper.getInstance(getContext()).deleteByKeys(keys); | ||
| 1824 | + } | ||
| 1825 | + } | ||
| 1826 | + | ||
| 1827 | + /** | ||
| 1828 | + * 切换夜间模式 | ||
| 1829 | + */ | ||
| 1830 | +// private void switchNightMode() { | ||
| 1831 | +// //创建弹窗 | ||
| 1832 | +// if (nightModeDialog == null) { | ||
| 1833 | +// List<NightModeBean> nightModeBeans = new ArrayList<>(); | ||
| 1834 | +// //日间模式 | ||
| 1835 | +// NightModeBean bean = new NightModeBean(); | ||
| 1836 | +// bean.nightmodeWord = SpUtils.LIGHT_MODE; | ||
| 1837 | +// bean.nightMode = AppCompatDelegate.MODE_NIGHT_NO; | ||
| 1838 | +// bean.showLine = true; | ||
| 1839 | +// nightModeBeans.add(bean); | ||
| 1840 | +// //夜间模式 | ||
| 1841 | +// bean = new NightModeBean(); | ||
| 1842 | +// bean.nightmodeWord = SpUtils.NIGHT_MODE; | ||
| 1843 | +// bean.nightMode = AppCompatDelegate.MODE_NIGHT_YES; | ||
| 1844 | +// bean.showLine = true; | ||
| 1845 | +// nightModeBeans.add(bean); | ||
| 1846 | +// //跟随系统(二级页面跟随系统,系统切换有问题,暂去掉) | ||
| 1847 | +// /*bean = new NightModeBean(); | ||
| 1848 | +// bean.nightmodeWord = SpUtils.FOLLOWUP_SYSTEM; | ||
| 1849 | +// bean.nightMode = AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM; | ||
| 1850 | +// nightModeBeans.add(bean);*/ | ||
| 1851 | +// | ||
| 1852 | +// AlertDialog.Builder builder = new AlertDialog.Builder(activity); | ||
| 1853 | +// builder.setContentView(R.layout.nightmode_dialog); | ||
| 1854 | +// builder.fullWidth(); | ||
| 1855 | +// builder.fromBottom(false); | ||
| 1856 | +// builder.setAnimations(R.style.BottomShowAnimation); | ||
| 1857 | +// nightModeDialog = builder.show(); | ||
| 1858 | +// RecyclerView rvproduct = nightModeDialog.findViewById(R.id.rv_product); | ||
| 1859 | +// rvproduct.setLayoutManager(new LinearLayoutManager(activity)); | ||
| 1860 | +// AppCompatTextView tvCancel = nightModeDialog.findViewById(R.id.tvCancel); | ||
| 1861 | +// tvCancel.setOnClickListener(new View.OnClickListener() { | ||
| 1862 | +// @Override | ||
| 1863 | +// public void onClick(View v) { | ||
| 1864 | +// nightModeDialog.dismiss(); | ||
| 1865 | +// } | ||
| 1866 | +// }); | ||
| 1867 | +// //设置列表数据 | ||
| 1868 | +// nightModeAdapter = new NightModeAdapter(nightModeBeans); | ||
| 1869 | +// rvproduct.setAdapter(nightModeAdapter); | ||
| 1870 | +// nightModeAdapter.setOnItemClickListener(new OnItemClickListener() { | ||
| 1871 | +// @Override | ||
| 1872 | +// public void onItemClick(BaseQuickAdapter baseQuickAdapter, View view, int i) { | ||
| 1873 | +// //更换了模式 | ||
| 1874 | +// if (!nightModeBeans.get(i).nightmodeWord.equals(SpUtils.getNightMode())) { | ||
| 1875 | +// //切换模式 | ||
| 1876 | +// try { | ||
| 1877 | +// if(i == 1){ | ||
| 1878 | +// Constants.isNightMode = true; | ||
| 1879 | +// } | ||
| 1880 | +// SpUtils.saveNightMode(nightModeBeans.get(i).nightmodeWord); | ||
| 1881 | +// AppCompatActivity appCompatActivity = (AppCompatActivity) activity; | ||
| 1882 | +// appCompatActivity.getDelegate().setLocalNightMode(nightModeBeans.get(i).nightMode); | ||
| 1883 | +// AppCompatDelegate.setDefaultNightMode(nightModeBeans.get(i).nightMode); | ||
| 1884 | +//// LiveDataBus.getInstance().with(EventConstants.EVENT_GLOBALLISTENING).postValue(1); | ||
| 1885 | +// } catch (Exception e) { | ||
| 1886 | +// throw new RuntimeException(e); | ||
| 1887 | +// } | ||
| 1888 | +// } | ||
| 1889 | +// String nightText = "日间模式"; | ||
| 1890 | +// if(StringUtils.isEqual(SpUtils.NIGHT_MODE,SpUtils.getNightMode())){ | ||
| 1891 | +// nightText = "夜间模式"; | ||
| 1892 | +// }else if(StringUtils.isEqual(SpUtils.FOLLOWUP_SYSTEM,SpUtils.getNightMode())){ | ||
| 1893 | +// nightText = "跟随系统"; | ||
| 1894 | +// } | ||
| 1895 | +// nightModeTv.setText(nightText); | ||
| 1896 | +// nightModeDialog.dismiss(); | ||
| 1897 | +// } | ||
| 1898 | +// }); | ||
| 1899 | +// } else { | ||
| 1900 | +// nightModeDialog.show(); | ||
| 1901 | +// if(nightModeAdapter != null){ | ||
| 1902 | +// nightModeAdapter.notifyDataSetChanged(); | ||
| 1903 | +// } | ||
| 1904 | +// } | ||
| 1905 | +// } | ||
| 1906 | + | ||
| 1907 | + @Override | ||
| 1908 | + public void onDestroy() { | ||
| 1909 | + super.onDestroy(); | ||
| 1910 | + } | ||
| 1911 | +} |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 3 | + <item android:color="#F6F6F6"></item> | ||
| 4 | + <item android:state_selected="true" android:color="#ED2800"></item> | ||
| 5 | + <item android:state_selected="false" android:color="#F6F6F6"></item> | ||
| 6 | +</selector> |
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
3.05 KB
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
457 Bytes
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
1.02 KB
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
-
Please register or login to post a comment