Commit 3c4cd3a4 authored by jyx's avatar jyx

新版好友邀请页面

parent 92d381f9
...@@ -131,12 +131,12 @@ android { ...@@ -131,12 +131,12 @@ android {
dependencies { dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.0' implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.recyclerview:recyclerview:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.android.material:material:1.0.0' implementation 'com.google.android.material:material:1.2.1'
// 网络请求 // 网络请求
implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.squareup.retrofit2:retrofit:2.7.1'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0' implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
// 异步 // 异步
implementation "io.reactivex.rxjava2:rxjava:2.2.6" implementation "io.reactivex.rxjava2:rxjava:2.2.6"
...@@ -145,16 +145,16 @@ dependencies { ...@@ -145,16 +145,16 @@ dependencies {
implementation 'com.readystatesoftware.systembartint:systembartint:1.0.3' implementation 'com.readystatesoftware.systembartint:systembartint:1.0.3'
implementation 'com.gyf.immersionbar:immersionbar:2.3.3-beta15' implementation 'com.gyf.immersionbar:immersionbar:2.3.3-beta15'
// okhttp3日志 // okhttp3日志
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0' implementation 'com.squareup.okhttp3:logging-interceptor:4.0.0'
implementation 'com.squareup.okhttp3:okhttp:3.14.2' implementation 'com.squareup.okhttp3:okhttp:4.1.0'
implementation 'com.orhanobut:logger:2.1.1' implementation 'com.orhanobut:logger:2.2.0'
// 权限 // 权限
implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.9.3@aar' implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.9.3@aar'
// 图片加载 // 图片加载
implementation 'com.github.bumptech.glide:glide:4.9.0' implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
// 65536 // 65536
implementation 'androidx.multidex:multidex:2.0.0' implementation 'androidx.multidex:multidex:2.0.1'
// jsbridge // jsbridge
implementation 'com.github.lzyzsd:jsbridge:1.0.4' implementation 'com.github.lzyzsd:jsbridge:1.0.4'
//下拉刷新 //下拉刷新
...@@ -217,23 +217,22 @@ dependencies { ...@@ -217,23 +217,22 @@ dependencies {
implementation files("libs/qq_x5.jar") implementation files("libs/qq_x5.jar")
// 鱼丸盒子 // 鱼丸盒子
implementation(name: 'xzzq_ywsdk_1.1.0', ext: 'aar') implementation(name: 'xzzq_ywsdk_1.1.0', ext: 'aar')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.0"
implementation 'com.liulishuo.filedownloader:library:1.7.7' implementation 'com.liulishuo.filedownloader:library:1.7.7'
implementation "org.greenrobot:eventbus:3.1.0-RC" implementation "org.greenrobot:eventbus:3.1.0-RC"
// 掌阅书城 // 掌阅书城
implementation (name: 'iReader-release-1.0.1', ext: 'aar') implementation(name: 'iReader-release-1.0.1', ext: 'aar')
implementation 'com.alibaba:fastjson:1.2.11' implementation 'com.alibaba:fastjson:1.2.11'
implementation 'androidx.annotation:annotation:1.0.0' implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.core:core:1.0.0' implementation 'androidx.core:core:1.3.2'
implementation 'androidx.fragment:fragment:1.0.0' implementation 'androidx.fragment:fragment:1.2.5'
// 变现猫 // 变现猫
implementation(name: 'bxmsdk-release-3.0.0', ext: 'aar') implementation(name: 'bxmsdk-release-3.0.0', ext: 'aar')
implementation 'com.android.support:support-v4:28.0.0' implementation 'com.android.support:support-v4:28.0.0'
testImplementation 'junit:junit:4.13'
testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
} }
...@@ -38,17 +38,17 @@ ...@@ -38,17 +38,17 @@
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config" android:networkSecurityConfig="@xml/network_security_config"
android:requestLegacyExternalStorage="true"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/CustomAppTheme" android:theme="@style/CustomAppTheme"
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
android:requestLegacyExternalStorage="true"
tools:ignore="GoogleAppIndexingWarning"> tools:ignore="GoogleAppIndexingWarning">
<!-- 适配小米(xiaomi)刘海屏 --> <!-- 适配小米(xiaomi)刘海屏 -->
<meta-data <meta-data
android:name="android.max_aspect" android:name="android.max_aspect"
android:value="2.4" android:value="2.4"
tools:replace="android:value"/> tools:replace="android:value" />
<meta-data <meta-data
android:name="android.notch_support" android:name="android.notch_support"
android:value="true" /> android:value="true" />
...@@ -121,22 +121,30 @@ ...@@ -121,22 +121,30 @@
android:name=".ui.activitys.AboutusActivity" android:name=".ui.activitys.AboutusActivity"
android:screenOrientation="portrait" /> android:screenOrientation="portrait" />
<activity android:name=".ui.activitys.GuideActivity" /> <activity android:name=".ui.activitys.GuideActivity" />
<activity android:name=".ui.activitys.LiebaoGameActivity" <activity
android:screenOrientation="portrait"/> android:name=".ui.activitys.LiebaoGameActivity"
<activity android:name=".ui.activitys.DrawcashActivity" android:screenOrientation="portrait" />
android:screenOrientation="portrait"/> <activity
<activity android:name=".ui.activitys.WaterActivity" android:name=".ui.activitys.DrawcashActivity"
android:screenOrientation="portrait"/> android:screenOrientation="portrait" />
<activity android:name=".ui.activitys.WalkActivity" <activity
android:screenOrientation="portrait"/> android:name=".ui.activitys.WaterActivity"
<activity android:name=".ui.activitys.EraseActivity" android:screenOrientation="portrait" />
android:screenOrientation="portrait"/> <activity
<activity android:name=".ui.activitys.DrawcashRecordActivity" android:name=".ui.activitys.WalkActivity"
android:screenOrientation="portrait"/> android:screenOrientation="portrait" />
<activity android:name=".ui.activitys.CoinRecordActivity" <activity
android:screenOrientation="portrait"/> android:name=".ui.activitys.EraseActivity"
<activity android:name=".ui.activitys.SplashADActivity" android:screenOrientation="portrait" />
android:screenOrientation="portrait"/> <activity
android:name=".ui.activitys.DrawcashRecordActivity"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.CoinRecordActivity"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.SplashADActivity"
android:screenOrientation="portrait" />
<service <service
android:name=".service.UpdateService" android:name=".service.UpdateService"
...@@ -262,6 +270,16 @@ ...@@ -262,6 +270,16 @@
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation="landscape" /> android:screenOrientation="landscape" />
<!-- 变现猫 -->
<!-- <provider-->
<!-- android:name="android.support.v4.content.FileProvider"-->
<!-- android:authorities="${applicationId}.fileprovider"-->
<!-- android:exported="false"-->
<!-- android:grantUriPermissions="true">-->
<!-- <meta-data-->
<!-- android:name="android.support.FILE_PROVIDER_PATHS"-->
<!-- android:resource="@xml/new_app_file_paths" />-->
<!-- </provider>-->
</application> </application>
</manifest> </manifest>
\ No newline at end of file
...@@ -31,9 +31,13 @@ class InitAppService : IntentService("InitializeService") { ...@@ -31,9 +31,13 @@ class InitAppService : IntentService("InitializeService") {
* 开启intentService * 开启intentService
*/ */
fun start(context: Context) { fun start(context: Context) {
val intent = Intent(context, InitAppService::class.java) try {
intent.action = ACTION_INIT val intent = Intent(context, InitAppService::class.java)
context.startService(intent) intent.action = ACTION_INIT
context.startService(intent)
} catch (e: IllegalStateException) {
e.printStackTrace()
}
} }
} }
...@@ -101,6 +105,7 @@ class InitAppService : IntentService("InitializeService") { ...@@ -101,6 +105,7 @@ class InitAppService : IntentService("InitializeService") {
* 参数5:Push推送业务的secret,需要集成Push功能时必须传入Push的secret,否则传空。 * 参数5:Push推送业务的secret,需要集成Push功能时必须传入Push的secret,否则传空。
*/ */
UMConfigure.init(context, CommonUtils.getAppMetaData(MintsApplication.getContext(), "UMENG_KEY"), CommonUtils.getAppMetaData(context, "CHANNEL_NAME"), UMConfigure.DEVICE_TYPE_PHONE, "") UMConfigure.init(context, CommonUtils.getAppMetaData(MintsApplication.getContext(), "UMENG_KEY"), CommonUtils.getAppMetaData(context, "CHANNEL_NAME"), UMConfigure.DEVICE_TYPE_PHONE, "")
UMConfigure.setLogEnabled(true)
} }
/** /**
......
...@@ -6,7 +6,6 @@ import android.os.Build; ...@@ -6,7 +6,6 @@ import android.os.Build;
import android.text.TextUtils; import android.text.TextUtils;
import android.webkit.WebView; import android.webkit.WebView;
import androidx.annotation.NonNull;
import androidx.localbroadcastmanager.content.LocalBroadcastManager; import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.multidex.MultiDex; import androidx.multidex.MultiDex;
import androidx.multidex.MultiDexApplication; import androidx.multidex.MultiDexApplication;
...@@ -32,8 +31,6 @@ import com.yilan.sdk.ui.configs.CommentConfig; ...@@ -32,8 +31,6 @@ import com.yilan.sdk.ui.configs.CommentConfig;
import com.yilan.sdk.ui.configs.FeedConfig; import com.yilan.sdk.ui.configs.FeedConfig;
import com.yilan.sdk.ui.configs.YLUIConfig; import com.yilan.sdk.ui.configs.YLUIConfig;
import org.jetbrains.annotations.NotNull;
import rx.Scheduler; import rx.Scheduler;
import rx.schedulers.Schedulers; import rx.schedulers.Schedulers;
...@@ -134,12 +131,7 @@ public class MintsApplication extends MultiDexApplication { ...@@ -134,12 +131,7 @@ public class MintsApplication extends MultiDexApplication {
// BxmManager.INSTANCE.initBxm(this); // BxmManager.INSTANCE.initBxm(this);
} }
private MiitHelper.AppIdsUpdater appIdsUpdater = new MiitHelper.AppIdsUpdater() { private MiitHelper.AppIdsUpdater appIdsUpdater = ids -> OAID = ids;
@Override
public void OnIdsAvalid(@NonNull String ids) {
OAID = ids;
}
};
/** /**
* 移动安装联盟 获取OAID等设备标识符 * 移动安装联盟 获取OAID等设备标识符
...@@ -159,12 +151,7 @@ public class MintsApplication extends MultiDexApplication { ...@@ -159,12 +151,7 @@ public class MintsApplication extends MultiDexApplication {
*/ */
private void initOaid() { private void initOaid() {
try { try {
new OaidManager(new OaidManager.AppIdsUpdater() { new OaidManager(ids -> OAID = ids).InitSdk(this);
@Override
public void OnIdsAvalid(@NotNull String ids) {
OAID = ids;
}
}).InitSdk(this);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
LogUtil.e(e); LogUtil.e(e);
...@@ -252,8 +239,8 @@ public class MintsApplication extends MultiDexApplication { ...@@ -252,8 +239,8 @@ public class MintsApplication extends MultiDexApplication {
userID = "0"; userID = "0";
} }
String appid = ""; String appid;
String appSecret = ""; String appSecret;
if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) {
appid = "1725"; appid = "1725";
appSecret = "0yzizbqwyjt104gsdukmto53qclo9ljs"; appSecret = "0yzizbqwyjt104gsdukmto53qclo9ljs";
......
package com.mints.goodmoney.mvp.model;
import java.io.Serializable;
import java.util.List;
public class FriendHallMsgBean implements Serializable {
/**
* titleMsg : 6元
* button :
* rate : 1:?
* contribution_yesterday : 0.18
* periods : 第20201113期
* cashMsg : 未达目标,今日加油
* list : [{"id":6,"sid":2031418094401000000,"date":"2020-11-14","level":2,"contribution":0.2,"status":0,"name":"186****1558","head":null}]
* contribution_today : 0.2
* cash : 0
* status : 1
*/
private String titleMsg;
private String button;
private String rate;
private double contribution_yesterday;
private String periods;
private String cashMsg;
private double contribution_today;
private String cash;
private int status;
private List<ListBean> list;
public String getTitleMsg() {
return titleMsg;
}
public void setTitleMsg(String titleMsg) {
this.titleMsg = titleMsg;
}
public String getButton() {
return button;
}
public void setButton(String button) {
this.button = button;
}
public String getRate() {
return rate;
}
public void setRate(String rate) {
this.rate = rate;
}
public double getContribution_yesterday() {
return contribution_yesterday;
}
public void setContribution_yesterday(double contribution_yesterday) {
this.contribution_yesterday = contribution_yesterday;
}
public String getPeriods() {
return periods;
}
public void setPeriods(String periods) {
this.periods = periods;
}
public String getCashMsg() {
return cashMsg;
}
public void setCashMsg(String cashMsg) {
this.cashMsg = cashMsg;
}
public double getContribution_today() {
return contribution_today;
}
public void setContribution_today(double contribution_today) {
this.contribution_today = contribution_today;
}
public String getCash() {
return cash;
}
public void setCash(String cash) {
this.cash = cash;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public List<ListBean> getList() {
return list;
}
public void setList(List<ListBean> list) {
this.list = list;
}
public static class ListBean implements Serializable {
/**
* id : 6
* sid : 2031418094401000000
* date : 2020-11-14
* level : 2
* contribution : 0.2
* status : 0
* name : 186****1558
* head : null
*/
private int id;
private long sid;
private String date;
private int level;
private double contribution;
private int status;
private String name;
private String head = null;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public long getSid() {
return sid;
}
public void setSid(long sid) {
this.sid = sid;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
public double getContribution() {
return contribution;
}
public void setContribution(double contribution) {
this.contribution = contribution;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getHead() {
return head;
}
public void setHead(String head) {
this.head = head;
}
}
}
...@@ -3,7 +3,6 @@ package com.mints.goodmoney.mvp.presenters; ...@@ -3,7 +3,6 @@ package com.mints.goodmoney.mvp.presenters;
import android.text.TextUtils; import android.text.TextUtils;
import com.mints.goodmoney.MintsApplication; import com.mints.goodmoney.MintsApplication;
import com.mints.goodmoney.common.Constant;
import com.mints.goodmoney.common.DeviceInfo; import com.mints.goodmoney.common.DeviceInfo;
import com.mints.goodmoney.manager.AppHttpManager; import com.mints.goodmoney.manager.AppHttpManager;
import com.mints.goodmoney.manager.ShumeiManager; import com.mints.goodmoney.manager.ShumeiManager;
...@@ -16,8 +15,6 @@ import com.mints.goodmoney.utils.DeviceUuidFactory; ...@@ -16,8 +15,6 @@ import com.mints.goodmoney.utils.DeviceUuidFactory;
import com.mints.library.net.neterror.BaseSubscriber; import com.mints.library.net.neterror.BaseSubscriber;
import com.mints.library.net.neterror.Throwable; import com.mints.library.net.neterror.Throwable;
import net.grandcentrix.tray.AppPreferences;
import java.util.HashMap; import java.util.HashMap;
public class DrawcashPresenter extends BasePresenter<DrawcashView> { public class DrawcashPresenter extends BasePresenter<DrawcashView> {
......
package com.mints.goodmoney.mvp.presenters package com.mints.goodmoney.mvp.presenters
import com.mints.goodmoney.common.Constant import com.google.gson.JsonObject
import com.mints.goodmoney.manager.AppHttpManager import com.mints.goodmoney.manager.AppHttpManager
import com.mints.goodmoney.mvp.model.BaseResponse import com.mints.goodmoney.mvp.model.BaseResponse
import com.mints.goodmoney.mvp.model.FriendsTaskBean import com.mints.goodmoney.mvp.model.FriendHallMsgBean
import com.mints.goodmoney.mvp.views.FriendsView import com.mints.goodmoney.mvp.views.FriendsView
import com.mints.library.net.neterror.BaseSubscriber import com.mints.library.net.neterror.BaseSubscriber
import com.mints.library.net.neterror.Throwable import com.mints.library.net.neterror.Throwable
import java.util.HashMap
class FriendsPresenter : BasePresenter<FriendsView>() { class FriendsPresenter : BasePresenter<FriendsView>() {
/** /**
* 世界人民排名 * 世界人民排名
*/ */
fun getLeaders() { // fun getLeaders() {
// AppHttpManager.getInstance(loanApplication)
// .call(loanService.leaders, object : BaseSubscriber<BaseResponse<FriendsTaskBean.FriendsBean>>() {
// override fun onCompleted() {
// if (isLinkView) return
// }
//
// override fun onError(e: Throwable) {
// if (isLinkView) return
// }
//
// override fun onNext(baseResponse: BaseResponse<FriendsTaskBean.FriendsBean>) {
// if (isLinkView) return
// when (baseResponse.status) {
// 200 -> view.getWorldRankSuc(baseResponse.data)
// }
// }
// })
// }
/**
* 好友任务
*/
// fun getFriendsMsg() {
// AppHttpManager.getInstance(loanApplication)
// .call(loanService.friendsMsg, object : BaseSubscriber<BaseResponse<FriendsTaskBean>>() {
// override fun onCompleted() {
// if (isLinkView) return
// }
//
// override fun onError(e: Throwable) {
// if (isLinkView) return
// }
//
// override fun onNext(baseResponse: BaseResponse<FriendsTaskBean>) {
// if (isLinkView) return
// when (baseResponse.status) {
// 200 -> {
// view.getFriendsRankSuc(baseResponse.data)
// }
// }
// }
// })
// }
/**
* 分红奖励信息
*/
fun getFriendHallMsg() {
view.showLoading("加载中...")
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.leaders, object : BaseSubscriber<BaseResponse<FriendsTaskBean.FriendsBean>>() { .call(loanService.friendHallMsg(), object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() {
override fun onCompleted() { override fun onCompleted() {
if (isLinkView) return if (isLinkView) return
view.hideLoading()
} }
override fun onError(e: Throwable) { override fun onError(e: Throwable) {
if (isLinkView) return if (isLinkView) return
view.hideLoading()
} }
override fun onNext(baseResponse: BaseResponse<FriendsTaskBean.FriendsBean>) { override fun onNext(baseResponse: BaseResponse<FriendHallMsgBean>) {
if (isLinkView) return if (isLinkView) return
view.hideLoading()
when (baseResponse.status) { when (baseResponse.status) {
200 -> view.getWorldRankSuc(baseResponse.data) 200 -> {
view.getFriendsHallMsgSuc(baseResponse.data)
}
else -> {
view.showToast("网络出小差儿了")
}
} }
} }
}) })
} }
/** /**
* 好友任务 * 贡献榜单数据
*/ */
fun getFriendsMsg() { fun getContributionLeaders() {
view.showLoading("加载中...")
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.friendsMsg, object : BaseSubscriber<BaseResponse<FriendsTaskBean>>() { .call(loanService.contributionLeaders(), object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() {
override fun onCompleted() { override fun onCompleted() {
if (isLinkView) return if (isLinkView) return
view.hideLoading()
} }
override fun onError(e: Throwable) { override fun onError(e: Throwable) {
if (isLinkView) return if (isLinkView) return
view.hideLoading()
} }
override fun onNext(baseResponse: BaseResponse<FriendsTaskBean>) { override fun onNext(baseResponse: BaseResponse<FriendHallMsgBean>) {
if (isLinkView) return if (isLinkView) return
view.hideLoading()
when (baseResponse.status) { when (baseResponse.status) {
200 -> { 200 -> {
view.getFriendsRankSuc(baseResponse.data) view.getContributionLeadersSuc(baseResponse.data)
}
else -> {
view.showToast(baseResponse.message)
} }
} }
} }
...@@ -60,31 +125,64 @@ class FriendsPresenter : BasePresenter<FriendsView>() { ...@@ -60,31 +125,64 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
} }
/** /**
* 设置邀请成功 * 贡献榜单数据
*
*/ */
fun cmtShareStatus() { fun getContributionOutToCash() {
val vo = HashMap<String, Any>() view.showLoading("加载中...")
vo["carrierType"] = Constant.CHALLENGE_SHAREFRIEND
vo["value"] = "1"
AppHttpManager.getInstance(loanApplication) AppHttpManager.getInstance(loanApplication)
.call(loanService.setStatusInOneDayByCarrierType(vo), object : BaseSubscriber<BaseResponse<Any>>() { .call(loanService.contributionOutToCash(), object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() { override fun onCompleted() {
if (isLinkView) return if (isLinkView) return
view.hideLoading()
} }
override fun onError(e: Throwable) { override fun onError(e: Throwable) {
if (isLinkView) return if (isLinkView) return
view.hideLoading()
} }
override fun onNext(baseResponse: BaseResponse<Any>) { override fun onNext(baseResponse: BaseResponse<JsonObject>) {
if (isLinkView) return if (isLinkView) return
view.hideLoading()
when (baseResponse.status) { when (baseResponse.status) {
// 200 -> baseMsg() 200 -> {
view.getContributionOutToCashSuc()
}
else -> {
view.showToast(baseResponse.message)
}
} }
} }
}) })
} }
/**
* 设置邀请成功
*
*/
// fun cmtShareStatus() {
// val vo = HashMap<String, Any>()
// vo["carrierType"] = Constant.CHALLENGE_SHAREFRIEND
// vo["value"] = "1"
// AppHttpManager.getInstance(loanApplication)
// .call(loanService.setStatusInOneDayByCarrierType(vo), object : BaseSubscriber<BaseResponse<Any>>() {
// override fun onCompleted() {
// if (isLinkView) return
// }
//
// override fun onError(e: Throwable) {
// if (isLinkView) return
// }
//
// override fun onNext(baseResponse: BaseResponse<Any>) {
// if (isLinkView) return
// when (baseResponse.status) {
// 200 -> baseMsg()
// }
// }
// })
// }
} }
\ No newline at end of file
package com.mints.goodmoney.mvp.views package com.mints.goodmoney.mvp.views
import com.mints.goodmoney.mvp.model.FriendsTaskBean import com.mints.goodmoney.mvp.model.FriendHallMsgBean
interface FriendsView : BaseView { interface FriendsView : BaseView {
fun getWorldRankSuc(data: FriendsTaskBean.FriendsBean) // fun getWorldRankSuc(data: FriendsTaskBean.FriendsBean)
//
// fun getFriendsRankSuc(data: FriendsTaskBean)
fun getFriendsRankSuc(data: FriendsTaskBean) fun getFriendsHallMsgSuc(data: FriendHallMsgBean)
// fun getFriendsHallMsgFail()
fun getContributionLeadersSuc(data: FriendHallMsgBean)
// fun getContributionLeadersFail()
fun getContributionOutToCashSuc()
// fun getContributionOutToCash()
} }
...@@ -8,6 +8,7 @@ import com.mints.goodmoney.mvp.model.BannerBean; ...@@ -8,6 +8,7 @@ import com.mints.goodmoney.mvp.model.BannerBean;
import com.mints.goodmoney.mvp.model.BaseResponse; import com.mints.goodmoney.mvp.model.BaseResponse;
import com.mints.goodmoney.mvp.model.DrawcashBean; import com.mints.goodmoney.mvp.model.DrawcashBean;
import com.mints.goodmoney.mvp.model.DrawcashRecordBean; import com.mints.goodmoney.mvp.model.DrawcashRecordBean;
import com.mints.goodmoney.mvp.model.FriendHallMsgBean;
import com.mints.goodmoney.mvp.model.FriendsTaskBean; import com.mints.goodmoney.mvp.model.FriendsTaskBean;
import com.mints.goodmoney.mvp.model.GoldRecordBean; import com.mints.goodmoney.mvp.model.GoldRecordBean;
import com.mints.goodmoney.mvp.model.MainVedioMsgBean; import com.mints.goodmoney.mvp.model.MainVedioMsgBean;
...@@ -344,6 +345,30 @@ public interface LoanService { ...@@ -344,6 +345,30 @@ public interface LoanService {
@POST("api/game/baseMsg") @POST("api/game/baseMsg")
Observable<BaseResponse<JsonObject>> getGameInfo(); Observable<BaseResponse<JsonObject>> getGameInfo();
/**
* 分红奖励数据
*
* @return
*/
@POST("api/friendHallMsg")
Observable<BaseResponse<FriendHallMsgBean>> friendHallMsg();
/**
* 贡献榜单
*
* @return
*/
@POST("api/contributionLeaders")
Observable<BaseResponse<FriendHallMsgBean>> contributionLeaders();
/**
* 收益榜单
*
* @return
*/
@POST("api/contributionOutToCash")
Observable<BaseResponse<JsonObject>> contributionOutToCash();
/** /**
* 默认http工厂 * 默认http工厂
......
package com.mints.goodmoney.ui.adapter
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import androidx.viewpager.widget.PagerAdapter
class FriendsPagerAdapter(recyList: MutableList<RecyclerView>)
: PagerAdapter() {
private val mRecyList: MutableList<RecyclerView> = recyList
override fun getItemPosition(`object`: Any): Int {
// 处理notify方法失效
return POSITION_NONE
}
override fun getCount() = 2
override fun isViewFromObject(view: View, `object`: Any): Boolean {
return view === `object`
}
override fun instantiateItem(container: ViewGroup, position: Int): Any {
val recyclerView = mRecyList[position]
container.addView(mRecyList[position])
return recyclerView
}
override fun destroyItem(container: ViewGroup, position: Int, `object`: Any) {
container.removeView(`object` as View?)
}
override fun getPageTitle(position: Int): CharSequence? {
return if (position == 0) {
"贡献榜"
} else {
"收益榜"
}
}
}
\ No newline at end of file
...@@ -8,11 +8,11 @@ import android.widget.ImageView ...@@ -8,11 +8,11 @@ import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.mints.goodmoney.R import com.mints.goodmoney.R
import com.mints.goodmoney.mvp.model.FriendsTaskBean import com.mints.goodmoney.mvp.model.FriendHallMsgBean
import com.mints.goodmoney.ui.adapter.listener.OnItemClickListener import com.mints.goodmoney.ui.adapter.listener.OnItemClickListener
import com.mints.library.utils.GlideUtils import com.mints.library.utils.GlideUtils
class InvitedAdapter(context: Context, invitedData: MutableList<FriendsTaskBean.FriendsBean.ListBeanX>) : RecyclerView.Adapter<RecyclerView.ViewHolder>() { class InvitedAdapter(context: Context, invitedData: MutableList<FriendHallMsgBean.ListBean>) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
companion object { companion object {
const val HOLDER_TYPE_EMPTY = 0 const val HOLDER_TYPE_EMPTY = 0
...@@ -20,7 +20,7 @@ class InvitedAdapter(context: Context, invitedData: MutableList<FriendsTaskBean. ...@@ -20,7 +20,7 @@ class InvitedAdapter(context: Context, invitedData: MutableList<FriendsTaskBean.
} }
private var mContext: Context = context private var mContext: Context = context
private var invitedData: List<FriendsTaskBean.FriendsBean.ListBeanX> = invitedData private var invitedData: List<FriendHallMsgBean.ListBean> = invitedData
private var mOnItemClickListener: OnItemClickListener? = null private var mOnItemClickListener: OnItemClickListener? = null
...@@ -80,13 +80,13 @@ class InvitedAdapter(context: Context, invitedData: MutableList<FriendsTaskBean. ...@@ -80,13 +80,13 @@ class InvitedAdapter(context: Context, invitedData: MutableList<FriendsTaskBean.
} }
val data = invitedData[position] val data = invitedData[position]
GlideUtils.loadCircleImageView(mContext, data.head, holder.ivAvatar, R.mipmap.ic_avatar_ph, R.mipmap.ic_avatar_ph) GlideUtils.loadCircleImageView(mContext, data.head, holder.ivAvatar, R.mipmap.ic_avatar_ph, R.mipmap.ic_avatar_ph)
if (data.nickName != null) { if (data.name != null) {
holder.tvName.text = data.nickName.substring(0, data.nickName.length - 1) + "*" holder.tvName.text = data.name.substring(0, data.name.length - 1) + "*"
} else { } else {
holder.tvName.text = data.mobile holder.tvName.text = data.name
} }
holder.tvCoin.text = "" + data.sumCoin holder.tvCoin.text = "" + data.contribution
holder.itemView.setOnClickListener { holder.itemView.setOnClickListener {
mOnItemClickListener?.onItemClick(holder.itemView, position) mOnItemClickListener?.onItemClick(holder.itemView, position)
......
package com.mints.goodmoney.ui.fragment package com.mints.goodmoney.ui.fragment
import android.graphics.Typeface import android.text.TextUtils
import android.os.Bundle
import android.view.View import android.view.View
import android.widget.LinearLayout
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.RecyclerView
import androidx.viewpager.widget.ViewPager import androidx.viewpager.widget.ViewPager
import cn.sharesdk.framework.Platform
import cn.sharesdk.framework.ShareSDK
import cn.sharesdk.wechat.friends.Wechat
import com.mints.goodmoney.R import com.mints.goodmoney.R
import com.mints.goodmoney.common.AppConfig import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.UserManager import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.mvp.model.FriendsTaskBean import com.mints.goodmoney.mvp.model.FriendHallMsgBean
import com.mints.goodmoney.mvp.presenters.FriendsPresenter import com.mints.goodmoney.mvp.presenters.FriendsPresenter
import com.mints.goodmoney.mvp.views.FriendsView import com.mints.goodmoney.mvp.views.FriendsView
import com.mints.goodmoney.ui.activitys.AwardActivity import com.mints.goodmoney.ui.adapter.FriendsPagerAdapter
import com.mints.goodmoney.ui.adapter.BannerBaseAdapter
import com.mints.goodmoney.ui.adapter.BannerTaskAdapter
import com.mints.goodmoney.ui.adapter.InvitedAdapter import com.mints.goodmoney.ui.adapter.InvitedAdapter
import com.mints.goodmoney.ui.fragment.base.BaseFragment import com.mints.goodmoney.ui.fragment.base.BaseFragment
import com.mints.goodmoney.ui.widgets.tablayout.TabLayout import com.mints.goodmoney.utils.SpanUtils
import com.mints.goodmoney.utils.ImageUtil
import com.scwang.smartrefresh.layout.api.RefreshLayout import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnRefreshListener import com.scwang.smartrefresh.layout.listener.OnRefreshListener
import kotlinx.android.synthetic.main.banner_view.*
import kotlinx.android.synthetic.main.fragment_main_friends.* import kotlinx.android.synthetic.main.fragment_main_friends.*
import kotlinx.android.synthetic.main.header_layout.* import kotlinx.android.synthetic.main.header_layout.*
...@@ -35,16 +27,23 @@ import kotlinx.android.synthetic.main.header_layout.* ...@@ -35,16 +27,23 @@ import kotlinx.android.synthetic.main.header_layout.*
* 作者:孟崔广 * 作者:孟崔广
* 时间:2020/9/20 17:30 * 时间:2020/9/20 17:30
*/ */
class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener { class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnClickListener {
private val friendsPresenter by lazy { FriendsPresenter() } private val friendsPresenter by lazy { FriendsPresenter() }
private val userManager by lazy { UserManager.getInstance() } private val userManager by lazy { UserManager.getInstance() }
private var bvTaskData: MutableList<FriendsTaskBean.ChallengeBean.ListBean> = mutableListOf() private var viewPagerAdapter: FriendsPagerAdapter? = null
private var invitedData: MutableList<FriendsTaskBean.FriendsBean.ListBeanX> = mutableListOf()
private var bannerTaskAdapter: BannerTaskAdapter? = null private var friendsData: MutableList<FriendHallMsgBean.ListBean> = mutableListOf()
private var invitedAdapter: InvitedAdapter? = null private var worldData: MutableList<FriendHallMsgBean.ListBean> = mutableListOf()
private val recyList: MutableList<RecyclerView> = mutableListOf()
private var friendsAdapter: InvitedAdapter? = null
private var worldAdapter: InvitedAdapter? = null
private var mFriendsHallMsgBean: FriendHallMsgBean? = null
override fun getContentViewLayoutID() = R.layout.fragment_main_friends override fun getContentViewLayoutID() = R.layout.fragment_main_friends
...@@ -54,95 +53,58 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener { ...@@ -54,95 +53,58 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener {
initView() initView()
initRecy() initRecy()
initBanner()
friendsPresenter.getFriendsMsg() friendsPresenter.getFriendHallMsg()
} }
private fun initView() { private fun initView() {
tv_title.text = "邀请好友" tv_right_subtitle.visibility = View.VISIBLE
view_title1.findViewById<TextView>(R.id.view_title).text = "邀好友 做任务 赚现金" tv_right_subtitle.text = "玩法规则"
img_invite.setOnClickListener { tv_right_subtitle.setTextColor(resources.getColor(R.color.main_bg_text))
invitedFriends() tv_right_subtitle.setOnClickListener { }
} tv_title.text = "分红福利"
iv_question.setOnClickListener(this)
btn_get_bonus.setOnClickListener(this)
tv_right_subtitle.setOnClickListener(this)
} }
private fun initRecy() { private fun initRecy() {
tab_friends.addTab(tab_friends.newTab().setText("我的好友").setTag("my_friends")) val recyFriends = View.inflate(mContext, R.layout.item_friends_recy, null) as RecyclerView
tab_friends.addTab(tab_friends.newTab().setText("世界人民").setTag("world_person")) val recyWorld = View.inflate(mContext, R.layout.item_friends_recy, null) as RecyclerView
tab_friends.setOnTabSelectedListener(object : TabLayout.OnTabSelectedListener { recyFriends.addItemDecoration(DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL))
override fun onTabReselected(tab: TabLayout.Tab) {} recyWorld.addItemDecoration(DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL))
override fun onTabUnselected(tab: TabLayout.Tab) {
val title =
((tab_friends.getChildAt(0) as LinearLayout).getChildAt(tab.position) as LinearLayout).getChildAt(
1
) as TextView
title.apply {
// setTextAppearance(context, R.style.TabLayoutTextSize)
typeface = Typeface.defaultFromStyle(Typeface.NORMAL)
}
}
override fun onTabSelected(tab: TabLayout.Tab) { friendsAdapter = InvitedAdapter(mContext, friendsData)
val title = worldAdapter = InvitedAdapter(mContext, worldData)
((tab_friends.getChildAt(0) as LinearLayout).getChildAt(tab.position) as LinearLayout).getChildAt(
1
) as TextView
title.apply {
// setTextAppearance(context, R.style.BigTabLayoutTextStyle)
typeface = Typeface.defaultFromStyle(Typeface.BOLD)
}
tab.let { recyFriends.adapter = friendsAdapter
if (it.tag == "my_friends") { recyWorld.adapter = worldAdapter
friendsPresenter.getFriendsMsg()
} else {
friendsPresenter.getLeaders()
}
}
}
}) recyList.add(recyFriends)
recyList.add(recyWorld)
recy_friends.addItemDecoration(DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL)) viewPagerAdapter = FriendsPagerAdapter(recyList)
invitedAdapter = InvitedAdapter(mContext, invitedData) view_pager_friends.adapter = viewPagerAdapter
recy_friends.adapter = invitedAdapter view_pager_friends.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
} override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {
}
private fun initBanner() { override fun onPageSelected(position: Int) {
bannerTaskAdapter = BannerTaskAdapter(mContext) if (position == 1) {
bannerTaskAdapter?.setOnPageTouchListener(object : BannerBaseAdapter.OnPageTouchListener<FriendsTaskBean.ChallengeBean.ListBean> { friendsPresenter.getContributionLeaders()
override fun onPageClick(position: Int, t: FriendsTaskBean.ChallengeBean.ListBean) {
if (t.status == 0) {
invitedFriends()
} else { } else {
val bundle = Bundle() friendsPresenter.getFriendHallMsg()
bundle.putInt(Constant.MAIN_CUR_COIN, t.rewardCoin)
bundle.putString(Constant.MAIN_CARRIER_TYPE, t.carrierType)
readyGo(AwardActivity::class.java, bundle)
} }
} }
override fun onPageDown() {} override fun onPageScrollStateChanged(state: Int) {
override fun onPageUp() {}
})
// 滚动到边缘无阴影
bv_friends_task.viewPager.overScrollMode = View.OVER_SCROLL_NEVER
pageIndicatorView.setViewPager(bv_friends_task.viewPager)
bv_friends_task.addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {}
override fun onPageSelected(position: Int) {
pageIndicatorView.selection = position
} }
override fun onPageScrollStateChanged(state: Int) {}
}) })
bv_friends_task.setAdapter(bannerTaskAdapter)
tab_friends.setupWithViewPager(view_pager_friends)
} }
override fun onHiddenChanged(hidden: Boolean) { override fun onHiddenChanged(hidden: Boolean) {
...@@ -157,15 +119,16 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener { ...@@ -157,15 +119,16 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_FRIENDS) { if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_FRIENDS) {
// if (!TextUtils.isEmpty(userManager?.userID)) { if (!TextUtils.isEmpty(userManager?.userID)) {
// friendsPresenter.getFriendsMsg() if (view_pager_friends.currentItem == 0) {
// } friendsPresenter.getFriendHallMsg()
} else {
friendsPresenter.getContributionLeaders()
}
}
} }
// bv_friends_task.startAutoScroll()
} }
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
friendsPresenter.detachView() friendsPresenter.detachView()
...@@ -173,63 +136,95 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener { ...@@ -173,63 +136,95 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener {
override fun onRefresh(refreshLayout: RefreshLayout) { override fun onRefresh(refreshLayout: RefreshLayout) {
if (userManager.userID.isNotEmpty()) { if (userManager.userID.isNotEmpty()) {
friendsPresenter.getFriendsMsg() if (view_pager_friends.currentItem == 0) {
friendsPresenter.getFriendHallMsg()
} else {
friendsPresenter.getContributionLeaders()
}
// view_pager_friends.currentItem = 0
} }
} }
private fun invitedFriends() { private fun generateData(data: FriendHallMsgBean) {
val wechat = ShareSDK.getPlatform(Wechat.NAME) if (data.button != null) {
if (wechat.isClientValid) { btn_get_bonus.text = data.button
}
tv_bonus_date.text = "分红福利奖池-" + data.periods
tv_bonus_sum.text = SpanUtils()
.append("预计总分红 ").setFontSize(32).setForegroundColor(resources.getColor(R.color.black))
.append(data.titleMsg).setFontSize(52).setForegroundColor(resources.getColor(R.color.color_E72C2B))
.append(" 元").setFontSize(32).setForegroundColor(resources.getColor(R.color.black))
.create()
tv_yesterday_bonus.text = SpanUtils()
.append(data.contribution_yesterday.toString()).setForegroundColor(resources.getColor(R.color.color_FF7C00))
.create()
tv_today_bonus.text = SpanUtils()
.append(data.contribution_today.toString()).setForegroundColor(resources.getColor(R.color.color_FF7C00))
.create()
tv_bonus_money.text = SpanUtils()
.append(data.cash.toString()).setFontSize(50).setForegroundColor(resources.getColor(R.color.color_E72C2B))
.append("元").setFontSize(30).setForegroundColor(resources.getColor(R.color.color_E72C2B))
.create()
tv_bonus_rate.text = SpanUtils()
.append("昨日汇率:").setFontSize(32).setForegroundColor(resources.getColor(R.color.black))
.append(data.rate).setFontSize(32).setForegroundColor(resources.getColor(R.color.color_E72C2B))
.create()
}
override fun onClick(v: View?) {
when (v?.id) {
R.id.iv_question -> {
// 收益提示
val wechatSp = Platform.ShareParams() }
wechatSp.shareType = Platform.SHARE_WEBPAGE R.id.tv_right_subtitle -> {
wechatSp.title = Constant.SHARE_TITLE // 玩法规则
wechatSp.text = Constant.SHARE_CONTENT
wechatSp.imageData = ImageUtil.drawableToBitmap(ContextCompat.getDrawable(context!!, R.mipmap.ic_launcher))
wechatSp.url = Constant.SHARE_URL
// 执行图文分享 }
wechat.share(wechatSp) R.id.btn_get_bonus -> {
// 领取收益
mFriendsHallMsgBean?.let {
if (it.cash.toInt() > 0 && it.status == 0) {
// 去提现
friendsPresenter.getContributionOutToCash()
} else {
showToast("您的贡献值未达到提现要求")
}
}
} else { }
showToast("请先安装微信")
} }
} }
override fun getWorldRankSuc(data: FriendsTaskBean.FriendsBean) { override fun getFriendsHallMsgSuc(data: FriendHallMsgBean) {
srl_my.finishRefresh(true) srl_my.finishRefresh(true)
invitedData.clear() mFriendsHallMsgBean = data
invitedData.addAll(data.list)
invitedAdapter?.notifyDataSetChanged()
}
override fun getFriendsRankSuc(data: FriendsTaskBean) { friendsData.clear()
srl_my.finishRefresh(true) friendsData.addAll(data.list)
friendsAdapter?.notifyDataSetChanged()
bvTaskData = data.challenge.list generateData(data)
bannerTaskAdapter?.setData(bvTaskData) }
pageIndicatorView.count = bvTaskData.size override fun getContributionLeadersSuc(data: FriendHallMsgBean) {
srl_my.finishRefresh(true)
// 跳转当前完成的页面 worldData.clear()
var currentPosition = 0 worldData.addAll(data.list)
for (i in 0 until bvTaskData.size) { worldAdapter?.notifyDataSetChanged()
if (i == bvTaskData.size - 1 && bvTaskData[i].status == 1) { }
currentPosition = i
}
if (bvTaskData[i].status == 1 && i + 1 < bvTaskData.size && bvTaskData[i + 1].status == 0) {
currentPosition = i
break
}
}
bv_friends_task.setCurrentIndex(currentPosition)
if (tab_friends.selectedTabPosition == 0) { // 提现成功
invitedData.clear() override fun getContributionOutToCashSuc() {
invitedData.addAll(data.friends.list) showToast("提现成功")
invitedAdapter?.notifyDataSetChanged()
}
} }
} }
\ No newline at end of file
...@@ -3,6 +3,7 @@ package com.mints.goodmoney.ui.fragment ...@@ -3,6 +3,7 @@ package com.mints.goodmoney.ui.fragment
import android.os.Bundle import android.os.Bundle
import android.text.TextUtils import android.text.TextUtils
import android.view.View import android.view.View
import android.widget.ImageView
import androidx.fragment.app.FragmentTransaction import androidx.fragment.app.FragmentTransaction
import com.mints.goodmoney.R import com.mints.goodmoney.R
import com.mints.goodmoney.ad.VedioAdingManager import com.mints.goodmoney.ad.VedioAdingManager
...@@ -17,12 +18,10 @@ import com.mints.goodmoney.mvp.views.HomeView ...@@ -17,12 +18,10 @@ import com.mints.goodmoney.mvp.views.HomeView
import com.mints.goodmoney.ui.activitys.AwardActivity import com.mints.goodmoney.ui.activitys.AwardActivity
import com.mints.goodmoney.ui.activitys.WebActivity import com.mints.goodmoney.ui.activitys.WebActivity
import com.mints.goodmoney.ui.fragment.base.BaseFragment import com.mints.goodmoney.ui.fragment.base.BaseFragment
import com.mints.goodmoney.ui.widgets.CountDownVedioView
import com.mints.goodmoney.ui.widgets.DialogListener import com.mints.goodmoney.ui.widgets.DialogListener
import com.mints.goodmoney.ui.widgets.PowerDialog import com.mints.goodmoney.ui.widgets.PowerDialog
import com.mints.goodmoney.utils.LogUtil import com.mints.goodmoney.utils.LogUtil
import com.mints.library.utils.json.JsonUtil import com.mints.library.utils.json.JsonUtil
import com.yilan.sdk.player.UserCallback
import com.yilan.sdk.ui.littlevideo.LittleVideoFragment import com.yilan.sdk.ui.littlevideo.LittleVideoFragment
import kotlinx.android.synthetic.main.fragment_main_first.* import kotlinx.android.synthetic.main.fragment_main_first.*
import net.grandcentrix.tray.AppPreferences import net.grandcentrix.tray.AppPreferences
...@@ -54,6 +53,9 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener { ...@@ -54,6 +53,9 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
// 广告权重相关 // 广告权重相关
private var vedioAdingManager: VedioAdingManager? = null private var vedioAdingManager: VedioAdingManager? = null
// 是否是第一次观看完视频
private var isFristWacthVideo = true
override fun getContentViewLayoutID() = R.layout.fragment_main_first override fun getContentViewLayoutID() = R.layout.fragment_main_first
override fun initViewsAndEvents() { override fun initViewsAndEvents() {
...@@ -89,7 +91,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener { ...@@ -89,7 +91,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
if (AppConfig.fragmentClickFlag === Constant.FRAGMENT_CLICK_MAIN) { if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_MAIN) {
// 打开激活 // 打开激活
uploadDeviceInfo() uploadDeviceInfo()
...@@ -135,7 +137,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener { ...@@ -135,7 +137,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
} }
override fun getHallBaseMsgSuc(data: UserTaskMsgBean) { override fun getHallBaseMsgSuc(data: UserTaskMsgBean) {
if (activity == null || activity!!.isFinishing) { if (activity == null || requireActivity().isFinishing) {
return return
} }
...@@ -176,7 +178,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener { ...@@ -176,7 +178,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
} }
override fun getHomeVedioMsgSuc(data: MainVedioMsgBean) { override fun getHomeVedioMsgSuc(data: MainVedioMsgBean) {
if (activity == null || activity!!.isFinishing) { if (activity == null || requireActivity().isFinishing) {
return return
} }
...@@ -231,7 +233,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener { ...@@ -231,7 +233,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
littleVideoFragment = LittleVideoFragment.newInstance() littleVideoFragment = LittleVideoFragment.newInstance()
transaction.add(R.id.yilan_fragment_frame_container, littleVideoFragment!!, LittleVideoFragment::class.java.simpleName) transaction.add(R.id.yilan_fragment_frame_container, littleVideoFragment!!, LittleVideoFragment::class.java.simpleName)
// 设置点击的item播放状态,callback返回true标识用户已经处理了event,返回false,标识使用播放器内部逻辑处理event。 // 设置点击的item播放状态,callback返回true标识用户已经处理了event,返回false,标识使用播放器内部逻辑处理event。
littleVideoFragment!!.setUserCallBack(UserCallback { type, data, playerHash -> //播放状态 type littleVideoFragment!!.setUserCallBack { type, data, _ -> //播放状态 type
//播放的数据,可能为null data //播放的数据,可能为null data
//哪个播放器ß playerHash //哪个播放器ß playerHash
when (type) { when (type) {
...@@ -264,7 +266,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener { ...@@ -264,7 +266,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
} }
} }
false false
}) }
} else { } else {
transaction.show(littleVideoFragment!!) transaction.show(littleVideoFragment!!)
} }
...@@ -300,8 +302,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener { ...@@ -300,8 +302,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
*/ */
private fun resumeDownloadTime(id: String) { private fun resumeDownloadTime(id: String) {
if (!TextUtils.isEmpty(id)) { if (!TextUtils.isEmpty(id)) {
// LogUtil.d(TAG, "resumeDownloadTime cur id:" + id) LogUtil.d(TAG, "resumeDownloadTime cur id:$id")
// LogUtil.d(TAG, "resumeDownloadTime ListItem:" + JsonUtil.toJson(vedioIdList)) LogUtil.d(TAG, "resumeDownloadTime ListItem:" + JsonUtil.toJson(vedioIdList))
if (vedioIdList.contains(id)) { if (vedioIdList.contains(id)) {
cdvvYilanTime?.pause() cdvvYilanTime?.pause()
return return
...@@ -327,15 +329,23 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener { ...@@ -327,15 +329,23 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
* 红包倒计时初始化 * 红包倒计时初始化
*/ */
private fun initTimeview() { private fun initTimeview() {
cdvvYilanTime.setCountDownVedioListener(object : CountDownVedioView.CountDownVedioListener { cdvvYilanTime.setCountDownVedioListener {
override fun finish() { if (isFristWacthVideo) {
cdvvYilanTime?.showRedbox() val vs = vs_tips.inflate()
stopDownloadTime() val ivTipsClose = vs.findViewById<ImageView>(R.id.iv_tips_close)
ivTipsClose.setOnClickListener {
homePresenter.requestAddHomeVedioReward() vs.visibility = View.GONE
}
isFristWacthVideo = false
} }
})
var vedioTime = 60
cdvvYilanTime?.showRedbox()
stopDownloadTime()
homePresenter.requestAddHomeVedioReward()
}
val vedioTime = 60
cdvvYilanTime.setTime(vedioTime) cdvvYilanTime.setTime(vedioTime)
cdvvYilanTime.start() cdvvYilanTime.start()
} }
...@@ -360,15 +370,15 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener { ...@@ -360,15 +370,15 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
readyGo(WebActivity::class.java, bundle) readyGo(WebActivity::class.java, bundle)
} }
R.id.btn_dialogper_back -> { R.id.btn_dialogper_back -> {
if (activity != null && !activity!!.isFinishing() && if (activity != null && !activity!!.isFinishing &&
powerDialog != null && powerDialog!!.isShowing() powerDialog != null && powerDialog!!.isShowing
) { ) {
showToast("请您同意授权,否则将无法使用APP功能") showToast("请您同意授权,否则将无法使用APP功能")
} }
} }
R.id.btn_dialogper_next -> { R.id.btn_dialogper_next -> {
if (activity != null && !activity!!.isFinishing() && if (activity != null && !activity!!.isFinishing &&
powerDialog != null && powerDialog!!.isShowing() powerDialog != null && powerDialog!!.isShowing
) { ) {
powerDialog!!.dismiss() powerDialog!!.dismiss()
ps.put(Constant.LOAN_PERMISSION_FLAG, false) ps.put(Constant.LOAN_PERMISSION_FLAG, false)
......
...@@ -8,7 +8,6 @@ import android.content.Context ...@@ -8,7 +8,6 @@ import android.content.Context
import android.os.Bundle import android.os.Bundle
import android.text.TextUtils import android.text.TextUtils
import android.view.View import android.view.View
import android.view.ViewGroup
import android.widget.AdapterView import android.widget.AdapterView
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.DividerItemDecoration
...@@ -22,7 +21,6 @@ import com.mints.goodmoney.R ...@@ -22,7 +21,6 @@ import com.mints.goodmoney.R
import com.mints.goodmoney.ad.VedioAdingManager import com.mints.goodmoney.ad.VedioAdingManager
import com.mints.goodmoney.common.AppConfig import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.BxmManager
import com.mints.goodmoney.manager.UserManager import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.mvp.model.* import com.mints.goodmoney.mvp.model.*
import com.mints.goodmoney.mvp.presenters.MyPresenter import com.mints.goodmoney.mvp.presenters.MyPresenter
...@@ -32,7 +30,6 @@ import com.mints.goodmoney.ui.adapter.GvMyAdapter ...@@ -32,7 +30,6 @@ import com.mints.goodmoney.ui.adapter.GvMyAdapter
import com.mints.goodmoney.ui.adapter.MainMyAdapter import com.mints.goodmoney.ui.adapter.MainMyAdapter
import com.mints.goodmoney.ui.adapter.listener.OnItemChildClickListener import com.mints.goodmoney.ui.adapter.listener.OnItemChildClickListener
import com.mints.goodmoney.ui.fragment.base.BaseFragment import com.mints.goodmoney.ui.fragment.base.BaseFragment
import com.mints.goodmoney.utils.ForegroundOrBackground
import com.mints.goodmoney.utils.ImageUtil import com.mints.goodmoney.utils.ImageUtil
import com.mints.goodmoney.utils.SpanUtils import com.mints.goodmoney.utils.SpanUtils
import com.mints.library.net.netstatus.NetUtils import com.mints.library.net.netstatus.NetUtils
...@@ -177,14 +174,14 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi ...@@ -177,14 +174,14 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
} }
override fun getMyHotActivitySuc(data: BannerBean?) { override fun getMyHotActivitySuc(data: BannerBean?) {
if (activity != null && !activity!!.isFinishing) { if (activity != null && !requireActivity().isFinishing) {
// item_promotions_egv.visibility = View.GONE // item_promotions_egv.visibility = View.GONE
if (!bannerFlag) { if (!bannerFlag) {
bannerFlag = true bannerFlag = true
data?.let { data?.let {
item_promotions_egv.visibility = View.VISIBLE item_promotions_egv.visibility = View.VISIBLE
hotList = it.list hotList = it.list
item_promotions_egv.adapter = GvMyAdapter(mContext, activity!!, hotList) item_promotions_egv.adapter = GvMyAdapter(mContext, requireActivity(), hotList)
} }
} }
} }
...@@ -308,7 +305,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi ...@@ -308,7 +305,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
val finalSignStatus = signStatus val finalSignStatus = signStatus
item_clock_signview.setSignViewListener { day -> item_clock_signview.setSignViewListener { day ->
if (nowDate == day) { if (nowDate == day) {
RxPermissions(activity!!) RxPermissions(requireActivity())
.request(Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_EXTERNAL_STORAGE) .request(Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_EXTERNAL_STORAGE)
.subscribe { granted: Boolean -> .subscribe { granted: Boolean ->
if (granted) { if (granted) {
...@@ -462,7 +459,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi ...@@ -462,7 +459,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
wechatSp.shareType = Platform.SHARE_WEBPAGE wechatSp.shareType = Platform.SHARE_WEBPAGE
wechatSp.title = Constant.SHARE_TITLE wechatSp.title = Constant.SHARE_TITLE
wechatSp.text = Constant.SHARE_CONTENT wechatSp.text = Constant.SHARE_CONTENT
wechatSp.imageData = ImageUtil.drawableToBitmap(ContextCompat.getDrawable(context!!, R.mipmap.ic_launcher)) wechatSp.imageData = ImageUtil.drawableToBitmap(ContextCompat.getDrawable(requireContext(), R.mipmap.ic_launcher))
wechatSp.url = Constant.SHARE_URL wechatSp.url = Constant.SHARE_URL
val wechat = ShareSDK.getPlatform(Wechat.NAME) val wechat = ShareSDK.getPlatform(Wechat.NAME)
if (wechat.isClientValid) { if (wechat.isClientValid) {
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/color_FFC7C7" />
<corners android:radius="100dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="10dp" />
<solid android:color="@color/white_transparent" />
</shape>
\ No newline at end of file
...@@ -12,14 +12,22 @@ ...@@ -12,14 +12,22 @@
</RelativeLayout> </RelativeLayout>
<FrameLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentEnd="true"
android:layout_marginRight="8dp" android:layout_alignParentBottom="true"
android:layout_alignParentBottom="true"> android:layout_marginEnd="8dp"
android:orientation="horizontal">
<ViewStub
android:id="@+id/vs_tips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout="@layout/layout_watchvideo_tips" />
<LinearLayout <LinearLayout
android:layout_marginTop="30dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
...@@ -27,11 +35,11 @@ ...@@ -27,11 +35,11 @@
<ImageView <ImageView
android:id="@+id/ivMainBox" android:id="@+id/ivMainBox"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:visibility="gone"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="20dp" android:layout_marginBottom="20dp"
android:src="@mipmap/ic_main_box" /> android:src="@mipmap/ic_main_box"
android:visibility="gone" />
<com.mints.goodmoney.ui.widgets.CountDownVedioView <com.mints.goodmoney.ui.widgets.CountDownVedioView
android:id="@+id/cdvvYilanTime" android:id="@+id/cdvvYilanTime"
...@@ -39,5 +47,5 @@ ...@@ -39,5 +47,5 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="245dp" /> android:layout_marginBottom="245dp" />
</LinearLayout> </LinearLayout>
</FrameLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:attrs="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
...@@ -32,92 +31,242 @@ ...@@ -32,92 +31,242 @@
android:id="@+id/collapsingToolbarLayout" android:id="@+id/collapsingToolbarLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed"> app:layout_scrollFlags="scroll|exitUntilCollapsed">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@mipmap/bg_invite_friends" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<include <RelativeLayout
android:id="@+id/view_title1"
layout="@layout/view_title" />
<com.mints.goodmoney.ui.widgets.BannerView
android:id="@+id/bv_friends_task"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="80dp" android:layout_height="wrap_content">
android:layout_marginTop="10dp"
app:bannerAnimDuration="1500" <ImageView
app:bannerAnimScroll="false" android:id="@+id/img_invite"
app:bannerAutoScroll="false" android:layout_width="match_parent"
app:bannerPageAlpha="0" android:layout_height="wrap_content"
app:bannerPageMargin="8dp" android:scaleType="fitXY"
app:bannerPagePercent="0.9" android:src="@mipmap/bg_invite_friends" />
app:bannerPageScale="1"
app:bannerScrollDuration="4000" /> <ImageView
android:id="@+id/img_yellow"
<com.rd.PageIndicatorView android:layout_width="match_parent"
android:id="@+id/pageIndicatorView" android:layout_height="wrap_content"
android:layout_alignBottom="@id/img_invite"
android:layout_centerHorizontal="true"
android:layout_marginStart="20dp"
android:layout_marginEnd="20dp"
android:layout_marginBottom="-50dp"
android:scaleType="fitXY"
android:src="@mipmap/bg_invite_friends_yellow" />
<ImageView
android:id="@+id/img_red"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/img_yellow"
android:layout_centerHorizontal="true"
android:scaleType="centerCrop"
android:src="@mipmap/bg_invite_friends_red" />
<TextView
android:id="@+id/tv_bonus_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/img_yellow"
android:layout_centerHorizontal="true"
android:layout_marginTop="4dp"
android:text="@string/dot"
android:textColor="@color/white" />
<TextView
android:id="@+id/tv_bonus_sum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/img_red"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
android:text="@string/dot" />
</RelativeLayout>
<TextView
android:id="@+id/tv_bonus_rate"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_marginStart="20dp"
android:layout_marginBottom="10dp" android:layout_marginTop="15dp"
app:piv_animationType="worm" android:layout_marginBottom="15dp"
app:piv_dynamicCount="true" android:text="@string/dot" />
app:piv_interactiveAnimation="true"
app:piv_selectedColor="@color/main_mints" <LinearLayout
app:piv_unselectedColor="@color/ban_transparent"
app:piv_viewPager="@id/bv_friends_task"
attrs:piv_padding="10dp"
attrs:piv_radius="8dp" />
<include layout="@layout/item_divider_gray" />
<ImageView
android:id="@+id/img_invite"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="10dp" android:layout_gravity="center_horizontal"
android:scaleType="centerCrop" android:layout_marginStart="20dp"
android:src="@mipmap/bg_friends" /> android:layout_marginEnd="20dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="6dp"
android:layout_weight="1"
android:background="@mipmap/bg_invite_friends_left"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp"
android:gravity="center"
android:text="昨日贡献值"
android:textColor="@color/color_AF6F36"
android:textSize="12sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:gravity="center"
android:text="今日贡献值"
android:textColor="@color/color_912C36"
android:textSize="12sp" />
</LinearLayout>
<include layout="@layout/item_divider_gray" /> <LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/tv_yesterday_bonus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/dot"
android:textSize="20sp" />
<TextView
android:id="@+id/tv_today_bonus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/dot"
android:textSize="20sp" />
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="6dp"
android:layout_weight="1"
android:background="@mipmap/bg_invite_friends_right">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="15dp"
android:text="分红收益"
android:textColor="@color/color_CF7E7E" />
<TextView
android:id="@+id/tv_bonus_money"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="40dp"
android:text="@string/dot" />
<Button
android:id="@+id/btn_get_bonus"
android:layout_width="50dp"
android:layout_height="28dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginStart="20dp"
android:layout_marginEnd="5dp"
android:background="@drawable/shape_btn_friends"
android:text="提现"
android:textColor="@color/color_E72C2B"
android:textSize="12sp" />
</RelativeLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="20dp"
android:background="@color/my_color_gray3" />
</LinearLayout> </LinearLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout> </com.google.android.material.appbar.CollapsingToolbarLayout>
<com.mints.goodmoney.ui.widgets.tablayout.TabLayout <RelativeLayout
android:id="@+id/tab_friends" android:layout_width="match_parent"
android:layout_width="wrap_content" android:layout_height="wrap_content">
android:layout_height="56dp"
android:layout_gravity="center_horizontal" <com.androidkun.xtablayout.XTabLayout
app:indicatorEndColor="#e73820" android:id="@+id/tab_friends"
app:indicatorMarginEnd="24dp" android:layout_width="220dp"
app:indicatorMarginStart="24dp" android:layout_height="50dp"
app:indicatorStartColor="#d6694e" android:layout_centerHorizontal="true"
app:tabIndicatorHeight="4dp" android:layout_gravity="center_horizontal"
app:tabMode="scrollable" app:xTabDisplayNum="2"
app:tabSelectedTextColor="@color/my_color_orange" app:xTabIndicatorColor="#FB560C"
app:tabTextAppearance="@style/TabLayoutTextSize" app:xTabIndicatorHeight="3dp"
app:tabTextColor="@color/main_bg_text" /> app:xTabIndicatorWidth="30dp"
app:xTabMode="fixed"
app:xTabSelectedTextColor="#FB560C"
app:xTabSelectedTextSize="18sp"
app:xTabTextColor="#666666"
app:xTabTextSize="15sp" />
<ImageView
android:id="@+id/iv_question"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_centerVertical="true"
android:layout_toEndOf="@id/tab_friends"
android:src="@mipmap/ic_question" />
</RelativeLayout>
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/my_color_gray" /> android:background="@color/my_color_gray3" />
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.viewpager.widget.ViewPager
android:id="@+id/recy_friends" android:id="@+id/view_pager_friends"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginStart="15dp"
android:layout_marginEnd="15dp"
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/recy_friends"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_tips"
android:orientation="vertical"
android:padding="2dp">
<ImageView
android:id="@+id/iv_tips_close"
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@mipmap/ic_close" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:text="点击红包可以领取金币哦~"
android:textColor="@color/white"
android:textSize="14sp" />
</LinearLayout>
\ No newline at end of file
...@@ -124,4 +124,12 @@ ...@@ -124,4 +124,12 @@
<color name="color_00895B">#00895B</color> <color name="color_00895B">#00895B</color>
<color name="color_8F6D21">#8F6D21</color> <color name="color_8F6D21">#8F6D21</color>
<color name="color_FFDD0C">#FFDD0C</color> <color name="color_FFDD0C">#FFDD0C</color>
<color name="color_CF7E7E">#CF7E7E</color>
<color name="color_FF4A4A">#FF4A4A</color>
<color name="color_AF6F36">#AF6F36</color>
<color name="color_912C36">#912C36</color>
<color name="color_E72C2B">#E72C2B</color>
<color name="color_FFC7C7">#FFC7C7</color>
<color name="color_FF7C00">#FF7C00</color>
</resources> </resources>
\ No newline at end of file
<resources> <resources>
<string name="app_name">好赚钱</string> <string name="app_name">好赚钱</string>
<string name="dot">--</string>
<string name="netfail">网络异常,请检查网络</string> <string name="netfail">网络异常,请检查网络</string>
<string name="notifyTitle">提示</string> <string name="notifyTitle">提示</string>
<string name="notifyMsg">当前应用缺少必要权限。\n\n请点击\"设置\"-\"权限\"-打开所需权限。</string> <string name="notifyMsg">当前应用缺少必要权限。\n\n请点击\"设置\"-\"权限\"-打开所需权限。</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment