Merge branch 'refs/heads/新潘多拉6.8.1' into 新潘多拉_6.8.2
# Conflicts: # common/src/main/res/values-en-rUS/strings.xml # common/src/main/res/values-zh/strings.xml # common/src/main/res/values/strings.xml # config.gradle
This commit is contained in:
@@ -1,63 +0,0 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "867032862719",
|
||||
"project_id": "pdlnew",
|
||||
"storage_bucket": "pdlnew.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:867032862719:android:841a73fdfb6c37453ae1ca",
|
||||
"android_client_info": {
|
||||
"package_name": "com.pandora.sy"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "867032862719-af2dnojobjd8s6ekdr1is1vev8nk36sv.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pandora.sy",
|
||||
"certificate_hash": "38cc19306c9facee36a9224e9a4070bc0be15c7d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "867032862719-ohaa1f18e186qpasvgt7qkk1i1pivniq.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pandora.sy",
|
||||
"certificate_hash": "b66dc8d21cfcf6c729577ddcf0c312b2a31ed872"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "867032862719-snpbqruvqcc9fsifjnmm1h3dcgtr8am4.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pandora.sy",
|
||||
"certificate_hash": "15fc5e70cf238323bf7111c8c627803985478e87"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "867032862719-ep4r92lpjmn7gs9tg0r7q0l75a4gm9mt.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAnlY2aBEGyg7QpghHo7EaMRkM89dVNgq8"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "867032862719-ep4r92lpjmn7gs9tg0r7q0l75a4gm9mt.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
@@ -441,7 +441,7 @@ public class EntryActivity extends AppCompatActivity {
|
||||
} else if (loginType == 4) {
|
||||
try {
|
||||
// App-to-app login
|
||||
Intent loginIntent = LineLoginApi.getLoginIntent(findViewById(R.id.btn_line).getContext(), "1656399535", new LineAuthenticationParams.Builder().scopes(Arrays.asList(Scope.PROFILE))
|
||||
Intent loginIntent = LineLoginApi.getLoginIntent(findViewById(R.id.btn_line).getContext(), "2006124380", new LineAuthenticationParams.Builder().scopes(Arrays.asList(Scope.PROFILE))
|
||||
// .nonce("<a randomly-generated string>") // nonce can be used to improve security
|
||||
.build());
|
||||
startActivityForResult(loginIntent, 1001);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.yunbao.main.activity;
|
||||
|
||||
|
||||
import static com.yunbao.main.activity.MyWalletActivity.dis;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@@ -16,15 +14,17 @@ import android.webkit.WebView;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.facebook.appevents.AppEventsConstants;
|
||||
import com.android.billingclient.api.Purchase;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.utils.GoogleUtils;
|
||||
import com.yunbao.common.pay.google.GooglePlay;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.main.R;
|
||||
import com.yunbao.main.views.TestWebViewClient;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SuppressLint("ValidFragment")
|
||||
public class GoogleFragment extends Fragment {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class GoogleFragment extends Fragment {
|
||||
private String url;
|
||||
String adid = null;
|
||||
|
||||
GoogleUtils googleUtils;
|
||||
private GooglePlay googlePlay;
|
||||
|
||||
boolean isGoogleService = true;
|
||||
|
||||
@@ -62,17 +62,16 @@ public class GoogleFragment extends Fragment {
|
||||
Log.e("ttt", url);
|
||||
rlWebview.loadUrl(url);
|
||||
|
||||
googleUtils = new GoogleUtils(getActivity());
|
||||
googlePlay = GooglePlay.getInstance();
|
||||
|
||||
// 验证是否已在此设备上安装并启用Google Play服务,以及此设备上安装的旧版本是否为此客户端所需的版本
|
||||
if (googleUtils.getGoogleService()) {
|
||||
if (googlePlay.getGoogleService()) {
|
||||
isGoogleService = true;
|
||||
// 支持Google服务
|
||||
initGooglePay();
|
||||
new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
adid = googleUtils.getAdid();
|
||||
adid = googlePlay.getAdId();
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
@@ -100,11 +99,6 @@ public class GoogleFragment extends Fragment {
|
||||
|
||||
String TAG = "GooglePay";
|
||||
|
||||
private void initGooglePay() {
|
||||
googleUtils = new GoogleUtils(getActivity());
|
||||
googleUtils.initGooglePay();
|
||||
}
|
||||
|
||||
private Handler payHandler = new Handler();
|
||||
|
||||
//js调用原生
|
||||
@@ -117,51 +111,31 @@ public class GoogleFragment extends Fragment {
|
||||
mProductId = ProductId;
|
||||
mOrderid = OrderNumber;
|
||||
MoneyUsds = MoneyUsd;
|
||||
|
||||
googleUtils.setBillingListener(new GoogleUtils.GoogleBillingListener() {
|
||||
googlePlay.setBillingListener(new GooglePlay.GoogleBillingListener() {
|
||||
@Override
|
||||
public void onPaySuccess(String token, String orderId) {
|
||||
payHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
CommonHttpUtil.notifyGoogle(token, orderId, mProductId, mOrderid, adid, new HttpCallback() {
|
||||
public void onPaySuccess(List<Purchase> purchases) {
|
||||
Log.i("mLog", "调用谷歌支付成功了 " + purchases.toString());
|
||||
CommonHttpUtil.notifyGoogle(purchases.get(0).getPurchaseToken(),
|
||||
purchases.get(0).getProducts().get(0), new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
Bundle params = new Bundle();
|
||||
params.putString("currency", "HKD");
|
||||
params.putString("money", MoneyUsds);
|
||||
Bundle fb_params = new Bundle();
|
||||
fb_params.putString(AppEventsConstants.EVENT_PARAM_CURRENCY, "HKD");
|
||||
fb_params.putString(AppEventsConstants.EVENT_PARAM_CONTENT_ID, mProductId);
|
||||
//Google官方充值通知
|
||||
Bundle google_params = new Bundle();
|
||||
google_params.putString("currency", "HKD");
|
||||
google_params.putString("product_id", mProductId);
|
||||
google_params.putString("transaction_id", mOrderid);
|
||||
google_params.putString("value", MoneyUsds);
|
||||
google_params.putString("price", MoneyUsds);
|
||||
google_params.putString("quantity", "1");
|
||||
dis();
|
||||
googlePlay.consume(purchases);
|
||||
getActivity().finish();
|
||||
ToastUtil.show(getString(R.string.pay_suc));
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPayFailed(String msg) {
|
||||
payHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
});
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
});
|
||||
googleUtils.purchase(mProductId);
|
||||
googlePlay.purchase(getActivity(), mOrderid, mProductId);
|
||||
}
|
||||
lastClickTime = currentTime;
|
||||
|
||||
|
||||
@@ -18,17 +18,18 @@ import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.yunbao.common.utils.MobclickAgent;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.fragment.LoadingDialog;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.pay.google.GooglePlay;
|
||||
import com.yunbao.common.pay.hw.HwBuilder;
|
||||
import com.yunbao.common.pay.samsung.SamsungUtil;
|
||||
import com.yunbao.common.utils.GoogleUtils;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.MobclickAgent;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.main.R;
|
||||
@@ -62,7 +63,7 @@ public class MyWalletActivity extends AbsActivity {
|
||||
public static String orderId;
|
||||
|
||||
HwBuilder hwBuilder;
|
||||
GoogleUtils googleUtils;
|
||||
private GooglePlay googlePlay;
|
||||
|
||||
LoadingDialog loadingDialog;
|
||||
SamsungUtil samsungUtil;
|
||||
@@ -78,17 +79,15 @@ public class MyWalletActivity extends AbsActivity {
|
||||
mw = MyWalletActivity.this;
|
||||
setTitle(mContext.getString(R.string.wallet));
|
||||
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
||||
googleUtils = new GoogleUtils(mContext);
|
||||
googleUtils.initGooglePay();
|
||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
||||
hwBuilder = new HwBuilder(MyWalletActivity.this);
|
||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
||||
samsungUtil = SamsungUtil.newInstance(mContext);
|
||||
samsungUtil.init();
|
||||
}else{
|
||||
googleUtils = new GoogleUtils(mContext);
|
||||
googleUtils.initGooglePay();
|
||||
} else {
|
||||
googlePlay = GooglePlay.getInstance();
|
||||
//消耗所有商品
|
||||
googlePlay.consumeAll();
|
||||
}
|
||||
|
||||
|
||||
@@ -104,50 +103,8 @@ public class MyWalletActivity extends AbsActivity {
|
||||
loadingDialog.setShowText(getString(R.string.order_query));
|
||||
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == 1) {
|
||||
googleUtils.setQueryPurchaseListener(mContext, new GoogleUtils.QueryPurchasesListener() {
|
||||
@Override
|
||||
public void onResult(JSONObject obj) {
|
||||
try {
|
||||
int code = obj.getInt("querySize");
|
||||
if (code == 0) {
|
||||
payHandler.post(runnable1);
|
||||
payHandler.postDelayed(runnable2, 1000);
|
||||
} else {
|
||||
JSONArray tokenList = obj.getJSONArray("tokenList");
|
||||
JSONArray orderList = obj.getJSONArray("orderList");
|
||||
String tradeNo = obj.getString("tradeNo");
|
||||
|
||||
for (int i = 0; i < tokenList.length(); i++) {
|
||||
int finalI = i;
|
||||
payHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//谷歌掉单处理
|
||||
try {
|
||||
CommonHttpUtil.Google_sec_pay(tokenList.getString(finalI), orderList.getString(finalI), tradeNo, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (finalI == tokenList.length() - 1) {
|
||||
loadingDialog.setShowText(getString(R.string.order_query_success));
|
||||
loadingDialog.dismiss();
|
||||
}
|
||||
ToastUtil.show("充值已到账");
|
||||
finish();
|
||||
}
|
||||
});
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
googleUtils.queryPurchasesAsync();
|
||||
//消耗所有商品
|
||||
googlePlay.consumeAll();
|
||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
||||
hwBuilder.consume();
|
||||
payHandler.post(runnable1);
|
||||
@@ -186,12 +143,12 @@ public class MyWalletActivity extends AbsActivity {
|
||||
|
||||
googleFragment1 = new GoogleFragment();
|
||||
Bundle bundle1 = new Bundle();
|
||||
bundle1.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaycoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
bundle1.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaycoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=panduo" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
googleFragment1.setArguments(bundle1);
|
||||
|
||||
googleFragment2 = new GoogleFragment();
|
||||
Bundle bundle2 = new Bundle();
|
||||
bundle2.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaygole&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
bundle2.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaygole&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=panduo" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
googleFragment2.setArguments(bundle2);
|
||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 2) {
|
||||
//华为
|
||||
@@ -203,12 +160,12 @@ public class MyWalletActivity extends AbsActivity {
|
||||
|
||||
huaWeiFragment1 = new HuaWeiFragment();
|
||||
Bundle bundle1 = new Bundle();
|
||||
bundle1.putString("url", CommonAppConfig.HOST + "/themes/simplebootx/appapi/mall/huaweipaycoin.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd");
|
||||
bundle1.putString("url", CommonAppConfig.HOST + "/themes/simplebootx/appapi/mall/huaweipaycoin.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=panduo");
|
||||
huaWeiFragment1.setArguments(bundle1);
|
||||
|
||||
huaWeiFragment2 = new HuaWeiFragment();
|
||||
Bundle bundle2 = new Bundle();
|
||||
bundle2.putString("url", CommonAppConfig.HOST + "/themes/simplebootx/appapi/mall/huaweipaygole.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd");
|
||||
bundle2.putString("url", CommonAppConfig.HOST + "/themes/simplebootx/appapi/mall/huaweipaygole.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=panduo");
|
||||
huaWeiFragment2.setArguments(bundle2);
|
||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
||||
|
||||
@@ -271,12 +228,12 @@ public class MyWalletActivity extends AbsActivity {
|
||||
|
||||
huaWeiFragment1 = new HuaWeiFragment();
|
||||
Bundle bundle1 = new Bundle();
|
||||
bundle1.putString("url", CommonAppConfig.HOST + "/themes/simplebootx/appapi/mall/huaweipaycoin.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd");
|
||||
bundle1.putString("url", CommonAppConfig.HOST + "/themes/simplebootx/appapi/mall/huaweipaycoin.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=panduo");
|
||||
huaWeiFragment1.setArguments(bundle1);
|
||||
|
||||
huaWeiFragment2 = new HuaWeiFragment();
|
||||
Bundle bundle2 = new Bundle();
|
||||
bundle2.putString("url", CommonAppConfig.HOST + "/themes/simplebootx/appapi/mall/huaweipaygole.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd");
|
||||
bundle2.putString("url", CommonAppConfig.HOST + "/themes/simplebootx/appapi/mall/huaweipaygole.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=panduo");
|
||||
huaWeiFragment2.setArguments(bundle2);
|
||||
} else if (CommonAppConfig.IS_GOOGLE_PLAY == 3) {
|
||||
rView.setVisibility(View.VISIBLE);
|
||||
@@ -287,12 +244,12 @@ public class MyWalletActivity extends AbsActivity {
|
||||
|
||||
samsungFragment1 = new SamsungFragment();
|
||||
Bundle bundle1 = new Bundle();
|
||||
bundle1.putString("url", CommonAppConfig.HOST + "/themes/simplebootx/appapi/mall/samsungpaycoin.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
bundle1.putString("url", CommonAppConfig.HOST + "/themes/simplebootx/appapi/mall/samsungpaycoin.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=panduo" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
samsungFragment1.setArguments(bundle1);
|
||||
|
||||
samsungFragment2 = new SamsungFragment();
|
||||
Bundle bundle2 = new Bundle();
|
||||
bundle2.putString("url", CommonAppConfig.HOST + "/themes/simplebootx/appapi/mall/samsungpaygole.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
bundle2.putString("url", CommonAppConfig.HOST + "/themes/simplebootx/appapi/mall/samsungpaygole.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=panduo" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
samsungFragment2.setArguments(bundle2);
|
||||
} else {
|
||||
Log.i("tss", "不是首充");
|
||||
@@ -300,17 +257,17 @@ public class MyWalletActivity extends AbsActivity {
|
||||
|
||||
walletFragment = new WalletFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
bundle.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=panduo" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
walletFragment.setArguments(bundle);
|
||||
|
||||
googleFragment1 = new GoogleFragment();
|
||||
Bundle bundle1 = new Bundle();
|
||||
bundle1.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletcoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
bundle1.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletcoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=panduo" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
googleFragment1.setArguments(bundle1);
|
||||
|
||||
googleFragment2 = new GoogleFragment();
|
||||
Bundle bundle2 = new Bundle();
|
||||
bundle2.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletgold&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=pd" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
bundle2.putString("url", CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletgold&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=panduo" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
googleFragment2.setArguments(bundle2);
|
||||
}
|
||||
}
|
||||
@@ -491,7 +448,7 @@ public class MyWalletActivity extends AbsActivity {
|
||||
|
||||
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,9 +32,11 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
@@ -43,12 +45,15 @@ import com.binioter.guideview.Guide;
|
||||
import com.binioter.guideview.GuideBuilder;
|
||||
import com.facebook.appevents.AppEventsLogger;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lxj.xpopup.core.BasePopupView;
|
||||
import com.lxj.xpopup.enums.PopupPosition;
|
||||
import com.lxj.xpopup.interfaces.XPopupCallback;
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
import com.opensource.svgaplayer.SVGAParser;
|
||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.fragment.ChatViewModel;
|
||||
import com.yunbao.common.fragment.MainMessageRecommendFragment;
|
||||
import com.yunbao.common.utils.DebugUtils;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
@@ -73,6 +78,7 @@ import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.ViewPageIndicatorUtils;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.AbsMainViewHolder;
|
||||
import com.yunbao.common.views.MsgChatTypeSelectPoPupView;
|
||||
import com.yunbao.common.views.MsgRecommendPopupView;
|
||||
import com.yunbao.common.views.MsgSysDelPopupView;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
@@ -132,17 +138,20 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
private MagicIndicator mIndicator;
|
||||
private List<AbsMainMessageChatListFragment> fragmentList;
|
||||
|
||||
private ConstraintLayout tabLayout1, tabLayout2, tabLayout3;
|
||||
private Group tabLayout1, tabLayout2, tabLayout3;
|
||||
private TextView tab1, tab2, tab3;
|
||||
private ImageView imageView1, imageView2, imageView3;
|
||||
private View tab_line1, tab_line2, tab_line3;
|
||||
private ImageView tab_icon;
|
||||
|
||||
private List<ConstraintLayout> relativeLayouts = new ArrayList<>();
|
||||
private List<Group> relativeLayouts = new ArrayList<>();
|
||||
private List<TextView> tabTexts = new ArrayList<>();
|
||||
private List<View> tabLine = new ArrayList<>();
|
||||
private LinearLayout tabLayouts;
|
||||
private List<ImageView> tabExpend = new ArrayList<>();
|
||||
private ConstraintLayout tabLayouts;
|
||||
|
||||
private int userType = 0; // (0)普通用户 (1)主播A (2)主播B
|
||||
ChatViewModel chatViewModel;
|
||||
|
||||
public MainMessageViewHolder setHomeZdyPop(String homeZdyPop) {
|
||||
this.homeZdyPop = homeZdyPop;
|
||||
@@ -156,6 +165,7 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
public MainMessageViewHolder(MainActivity context, ViewGroup parentView) {
|
||||
super(context, parentView);
|
||||
mContext = context;
|
||||
chatViewModel= (new ViewModelProvider(mContext)).get(ChatViewModel.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -193,14 +203,28 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
tabLayouts = findViewById(R.id.tabLayouts);
|
||||
|
||||
tab_icon = findViewById(R.id.tab_icon);
|
||||
tabLayout1 = findViewById(R.id.tabLayout1);
|
||||
tabLayout2 = findViewById(R.id.tabLayout2);
|
||||
tabLayout3 = findViewById(R.id.tabLayout3);
|
||||
tabLayout1 = findViewById(R.id.group_tab1);
|
||||
tabLayout2 = findViewById(R.id.group_tab2);
|
||||
tabLayout3 = findViewById(R.id.group_tab3);
|
||||
|
||||
tab1 = findViewById(R.id.tab1);
|
||||
tab2 = findViewById(R.id.tab2);
|
||||
tab3 = findViewById(R.id.tab3);
|
||||
|
||||
imageView1 = findViewById(R.id.expendImg1);
|
||||
imageView2 = findViewById(R.id.expendImg2);
|
||||
imageView3 = findViewById(R.id.expendImg3);
|
||||
|
||||
imageView1.setOnClickListener(view -> {
|
||||
selectChatType(view, 0);
|
||||
});
|
||||
imageView2.setOnClickListener(view -> {
|
||||
selectChatType(view, 1);
|
||||
});
|
||||
imageView3.setOnClickListener(view -> {
|
||||
selectChatType(view, 2);
|
||||
});
|
||||
|
||||
tab_line1 = findViewById(R.id.tab_line1);
|
||||
tab_line2 = findViewById(R.id.tab_line2);
|
||||
tab_line3 = findViewById(R.id.tab_line3);
|
||||
@@ -224,6 +248,73 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
});
|
||||
}
|
||||
|
||||
private void selectChatType(View view, int position) {
|
||||
AbsMainMessageChatListFragment fragment = fragmentList.get(position);
|
||||
if (!(fragment instanceof MainMessageChatListFragment) || !(view instanceof ImageView)) {
|
||||
return;
|
||||
}
|
||||
MainMessageChatListFragment chatFragment = (MainMessageChatListFragment) fragment;
|
||||
ImageView expendImg = (ImageView) view;
|
||||
expendImg.setImageResource(R.mipmap.ic_expend_up);
|
||||
XPopup.Builder builder = new XPopup.Builder(mContext).atView(tabTexts.get(position));
|
||||
builder.offsetY(16);
|
||||
builder.dismissOnTouchOutside(true);
|
||||
builder.setPopupCallback(new XPopupCallback() {
|
||||
@Override
|
||||
public void onCreated(BasePopupView popupView) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeShow(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onShow(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDismiss(BasePopupView popupView) {
|
||||
expendImg.setImageResource(R.mipmap.ic_expend_down);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeDismiss(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBackPressed(BasePopupView popupView) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onKeyBoardStateChanged(BasePopupView popupView, int height) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDrag(BasePopupView popupView, int value, float percent, boolean upOrLeft) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClickOutside(BasePopupView popupView) {
|
||||
|
||||
}
|
||||
});
|
||||
builder.asCustom(new MsgChatTypeSelectPoPupView(mContext, chatFragment.getFilter(), new MsgChatTypeSelectPoPupView.ResultCallBack() {
|
||||
@Override
|
||||
public void callBack(int i,String str) {
|
||||
tabTexts.get(position).setText(str);
|
||||
chatFragment.setFilter(i);
|
||||
}
|
||||
})).show();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void initFragment() {
|
||||
final String[] titles;
|
||||
fragmentList = new ArrayList<>();
|
||||
@@ -264,9 +355,9 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
return fragmentList.get(i);
|
||||
}
|
||||
});
|
||||
if(userType==1){
|
||||
if (userType == 1) {
|
||||
viewPager.setCurrentItem(1);
|
||||
}else{
|
||||
} else {
|
||||
viewPager.setCurrentItem(0);
|
||||
}
|
||||
viewPager.setUserInputEnabled(false);
|
||||
@@ -340,7 +431,7 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
super.onPageSelected(position);
|
||||
if(!StringUtil.isEmpty(search.getText().toString())) {
|
||||
if (!StringUtil.isEmpty(search.getText().toString())) {
|
||||
search.setText("");
|
||||
}
|
||||
selectTab(position);
|
||||
@@ -369,6 +460,12 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void showChatTypeSelect() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void initTabView() {
|
||||
relativeLayouts = new ArrayList<>();
|
||||
tabTexts = new ArrayList<>();
|
||||
@@ -382,14 +479,19 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
tabTexts.add(tab2);
|
||||
tabTexts.add(tab3);
|
||||
|
||||
tabExpend.add(imageView1);
|
||||
tabExpend.add(imageView2);
|
||||
tabExpend.add(imageView3);
|
||||
|
||||
tabLine.add(tab_line1);
|
||||
tabLine.add(tab_line2);
|
||||
tabLine.add(tab_line3);
|
||||
if (userType == 0) { //普通用户
|
||||
relativeLayouts.get(0).setVisibility(View.VISIBLE);
|
||||
tabTexts.get(0).setText(WordUtil.getNewString(R.string.message_chat_msg_all_an_a));
|
||||
tabTexts.get(0).setText(WordUtil.getNewString(chatViewModel.getTitleTextId()));
|
||||
ViewGroup.LayoutParams params = tabLayouts.getLayoutParams();
|
||||
params.width = LinearLayout.LayoutParams.WRAP_CONTENT;
|
||||
//tabExpend.get(0).setVisibility(View.VISIBLE);
|
||||
tabLayouts.setLayoutParams(params);
|
||||
} else if (userType == 1) {//主播A
|
||||
tab_icon.setVisibility(View.VISIBLE);
|
||||
@@ -409,10 +511,12 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
relativeLayouts.get(0).setVisibility(View.VISIBLE);
|
||||
tabTexts.get(0).setText(WordUtil.getNewString(R.string.message_chat_msg_recommend));
|
||||
relativeLayouts.get(1).setVisibility(View.VISIBLE);
|
||||
tabTexts.get(1).setText(WordUtil.getNewString(R.string.message_chat_msg_all_an_a));
|
||||
tabTexts.get(1).setText(WordUtil.getNewString(chatViewModel.getTitleTextId()));
|
||||
// tabExpend.get(1).setVisibility(View.VISIBLE);
|
||||
} else { //主播B
|
||||
tabExpend.get(0).setVisibility(View.VISIBLE);
|
||||
relativeLayouts.get(0).setVisibility(View.VISIBLE);
|
||||
tabTexts.get(0).setText(WordUtil.getNewString(R.string.message_chat_msg_all));
|
||||
tabTexts.get(0).setText(WordUtil.getNewString(chatViewModel.getTitleTextId()));
|
||||
relativeLayouts.get(1).setVisibility(View.VISIBLE);
|
||||
tabTexts.get(1).setText(WordUtil.getNewString(R.string.message_chat_msg_system));
|
||||
relativeLayouts.get(2).setVisibility(View.VISIBLE);
|
||||
@@ -420,7 +524,7 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
}
|
||||
for (int i = 0; i < relativeLayouts.size(); i++) {
|
||||
int finalI = i;
|
||||
relativeLayouts.get(i).setOnClickListener(new View.OnClickListener() {
|
||||
tabTexts.get(i).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
selectTab(finalI);
|
||||
@@ -428,9 +532,9 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
}
|
||||
});
|
||||
}
|
||||
if(userType==1){
|
||||
if (userType == 1) {
|
||||
selectTab(1);
|
||||
}else{
|
||||
} else {
|
||||
selectTab(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,8 +191,7 @@
|
||||
android:layout_height="57dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:src="@mipmap/login_line"
|
||||
android:visibility="visible" />
|
||||
android:src="@mipmap/login_line" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="57dp"
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginTop="18dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
@@ -303,185 +303,412 @@
|
||||
android:layout_height="37dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/tabLayouts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp">
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<TextView
|
||||
android:id="@+id/tab1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:maxWidth="100dp"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/view2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="仅显示已读" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@mipmap/icon_msg_recommend"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tab1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<View
|
||||
android:id="@+id/tab_line1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="3dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:background="@drawable/bg_main_com_type"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tab1"
|
||||
app:layout_constraintStart_toStartOf="@+id/tab1"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/expendImg1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:src="@mipmap/ic_expend_down"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tab1"
|
||||
app:layout_constraintStart_toEndOf="@+id/tab1"
|
||||
app:layout_constraintTop_toTopOf="@+id/tab1"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group_tab1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:id="@+id/tabLayout1"
|
||||
app:constraint_referenced_ids="tab1,tab_line1"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/view2"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="1dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tab2"
|
||||
app:layout_constraintStart_toEndOf="@+id/tab1"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab2"
|
||||
android:maxWidth="100dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/view3"
|
||||
app:layout_constraintStart_toEndOf="@+id/view2"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="系统匹配" />
|
||||
|
||||
<View
|
||||
android:id="@+id/tab_line2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="3dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:background="@drawable/bg_main_com_type"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tab2"
|
||||
app:layout_constraintStart_toStartOf="@+id/tab2"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/expendImg2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
android:padding="5dp"
|
||||
android:src="@mipmap/ic_expend_down"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tab2"
|
||||
app:layout_constraintStart_toEndOf="@+id/tab2"
|
||||
app:layout_constraintTop_toTopOf="@+id/tab2"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tab_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_toStartOf="@+id/tab_top1"
|
||||
android:src="@mipmap/icon_msg_recommend"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tab_top1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/tab_top1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="MissingConstraints">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="tab1"
|
||||
android:textSize="15dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/tab_line1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="3dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_below="@+id/tab_top1"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/bg_main_com_type"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tab1"
|
||||
app:layout_constraintStart_toStartOf="@+id/tab1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tab1" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group_tab2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:id="@+id/tabLayout2"
|
||||
app:constraint_referenced_ids="view2,tab2,tab_line2"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/view3"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="1dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tab3"
|
||||
app:layout_constraintStart_toEndOf="@+id/tab2"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:maxWidth="100dp"
|
||||
android:id="@+id/tab3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/view3"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="对方主动" />
|
||||
|
||||
<View
|
||||
tools:visibility="visible"
|
||||
android:id="@+id/tab_line3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="3dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:background="@drawable/bg_main_com_type"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tab3"
|
||||
app:layout_constraintStart_toStartOf="@+id/tab3"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/expendImg3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
android:padding="5dp"
|
||||
android:src="@mipmap/ic_expend_down"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tab3"
|
||||
app:layout_constraintStart_toEndOf="@+id/tab3"
|
||||
app:layout_constraintTop_toTopOf="@+id/tab3"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/tab_top2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="MissingConstraints">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="tab1"
|
||||
android:textSize="15dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/tab_line2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_height="3dp"
|
||||
android:layout_below="@+id/tab_top2"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/bg_main_com_type"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tab2"
|
||||
app:layout_constraintStart_toStartOf="@+id/tab2"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tab2" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group_tab3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:id="@+id/tabLayout3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/tab_top3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="MissingConstraints">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tab3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="tab1"
|
||||
android:textSize="15dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:id="@+id/tab_line3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_height="3dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_below="@+id/tab_top3"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/bg_main_com_type"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tab3"
|
||||
app:layout_constraintStart_toStartOf="@+id/tab3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tab3" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
app:constraint_referenced_ids="view3,tab3,tab_line3"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<!-- <LinearLayout-->
|
||||
<!-- android:id="@+id/tabLayouts"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="40dp"-->
|
||||
<!-- android:gravity="center_vertical"-->
|
||||
<!-- android:paddingStart="20dp"-->
|
||||
<!-- android:paddingEnd="20dp">-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/tabLayout1"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- tools:visibility="visible">-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/tab_icon"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_marginEnd="5dp"-->
|
||||
<!-- android:layout_toStartOf="@+id/tab_top1"-->
|
||||
<!-- android:src="@mipmap/icon_msg_recommend"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toStartOf="@+id/tab_top1"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- tools:visibility="visible" />-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/tab_top1"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_centerHorizontal="true"-->
|
||||
<!-- android:gravity="center_horizontal"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintWidth_percent="0.8"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- tools:ignore="MissingConstraints">-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tab1"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:text="tab1"-->
|
||||
<!-- android:textSize="15dp"-->
|
||||
<!-- android:textStyle="bold"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintHorizontal_bias="1.0"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <View-->
|
||||
<!-- android:id="@+id/tab_line1"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="3dp"-->
|
||||
<!-- android:layout_below="@+id/tab_top1"-->
|
||||
<!-- android:layout_centerHorizontal="true"-->
|
||||
<!-- android:layout_marginStart="3dp"-->
|
||||
<!-- android:layout_marginTop="3dp"-->
|
||||
<!-- android:layout_marginEnd="3dp"-->
|
||||
<!-- android:background="@drawable/bg_main_com_type"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="@+id/tab1"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@+id/tab1"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/tab1" />-->
|
||||
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/expendImg1"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:padding="5dp"-->
|
||||
<!-- android:src="@mipmap/ic_expend_down"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- android:layout_marginEnd="1dp"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintHorizontal_bias="0.1"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/tab_top1"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- tools:visibility="visible" />-->
|
||||
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/tabLayout2"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- tools:visibility="visible">-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/tab_top2"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_centerHorizontal="true"-->
|
||||
<!-- android:gravity="center_horizontal"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- tools:ignore="MissingConstraints">-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tab2"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:text="tab1"-->
|
||||
<!-- android:textSize="15dp"-->
|
||||
<!-- android:textStyle="bold"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintHorizontal_bias="1.0"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <View-->
|
||||
<!-- android:id="@+id/tab_line2"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="3dp"-->
|
||||
<!-- android:layout_below="@+id/tab_top2"-->
|
||||
<!-- android:layout_centerHorizontal="true"-->
|
||||
<!-- android:layout_marginStart="3dp"-->
|
||||
<!-- android:layout_marginTop="3dp"-->
|
||||
<!-- android:layout_marginEnd="3dp"-->
|
||||
<!-- android:background="@drawable/bg_main_com_type"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="@+id/tab2"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@+id/tab2"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/tab2" />-->
|
||||
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/expendImg2"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:padding="5dp"-->
|
||||
<!-- android:src="@mipmap/ic_expend_down"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintHorizontal_bias="0.1"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/tab_top2"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- tools:visibility="visible" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/tabLayout3"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- tools:visibility="visible">-->
|
||||
|
||||
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
|
||||
<!-- android:id="@+id/tab_top3"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:layout_centerHorizontal="true"-->
|
||||
<!-- android:gravity="center_horizontal"-->
|
||||
<!-- android:orientation="vertical"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- tools:ignore="MissingConstraints">-->
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:id="@+id/tab3"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:gravity="center"-->
|
||||
<!-- android:text="tab1"-->
|
||||
<!-- android:textSize="15dp"-->
|
||||
<!-- android:textStyle="bold"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintHorizontal_bias="1.0"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent" />-->
|
||||
|
||||
<!-- <View-->
|
||||
<!-- android:id="@+id/tab_line3"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="3dp"-->
|
||||
<!-- android:layout_below="@+id/tab_top3"-->
|
||||
<!-- android:layout_centerHorizontal="true"-->
|
||||
<!-- android:layout_marginStart="3dp"-->
|
||||
<!-- android:layout_marginTop="3dp"-->
|
||||
<!-- android:layout_marginEnd="3dp"-->
|
||||
<!-- android:background="@drawable/bg_main_com_type"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="@+id/tab3"-->
|
||||
<!-- app:layout_constraintStart_toStartOf="@+id/tab3"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/tab3" />-->
|
||||
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/expendImg3"-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:layout_centerHorizontal="true"-->
|
||||
<!-- android:padding="5dp"-->
|
||||
<!-- app:layout_constraintHorizontal_bias="0.1"-->
|
||||
<!-- android:src="@mipmap/ic_expend_down"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintEnd_toEndOf="parent"-->
|
||||
<!-- app:layout_constraintStart_toEndOf="@+id/tab_top3"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- tools:visibility="visible" />-->
|
||||
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
|
||||
<!-- </LinearLayout>-->
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager"
|
||||
|
||||
BIN
main/src/main/res/mipmap-mdpi/ic_expend_down.png
Normal file
BIN
main/src/main/res/mipmap-mdpi/ic_expend_down.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 377 B |
BIN
main/src/main/res/mipmap-mdpi/ic_expend_up.png
Normal file
BIN
main/src/main/res/mipmap-mdpi/ic_expend_up.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 366 B |
BIN
main/src/main/res/mipmap-xxhdpi/ic_expend_down.png
Normal file
BIN
main/src/main/res/mipmap-xxhdpi/ic_expend_down.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1009 B |
BIN
main/src/main/res/mipmap-xxhdpi/ic_expend_up.png
Normal file
BIN
main/src/main/res/mipmap-xxhdpi/ic_expend_up.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 950 B |
BIN
main/src/main/res/mipmap-xxxhdpi/ic_expend_down.png
Normal file
BIN
main/src/main/res/mipmap-xxxhdpi/ic_expend_down.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 455 B |
BIN
main/src/main/res/mipmap-xxxhdpi/ic_expend_up.png
Normal file
BIN
main/src/main/res/mipmap-xxxhdpi/ic_expend_up.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 433 B |
Reference in New Issue
Block a user