Merge remote-tracking branch 'origin/dev_6.5.5_语聊' into dev_6.5.5_语聊
# Conflicts: # OneToOne/src/main/java/com/shayu/onetoone/manager/OTONetManager.java # OneToOne/src/main/java/com/shayu/onetoone/network/OneToOneApi.java
This commit is contained in:
commit
ea44969bd7
@ -86,11 +86,11 @@
|
|||||||
<application
|
<application
|
||||||
android:name=".AppContext"
|
android:name=".AppContext"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
android:enableOnBackInvokedCallback="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:largeHeap="true"
|
android:largeHeap="true"
|
||||||
android:preserveLegacyExternalStorage="true"
|
android:preserveLegacyExternalStorage="true"
|
||||||
android:enableOnBackInvokedCallback="true"
|
|
||||||
android:requestLegacyExternalStorage="true"
|
android:requestLegacyExternalStorage="true"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme"
|
android:theme="@style/AppTheme"
|
||||||
@ -145,9 +145,15 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".activity.MyArnActivity"
|
android:name=".activity.MyArnActivity"
|
||||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.DiamondExchangeActivity"
|
android:name=".activity.DiamondExchangeActivity"
|
||||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||||
|
<activity
|
||||||
|
android:name=".activity.setting.OneMsgSettActivity"
|
||||||
|
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||||
|
<activity
|
||||||
|
android:name=".activity.ExchangeRecordActivity"
|
||||||
|
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.HomeScreenActivity"
|
android:name=".activity.HomeScreenActivity"
|
||||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||||
@ -162,10 +168,10 @@
|
|||||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.MatchingActivity"
|
android:name=".activity.MatchingActivity"
|
||||||
android:windowSoftInputMode="stateHidden|adjustResize"/>
|
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".activity.EndCallActivity"
|
android:name=".activity.EndCallActivity"
|
||||||
android:windowSoftInputMode="stateHidden|adjustResize"/>
|
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||||
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
@ -208,6 +214,16 @@
|
|||||||
android:label="达人认证入口"
|
android:label="达人认证入口"
|
||||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".activity.setting.FollowActivity"
|
||||||
|
android:label="达人认证入口"
|
||||||
|
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".activity.setting.ModifyPwdActivity"
|
||||||
|
android:label="修改密码"
|
||||||
|
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
android:authorities="com.shayu.onetoone.fileprovider"
|
android:authorities="com.shayu.onetoone.fileprovider"
|
||||||
|
@ -2,6 +2,11 @@ package com.shayu.onetoone.activity;
|
|||||||
|
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Editable;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.text.TextWatcher;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
@ -10,11 +15,17 @@ import com.alibaba.android.arouter.facade.annotation.Route;
|
|||||||
import com.shayu.onetoone.R;
|
import com.shayu.onetoone.R;
|
||||||
import com.shayu.onetoone.adapter.DiamondExchangeAdapter;
|
import com.shayu.onetoone.adapter.DiamondExchangeAdapter;
|
||||||
import com.shayu.onetoone.bean.ExchangeModel;
|
import com.shayu.onetoone.bean.ExchangeModel;
|
||||||
|
import com.shayu.onetoone.event.DiamondExchangeEvent;
|
||||||
import com.shayu.onetoone.manager.OTONetManager;
|
import com.shayu.onetoone.manager.OTONetManager;
|
||||||
import com.shayu.onetoone.manager.RouteManager;
|
import com.shayu.onetoone.manager.RouteManager;
|
||||||
import com.yunbao.common.custom.ItemDecoration;
|
import com.yunbao.common.custom.ItemDecoration;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -22,6 +33,12 @@ import java.util.List;
|
|||||||
public class DiamondExchangeActivity extends AbsOTOActivity {
|
public class DiamondExchangeActivity extends AbsOTOActivity {
|
||||||
private RecyclerView diamondExchangeList;
|
private RecyclerView diamondExchangeList;
|
||||||
private DiamondExchangeAdapter exchangeAdapter;
|
private DiamondExchangeAdapter exchangeAdapter;
|
||||||
|
private TextView title, totalConvertibility;
|
||||||
|
private String type = "yuanbao";
|
||||||
|
|
||||||
|
private EditText diamondExchangeInput;
|
||||||
|
private String number;
|
||||||
|
private int index = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
@ -30,23 +47,150 @@ public class DiamondExchangeActivity extends AbsOTOActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main(Bundle savedInstanceState) {
|
protected void main(Bundle savedInstanceState) {
|
||||||
|
Bus.getOn(this);
|
||||||
initView();
|
initView();
|
||||||
initData();
|
initData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
Bus.getOff(this);
|
||||||
|
}
|
||||||
|
|
||||||
private void initView() {
|
private void initView() {
|
||||||
diamondExchangeList = findViewById(R.id.diamond_exchange_list);
|
diamondExchangeList = findViewById(R.id.diamond_exchange_list);
|
||||||
|
title = findViewById(R.id.title);
|
||||||
|
diamondExchangeInput = findViewById(R.id.diamond_exchange_input);
|
||||||
|
totalConvertibility = findViewById(R.id.total_convertibility);
|
||||||
diamondExchangeList.addItemDecoration(new ItemDecoration(mContext, Color.parseColor("#ffffff"), 10, 2));
|
diamondExchangeList.addItemDecoration(new ItemDecoration(mContext, Color.parseColor("#ffffff"), 10, 2));
|
||||||
diamondExchangeList.setLayoutManager(new GridLayoutManager(mContext, 3));
|
diamondExchangeList.setLayoutManager(new GridLayoutManager(mContext, 3));
|
||||||
exchangeAdapter = new DiamondExchangeAdapter();
|
exchangeAdapter = new DiamondExchangeAdapter();
|
||||||
diamondExchangeList.setAdapter(exchangeAdapter);
|
diamondExchangeList.setAdapter(exchangeAdapter);
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.arn_toggle), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
if (TextUtils.equals(type, "yuanbao")) {
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("type", "coin");
|
||||||
|
RouteManager.forwardActivity(RouteManager.ACTIVITY_DIAMOND_EXCHANGE, bundle);
|
||||||
|
finish();
|
||||||
|
} else {
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("type", "yuanbao");
|
||||||
|
RouteManager.forwardActivity(RouteManager.ACTIVITY_DIAMOND_EXCHANGE, bundle);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.exchange_record), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
if (TextUtils.equals(type, "yuanbao")) {
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("type", "coin");
|
||||||
|
RouteManager.forwardActivity(RouteManager.ACTIVITY_EXCHANGE_RECORD, bundle);
|
||||||
|
} else {
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("type", "yuanbao");
|
||||||
|
RouteManager.forwardActivity(RouteManager.ACTIVITY_EXCHANGE_RECORD, bundle);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.immediate_exchange), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
String exchangeNumber = "";
|
||||||
|
if (TextUtils.isEmpty(number)) {
|
||||||
|
exchangeNumber = diamondExchangeInput.getText().toString();
|
||||||
|
} else {
|
||||||
|
exchangeNumber = number;
|
||||||
|
}
|
||||||
|
OTONetManager.getInstance(mContext).getTransform(type, exchangeNumber, new HttpCallback<List<ExchangeModel>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(List<ExchangeModel> data) {
|
||||||
|
if (data.size() > 0) {
|
||||||
|
if ((data.size() - 1) > index && index > 0) {
|
||||||
|
data.get(index).setSelect(true);
|
||||||
|
totalConvertibility.setText(String.valueOf(data.get(0).getNum()));
|
||||||
|
number = data.get(index).getNum();
|
||||||
|
} else {
|
||||||
|
if (TextUtils.isEmpty(diamondExchangeInput.getText().toString())) {
|
||||||
|
data.get(0).setSelect(true);
|
||||||
|
totalConvertibility.setText(String.valueOf(data.get(0).getNum()));
|
||||||
|
number = data.get(0).getNum();
|
||||||
|
} else {
|
||||||
|
totalConvertibility.setText(String.valueOf(data.get(0).getNum()));
|
||||||
|
for (int i = 0; i < data.size(); i++) {
|
||||||
|
data.get(i).setSelect(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
exchangeAdapter.addData(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
diamondExchangeInput.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable editable) {
|
||||||
|
if (!TextUtils.isEmpty(diamondExchangeInput.getText().toString()) && !TextUtils.isEmpty(number)) {
|
||||||
|
exchangeAdapter.unSelect();
|
||||||
|
number = null;
|
||||||
|
index = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.one_back), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initData() {
|
private void initData() {
|
||||||
OTONetManager.getInstance(mContext).getExchangeList("yuanbao", new HttpCallback<List<ExchangeModel>>() {
|
|
||||||
|
if (getIntent() != null && getIntent().getBundleExtra("bundle") != null) {
|
||||||
|
type = getIntent().getBundleExtra("bundle").getString("type");
|
||||||
|
if (TextUtils.equals(type, "yuanbao")) {
|
||||||
|
title.setText(getString(R.string.my_arnings_exchange_star));
|
||||||
|
} else {
|
||||||
|
title.setText(getString(R.string.my_arnings_exchange_diamond));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
OTONetManager.getInstance(mContext).getExchangeList(type, new HttpCallback<List<ExchangeModel>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<ExchangeModel> data) {
|
public void onSuccess(List<ExchangeModel> data) {
|
||||||
exchangeAdapter.addData(data);
|
if (data.size() > 0) {
|
||||||
|
data.get(0).setSelect(true);
|
||||||
|
totalConvertibility.setText(String.valueOf(data.get(0).getNum()));
|
||||||
|
number = data.get(0).getNum();
|
||||||
|
exchangeAdapter.addData(data);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -55,4 +199,11 @@ public class DiamondExchangeActivity extends AbsOTOActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
public void onExchangeModel(DiamondExchangeEvent event) {
|
||||||
|
number = event.getNum();
|
||||||
|
index = event.getIndex();
|
||||||
|
diamondExchangeInput.setText("");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,114 @@
|
|||||||
|
package com.shayu.onetoone.activity;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
|
import com.shayu.onetoone.R;
|
||||||
|
import com.shayu.onetoone.adapter.ExchangeRecordAdapter;
|
||||||
|
import com.shayu.onetoone.bean.ExchangeRecordModel;
|
||||||
|
import com.shayu.onetoone.manager.OTONetManager;
|
||||||
|
import com.shayu.onetoone.manager.RouteManager;
|
||||||
|
import com.yanzhenjie.recyclerview.SwipeRecyclerView;
|
||||||
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.rong.imkit.widget.refresh.SmartRefreshLayout;
|
||||||
|
import io.rong.imkit.widget.refresh.api.RefreshLayout;
|
||||||
|
import io.rong.imkit.widget.refresh.listener.OnLoadMoreListener;
|
||||||
|
import io.rong.imkit.widget.refresh.listener.OnRefreshListener;
|
||||||
|
import io.rong.imkit.widget.refresh.wrapper.RongRefreshHeader;
|
||||||
|
|
||||||
|
@Route(path = RouteManager.ACTIVITY_EXCHANGE_RECORD)
|
||||||
|
public class ExchangeRecordActivity extends AbsOTOActivity {
|
||||||
|
private ExchangeRecordAdapter recordAdapter;
|
||||||
|
private SmartRefreshLayout mRefreshLayout;
|
||||||
|
private SwipeRecyclerView recyclerView;
|
||||||
|
private int page = 1;
|
||||||
|
|
||||||
|
private String type = "10";
|
||||||
|
private String mType = "10";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getLayoutId() {
|
||||||
|
return R.layout.activity_exchange_record;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void main(Bundle savedInstanceState) {
|
||||||
|
if (getIntent() != null && getIntent().getBundleExtra("bundle") != null) {
|
||||||
|
mType = getIntent().getBundleExtra("bundle").getString("type");
|
||||||
|
if (TextUtils.equals(mType, "yuanbao")) {
|
||||||
|
type = "11";
|
||||||
|
} else {
|
||||||
|
type = "10";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
initView();
|
||||||
|
initData();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
recyclerView = findViewById(R.id.recyclerView);
|
||||||
|
mRefreshLayout = findViewById(R.id.swipeRefreshLayout);
|
||||||
|
recordAdapter = new ExchangeRecordAdapter();
|
||||||
|
recyclerView.setAdapter(recordAdapter);
|
||||||
|
mRefreshLayout.setNestedScrollingEnabled(false);
|
||||||
|
mRefreshLayout.setRefreshHeader(new RongRefreshHeader(mContext));
|
||||||
|
mRefreshLayout.setRefreshFooter(new RongRefreshHeader(mContext));
|
||||||
|
mRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
|
||||||
|
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||||
|
page = 1;
|
||||||
|
initData();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.mRefreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
|
||||||
|
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||||
|
onConversationListLoadMore();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.one_back), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initData() {
|
||||||
|
OTONetManager.getInstance(mContext).
|
||||||
|
getExchangeRecord(type, "3", "2", page, new HttpCallback<List<ExchangeRecordModel>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(List<ExchangeRecordModel> data) {
|
||||||
|
if (page != 1 && data.isEmpty()) {
|
||||||
|
mRefreshLayout.finishLoadMore();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (page != 1) {
|
||||||
|
recordAdapter.addLst(data);
|
||||||
|
} else {
|
||||||
|
recordAdapter.setList(data);
|
||||||
|
}
|
||||||
|
mRefreshLayout.finishRefresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
mRefreshLayout.finishRefresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onConversationListLoadMore() {
|
||||||
|
page++;
|
||||||
|
initData();
|
||||||
|
mRefreshLayout.finishLoadMore();
|
||||||
|
}
|
||||||
|
}
|
@ -4,8 +4,8 @@ package com.shayu.onetoone.activity;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.shayu.onetoone.R;
|
import com.shayu.onetoone.R;
|
||||||
@ -14,19 +14,28 @@ import com.shayu.onetoone.bean.FriendAppMoneyLogModel;
|
|||||||
import com.shayu.onetoone.bean.FriendAppMoneySumModel;
|
import com.shayu.onetoone.bean.FriendAppMoneySumModel;
|
||||||
import com.shayu.onetoone.manager.OTONetManager;
|
import com.shayu.onetoone.manager.OTONetManager;
|
||||||
import com.shayu.onetoone.manager.RouteManager;
|
import com.shayu.onetoone.manager.RouteManager;
|
||||||
|
import com.yanzhenjie.recyclerview.SwipeRecyclerView;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.rong.imkit.widget.refresh.SmartRefreshLayout;
|
||||||
|
import io.rong.imkit.widget.refresh.api.RefreshLayout;
|
||||||
|
import io.rong.imkit.widget.refresh.listener.OnLoadMoreListener;
|
||||||
|
import io.rong.imkit.widget.refresh.listener.OnRefreshListener;
|
||||||
|
import io.rong.imkit.widget.refresh.wrapper.RongRefreshHeader;
|
||||||
|
|
||||||
|
|
||||||
@Route(path = RouteManager.ACTIVITY_MY_ARN)
|
@Route(path = RouteManager.ACTIVITY_MY_ARN)
|
||||||
public class MyArnActivity extends AbsOTOActivity {
|
public class MyArnActivity extends AbsOTOActivity {
|
||||||
private TextView todayEarnings, cumulativeIncome;
|
private TextView todayEarnings, cumulativeIncome, withdrawalSum,withdrawalMoney;
|
||||||
|
|
||||||
private MyArnAdapter myArnAdapter;
|
private MyArnAdapter myArnAdapter;
|
||||||
private RecyclerView myArnList;
|
private SwipeRecyclerView myArnList;
|
||||||
|
private SmartRefreshLayout mRefreshLayout;
|
||||||
|
private int page = 1;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
@ -44,9 +53,26 @@ public class MyArnActivity extends AbsOTOActivity {
|
|||||||
todayEarnings = findViewById(R.id.today_earnings);
|
todayEarnings = findViewById(R.id.today_earnings);
|
||||||
cumulativeIncome = findViewById(R.id.cumulative_income);
|
cumulativeIncome = findViewById(R.id.cumulative_income);
|
||||||
myArnList = findViewById(R.id.my_arn_list);
|
myArnList = findViewById(R.id.my_arn_list);
|
||||||
|
withdrawalSum = findViewById(R.id.withdrawal_sum);
|
||||||
|
withdrawalMoney = findViewById(R.id.withdrawal_money);
|
||||||
|
mRefreshLayout = findViewById(R.id.swipeRefreshLayout);
|
||||||
myArnList.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
myArnList.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||||
myArnAdapter = new MyArnAdapter();
|
myArnAdapter = new MyArnAdapter();
|
||||||
myArnList.setAdapter(myArnAdapter);
|
myArnList.setAdapter(myArnAdapter);
|
||||||
|
mRefreshLayout.setNestedScrollingEnabled(false);
|
||||||
|
mRefreshLayout.setRefreshHeader(new RongRefreshHeader(mContext));
|
||||||
|
mRefreshLayout.setRefreshFooter(new RongRefreshHeader(mContext));
|
||||||
|
mRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
|
||||||
|
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||||
|
page = 1;
|
||||||
|
refreshMyArn();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.mRefreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
|
||||||
|
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||||
|
onConversationListLoadMore();
|
||||||
|
}
|
||||||
|
});
|
||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.my_arn_back), new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.my_arn_back), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
@ -56,18 +82,49 @@ public class MyArnActivity extends AbsOTOActivity {
|
|||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.diamond_star_coins), new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.diamond_star_coins), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
RouteManager.forwardActivity(RouteManager.ACTIVITY_DIAMOND_EXCHANGE);
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putString("type", "yuanbao");
|
||||||
|
RouteManager.forwardActivity(RouteManager.ACTIVITY_DIAMOND_EXCHANGE, bundle);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void refreshMyArn() {
|
||||||
|
OTONetManager.getInstance(mContext).getFriendAppMoneyLogModel("3", "1", page, new HttpCallback<List<FriendAppMoneyLogModel>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(List<FriendAppMoneyLogModel> data) {
|
||||||
|
if (page != 1 && data.isEmpty()) {
|
||||||
|
mRefreshLayout.finishLoadMore();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (page != 1) {
|
||||||
|
myArnAdapter.addLst(data);
|
||||||
|
} else {
|
||||||
|
myArnAdapter.showData(data);
|
||||||
|
}
|
||||||
|
mRefreshLayout.finishRefresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(error);
|
||||||
|
mRefreshLayout.finishRefresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void initData() {
|
private void initData() {
|
||||||
OTONetManager.getInstance(mContext).getFriendAppMoneySum(new HttpCallback<FriendAppMoneySumModel>() {
|
OTONetManager.getInstance(mContext).getFriendAppMoneySum(new HttpCallback<FriendAppMoneySumModel>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(FriendAppMoneySumModel data) {
|
public void onSuccess(FriendAppMoneySumModel data) {
|
||||||
todayEarnings.setText(data.getToday());
|
todayEarnings.setText(data.getToday());
|
||||||
cumulativeIncome.setText(data.getSum());
|
cumulativeIncome.setText(data.getSum());
|
||||||
|
withdrawalSum.setText(data.getWithdrawalModel().getSum());
|
||||||
|
StringBuffer stringBuffer = new StringBuffer();
|
||||||
|
stringBuffer.append("$ ")
|
||||||
|
.append(data.getWithdrawalModel().getMoney());
|
||||||
|
withdrawalMoney.setText(stringBuffer.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -75,16 +132,12 @@ public class MyArnActivity extends AbsOTOActivity {
|
|||||||
ToastUtil.show(error);
|
ToastUtil.show(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
OTONetManager.getInstance(mContext).getFriendAppMoneyLogModel("3", "1", new HttpCallback<List<FriendAppMoneyLogModel>>() {
|
refreshMyArn();
|
||||||
@Override
|
}
|
||||||
public void onSuccess(List<FriendAppMoneyLogModel> data) {
|
|
||||||
myArnAdapter.showData(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
private void onConversationListLoadMore() {
|
||||||
public void onError(String error) {
|
page++;
|
||||||
ToastUtil.show(error);
|
refreshMyArn();
|
||||||
}
|
mRefreshLayout.finishLoadMore();
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -539,7 +539,7 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
|||||||
* 设置
|
* 设置
|
||||||
*/
|
*/
|
||||||
private void forwardSetting() {
|
private void forwardSetting() {
|
||||||
// mContext.startActivity(new Intent(mContext, SettingActivity.class));
|
mContext.startActivity(new Intent(mContext, SettingActivity.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,6 +20,7 @@ import com.shayu.onetoone.bean.LabelBean;
|
|||||||
import com.shayu.onetoone.manager.OTONetManager;
|
import com.shayu.onetoone.manager.OTONetManager;
|
||||||
import com.shayu.onetoone.manager.RouteManager;
|
import com.shayu.onetoone.manager.RouteManager;
|
||||||
import com.xuexiang.xui.widget.flowlayout.FlowTagLayout;
|
import com.xuexiang.xui.widget.flowlayout.FlowTagLayout;
|
||||||
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.bean.HttpCallbackModel;
|
import com.yunbao.common.bean.HttpCallbackModel;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
|
||||||
@ -47,6 +48,8 @@ public class ChooseLabelActivity extends AbsOTOActivity {
|
|||||||
|
|
||||||
Button submit; //提交
|
Button submit; //提交
|
||||||
|
|
||||||
|
boolean isUserHome;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
return R.layout.activity_choose_label;
|
return R.layout.activity_choose_label;
|
||||||
@ -59,6 +62,9 @@ public class ChooseLabelActivity extends AbsOTOActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void initDate() {
|
private void initDate() {
|
||||||
|
|
||||||
|
isUserHome = getIntent().getBooleanExtra("isUserHome", false);
|
||||||
|
|
||||||
OTONetManager.getInstance(mContext).getSysLabel(new HttpCallback<List<LabelBean>>() {
|
OTONetManager.getInstance(mContext).getSysLabel(new HttpCallback<List<LabelBean>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<LabelBean> data) {
|
public void onSuccess(List<LabelBean> data) {
|
||||||
@ -134,8 +140,12 @@ public class ChooseLabelActivity extends AbsOTOActivity {
|
|||||||
public void onSuccess(HttpCallbackModel data) {
|
public void onSuccess(HttpCallbackModel data) {
|
||||||
Toast.makeText(mContext, data.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(mContext, data.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
if (data.getCode() == 0) {
|
if (data.getCode() == 0) {
|
||||||
RouteManager.forwardMainActivity();
|
if (isUserHome) {
|
||||||
finish();
|
finish();
|
||||||
|
} else {
|
||||||
|
RouteManager.forwardMainActivity();
|
||||||
|
finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ package com.shayu.onetoone.activity.login;
|
|||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
@ -21,13 +20,11 @@ import com.blankj.utilcode.util.StringUtils;
|
|||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.shayu.onetoone.R;
|
import com.shayu.onetoone.R;
|
||||||
import com.shayu.onetoone.activity.AbsOTOActivity;
|
import com.shayu.onetoone.activity.AbsOTOActivity;
|
||||||
import com.shayu.onetoone.activity.MainActivity;
|
|
||||||
import com.shayu.onetoone.bean.AvatarBean;
|
import com.shayu.onetoone.bean.AvatarBean;
|
||||||
import com.shayu.onetoone.manager.OTONetManager;
|
import com.shayu.onetoone.manager.OTONetManager;
|
||||||
import com.shayu.onetoone.manager.RouteManager;
|
import com.shayu.onetoone.manager.RouteManager;
|
||||||
import com.shayu.onetoone.view.UserAvatarPopup;
|
import com.shayu.onetoone.view.UserAvatarPopup;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
|
||||||
import com.yunbao.common.bean.HttpCallbackModel;
|
import com.yunbao.common.bean.HttpCallbackModel;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
@ -204,7 +201,7 @@ public class CompleteActivity extends AbsOTOActivity {
|
|||||||
public void onSuccess(HttpCallbackModel data) {
|
public void onSuccess(HttpCallbackModel data) {
|
||||||
Toast.makeText(mContext, data.getMsg(), Toast.LENGTH_SHORT).show();
|
Toast.makeText(mContext, data.getMsg(), Toast.LENGTH_SHORT).show();
|
||||||
if (data.getCode() == 0) {
|
if (data.getCode() == 0) {
|
||||||
RouteManager.forwardChooseActivity();
|
RouteManager.forwardChooseLabelActivity(false);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,151 @@
|
|||||||
|
package com.shayu.onetoone.activity.setting;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.shayu.onetoone.R;
|
||||||
|
import com.shayu.onetoone.adapter.SearchAdapter;
|
||||||
|
import com.shayu.onetoone.bean.SearchUserBean;
|
||||||
|
import com.shayu.onetoone.utils.MainHttpConsts;
|
||||||
|
import com.shayu.onetoone.utils.MainHttpUtil;
|
||||||
|
import com.yunbao.common.CommonAppConfig;
|
||||||
|
import com.yunbao.common.Constants;
|
||||||
|
import com.yunbao.common.activity.AbsActivity;
|
||||||
|
import com.yunbao.common.adapter.RefreshAdapter;
|
||||||
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
|
import com.yunbao.common.custom.CommonRefreshView;
|
||||||
|
import com.yunbao.common.event.FollowEvent;
|
||||||
|
import com.yunbao.common.http.HttpCallback;
|
||||||
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我的关注 TA的关注
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class FollowActivity extends AbsActivity implements OnItemClickListener<SearchUserBean> {
|
||||||
|
|
||||||
|
public static void forward(Context context, String toUid, int isBlack) {
|
||||||
|
Intent intent = new Intent(context, FollowActivity.class);
|
||||||
|
intent.putExtra(Constants.TO_UID, toUid);
|
||||||
|
intent.putExtra(Constants.isBlack, isBlack);
|
||||||
|
context.startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
|
private CommonRefreshView mRefreshView;
|
||||||
|
private SearchAdapter mAdapter;
|
||||||
|
private String mToUid;
|
||||||
|
private int isBlack;
|
||||||
|
private int intoIndex = 0;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getLayoutId() {
|
||||||
|
return R.layout.activity_follow;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void main() {
|
||||||
|
mToUid = getIntent().getStringExtra(Constants.TO_UID);
|
||||||
|
isBlack = getIntent().getIntExtra(Constants.isBlack, 0);
|
||||||
|
if (TextUtils.isEmpty(mToUid)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mRefreshView = findViewById(R.id.refreshView);
|
||||||
|
if (isBlack == 1) {
|
||||||
|
setTitle(mContext.getString(R.string.my_black));
|
||||||
|
} else if (mToUid.equals(CommonAppConfig.getInstance().getUid())) {
|
||||||
|
setTitle(mContext.getString(R.string.follow_my_follow));
|
||||||
|
mRefreshView.setEmptyLayoutId(R.layout.view_no_data_follow);
|
||||||
|
} else {
|
||||||
|
setTitle(mContext.getString(R.string.follow_ta_follow));
|
||||||
|
mRefreshView.setEmptyLayoutId(R.layout.view_no_data_follow_2);
|
||||||
|
}
|
||||||
|
mRefreshView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||||
|
mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<SearchUserBean>() {
|
||||||
|
@Override
|
||||||
|
public RefreshAdapter<SearchUserBean> getAdapter() {
|
||||||
|
if (mAdapter == null) {
|
||||||
|
mAdapter = new SearchAdapter(mContext, Constants.FOLLOW_FROM_FOLLOW);
|
||||||
|
mAdapter.setOnItemClickListener(FollowActivity.this);
|
||||||
|
}
|
||||||
|
return mAdapter;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void loadData(int p, HttpCallback callback) {
|
||||||
|
if (isBlack == 1) {
|
||||||
|
MainHttpUtil.getBlackList(p, callback);
|
||||||
|
} else {
|
||||||
|
MainHttpUtil.getFollowList(mToUid, p, callback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SearchUserBean> processData(String[] info) {
|
||||||
|
return JSON.parseArray(Arrays.toString(info), SearchUserBean.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRefreshSuccess(List<SearchUserBean> list, int listCount) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRefreshFailure() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadMoreSuccess(List<SearchUserBean> loadItemList, int loadItemCount) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onLoadMoreFailure() {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
EventBus.getDefault().register(this);
|
||||||
|
mRefreshView.initData();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
public void onFollowEvent(FollowEvent e) {
|
||||||
|
if (mAdapter != null) {
|
||||||
|
mAdapter.updateItem(e.getToUid(), e.getIsAttention());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
EventBus.getDefault().unregister(this);
|
||||||
|
MainHttpUtil.cancel(MainHttpConsts.GET_FOLLOW_LIST);
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onItemClick(SearchUserBean bean, int position) {
|
||||||
|
RouteUtil.forwardUserHome(mContext, bean.getId(), 0);
|
||||||
|
intoIndex = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
if (intoIndex == 1) {
|
||||||
|
intoIndex = 0;
|
||||||
|
mRefreshView.initData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,91 @@
|
|||||||
|
package com.shayu.onetoone.activity.setting;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.EditText;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.shayu.onetoone.R;
|
||||||
|
import com.shayu.onetoone.activity.user.AuthActivity;
|
||||||
|
import com.shayu.onetoone.manager.OTONetManager;
|
||||||
|
import com.yunbao.common.activity.AbsActivity;
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
import com.yunbao.common.bean.HttpCallbackModel;
|
||||||
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置密码
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ModifyPwdActivity extends AbsActivity implements View.OnClickListener {
|
||||||
|
|
||||||
|
private EditText mEditOld;
|
||||||
|
private EditText mEditNew;
|
||||||
|
private EditText mEditConfirm;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getLayoutId() {
|
||||||
|
return R.layout.activity_modify_pwd;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void main() {
|
||||||
|
setTitle(mContext.getString(R.string.modify_pwd));
|
||||||
|
mEditOld = (EditText) findViewById(R.id.edit_old);
|
||||||
|
mEditNew = (EditText) findViewById(R.id.edit_new);
|
||||||
|
mEditConfirm = (EditText) findViewById(R.id.edit_confirm);
|
||||||
|
findViewById(R.id.btn_confirm).setOnClickListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
modify();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void modify() {
|
||||||
|
String pwdOld = mEditOld.getText().toString().trim();
|
||||||
|
if (TextUtils.isEmpty(pwdOld)) {
|
||||||
|
mEditOld.setError(mContext.getString(R.string.modify_pwd_old_1));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String pwdNew = mEditNew.getText().toString().trim();
|
||||||
|
if (TextUtils.isEmpty(pwdNew)) {
|
||||||
|
mEditNew.setError(mContext.getString(R.string.modify_pwd_new_1));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String pwdConfirm = mEditConfirm.getText().toString().trim();
|
||||||
|
if (TextUtils.isEmpty(pwdConfirm)) {
|
||||||
|
mEditConfirm.setError(mContext.getString(R.string.modify_pwd_confirm_1));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!pwdNew.equals(pwdConfirm)) {
|
||||||
|
mEditConfirm.setError(mContext.getString(R.string.reg_pwd_error));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
OTONetManager.getInstance(ModifyPwdActivity.this).updatePass(pwdOld, pwdNew, pwdConfirm, new HttpCallback<HttpCallbackModel>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(HttpCallbackModel data) {
|
||||||
|
if (data.getCode() == 0) {
|
||||||
|
ToastUtil.show(data.getMsg());
|
||||||
|
finish();
|
||||||
|
} else {
|
||||||
|
ToastUtil.show(data.getMsg());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,268 @@
|
|||||||
|
package com.shayu.onetoone.activity.setting;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.shayu.onetoone.R;
|
||||||
|
import com.shayu.onetoone.activity.AbsOTOActivity;
|
||||||
|
import com.yunbao.common.adapter.MsgFollowAdapter;
|
||||||
|
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
||||||
|
import com.yunbao.common.http.ResponseData;
|
||||||
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
|
import com.yunbao.common.http.main.MainNetManager;
|
||||||
|
import com.yunbao.common.utils.SpUtil;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
|
||||||
|
public class OneMsgSettActivity extends AbsOTOActivity {
|
||||||
|
ImageView dt_switch, hdd_switch, lt_switch, xt_switch, kb_switch, privateChatMessageSwitch;
|
||||||
|
public static final String SWITCH_PRIVATE_CHAT_MSG = "private_chat_message_switch";
|
||||||
|
|
||||||
|
RecyclerView follow_list;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getLayoutId() {
|
||||||
|
return R.layout.activity_msg_sett;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void main(Bundle savedInstanceState) {
|
||||||
|
setTitle(getString(R.string.alerts));
|
||||||
|
follow_list = (RecyclerView) findViewById(R.id.follow_list);
|
||||||
|
dt_switch = (ImageView) findViewById(R.id.dt_switch);
|
||||||
|
hdd_switch = (ImageView) findViewById(R.id.hdd_switch);
|
||||||
|
lt_switch = (ImageView) findViewById(R.id.lt_switch);
|
||||||
|
xt_switch = (ImageView) findViewById(R.id.xt_switch);
|
||||||
|
kb_switch = (ImageView) findViewById(R.id.kb_switch);
|
||||||
|
privateChatMessageSwitch = findViewById(R.id.private_chat_switch);
|
||||||
|
getData();
|
||||||
|
dt_switch.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
//打开的
|
||||||
|
if (dt_switch.getDrawable().getCurrent().getConstantState().equals(getResources().getDrawable(R.mipmap.special_icon_on).getConstantState())) {
|
||||||
|
if (setMsgMasterSwitch("2", "1")) {
|
||||||
|
dt_switch.setImageResource(R.mipmap.special_icon_off);
|
||||||
|
}
|
||||||
|
;
|
||||||
|
} else {
|
||||||
|
if (setMsgMasterSwitch("1", "1")) {
|
||||||
|
dt_switch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
}
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
hdd_switch.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
//打开的
|
||||||
|
if (hdd_switch.getDrawable().getCurrent().getConstantState().equals(getResources().getDrawable(R.mipmap.special_icon_on).getConstantState())) {
|
||||||
|
if (setMsgMasterSwitch("2", "2")) {
|
||||||
|
hdd_switch.setImageResource(R.mipmap.special_icon_off);
|
||||||
|
}
|
||||||
|
;
|
||||||
|
} else {
|
||||||
|
if (setMsgMasterSwitch("1", "2")) {
|
||||||
|
hdd_switch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
}
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
lt_switch.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
//打开的
|
||||||
|
if (lt_switch.getDrawable().getCurrent().getConstantState().equals(getResources().getDrawable(R.mipmap.special_icon_on).getConstantState())) {
|
||||||
|
if (setMsgMasterSwitch("2", "3")) {
|
||||||
|
lt_switch.setImageResource(R.mipmap.special_icon_off);
|
||||||
|
}
|
||||||
|
;
|
||||||
|
} else {
|
||||||
|
if (setMsgMasterSwitch("1", "3")) {
|
||||||
|
lt_switch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
}
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
xt_switch.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
//打开的
|
||||||
|
if (xt_switch.getDrawable().getCurrent().getConstantState().equals(getResources().getDrawable(R.mipmap.special_icon_on).getConstantState())) {
|
||||||
|
if (setMsgMasterSwitch("2", "4")) {
|
||||||
|
xt_switch.setImageResource(R.mipmap.special_icon_off);
|
||||||
|
}
|
||||||
|
;
|
||||||
|
} else {
|
||||||
|
if (setMsgMasterSwitch("1", "4")) {
|
||||||
|
xt_switch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
}
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
follow_list.setVisibility(View.GONE);
|
||||||
|
kb_switch.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
int is = 1;
|
||||||
|
//打开的
|
||||||
|
if (kb_switch.getDrawable().getCurrent().getConstantState().equals(getResources().getDrawable(R.mipmap.special_icon_on).getConstantState())) {
|
||||||
|
is = 2;
|
||||||
|
} else {
|
||||||
|
is = 1;
|
||||||
|
}
|
||||||
|
MainNetManager.get(OneMsgSettActivity.this).setBeginShowMsgSwitch(is + "", "1", "", new HttpCallback<ResponseData>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(ResponseData data) {
|
||||||
|
|
||||||
|
Log.e("ds", data.getCode() + "");
|
||||||
|
if (data.getCode() == 200) {
|
||||||
|
Log.e("ds", kb_switch.getDrawable().getCurrent().getConstantState() + "");
|
||||||
|
if (kb_switch.getDrawable().getCurrent().getConstantState().equals(getResources().getDrawable(R.mipmap.special_icon_on).getConstantState())) {
|
||||||
|
kb_switch.setImageResource(R.mipmap.special_icon_off);
|
||||||
|
follow_list.setVisibility(View.GONE);
|
||||||
|
} else {
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
Log.e("ds", kb_switch.getDrawable().getCurrent().getConstantState() + "11" + error);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
/* privateChatMessageSwitch.setOnClickListener(view -> {
|
||||||
|
if (privateChatMessageSwitch.getDrawable().getCurrent().getConstantState().equals(getResources().getDrawable(R.mipmap.special_icon_on).getConstantState())){
|
||||||
|
if(setMsgMasterSwitch("2","5")){
|
||||||
|
privateChatMessageSwitch.setImageResource(R.mipmap.special_icon_off);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(setMsgMasterSwitch("1","5")){
|
||||||
|
privateChatMessageSwitch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});*/
|
||||||
|
privateChatMessageSwitch.setOnClickListener(view -> {
|
||||||
|
if (privateChatMessageSwitch.getDrawable().getCurrent().getConstantState().equals(getResources().getDrawable(R.mipmap.special_icon_on).getConstantState())) {
|
||||||
|
privateChatMessageSwitch.setImageResource(R.mipmap.special_icon_off);
|
||||||
|
SpUtil.getInstance().setBooleanValue(SWITCH_PRIVATE_CHAT_MSG, false);
|
||||||
|
} else {
|
||||||
|
privateChatMessageSwitch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
SpUtil.getInstance().setBooleanValue(SWITCH_PRIVATE_CHAT_MSG, true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
follow_list.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||||
|
follow_list.setHasFixedSize(true);
|
||||||
|
follow_list.setNestedScrollingEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getData() {
|
||||||
|
MainNetManager.get(this)
|
||||||
|
.getMsgSwitchDetail(new HttpCallback<MsgSwitchDetailModel>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(MsgSwitchDetailModel data) {
|
||||||
|
|
||||||
|
if (data.getDynamic_msg_switch().equals("2")) {
|
||||||
|
dt_switch.setImageResource(R.mipmap.special_icon_off);
|
||||||
|
} else {
|
||||||
|
dt_switch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.getInteraction_show_msg_switch().equals("2")) {
|
||||||
|
hdd_switch.setImageResource(R.mipmap.special_icon_off);
|
||||||
|
} else {
|
||||||
|
hdd_switch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.getChat_msg_switch().equals("2")) {
|
||||||
|
lt_switch.setImageResource(R.mipmap.special_icon_off);
|
||||||
|
} else {
|
||||||
|
lt_switch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.getChat_msg_switch().equals("2")) {
|
||||||
|
lt_switch.setImageResource(R.mipmap.special_icon_off);
|
||||||
|
} else {
|
||||||
|
lt_switch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.getSystem_msg_switch().equals("2")) {
|
||||||
|
xt_switch.setImageResource(R.mipmap.special_icon_off);
|
||||||
|
} else {
|
||||||
|
xt_switch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.getSystem_msg_switch().equals("2")) {
|
||||||
|
xt_switch.setImageResource(R.mipmap.special_icon_off);
|
||||||
|
} else {
|
||||||
|
xt_switch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < data.getFollowList().size(); i++) {
|
||||||
|
if (!data.getFollowList().get(i).getStatus().equals("2")) {
|
||||||
|
kb_switch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
follow_list.setVisibility(View.VISIBLE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (SpUtil.getInstance().getBooleanValue(SWITCH_PRIVATE_CHAT_MSG)) {
|
||||||
|
privateChatMessageSwitch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
} else {
|
||||||
|
privateChatMessageSwitch.setImageResource(R.mipmap.special_icon_off);
|
||||||
|
}
|
||||||
|
|
||||||
|
MsgFollowAdapter topAdapter = new MsgFollowAdapter(OneMsgSettActivity.this, data.getFollowList());
|
||||||
|
follow_list.setAdapter(topAdapter);
|
||||||
|
follow_list.setVisibility(View.VISIBLE);
|
||||||
|
kb_switch.setImageResource(R.mipmap.special_icon_on);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(R.string.net_error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean ret = false;
|
||||||
|
|
||||||
|
public boolean setMsgMasterSwitch(String status, String type) {
|
||||||
|
ret = false;
|
||||||
|
MainNetManager.get(this).setMsgMasterSwitch(status, type, new HttpCallback<ResponseData>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(ResponseData data) {
|
||||||
|
|
||||||
|
if (data.getCode() == 200) {
|
||||||
|
ret = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +1,10 @@
|
|||||||
package com.shayu.onetoone.activity.setting;
|
package com.shayu.onetoone.activity.setting;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.shayu.onetoone.R;
|
import com.shayu.onetoone.R;
|
||||||
@ -11,14 +13,17 @@ import com.shayu.onetoone.manager.RouteManager;
|
|||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.activity.AbsActivity;
|
import com.yunbao.common.activity.AbsActivity;
|
||||||
|
import com.yunbao.common.bean.ConfigBean;
|
||||||
import com.yunbao.common.bean.IMLoginModel;
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
import com.yunbao.common.http.CommonHttpConsts;
|
import com.yunbao.common.http.CommonHttpConsts;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.GlideCatchUtil;
|
import com.yunbao.common.utils.GlideCatchUtil;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.utils.VersionUtil;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -27,13 +32,16 @@ import cn.rongcloud.rtc.api.RCRTCEngine;
|
|||||||
import io.rong.imlib.RongIMClient;
|
import io.rong.imlib.RongIMClient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/9/30.
|
* 设置
|
||||||
*/
|
*/
|
||||||
@Route(path = RouteUtil.PATH_SETTING)
|
@Route(path = RouteUtil.PATH_SETTING)
|
||||||
public class SettingActivity extends AbsActivity {
|
public class SettingActivity extends AbsActivity {
|
||||||
|
|
||||||
private Handler mHandler;
|
private Handler mHandler;
|
||||||
|
|
||||||
|
private TextView versionCode;
|
||||||
|
private TextView cacheSize;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
return R.layout.activity_setting;
|
return R.layout.activity_setting;
|
||||||
@ -44,14 +52,28 @@ public class SettingActivity extends AbsActivity {
|
|||||||
setTitle(mContext.getString(R.string.set_up));
|
setTitle(mContext.getString(R.string.set_up));
|
||||||
IMLoginModel model = IMLoginManager.get(mContext).getUserInfo();
|
IMLoginModel model = IMLoginManager.get(mContext).getUserInfo();
|
||||||
|
|
||||||
//跳转自己
|
versionCode = findViewById(R.id.versionCode);
|
||||||
|
cacheSize = findViewById(R.id.cacheSize);
|
||||||
|
|
||||||
|
//编辑资料
|
||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.personSet), new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.personSet), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
RouteUtil.forwardEditProfileActivity();
|
RouteUtil.forwardEditProfileActivity();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.change_the_password), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
forwardModifyPwd();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.blacklist), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
FollowActivity.forward(mContext, CommonAppConfig.getInstance().getUserBean().getId(), 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
// 达人认证
|
// 达人认证
|
||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.toBlogger), new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.toBlogger), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
@ -60,30 +82,59 @@ public class SettingActivity extends AbsActivity {
|
|||||||
RouteManager.forwardAuthBloggerInletActivity();
|
RouteManager.forwardAuthBloggerInletActivity();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//清除緩存
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.clearCaChe), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
clearCache();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//检查版本更新
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.checkVersion), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
checkVersion();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//退出登录
|
||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.logout), new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.logout), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
logout();
|
logout();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.layout_alerts), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
startActivity(new Intent(SettingActivity.this, OneMsgSettActivity.class));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
intiData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("SetTextI18n")
|
||||||
|
private void intiData() {
|
||||||
|
versionCode.setText(VersionUtil.getVersion());
|
||||||
|
cacheSize.setText(GlideCatchUtil.getInstance().getCacheSize() + "MB");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查更新
|
* 检查更新
|
||||||
*/
|
*/
|
||||||
private void checkVersion() {
|
private void checkVersion() {
|
||||||
// CommonAppConfig.getInstance().getConfig(new CommonCallback<ConfigBean>() {
|
CommonAppConfig.getInstance().getConfig(new CommonCallback<ConfigBean>() {
|
||||||
// @Override
|
@Override
|
||||||
// public void callback(ConfigBean configBean) {
|
public void callback(ConfigBean configBean) {
|
||||||
// if (configBean != null) {
|
if (configBean != null) {
|
||||||
// if (VersionUtil.isLatest(configBean.getVersion())) {
|
if (VersionUtil.isLatest(configBean.getVersion())) {
|
||||||
// ToastUtil.show(R.string.version_latest);
|
ToastUtil.show(R.string.version_latest);
|
||||||
// } else {
|
} else {
|
||||||
// VersionUtil.showDialog(mContext, configBean, configBean.getDownloadApkUrl());
|
VersionUtil.showDialog(mContext, configBean, configBean.getDownloadApkUrl());
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// });
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -103,7 +154,7 @@ public class SettingActivity extends AbsActivity {
|
|||||||
* 修改密码
|
* 修改密码
|
||||||
*/
|
*/
|
||||||
private void forwardModifyPwd() {
|
private void forwardModifyPwd() {
|
||||||
//startActivity(new Intent(mContext, ModifyPwdActivity.class));
|
startActivity(new Intent(mContext, ModifyPwdActivity.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -116,7 +167,7 @@ public class SettingActivity extends AbsActivity {
|
|||||||
/**
|
/**
|
||||||
* 清除缓存
|
* 清除缓存
|
||||||
*/
|
*/
|
||||||
private void clearCache(final int position) {
|
private void clearCache() {
|
||||||
final Dialog dialog = DialogUitl.loadingDialog(mContext, getString(R.string.setting_clear_cache_ing));
|
final Dialog dialog = DialogUitl.loadingDialog(mContext, getString(R.string.setting_clear_cache_ing));
|
||||||
dialog.show();
|
dialog.show();
|
||||||
GlideCatchUtil.getInstance().clearImageAllCache();
|
GlideCatchUtil.getInstance().clearImageAllCache();
|
||||||
|
@ -6,6 +6,7 @@ import android.content.Intent;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@ -18,6 +19,7 @@ import com.sahooz.library.Country;
|
|||||||
import com.sahooz.library.CountryPicker;
|
import com.sahooz.library.CountryPicker;
|
||||||
import com.sahooz.library.OnPick;
|
import com.sahooz.library.OnPick;
|
||||||
import com.shayu.onetoone.R;
|
import com.shayu.onetoone.R;
|
||||||
|
import com.shayu.onetoone.bean.AuthBean;
|
||||||
import com.shayu.onetoone.bean.AvatarBean;
|
import com.shayu.onetoone.bean.AvatarBean;
|
||||||
import com.shayu.onetoone.manager.OTONetManager;
|
import com.shayu.onetoone.manager.OTONetManager;
|
||||||
import com.shayu.onetoone.manager.RouteManager;
|
import com.shayu.onetoone.manager.RouteManager;
|
||||||
@ -75,6 +77,7 @@ public class EditProfileActivity extends AbsActivity {
|
|||||||
private TextView mSex;
|
private TextView mSex;
|
||||||
private TextView mCity;
|
private TextView mCity;
|
||||||
private TextView tv_bind_phone;
|
private TextView tv_bind_phone;
|
||||||
|
private TextView auth_status;
|
||||||
private ProcessImageUtil cameraUtil;
|
private ProcessImageUtil cameraUtil;
|
||||||
private UserBean mUserBean;
|
private UserBean mUserBean;
|
||||||
private String mProvinceVal;
|
private String mProvinceVal;
|
||||||
@ -88,6 +91,8 @@ public class EditProfileActivity extends AbsActivity {
|
|||||||
|
|
||||||
int userSex;
|
int userSex;
|
||||||
|
|
||||||
|
AuthBean authBean;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
return R.layout.activity_edit_profile;
|
return R.layout.activity_edit_profile;
|
||||||
@ -96,6 +101,7 @@ public class EditProfileActivity extends AbsActivity {
|
|||||||
@Override
|
@Override
|
||||||
protected void main() {
|
protected void main() {
|
||||||
setTitle(mContext.getString(R.string.edit_profile));
|
setTitle(mContext.getString(R.string.edit_profile));
|
||||||
|
auth_status = findViewById(R.id.auth_status);
|
||||||
mAvatar = (ImageView) findViewById(R.id.avatar);
|
mAvatar = (ImageView) findViewById(R.id.avatar);
|
||||||
mName = (TextView) findViewById(R.id.name);
|
mName = (TextView) findViewById(R.id.name);
|
||||||
mSign = (TextView) findViewById(R.id.sign);
|
mSign = (TextView) findViewById(R.id.sign);
|
||||||
@ -247,6 +253,12 @@ public class EditProfileActivity extends AbsActivity {
|
|||||||
} else {
|
} else {
|
||||||
showTaskDialog();
|
showTaskDialog();
|
||||||
}
|
}
|
||||||
|
} else if (i == R.id.btn_like) {
|
||||||
|
if (isInto) {
|
||||||
|
editLabel();
|
||||||
|
} else {
|
||||||
|
showTaskDialog();
|
||||||
|
}
|
||||||
} else if (i == R.id.btn_sign) {
|
} else if (i == R.id.btn_sign) {
|
||||||
if (isInto) {
|
if (isInto) {
|
||||||
forwardSign();
|
forwardSign();
|
||||||
@ -263,7 +275,6 @@ public class EditProfileActivity extends AbsActivity {
|
|||||||
public void onSex(int sex) {
|
public void onSex(int sex) {
|
||||||
userSex = sex;
|
userSex = sex;
|
||||||
|
|
||||||
|
|
||||||
OTONetManager.getInstance(EditProfileActivity.this).setFiled("sex", String.valueOf(sex), new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
OTONetManager.getInstance(EditProfileActivity.this).setFiled("sex", String.valueOf(sex), new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(HttpCallbackModel data) {
|
public void onSuccess(HttpCallbackModel data) {
|
||||||
@ -323,6 +334,10 @@ public class EditProfileActivity extends AbsActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void editLabel() {
|
||||||
|
RouteManager.forwardChooseLabelActivity(true);
|
||||||
|
}
|
||||||
|
|
||||||
private void editName() {
|
private void editName() {
|
||||||
Intent intent = new Intent(mContext, EditNameActivity.class);
|
Intent intent = new Intent(mContext, EditNameActivity.class);
|
||||||
intent.putExtra(Constants.NICK_NAME, mUserBean.getUserNiceName());
|
intent.putExtra(Constants.NICK_NAME, mUserBean.getUserNiceName());
|
||||||
@ -665,6 +680,32 @@ public class EditProfileActivity extends AbsActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}*/
|
}*/
|
||||||
|
OTONetManager.getInstance(EditProfileActivity.this).getAuthInfo(new com.yunbao.common.http.base.HttpCallback<AuthBean>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(AuthBean data) {
|
||||||
|
authBean = data;
|
||||||
|
if (data.getName_auth() == 2) {//已通过
|
||||||
|
auth_status.setText("認證通過");
|
||||||
|
auth_status.setTextColor(getResources().getColor(R.color.green_81c160));
|
||||||
|
auth_status.setVisibility(View.GONE);
|
||||||
|
findViewById(R.id.img_auth_status).setVisibility(View.VISIBLE);
|
||||||
|
} else if (data.getName_auth() == 3) {//已提交
|
||||||
|
auth_status.setText("審核中");
|
||||||
|
auth_status.setTextColor(getResources().getColor(R.color.gray1));
|
||||||
|
} else if (data.getName_auth() == 4) {
|
||||||
|
auth_status.setText("審核失敗重新提交");
|
||||||
|
auth_status.setTextColor(getResources().getColor(R.color.red));
|
||||||
|
} else {
|
||||||
|
auth_status.setText("去認證");
|
||||||
|
auth_status.setTextColor(getResources().getColor(R.color.black2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,7 +27,16 @@ public class DiamondExchangeAdapter extends RecyclerView.Adapter {
|
|||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
DiamondExchangeViewHolder exchangeViewHolder = (DiamondExchangeViewHolder) holder;
|
DiamondExchangeViewHolder exchangeViewHolder = (DiamondExchangeViewHolder) holder;
|
||||||
exchangeViewHolder.showData(exchangeModels.get(position));
|
exchangeViewHolder.showData(exchangeModels.get(position), position);
|
||||||
|
exchangeViewHolder.setListener(new DiamondExchangeViewHolder.DiamondExchangeClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onDiamondExchangeClickListener(ExchangeModel model, int position) {
|
||||||
|
for (int i = 0; i < exchangeModels.size(); i++) {
|
||||||
|
exchangeModels.get(i).setSelect(i == position);
|
||||||
|
}
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -38,5 +47,13 @@ public class DiamondExchangeAdapter extends RecyclerView.Adapter {
|
|||||||
public void addData(List<ExchangeModel> mExchangeModels) {
|
public void addData(List<ExchangeModel> mExchangeModels) {
|
||||||
exchangeModels.clear();
|
exchangeModels.clear();
|
||||||
exchangeModels.addAll(mExchangeModels);
|
exchangeModels.addAll(mExchangeModels);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void unSelect() {
|
||||||
|
for (int i = 0; i < exchangeModels.size(); i++) {
|
||||||
|
exchangeModels.get(i).setSelect(false);
|
||||||
|
}
|
||||||
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,46 @@
|
|||||||
|
package com.shayu.onetoone.adapter;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.shayu.onetoone.R;
|
||||||
|
import com.shayu.onetoone.bean.ExchangeRecordModel;
|
||||||
|
import com.shayu.onetoone.view.ExchangeRecordViewHolder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ExchangeRecordAdapter extends RecyclerView.Adapter<ExchangeRecordViewHolder> {
|
||||||
|
private List<ExchangeRecordModel> exchangeRecordModels = new ArrayList<>();
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public ExchangeRecordViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View bodyView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_exchange_record_item_holder, parent, false);
|
||||||
|
return new ExchangeRecordViewHolder(bodyView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull ExchangeRecordViewHolder holder, int position) {
|
||||||
|
holder.setData(exchangeRecordModels.get(position), position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return exchangeRecordModels.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setList(List<ExchangeRecordModel> mExchangeRecordModels) {
|
||||||
|
this.exchangeRecordModels = mExchangeRecordModels;
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addLst(List<ExchangeRecordModel> mExchangeRecordModels) {
|
||||||
|
this.exchangeRecordModels.addAll(mExchangeRecordModels);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
}
|
@ -40,4 +40,9 @@ public class MyArnAdapter extends RecyclerView.Adapter {
|
|||||||
friendAppMoneyLogModels.addAll(mFriendAppMoneyLogModels);
|
friendAppMoneyLogModels.addAll(mFriendAppMoneyLogModels);
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addLst(List<FriendAppMoneyLogModel> mFriendAppMoneyLogModels) {
|
||||||
|
this.friendAppMoneyLogModels.addAll(mFriendAppMoneyLogModels);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,218 @@
|
|||||||
|
package com.shayu.onetoone.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.shayu.onetoone.R;
|
||||||
|
import com.shayu.onetoone.bean.SearchUserBean;
|
||||||
|
import com.yunbao.common.CommonAppConfig;
|
||||||
|
import com.yunbao.common.Constants;
|
||||||
|
import com.yunbao.common.adapter.RefreshAdapter;
|
||||||
|
import com.yunbao.common.bean.LevelBean;
|
||||||
|
import com.yunbao.common.bean.LiveBean;
|
||||||
|
import com.yunbao.common.custom.MyRadioButton;
|
||||||
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
|
import com.yunbao.common.http.HttpCallback;
|
||||||
|
import com.yunbao.common.http.LiveHttpUtil;
|
||||||
|
import com.yunbao.common.utils.CommonIconUtil;
|
||||||
|
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||||
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import pl.droidsonroids.gif.GifImageView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by cxf on 2018/9/29.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class SearchAdapter extends RefreshAdapter<SearchUserBean> {
|
||||||
|
|
||||||
|
private View.OnClickListener mFollowClickListener;
|
||||||
|
private View.OnClickListener mClickListener;
|
||||||
|
private String mFollow;
|
||||||
|
private String mFollowing;
|
||||||
|
private int mFrom;
|
||||||
|
private String mUid;
|
||||||
|
|
||||||
|
public SearchAdapter(Context context, int from) {
|
||||||
|
super(context);
|
||||||
|
mFrom = from;
|
||||||
|
mFollow =mContext.getString(R.string.follow);
|
||||||
|
mFollowing =mContext.getString(R.string.following);
|
||||||
|
mFollowClickListener = new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (!canClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Object tag = v.getTag();
|
||||||
|
if (tag == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SearchUserBean bean = (SearchUserBean) tag;
|
||||||
|
CommonHttpUtil.setAttention(bean.getId(), null);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
mClickListener = new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
if (!canClick()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Object tag = v.getTag();
|
||||||
|
if (tag == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SearchUserBean bean = (SearchUserBean) tag;
|
||||||
|
if (mOnItemClickListener != null) {
|
||||||
|
mOnItemClickListener.onItemClick(bean, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
mUid = CommonAppConfig.getInstance().getUid();
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
return new Vh(mInflater.inflate(R.layout.item_search, parent, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vh, int position, @NonNull List payloads) {
|
||||||
|
Object payload = payloads.size() > 0 ? payloads.get(0) : null;
|
||||||
|
((Vh) vh).setData(mList.get(position), position, payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateItem(String id, int attention) {
|
||||||
|
if (TextUtils.isEmpty(id)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (int i = 0, size = mList.size(); i < size; i++) {
|
||||||
|
SearchUserBean bean = mList.get(i);
|
||||||
|
if (bean != null && id.equals(bean.getId())) {
|
||||||
|
bean.setAttention(attention);
|
||||||
|
notifyItemChanged(i, Constants.PAYLOAD);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class Vh extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
|
ImageView mAvatar;
|
||||||
|
TextView mName;
|
||||||
|
TextView mSign;
|
||||||
|
ImageView mSex;
|
||||||
|
ImageView mLevelAnchor;
|
||||||
|
ImageView mLevel;
|
||||||
|
MyRadioButton mBtnFollow;
|
||||||
|
GifImageView btn_live;
|
||||||
|
|
||||||
|
public Vh(View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
mAvatar = (ImageView) itemView.findViewById(R.id.avatar);
|
||||||
|
mName = (TextView) itemView.findViewById(R.id.name);
|
||||||
|
mSign = (TextView) itemView.findViewById(R.id.sign);
|
||||||
|
mSex = (ImageView) itemView.findViewById(R.id.sex);
|
||||||
|
mLevelAnchor = (ImageView) itemView.findViewById(R.id.level_anchor);
|
||||||
|
mLevel = (ImageView) itemView.findViewById(R.id.level);
|
||||||
|
mBtnFollow = (MyRadioButton) itemView.findViewById(R.id.btn_follow);
|
||||||
|
btn_live = (GifImageView) itemView.findViewById(R.id.btn_live);
|
||||||
|
itemView.setOnClickListener(mClickListener);
|
||||||
|
mBtnFollow.setOnClickListener(mFollowClickListener);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setData(final SearchUserBean bean, int position, Object payload) {
|
||||||
|
itemView.setTag(bean);
|
||||||
|
mBtnFollow.setTag(bean);
|
||||||
|
if (payload == null) {
|
||||||
|
ImgLoader.displayAvatar(mContext, bean.getAvatar(), mAvatar);
|
||||||
|
mName.setText(bean.getUserNiceName());
|
||||||
|
mSign.setText(bean.getSignature());
|
||||||
|
mSex.setImageResource(CommonIconUtil.getSexIcon(bean.getSex()));
|
||||||
|
btn_live.setVisibility(View.GONE);
|
||||||
|
if (bean.getIslive() != null && bean.getIslive().equals("1")) {
|
||||||
|
btn_live.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
}
|
||||||
|
btn_live.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
gotoLive(bean.getId());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
LevelBean anchorLevelBean = CommonAppConfig.getInstance().getAnchorLevel(bean.getLevelAnchor());
|
||||||
|
if (anchorLevelBean != null) {
|
||||||
|
ImgLoader.display(mContext, CommonAppConfig.getInstance().HOST + anchorLevelBean.getThumb(), mLevelAnchor);
|
||||||
|
}
|
||||||
|
LevelBean levelBean = CommonAppConfig.getInstance().getLevel(bean.getLevel());
|
||||||
|
if (levelBean != null) {
|
||||||
|
ImgLoader.display(mContext, levelBean.getThumb(), mLevel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if (mUid.equals(bean.getId())) {
|
||||||
|
// if (mBtnFollow.getVisibility() == View.VISIBLE) {
|
||||||
|
// mBtnFollow.setVisibility(View.INVISIBLE);
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// if (mBtnFollow.getVisibility() != View.VISIBLE) {
|
||||||
|
// mBtnFollow.setVisibility(View.VISIBLE);
|
||||||
|
// }
|
||||||
|
// if (bean.getAttention() == 1) {
|
||||||
|
// mBtnFollow.doChecked(true);
|
||||||
|
// mBtnFollow.setText(mFollowing);
|
||||||
|
// } else {
|
||||||
|
// mBtnFollow.doChecked(false);
|
||||||
|
// mBtnFollow.setText(mFollow);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void gotoLive(final String live_id) {
|
||||||
|
LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
if (code == 0 && info.length > 0) {
|
||||||
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
|
if (liveBean == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||||
|
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCheckError(String contextError) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
RouteUtil.forwardUserHome(mContext, live_id, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -12,7 +12,17 @@ public class ExchangeModel extends BaseModel {
|
|||||||
@SerializedName("title")
|
@SerializedName("title")
|
||||||
private String title;
|
private String title;
|
||||||
@SerializedName("num")
|
@SerializedName("num")
|
||||||
private int num;
|
private String num;
|
||||||
|
private boolean select = false;
|
||||||
|
|
||||||
|
public boolean isSelect() {
|
||||||
|
return select;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExchangeModel setSelect(boolean select) {
|
||||||
|
this.select = select;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getTop() {
|
public String getTop() {
|
||||||
return top;
|
return top;
|
||||||
@ -41,11 +51,11 @@ public class ExchangeModel extends BaseModel {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNum() {
|
public String getNum() {
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExchangeModel setNum(int num) {
|
public ExchangeModel setNum(String num) {
|
||||||
this.num = num;
|
this.num = num;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,140 @@
|
|||||||
|
package com.shayu.onetoone.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
|
public class ExchangeRecordModel extends BaseModel {
|
||||||
|
|
||||||
|
@SerializedName("id")
|
||||||
|
private int id;
|
||||||
|
@SerializedName("uid")
|
||||||
|
private int uid;
|
||||||
|
@SerializedName("income")
|
||||||
|
private int income;
|
||||||
|
@SerializedName("before_money")
|
||||||
|
private String beforeMoney;
|
||||||
|
@SerializedName("money")
|
||||||
|
private String money;
|
||||||
|
@SerializedName("after_money")
|
||||||
|
private String afterMoney;
|
||||||
|
@SerializedName("memo")
|
||||||
|
private String memo;
|
||||||
|
@SerializedName("type")
|
||||||
|
private String type;
|
||||||
|
@SerializedName("currency_type")
|
||||||
|
private String currencyType;
|
||||||
|
@SerializedName("service_id")
|
||||||
|
private String serviceId;
|
||||||
|
@SerializedName("create_time")
|
||||||
|
private long createTime;
|
||||||
|
@SerializedName("tuid")
|
||||||
|
private int tuid;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExchangeRecordModel setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getUid() {
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExchangeRecordModel setUid(int uid) {
|
||||||
|
this.uid = uid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getIncome() {
|
||||||
|
return income;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExchangeRecordModel setIncome(int income) {
|
||||||
|
this.income = income;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBeforeMoney() {
|
||||||
|
return beforeMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExchangeRecordModel setBeforeMoney(String beforeMoney) {
|
||||||
|
this.beforeMoney = beforeMoney;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMoney() {
|
||||||
|
return money;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExchangeRecordModel setMoney(String money) {
|
||||||
|
this.money = money;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAfterMoney() {
|
||||||
|
return afterMoney;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExchangeRecordModel setAfterMoney(String afterMoney) {
|
||||||
|
this.afterMoney = afterMoney;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMemo() {
|
||||||
|
return memo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExchangeRecordModel setMemo(String memo) {
|
||||||
|
this.memo = memo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExchangeRecordModel setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCurrencyType() {
|
||||||
|
return currencyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExchangeRecordModel setCurrencyType(String currencyType) {
|
||||||
|
this.currencyType = currencyType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getServiceId() {
|
||||||
|
return serviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExchangeRecordModel setServiceId(String serviceId) {
|
||||||
|
this.serviceId = serviceId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExchangeRecordModel setCreateTime(long createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTuid() {
|
||||||
|
return tuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExchangeRecordModel setTuid(int tuid) {
|
||||||
|
this.tuid = tuid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@ -9,6 +9,17 @@ public class FriendAppMoneySumModel extends BaseModel {
|
|||||||
private String today;
|
private String today;
|
||||||
@SerializedName("sum")
|
@SerializedName("sum")
|
||||||
private String sum;
|
private String sum;
|
||||||
|
@SerializedName("withdrawal")
|
||||||
|
private WithdrawalModel withdrawalModel;
|
||||||
|
|
||||||
|
public WithdrawalModel getWithdrawalModel() {
|
||||||
|
return withdrawalModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FriendAppMoneySumModel setWithdrawalModel(WithdrawalModel withdrawalModel) {
|
||||||
|
this.withdrawalModel = withdrawalModel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getToday() {
|
public String getToday() {
|
||||||
return today;
|
return today;
|
||||||
|
@ -0,0 +1,62 @@
|
|||||||
|
package com.shayu.onetoone.bean;
|
||||||
|
|
||||||
|
import android.os.Parcel;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import com.yunbao.common.bean.UserBean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by cxf on 2018/9/29.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class SearchUserBean extends UserBean {
|
||||||
|
|
||||||
|
private int attention;
|
||||||
|
private String isblack;
|
||||||
|
@JSONField(name = "isattention")
|
||||||
|
public int getAttention() {
|
||||||
|
return attention;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JSONField(name = "isblack")
|
||||||
|
public String getBlack() {
|
||||||
|
return isblack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JSONField(name = "isblack")
|
||||||
|
public void setBlack(String black) {
|
||||||
|
this.isblack = black;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JSONField(name = "isattention")
|
||||||
|
public void setAttention(int attention) {
|
||||||
|
this.attention = attention;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SearchUserBean() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void writeToParcel(Parcel dest, int flags) {
|
||||||
|
// super.writeToParcel(dest, flags);
|
||||||
|
// dest.writeInt(this.attention);
|
||||||
|
// }
|
||||||
|
|
||||||
|
public SearchUserBean(Parcel in) {
|
||||||
|
super(in);
|
||||||
|
this.attention = in.readInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final Creator<SearchUserBean> CREATOR = new Creator<SearchUserBean>() {
|
||||||
|
@Override
|
||||||
|
public SearchUserBean[] newArray(int size) {
|
||||||
|
return new SearchUserBean[size];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SearchUserBean createFromParcel(Parcel in) {
|
||||||
|
return new SearchUserBean(in);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.shayu.onetoone.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
|
public class WithdrawalModel extends BaseModel {
|
||||||
|
|
||||||
|
@SerializedName("sum")
|
||||||
|
private String sum;
|
||||||
|
@SerializedName("money")
|
||||||
|
private int money;
|
||||||
|
|
||||||
|
public String getSum() {
|
||||||
|
return sum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSum(String sum) {
|
||||||
|
this.sum = sum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMoney() {
|
||||||
|
return money;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMoney(int money) {
|
||||||
|
this.money = money;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
package com.shayu.onetoone.event;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
|
public class DiamondExchangeEvent extends BaseModel {
|
||||||
|
private String top;
|
||||||
|
private String name;
|
||||||
|
private String title;
|
||||||
|
private String num;
|
||||||
|
|
||||||
|
private int index = 0;
|
||||||
|
|
||||||
|
public int getIndex() {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiamondExchangeEvent setIndex(int index) {
|
||||||
|
this.index = index;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTop() {
|
||||||
|
return top;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiamondExchangeEvent setTop(String top) {
|
||||||
|
this.top = top;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiamondExchangeEvent setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiamondExchangeEvent setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNum() {
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DiamondExchangeEvent setNum(String num) {
|
||||||
|
this.num = num;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@ -9,6 +9,7 @@ import com.shayu.onetoone.bean.AuthBean;
|
|||||||
import com.shayu.onetoone.bean.AuthBloggerBean;
|
import com.shayu.onetoone.bean.AuthBloggerBean;
|
||||||
import com.shayu.onetoone.bean.AvatarBean;
|
import com.shayu.onetoone.bean.AvatarBean;
|
||||||
import com.shayu.onetoone.bean.ExchangeModel;
|
import com.shayu.onetoone.bean.ExchangeModel;
|
||||||
|
import com.shayu.onetoone.bean.ExchangeRecordModel;
|
||||||
import com.shayu.onetoone.bean.FollowBean;
|
import com.shayu.onetoone.bean.FollowBean;
|
||||||
import com.shayu.onetoone.bean.FriendAppMoneyLogModel;
|
import com.shayu.onetoone.bean.FriendAppMoneyLogModel;
|
||||||
import com.shayu.onetoone.bean.FriendAppMoneySumModel;
|
import com.shayu.onetoone.bean.FriendAppMoneySumModel;
|
||||||
@ -1121,9 +1122,9 @@ public class OTONetManager {
|
|||||||
* @param currencyType 1星币 2砖石 3社交新币种
|
* @param currencyType 1星币 2砖石 3社交新币种
|
||||||
* @param income 1收入 2支出
|
* @param income 1收入 2支出
|
||||||
*/
|
*/
|
||||||
public void getFriendAppMoneyLogModel(String currencyType, String income, HttpCallback<List<FriendAppMoneyLogModel>> callback) {
|
public void getFriendAppMoneyLogModel(String currencyType, String income, int page, HttpCallback<List<FriendAppMoneyLogModel>> callback) {
|
||||||
API.get().otoApi(mContext).
|
API.get().otoApi(mContext).
|
||||||
getFriendAppMoneyLogModel(currencyType, income)
|
getFriendAppMoneyLogModel(currencyType, income,page)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(new Consumer<ResponseModel<List<FriendAppMoneyLogModel>>>() {
|
.subscribe(new Consumer<ResponseModel<List<FriendAppMoneyLogModel>>>() {
|
||||||
@ -1170,8 +1171,7 @@ public class OTONetManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @param type coin砖石 yuanbao 星币
|
||||||
* @param type coin砖石 yuanbao 星币
|
|
||||||
* @param callback
|
* @param callback
|
||||||
*/
|
*/
|
||||||
public void getExchangeList(String type, HttpCallback<List<ExchangeModel>> callback) {
|
public void getExchangeList(String type, HttpCallback<List<ExchangeModel>> callback) {
|
||||||
@ -1197,6 +1197,95 @@ public class OTONetManager {
|
|||||||
}
|
}
|
||||||
}).isDisposed();
|
}).isDisposed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收益转换星币或砖石
|
||||||
|
*
|
||||||
|
* @param type coin砖石 yuanbao 星币
|
||||||
|
* @param number 转换 星币 或 砖石 数量
|
||||||
|
* @param callback
|
||||||
|
*/
|
||||||
|
public void getTransform(String type, String number, HttpCallback<List<ExchangeModel>> callback) {
|
||||||
|
API.get().otoApi(mContext).
|
||||||
|
getTransform(type, number)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new Consumer<ResponseModel<List<ExchangeModel>>>() {
|
||||||
|
@Override
|
||||||
|
public void accept(ResponseModel<List<ExchangeModel>> listResponseModel) throws Exception {
|
||||||
|
if (listResponseModel.getData().getCode() == 0) {
|
||||||
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
|
} else {
|
||||||
|
callback.onError(listResponseModel.getData().getMsg());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, new Consumer<Throwable>() {
|
||||||
|
@Override
|
||||||
|
public void accept(Throwable throwable) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onError(mContext.getString(com.yunbao.common.R.string.net_error));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param type 10 转换星币 11转换砖石
|
||||||
|
* @param currencyType 1星币 2砖石 3社交新币种
|
||||||
|
* @param income 1收入 2支出
|
||||||
|
* @param page
|
||||||
|
* @param callback
|
||||||
|
*/
|
||||||
|
public void getExchangeRecord(String type, String currencyType, String income, int page, HttpCallback<List<ExchangeRecordModel>> callback) {
|
||||||
|
API.get().otoApi(mContext).
|
||||||
|
getExchangeRecord(type, currencyType, income, page)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new Consumer<ResponseModel<List<ExchangeRecordModel>>>() {
|
||||||
|
@Override
|
||||||
|
public void accept(ResponseModel<List<ExchangeRecordModel>> listResponseModel) throws Exception {
|
||||||
|
if (listResponseModel.getData().getCode() == 0) {
|
||||||
|
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||||
|
} else {
|
||||||
|
callback.onError(listResponseModel.getData().getMsg());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, new Consumer<Throwable>() {
|
||||||
|
@Override
|
||||||
|
public void accept(Throwable throwable) throws Exception {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.onError(mContext.getString(com.yunbao.common.R.string.net_error));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void updatePass(
|
||||||
|
String name, String mobile, String card_no,
|
||||||
|
HttpCallback<HttpCallbackModel> callback) {
|
||||||
|
|
||||||
|
API.get().otoApi(mContext)
|
||||||
|
.updaePass(name, mobile, card_no)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
|
||||||
|
@Override
|
||||||
|
public void accept(ResponseModel<List<BaseModel>> listResponseModel) throws Exception {
|
||||||
|
if (listResponseModel.getData().getCode() == 0) {
|
||||||
|
callback.onSuccess(new HttpCallbackModel(listResponseModel.getData().getCode(), listResponseModel.getData().getMsg()));
|
||||||
|
} else {
|
||||||
|
callback.onError(listResponseModel.getData().getMsg());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, new Consumer<Throwable>() {
|
||||||
|
@Override
|
||||||
|
public void accept(Throwable throwable) throws Exception {
|
||||||
|
|
||||||
|
}
|
||||||
|
}).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
public void getFriends(int page,HttpCallback<List<HomeItemBean>> callback) {
|
public void getFriends(int page,HttpCallback<List<HomeItemBean>> callback) {
|
||||||
API.get().otoApi(mContext).
|
API.get().otoApi(mContext).
|
||||||
getFriends(page+"")
|
getFriends(page+"")
|
||||||
|
@ -19,6 +19,7 @@ public class RouteManager {
|
|||||||
public static final String ACTIVITY_HOME_RANK = "/activity/HomepageRankingActivity";
|
public static final String ACTIVITY_HOME_RANK = "/activity/HomepageRankingActivity";
|
||||||
public static final String ACTIVITY_MY_ARN = "/activity/MyAarningsActivity";
|
public static final String ACTIVITY_MY_ARN = "/activity/MyAarningsActivity";
|
||||||
public static final String ACTIVITY_DIAMOND_EXCHANGE = "/activity/DiamondExchangeActivity";
|
public static final String ACTIVITY_DIAMOND_EXCHANGE = "/activity/DiamondExchangeActivity";
|
||||||
|
public static final String ACTIVITY_EXCHANGE_RECORD = "/activity/ExchangeRecordActivity";
|
||||||
public static final String ACTIVITY_HOME_SEARCH = "/activity/HomeSearchActivity";
|
public static final String ACTIVITY_HOME_SEARCH = "/activity/HomeSearchActivity";
|
||||||
public static final String ACTIVITY_HOME_SCREEN = "/activity/HomeScreenActivity";
|
public static final String ACTIVITY_HOME_SCREEN = "/activity/HomeScreenActivity";
|
||||||
public static final String ACTIVITY_CALL_VIDEO = "/activity/CallVideoActivity";
|
public static final String ACTIVITY_CALL_VIDEO = "/activity/CallVideoActivity";
|
||||||
@ -40,6 +41,7 @@ public class RouteManager {
|
|||||||
public static final String ACTIVITY_AUTH_BLOGGER_INLET = "/activity/AuthBloggerInletActivity";
|
public static final String ACTIVITY_AUTH_BLOGGER_INLET = "/activity/AuthBloggerInletActivity";
|
||||||
public static final String ACTIVITY_END_CALL="/activity/EndCallActivity";
|
public static final String ACTIVITY_END_CALL="/activity/EndCallActivity";
|
||||||
|
|
||||||
|
public static final String ACTIVITY_BLACK_LIST = "/activity/AuthBloggerInletActivity";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 达人认证入口
|
* 达人认证入口
|
||||||
@ -66,8 +68,8 @@ public class RouteManager {
|
|||||||
/**
|
/**
|
||||||
* 选择标签
|
* 选择标签
|
||||||
*/
|
*/
|
||||||
public static void forwardChooseActivity() {
|
public static void forwardChooseLabelActivity(boolean isUserHome) {
|
||||||
ARouter.getInstance().build(ACTIVITY_CHOOSE_LABEL).navigation();
|
ARouter.getInstance().build(ACTIVITY_CHOOSE_LABEL).withBoolean("isUserHome",isUserHome).navigation();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,6 +4,7 @@ import com.shayu.onetoone.bean.AuthBean;
|
|||||||
import com.shayu.onetoone.bean.AuthBloggerBean;
|
import com.shayu.onetoone.bean.AuthBloggerBean;
|
||||||
import com.shayu.onetoone.bean.AvatarBean;
|
import com.shayu.onetoone.bean.AvatarBean;
|
||||||
import com.shayu.onetoone.bean.ExchangeModel;
|
import com.shayu.onetoone.bean.ExchangeModel;
|
||||||
|
import com.shayu.onetoone.bean.ExchangeRecordModel;
|
||||||
import com.shayu.onetoone.bean.FollowBean;
|
import com.shayu.onetoone.bean.FollowBean;
|
||||||
import com.shayu.onetoone.bean.FriendAppMoneyLogModel;
|
import com.shayu.onetoone.bean.FriendAppMoneyLogModel;
|
||||||
import com.shayu.onetoone.bean.FriendAppMoneySumModel;
|
import com.shayu.onetoone.bean.FriendAppMoneySumModel;
|
||||||
@ -226,7 +227,8 @@ public interface OneToOneApi {
|
|||||||
@GET("/api/public/?service=Friendappmoney.logs")
|
@GET("/api/public/?service=Friendappmoney.logs")
|
||||||
Observable<ResponseModel<List<FriendAppMoneyLogModel>>> getFriendAppMoneyLogModel(
|
Observable<ResponseModel<List<FriendAppMoneyLogModel>>> getFriendAppMoneyLogModel(
|
||||||
@Query("currency_type") String currencyType,
|
@Query("currency_type") String currencyType,
|
||||||
@Query("income") String income
|
@Query("income") String income,
|
||||||
|
@Query("p") int page
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -305,6 +307,40 @@ public interface OneToOneApi {
|
|||||||
@GET("/api/public/?service=Friendappinfos.getSage")
|
@GET("/api/public/?service=Friendappinfos.getSage")
|
||||||
Observable<ResponseModel<AuthBloggerBean>> getBloggerInfo(
|
Observable<ResponseModel<AuthBloggerBean>> getBloggerInfo(
|
||||||
);
|
);
|
||||||
|
/**
|
||||||
|
* 收益转换星币或砖石
|
||||||
|
*/
|
||||||
|
@GET("/api/public/?service=Friendappmoney.transform")
|
||||||
|
Observable<ResponseModel<List<ExchangeModel>>> getTransform(
|
||||||
|
@Query("type") String type,
|
||||||
|
@Query("num") String number
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收益转换星币或砖石
|
||||||
|
*/
|
||||||
|
@GET("/api/public/?service=Friendappmoney.logs")
|
||||||
|
Observable<ResponseModel<List<ExchangeRecordModel>>> getExchangeRecord(
|
||||||
|
@Query("type") String type,
|
||||||
|
@Query("currency_type") String currencyType,
|
||||||
|
@Query("income") String income,
|
||||||
|
@Query("p") int page
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改密码
|
||||||
|
* @param oldpass
|
||||||
|
* @param pass
|
||||||
|
* @param pass2
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GET("/api/public/?service=User.updatePass")
|
||||||
|
Observable<ResponseModel<List<BaseModel>>> updaePass(
|
||||||
|
@Query("oldpass") String oldpass,
|
||||||
|
@Query("pass") String pass,
|
||||||
|
@Query("pass2") String pass2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GET("/api/public/?service=Friendappuser.friend")
|
@GET("/api/public/?service=Friendappuser.friend")
|
||||||
Observable<ResponseModel<List<HomeItemBean>>> getFriends(@Query("p")String p);
|
Observable<ResponseModel<List<HomeItemBean>>> getFriends(@Query("p")String p);
|
||||||
|
@ -360,6 +360,7 @@ public class MainHttpUtil {
|
|||||||
public static void getBlackList(int p, HttpCallback callback) {
|
public static void getBlackList(int p, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("User.getBlackList", "User.getBlackList")
|
HttpClient.getInstance().get("User.getBlackList", "User.getBlackList")
|
||||||
.params("p", p)
|
.params("p", p)
|
||||||
|
.params("touid", "1")
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package com.shayu.onetoone.view;
|
package com.shayu.onetoone.view;
|
||||||
|
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@ -9,6 +11,9 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
|
|
||||||
import com.shayu.onetoone.R;
|
import com.shayu.onetoone.R;
|
||||||
import com.shayu.onetoone.bean.ExchangeModel;
|
import com.shayu.onetoone.bean.ExchangeModel;
|
||||||
|
import com.shayu.onetoone.event.DiamondExchangeEvent;
|
||||||
|
import com.yunbao.common.utils.Bus;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
public class DiamondExchangeViewHolder extends RecyclerView.ViewHolder {
|
public class DiamondExchangeViewHolder extends RecyclerView.ViewHolder {
|
||||||
private LinearLayout diamondExchangeBtn;
|
private LinearLayout diamondExchangeBtn;
|
||||||
@ -22,7 +27,57 @@ public class DiamondExchangeViewHolder extends RecyclerView.ViewHolder {
|
|||||||
goldCoin = itemView.findViewById(R.id.gold_coin);
|
goldCoin = itemView.findViewById(R.id.gold_coin);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showData(ExchangeModel model) {
|
public void showData(ExchangeModel model, int position) {
|
||||||
|
diamondExchangeBtn.setSelected(model.isSelect());
|
||||||
|
coins.setText(model.getName());
|
||||||
|
StringBuffer stringBuffer = new StringBuffer();
|
||||||
|
stringBuffer.append("(")
|
||||||
|
.append(model.getTitle())
|
||||||
|
.append(")");
|
||||||
|
goldCoin.setText(stringBuffer);
|
||||||
|
if (!TextUtils.isEmpty(model.getTop())) {
|
||||||
|
fullConversion.setVisibility(View.VISIBLE);
|
||||||
|
fullConversion.setText(model.getTop());
|
||||||
|
if (model.isSelect()) {
|
||||||
|
fullConversion.setTextColor(Color.parseColor("#C274EC"));
|
||||||
|
} else {
|
||||||
|
fullConversion.setTextColor(Color.parseColor("#333333"));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fullConversion.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
if (model.isSelect()) {
|
||||||
|
coins.setTextColor(Color.parseColor("#C274EC"));
|
||||||
|
goldCoin.setTextColor(Color.parseColor("#C274EC"));
|
||||||
|
} else {
|
||||||
|
coins.setTextColor(Color.parseColor("#333333"));
|
||||||
|
goldCoin.setTextColor(Color.parseColor("#333333"));
|
||||||
|
}
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(diamondExchangeBtn, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
|
@Override
|
||||||
|
public void onViewClicks() {
|
||||||
|
if (listener != null) {
|
||||||
|
listener.onDiamondExchangeClickListener(model, position);
|
||||||
|
Bus.get().post(new DiamondExchangeEvent()
|
||||||
|
.setName(model.getName())
|
||||||
|
.setTitle(model.getTitle())
|
||||||
|
.setTop(model.getTop())
|
||||||
|
.setNum(model.getNum())
|
||||||
|
.setIndex(position));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private DiamondExchangeClickListener listener;
|
||||||
|
|
||||||
|
public DiamondExchangeViewHolder setListener(DiamondExchangeClickListener listener) {
|
||||||
|
this.listener = listener;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface DiamondExchangeClickListener {
|
||||||
|
void onDiamondExchangeClickListener(ExchangeModel model, int position);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,41 @@
|
|||||||
|
package com.shayu.onetoone.view;
|
||||||
|
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.shayu.onetoone.R;
|
||||||
|
import com.shayu.onetoone.bean.ExchangeRecordModel;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class ExchangeRecordViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private TextView memoName, createTime, money;
|
||||||
|
|
||||||
|
public ExchangeRecordViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
memoName = itemView.findViewById(R.id.memo_name);
|
||||||
|
createTime = itemView.findViewById(R.id.create_time);
|
||||||
|
money = itemView.findViewById(R.id.money);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(ExchangeRecordModel model, int position) {
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
builder
|
||||||
|
.append(model.getMoney());
|
||||||
|
memoName.setText(model.getMemo());
|
||||||
|
money.setText(builder.toString());
|
||||||
|
createTime.setText(getDateStr(new Date((model.getCreateTime()) * 1000), null));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDateStr(Date date, String format) {
|
||||||
|
if (format == null || format.isEmpty()) {
|
||||||
|
format = "yyyy-MM-dd HH:mm";
|
||||||
|
}
|
||||||
|
SimpleDateFormat formatter = new SimpleDateFormat(format);
|
||||||
|
return formatter.format(date);
|
||||||
|
}
|
||||||
|
}
|
@ -7,104 +7,113 @@
|
|||||||
|
|
||||||
<include layout="@layout/view_title_custom" />
|
<include layout="@layout/view_title_custom" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:text="真人說明"
|
|
||||||
android:textColor="@color/black2"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="10dp"
|
|
||||||
android:text="請上傳您的身份證正反面完成真人認證,完成認證可獲得跟多消息推送并提高聊天,收禮的收益比例"
|
|
||||||
android:textColor="@color/text_gray"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/personLayout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center"
|
android:background="@color/white"
|
||||||
android:layout_marginLeft="50dp"
|
android:orientation="vertical">
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:layout_marginRight="50dp"
|
|
||||||
android:background="@drawable/bg_auth_submit_1"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="條件一:完後真人認證 "
|
android:layout_marginLeft="10dp"
|
||||||
android:textColor="@color/white"
|
android:layout_marginTop="10dp"
|
||||||
android:textSize="16sp" />
|
android:text="真人說明"
|
||||||
|
android:textColor="@color/black2"
|
||||||
<ImageView
|
android:textSize="18sp"
|
||||||
android:id="@+id/personStatus"
|
android:textStyle="bold" />
|
||||||
android:layout_width="18dp"
|
|
||||||
android:layout_height="18dp"
|
|
||||||
android:src="@mipmap/icon_suc" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/personBt"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:background="@drawable/bg_auth_submit_3"
|
|
||||||
android:gravity="center"
|
|
||||||
android:paddingLeft="40dp"
|
|
||||||
android:paddingRight="40dp"
|
|
||||||
android:text="已完成"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="18sp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/sageLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginLeft="50dp"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:layout_marginRight="50dp"
|
|
||||||
android:background="@drawable/bg_auth_submit_4"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="條件二:上傳入駐資料 "
|
android:layout_marginLeft="10dp"
|
||||||
android:textColor="@color/white"
|
android:text="請上傳您的身份證正反面完成真人認證,完成認證可獲得跟多消息推送并提高聊天,收禮的收益比例"
|
||||||
android:textSize="16sp" />
|
android:textColor="@color/text_gray"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/personLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="50dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:layout_marginRight="50dp"
|
||||||
|
android:background="@drawable/bg_auth_submit_1"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="條件一:完後真人認證 "
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/personStatus"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:src="@mipmap/icon_suc" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/personBt"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:background="@drawable/bg_auth_submit_3"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingLeft="40dp"
|
||||||
|
android:paddingRight="40dp"
|
||||||
|
android:text="已完成"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/sageLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="50dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:layout_marginRight="50dp"
|
||||||
|
android:background="@drawable/bg_auth_submit_4"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="條件二:上傳入駐資料 "
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/sageStatus"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="18dp"
|
||||||
|
android:src="@mipmap/icon_fail" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/sageBt"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:background="@drawable/bg_auth_submit_5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingLeft="40dp"
|
||||||
|
android:paddingRight="40dp"
|
||||||
|
android:text="去上傳"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/sageStatus"
|
|
||||||
android:layout_width="18dp"
|
|
||||||
android:layout_height="18dp"
|
|
||||||
android:src="@mipmap/icon_fail" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/sageBt"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:background="@drawable/bg_auth_submit_5"
|
|
||||||
android:gravity="center"
|
|
||||||
android:paddingLeft="40dp"
|
|
||||||
android:paddingRight="40dp"
|
|
||||||
android:text="去上傳"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="18sp" />
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -16,7 +16,17 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="30dp">
|
android:layout_marginTop="30dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/one_back"
|
||||||
|
android:layout_width="21dp"
|
||||||
|
android:layout_height="28dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:src="@mipmap/icon_one_back" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
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_gravity="center"
|
||||||
@ -25,6 +35,7 @@
|
|||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/exchange_record"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="end|bottom"
|
||||||
@ -83,6 +94,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
|
android:id="@+id/arn_toggle"
|
||||||
android:layout_width="54dp"
|
android:layout_width="54dp"
|
||||||
android:layout_height="21dp"
|
android:layout_height="21dp"
|
||||||
android:layout_gravity="end|center_vertical"
|
android:layout_gravity="end|center_vertical"
|
||||||
@ -120,10 +132,13 @@
|
|||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/diamond_exchange_list"
|
android:id="@+id/diamond_exchange_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="300dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="29dp" />
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="29dp"
|
||||||
|
android:layout_marginEnd="16dp" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
android:id="@+id/diamond_exchange_input"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="47dp"
|
android:layout_height="47dp"
|
||||||
android:layout_marginStart="34dp"
|
android:layout_marginStart="34dp"
|
||||||
@ -140,6 +155,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
android:id="@+id/immediate_exchange"
|
||||||
android:layout_width="180dp"
|
android:layout_width="180dp"
|
||||||
android:layout_height="47dp"
|
android:layout_height="47dp"
|
||||||
android:layout_gravity="bottom|center_horizontal"
|
android:layout_gravity="bottom|center_horizontal"
|
||||||
|
@ -348,18 +348,33 @@
|
|||||||
android:textColor="#FF5730"
|
android:textColor="#FF5730"
|
||||||
android:textSize="9sp" />
|
android:textSize="9sp" />
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginLeft="70dp"
|
android:layout_marginLeft="70dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
android:layout_marginRight="25dp"
|
android:layout_marginRight="25dp"
|
||||||
android:ellipsize="end"
|
android:layout_height="wrap_content">
|
||||||
android:gravity="right"
|
|
||||||
android:singleLine="true"
|
<TextView
|
||||||
android:textColor="#353535"
|
android:id="@+id/auth_status"
|
||||||
android:textSize="14sp"
|
android:layout_width="match_parent"
|
||||||
android:textStyle="bold" />
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="right"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="#353535"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/img_auth_status"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@mipmap/auth_status" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="16dp"
|
android:layout_width="16dp"
|
||||||
|
62
OneToOne/src/main/res/layout/activity_exchange_record.xml
Normal file
62
OneToOne/src/main/res/layout/activity_exchange_record.xml
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="30dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/one_back"
|
||||||
|
android:layout_width="21dp"
|
||||||
|
android:layout_height="28dp"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:src="@mipmap/icon_one_back" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="@string/my_arnings_exchange_record"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="@string/my_arnings_exchange_record"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<io.rong.imkit.widget.refresh.SmartRefreshLayout
|
||||||
|
android:id="@+id/swipeRefreshLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="18dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<com.yanzhenjie.recyclerview.SwipeRecyclerView
|
||||||
|
android:id="@+id/recyclerView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
tools:listitem="@layout/view_exchange_record_item_holder" />
|
||||||
|
</io.rong.imkit.widget.refresh.SmartRefreshLayout>
|
||||||
|
</LinearLayout>
|
21
OneToOne/src/main/res/layout/activity_follow.xml
Normal file
21
OneToOne/src/main/res/layout/activity_follow.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#F7F8F9"
|
||||||
|
android:orientation="vertical"
|
||||||
|
>
|
||||||
|
|
||||||
|
<include layout="@layout/view_title_custom"/>
|
||||||
|
|
||||||
|
<com.yunbao.common.custom.CommonRefreshView
|
||||||
|
android:id="@+id/refreshView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="1dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
app:crv_itemCount="50"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
122
OneToOne/src/main/res/layout/activity_modify_pwd.xml
Normal file
122
OneToOne/src/main/res/layout/activity_modify_pwd.xml
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#F7F8F9"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include layout="@layout/view_title_custom" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="1dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingLeft="15dp"
|
||||||
|
android:paddingRight="15dp">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:text="@string/modify_pwd_old"
|
||||||
|
android:textColor="@color/textColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/edit_old"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="80dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:hint="@string/modify_pwd_old_1"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:textColor="@color/textColor"
|
||||||
|
android:textColorHint="@color/gray3"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<View style="@style/line2" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:text="@string/modify_pwd_new"
|
||||||
|
android:textColor="@color/textColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/edit_new"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginLeft="80dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:hint="@string/modify_pwd_new_1"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:textColor="@color/textColor"
|
||||||
|
android:textColorHint="@color/gray3"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<View style="@style/line2" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:text="@string/modify_pwd_confirm"
|
||||||
|
android:textColor="@color/textColor"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/edit_confirm"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginLeft="80dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:hint="@string/modify_pwd_confirm_1"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:textColor="@color/textColor"
|
||||||
|
android:textColorHint="@color/gray3"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btn_confirm"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_marginLeft="30dp"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:layout_marginRight="30dp"
|
||||||
|
android:background="@drawable/login_btn"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/modify_pwd_confirm_2"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</LinearLayout>
|
@ -1,6 +1,7 @@
|
|||||||
<?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:tools="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:background="@mipmap/background_my_arnings"
|
android:background="@mipmap/background_my_arnings"
|
||||||
@ -63,8 +64,12 @@
|
|||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/withdrawal_sum"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxWidth="100dp"
|
||||||
|
android:singleLine="true"
|
||||||
android:text="1000"
|
android:text="1000"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="18sp" />
|
android:textSize="18sp" />
|
||||||
@ -89,9 +94,13 @@
|
|||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/withdrawal_money"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="2dp"
|
android:layout_marginStart="2dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxWidth="100dp"
|
||||||
|
android:singleLine="true"
|
||||||
android:text="$ 10"
|
android:text="$ 10"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
@ -200,10 +209,20 @@
|
|||||||
app:cardCornerRadius="14dp"
|
app:cardCornerRadius="14dp"
|
||||||
app:cardElevation="0dp">
|
app:cardElevation="0dp">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<io.rong.imkit.widget.refresh.SmartRefreshLayout
|
||||||
android:id="@+id/my_arn_list"
|
android:id="@+id/swipeRefreshLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<com.yanzhenjie.recyclerview.SwipeRecyclerView
|
||||||
|
android:id="@+id/my_arn_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
tools:listitem="@layout/view_my_arn_item_holder" />
|
||||||
|
</io.rong.imkit.widget.refresh.SmartRefreshLayout>
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
@ -98,9 +98,10 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/blacklist"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingTop="15.33dp"
|
android:paddingTop="15.33dp"
|
||||||
android:paddingBottom="15dp">
|
android:paddingBottom="15dp">
|
||||||
|
|
||||||
@ -126,17 +127,19 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_alerts"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingTop="15.33dp"
|
android:paddingTop="15.33dp"
|
||||||
|
android:visibility="gone"
|
||||||
android:paddingBottom="15dp">
|
android:paddingBottom="15dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="25dp"
|
android:layout_marginStart="25dp"
|
||||||
android:text="消息通知"
|
android:text="@string/alerts"
|
||||||
android:textColor="#1E1F20"
|
android:textColor="#1E1F20"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
@ -267,6 +270,7 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/clearCaChe"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@ -286,11 +290,14 @@
|
|||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:layout_width="17dp"
|
android:id="@+id/cacheSize"
|
||||||
android:layout_height="30dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_marginEnd="26.33dp"
|
android:layout_height="wrap_content"
|
||||||
android:src="@mipmap/icon_arrow_right" />
|
android:layout_marginStart="25dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:textColor="#8E7DDF"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -370,15 +377,19 @@
|
|||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:layout_width="17dp"
|
android:id="@+id/versionCode"
|
||||||
android:layout_height="30dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_marginEnd="26.33dp"
|
android:layout_height="wrap_content"
|
||||||
android:src="@mipmap/icon_arrow_right" />
|
android:layout_marginStart="25dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:textColor="#1E1F20"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/checkVersion"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="12dp"
|
android:layout_marginBottom="12dp"
|
||||||
|
108
OneToOne/src/main/res/layout/item_search.xml
Normal file
108
OneToOne/src/main/res/layout/item_search.xml
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RelativeLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:paddingLeft="15dp"
|
||||||
|
android:paddingRight="15dp"
|
||||||
|
>
|
||||||
|
|
||||||
|
<com.makeramen.roundedimageview.RoundedImageView
|
||||||
|
android:id="@+id/avatar"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:layout_marginRight="15dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
app:riv_oval="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="9dp"
|
||||||
|
android:layout_toRightOf="@id/avatar"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxWidth="130dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="@color/textColor"
|
||||||
|
android:textSize="16sp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/sign"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/name"
|
||||||
|
android:layout_marginRight="80dp"
|
||||||
|
android:layout_toRightOf="@id/avatar"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textColor="@color/gray3"
|
||||||
|
android:textSize="14sp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toRightOf="@id/name"
|
||||||
|
android:layout_alignTop="@id/name"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:layout_marginTop="3dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/sex"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:layout_height="15dp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/level_anchor"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="15dp"
|
||||||
|
android:layout_marginLeft="5dp"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/level"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="15dp"
|
||||||
|
android:layout_marginLeft="5dp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<com.yunbao.common.custom.MyRadioButton
|
||||||
|
android:id="@+id/btn_follow"
|
||||||
|
android:layout_width="44dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:background="@drawable/bg_btn_follow"
|
||||||
|
android:button="@null"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="@color/fg_btn_follow"
|
||||||
|
android:textSize="11sp"
|
||||||
|
android:visibility="gone"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
<pl.droidsonroids.gif.GifImageView
|
||||||
|
android:id="@+id/btn_live"
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:src="@mipmap/icon_user_home_living"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
style="@style/line2"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
@ -2,10 +2,12 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="1dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/diamond_exchange_btn"
|
android:id="@+id/diamond_exchange_btn"
|
||||||
|
android:layout_margin="1dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="92dp"
|
android:layout_height="92dp"
|
||||||
android:background="@drawable/bg_diamond_exchange_btn"
|
android:background="@drawable/bg_diamond_exchange_btn"
|
||||||
|
@ -0,0 +1,77 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="60dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/memo_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="13dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxWidth="170dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="收到×××的×××禮物"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/create_time"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="13dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxWidth="170dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="2023-08-10 15:30"
|
||||||
|
android:textColor="#ACA9A9"
|
||||||
|
android:textSize="10sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end|center_vertical"
|
||||||
|
android:layout_marginEnd="19dp"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/money"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxWidth="100dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="+1111111110.5"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxWidth="100dp"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:text="@string/my_arnings_gold_coin"
|
||||||
|
android:textColor="#333333"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:background="#80999999" />
|
||||||
|
</FrameLayout>
|
28
OneToOne/src/main/res/layout/view_no_data_follow.xml
Normal file
28
OneToOne/src/main/res/layout/view_no_data_follow.xml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?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:layout_centerHorizontal="true"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:text="@string/follow_no_follow"
|
||||||
|
android:textColor="@color/textColor"
|
||||||
|
android:textSize="14sp"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/follow_do_follow"
|
||||||
|
android:textColor="@color/gray1"
|
||||||
|
android:textSize="14sp"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
11
OneToOne/src/main/res/layout/view_no_data_follow_2.xml
Normal file
11
OneToOne/src/main/res/layout/view_no_data_follow_2.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<TextView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:text="@string/follow_no_follow_2"
|
||||||
|
android:textColor="@color/textColor"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
/>
|
BIN
OneToOne/src/main/res/mipmap-xxhdpi/auth_status.png
Normal file
BIN
OneToOne/src/main/res/mipmap-xxhdpi/auth_status.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.9 KiB |
BIN
OneToOne/src/main/res/mipmap-xxhdpi/icon_one_back.png
Normal file
BIN
OneToOne/src/main/res/mipmap-xxhdpi/icon_one_back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
@ -23,6 +23,7 @@
|
|||||||
<string name="my_arnings_incentive_withdrawal">獎勵提現</string>
|
<string name="my_arnings_incentive_withdrawal">獎勵提現</string>
|
||||||
<string name="my_arnings_incentive_withdrawal_minimum">(最低$ %s)</string>
|
<string name="my_arnings_incentive_withdrawal_minimum">(最低$ %s)</string>
|
||||||
<string name="my_arnings_exchange_star">兌換星幣</string>
|
<string name="my_arnings_exchange_star">兌換星幣</string>
|
||||||
|
<string name="my_arnings_exchange_diamond">兌換鑽石</string>
|
||||||
<string name="my_arnings_exchange_record">兌換記錄</string>
|
<string name="my_arnings_exchange_record">兌換記錄</string>
|
||||||
<string name="my_arnings_total_convertibility">可兌換總額</string>
|
<string name="my_arnings_total_convertibility">可兌換總額</string>
|
||||||
<string name="my_arnings_gold_coin">金幣</string>
|
<string name="my_arnings_gold_coin">金幣</string>
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package com.yunbao.main.adapter;
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -13,9 +11,8 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.makeramen.roundedimageview.RoundedImageView;
|
import com.makeramen.roundedimageview.RoundedImageView;
|
||||||
import com.yunbao.common.bean.MsgSwitchDetailModel;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.bean.MsgSwitchFollowlModel;
|
import com.yunbao.common.bean.MsgSwitchFollowlModel;
|
||||||
import com.yunbao.common.bean.UserItemBean;
|
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.ResponseData;
|
import com.yunbao.common.http.ResponseData;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
@ -23,7 +20,6 @@ import com.yunbao.common.http.main.MainNetManager;
|
|||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
import com.yunbao.main.R;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -42,7 +42,7 @@ public class VersionUtil {
|
|||||||
|
|
||||||
|
|
||||||
//是否是谷歌版本
|
//是否是谷歌版本
|
||||||
public void showDialog(Activity context, ConfigBean configBean, String downloadUrl) {
|
public static void showDialog(Activity context, ConfigBean configBean, String downloadUrl) {
|
||||||
//不是谷歌
|
//不是谷歌
|
||||||
if (CommonAppConfig.IS_GOOGLE_PLAY == false) {
|
if (CommonAppConfig.IS_GOOGLE_PLAY == false) {
|
||||||
//不强更
|
//不强更
|
||||||
|
@ -15,7 +15,7 @@ import com.yunbao.common.http.main.MainNetManager;
|
|||||||
import com.yunbao.common.utils.SpUtil;
|
import com.yunbao.common.utils.SpUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
import com.yunbao.main.adapter.MsgFollowAdapter;
|
import com.yunbao.common.adapter.MsgFollowAdapter;
|
||||||
|
|
||||||
public class MsgSettActivity extends AbsActivity {
|
public class MsgSettActivity extends AbsActivity {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user