Compare commits
No commits in common. "master" and "dev_改版主分支" have entirely different histories.
@ -1,18 +1,12 @@
|
|||||||
//apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
//apply plugin: 'img-optimizer'
|
apply plugin: 'img-optimizer'
|
||||||
//apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
//apply plugin: 'kotlin-android-extensions'
|
apply plugin: 'kotlin-android-extensions'
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-parcelize'
|
|
||||||
id 'img-optimizer'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "com.yunbao.faceunity"
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
compileSdk rootProject.ext.android.compileSdkVersion
|
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
pickFirst "lib/armeabi/libyuvutils.so"
|
pickFirst "lib/armeabi/libyuvutils.so"
|
||||||
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
||||||
@ -54,11 +48,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_18
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_18
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
|
||||||
buildFeatures {
|
|
||||||
buildConfig = true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
package="com.yunbao.faceunity"
|
||||||
>
|
>
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
@ -10,9 +11,7 @@
|
|||||||
|
|
||||||
<application
|
<application
|
||||||
android:icon="@mipmap/ico_home_animoji"
|
android:icon="@mipmap/ico_home_animoji"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true">
|
||||||
tools:replace="allowBackup"
|
|
||||||
>
|
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
android {
|
android {
|
||||||
namespace "com.samsung.android.sdk.iap.lib"
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
compileSdk rootProject.ext.android.compileSdkVersion
|
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
minSdkVersion minSdkVersion
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
consumerProguardFiles "consumer-rules.pro"
|
consumerProguardFiles "consumer-rules.pro"
|
||||||
versionCode rootProject.ext.android.versionCode
|
versionCode versionCode
|
||||||
versionName rootProject.ext.android.versionName
|
versionName versionName
|
||||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
targetSdkVersion targetSdkVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@ -18,15 +18,7 @@ android {
|
|||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buildFeatures {
|
|
||||||
buildConfig = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
repositories {
|
|
||||||
flatDir {
|
|
||||||
dirs 'libs', '../libs'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
|
||||||
}
|
}
|
Binary file not shown.
@ -1,31 +1,30 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.samsung.android.sdk.iap.lib"
|
||||||
android:versionCode="601000004"
|
android:versionCode="601000004"
|
||||||
android:versionName="6.1.0">
|
android:versionName="6.1.0">
|
||||||
<!-- version code [Major/Minor/Bug fix release/Build number ] : x xx xxx xxx -->
|
<!-- version code [Major/Minor/Bug fix release/Build number ] : x xx xxx xxx -->
|
||||||
|
|
||||||
<application
|
<application>
|
||||||
android:allowBackup="true"
|
|
||||||
tools:replace="allowBackup">
|
|
||||||
<!-- IAP 라이브러리 내 Activity 선언 시작-->
|
<!-- IAP 라이브러리 내 Activity 선언 시작-->
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.samsung.android.sdk.iap.lib2.activity.DialogActivity"
|
android:name="com.samsung.android.sdk.iap.lib.activity.DialogActivity"
|
||||||
android:theme="@style/Theme.Empty"
|
android:theme="@style/Theme.Empty"
|
||||||
android:configChanges="orientation|screenSize"/>
|
android:configChanges="orientation|screenSize"/>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.samsung.android.sdk.iap.lib2.activity.CheckPackageActivity"
|
android:name="com.samsung.android.sdk.iap.lib.activity.CheckPackageActivity"
|
||||||
android:theme="@style/Theme.Empty"
|
android:theme="@style/Theme.Empty"
|
||||||
android:configChanges="orientation|screenSize"/>
|
android:configChanges="orientation|screenSize"/>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.samsung.android.sdk.iap.lib2.activity.AccountActivity"
|
android:name="com.samsung.android.sdk.iap.lib.activity.AccountActivity"
|
||||||
android:theme="@style/Theme.Transparent"
|
android:theme="@style/Theme.Transparent"
|
||||||
android:configChanges="orientation|screenSize"/>
|
android:configChanges="orientation|screenSize"/>
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.samsung.android.sdk.iap.lib2.activity.PaymentActivity"
|
android:name="com.samsung.android.sdk.iap.lib.activity.PaymentActivity"
|
||||||
android:theme="@style/Theme.Empty"
|
android:theme="@style/Theme.Empty"
|
||||||
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|locale|uiMode|fontScale|density"/>
|
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|locale|uiMode|fontScale|density"/>
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.activity;
|
package com.samsung.android.sdk.iap.lib.activity;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperUtil;
|
import com.samsung.android.sdk.iap.lib.helper.HelperUtil;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2018-03-06.
|
* Created by sangbum7.kim on 2018-03-06.
|
||||||
@ -16,11 +16,12 @@ import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
|||||||
public class AccountActivity extends Activity {
|
public class AccountActivity extends Activity {
|
||||||
private static final String TAG = AccountActivity.class.getSimpleName();
|
private static final String TAG = AccountActivity.class.getSimpleName();
|
||||||
|
|
||||||
com.samsung.android.sdk.iap.lib2.helper.IapHelper mIapHelper = null;
|
IapHelper mIapHelper = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
mIapHelper = IapHelper.getInstance(this);
|
mIapHelper = IapHelper.getInstance(this);
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
// 1. If IAP package is installed and valid, start SamsungAccount
|
// 1. If IAP package is installed and valid, start SamsungAccount
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.activity;
|
package com.samsung.android.sdk.iap.lib.activity;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
@ -8,25 +8,25 @@ import android.util.Log;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib.dialog.BaseDialogFragment;
|
||||||
import com.samsung.android.sdk.iap.lib2.dialog.BaseDialogFragment;
|
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperUtil;
|
import com.samsung.android.sdk.iap.lib.helper.HelperUtil;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.PurchaseVo;
|
import com.samsung.android.sdk.iap.lib.vo.PurchaseVo;
|
||||||
|
|
||||||
|
|
||||||
public abstract class BaseActivity extends Activity {
|
public abstract class BaseActivity extends Activity {
|
||||||
private static final String TAG = BaseActivity.class.getSimpleName();
|
private static final String TAG = BaseActivity.class.getSimpleName();
|
||||||
|
|
||||||
protected com.samsung.android.sdk.iap.lib2.vo.ErrorVo mErrorVo = new com.samsung.android.sdk.iap.lib2.vo.ErrorVo();
|
protected ErrorVo mErrorVo = new ErrorVo();
|
||||||
private Dialog mProgressDialog = null;
|
private Dialog mProgressDialog = null;
|
||||||
protected com.samsung.android.sdk.iap.lib2.vo.PurchaseVo mPurchaseVo = null;
|
protected PurchaseVo mPurchaseVo = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper Class between IAPService and 3rd Party Application
|
* Helper Class between IAPService and 3rd Party Application
|
||||||
*/
|
*/
|
||||||
com.samsung.android.sdk.iap.lib2.helper.IapHelper mIapHelper = null;
|
IapHelper mIapHelper = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag value to show successful pop-up. Error pop-up appears whenever it fails or not.
|
* Flag value to show successful pop-up. Error pop-up appears whenever it fails or not.
|
||||||
@ -64,15 +64,15 @@ public abstract class BaseActivity extends Activity {
|
|||||||
public boolean checkAppsPackage(Activity _activity) {
|
public boolean checkAppsPackage(Activity _activity) {
|
||||||
// 1. If Galaxy Store is installed
|
// 1. If Galaxy Store is installed
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
if (com.samsung.android.sdk.iap.lib2.helper.HelperUtil.isInstalledAppsPackage(this)) {
|
if (HelperUtil.isInstalledAppsPackage(this)) {
|
||||||
// 1) If Galaxy Store is enabled
|
// 1) If Galaxy Store is enabled
|
||||||
// ================================================================
|
// ================================================================
|
||||||
if (!com.samsung.android.sdk.iap.lib2.helper.HelperUtil.isEnabledAppsPackage(this)) {
|
if (!HelperUtil.isEnabledAppsPackage(this)) {
|
||||||
com.samsung.android.sdk.iap.lib2.helper.HelperUtil.showEnableGalaxyStoreDialog(_activity);
|
HelperUtil.showEnableGalaxyStoreDialog(_activity);
|
||||||
// ================================================================
|
// ================================================================
|
||||||
// 2) If Galaxy Store is valid
|
// 2) If Galaxy Store is valid
|
||||||
// ================================================================
|
// ================================================================
|
||||||
} else if (com.samsung.android.sdk.iap.lib2.helper.HelperUtil.isValidAppsPackage(this)) {
|
} else if (HelperUtil.isValidAppsPackage(this)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
// Set error to notify result to third-party application
|
// Set error to notify result to third-party application
|
||||||
@ -84,7 +84,7 @@ public abstract class BaseActivity extends Activity {
|
|||||||
R.string.dream_ph_body_contact_p1sscustomer_servicep2ss_for_more_information_n_nerror_code_c_p3ss),
|
R.string.dream_ph_body_contact_p1sscustomer_servicep2ss_for_more_information_n_nerror_code_c_p3ss),
|
||||||
"", "", ERROR_ISSUER_IAP_CLIENT + ERROR_CODE_INVALID_GALAXY_STORE);
|
"", "", ERROR_ISSUER_IAP_CLIENT + ERROR_CODE_INVALID_GALAXY_STORE);
|
||||||
mErrorVo.setError(HelperDefine.IAP_PAYMENT_IS_CANCELED, errorString);
|
mErrorVo.setError(HelperDefine.IAP_PAYMENT_IS_CANCELED, errorString);
|
||||||
com.samsung.android.sdk.iap.lib2.helper.HelperUtil.showInvalidGalaxyStoreDialog(this);
|
HelperUtil.showInvalidGalaxyStoreDialog(this);
|
||||||
}
|
}
|
||||||
// ================================================================
|
// ================================================================
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ public abstract class BaseActivity extends Activity {
|
|||||||
// 2. If Galaxy Store is not installed
|
// 2. If Galaxy Store is not installed
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
} else {
|
} else {
|
||||||
com.samsung.android.sdk.iap.lib2.helper.HelperUtil.installAppsPackage(this);
|
HelperUtil.installAppsPackage(this);
|
||||||
}
|
}
|
||||||
// ====================================================================
|
// ====================================================================
|
||||||
return false;
|
return false;
|
||||||
@ -161,12 +161,12 @@ public abstract class BaseActivity extends Activity {
|
|||||||
else {
|
else {
|
||||||
Log.e(TAG, "finishPurchase: " + mErrorVo.dump());
|
Log.e(TAG, "finishPurchase: " + mErrorVo.dump());
|
||||||
if (mShowErrorDialog) {
|
if (mShowErrorDialog) {
|
||||||
com.samsung.android.sdk.iap.lib2.helper.HelperUtil.showIapErrorDialog(
|
HelperUtil.showIapErrorDialog(
|
||||||
this,
|
this,
|
||||||
getString(R.string.dream_ph_pheader_couldnt_complete_purchase),
|
getString(R.string.dream_ph_pheader_couldnt_complete_purchase),
|
||||||
mErrorVo.getErrorString(),
|
mErrorVo.getErrorString(),
|
||||||
mErrorVo.getErrorDetailsString(),
|
mErrorVo.getErrorDetailsString(),
|
||||||
new com.samsung.android.sdk.iap.lib2.dialog.BaseDialogFragment.OnClickListener() {
|
new BaseDialogFragment.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick() {
|
public void onClick() {
|
||||||
finish();
|
finish();
|
@ -1,12 +1,12 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.activity;
|
package com.samsung.android.sdk.iap.lib.activity;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperUtil;
|
import com.samsung.android.sdk.iap.lib.helper.HelperUtil;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2018-03-07.
|
* Created by sangbum7.kim on 2018-03-07.
|
||||||
@ -27,12 +27,12 @@ public class CheckPackageActivity extends Activity {
|
|||||||
int DialogType = extras.getInt("DialogType");
|
int DialogType = extras.getInt("DialogType");
|
||||||
switch (DialogType) {
|
switch (DialogType) {
|
||||||
case HelperDefine.DIALOG_TYPE_INVALID_PACKAGE: {
|
case HelperDefine.DIALOG_TYPE_INVALID_PACKAGE: {
|
||||||
com.samsung.android.sdk.iap.lib2.helper.HelperUtil.showInvalidGalaxyStoreDialog(this);
|
HelperUtil.showInvalidGalaxyStoreDialog(this);
|
||||||
mFinishFlag = false;
|
mFinishFlag = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case HelperDefine.DIALOG_TYPE_DISABLE_APPLICATION: {
|
case HelperDefine.DIALOG_TYPE_DISABLE_APPLICATION: {
|
||||||
com.samsung.android.sdk.iap.lib2.helper.HelperUtil.showEnableGalaxyStoreDialog(this);
|
HelperUtil.showEnableGalaxyStoreDialog(this);
|
||||||
mFinishFlag = false;
|
mFinishFlag = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
@ -1,12 +1,16 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.activity;
|
package com.samsung.android.sdk.iap.lib.activity;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib2.dialog.BaseDialogFragment;
|
import com.samsung.android.sdk.iap.lib.dialog.BaseDialogFragment;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperUtil;
|
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||||
|
import com.samsung.android.sdk.iap.lib.helper.HelperUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2018-03-05.
|
* Created by sangbum7.kim on 2018-03-05.
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.activity;
|
package com.samsung.android.sdk.iap.lib.activity;
|
||||||
|
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -9,9 +9,9 @@ import android.util.Log;
|
|||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperListenerManager;
|
import com.samsung.android.sdk.iap.lib.helper.HelperListenerManager;
|
||||||
import com.samsung.android.sdk.iap.lib2.listener.OnPaymentListener;
|
import com.samsung.android.sdk.iap.lib.listener.OnPaymentListener;
|
||||||
|
|
||||||
public class PaymentActivity extends BaseActivity {
|
public class PaymentActivity extends BaseActivity {
|
||||||
private static final String TAG = PaymentActivity.class.getSimpleName();
|
private static final String TAG = PaymentActivity.class.getSimpleName();
|
||||||
@ -56,7 +56,7 @@ public class PaymentActivity extends BaseActivity {
|
|||||||
super.preDestory();
|
super.preDestory();
|
||||||
if (isFinishing()) {
|
if (isFinishing()) {
|
||||||
OnPaymentListener onPaymentListener =
|
OnPaymentListener onPaymentListener =
|
||||||
com.samsung.android.sdk.iap.lib2.helper.HelperListenerManager.getInstance().getOnPaymentListener();
|
HelperListenerManager.getInstance().getOnPaymentListener();
|
||||||
HelperListenerManager.getInstance().setOnPaymentListener(null);
|
HelperListenerManager.getInstance().setOnPaymentListener(null);
|
||||||
if (null != onPaymentListener) {
|
if (null != onPaymentListener) {
|
||||||
onPaymentListener.onPayment(mErrorVo, mPurchaseVo);
|
onPaymentListener.onPayment(mErrorVo, mPurchaseVo);
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.dialog;
|
package com.samsung.android.sdk.iap.lib.dialog;
|
||||||
|
|
||||||
import android.app.ActionBar;
|
import android.app.ActionBar;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
@ -8,6 +8,7 @@ import android.os.Build;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
|
import android.util.Log;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.View;
|
import android.view.View;
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.helper;
|
package com.samsung.android.sdk.iap.lib.helper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2017-07-17.
|
* Created by sangbum7.kim on 2017-07-17.
|
@ -1,12 +1,12 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.helper;
|
package com.samsung.android.sdk.iap.lib.helper;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib2.listener.OnConsumePurchasedItemsListener;
|
import com.samsung.android.sdk.iap.lib.helper.task.ConsumePurchasedItemsTask;
|
||||||
import com.samsung.android.sdk.iap.lib2.listener.OnGetOwnedListListener;
|
import com.samsung.android.sdk.iap.lib.helper.task.GetOwnedListTask;
|
||||||
import com.samsung.android.sdk.iap.lib2.listener.OnGetProductsDetailsListener;
|
import com.samsung.android.sdk.iap.lib.helper.task.GetProductsDetailsTask;
|
||||||
import com.samsung.android.sdk.iap.lib2.listener.OnPaymentListener;
|
import com.samsung.android.sdk.iap.lib.listener.OnConsumePurchasedItemsListener;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.task.ConsumePurchasedItemsTask;
|
import com.samsung.android.sdk.iap.lib.listener.OnGetOwnedListListener;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask;
|
import com.samsung.android.sdk.iap.lib.listener.OnGetProductsDetailsListener;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.task.GetProductsDetailsTask;
|
import com.samsung.android.sdk.iap.lib.listener.OnPaymentListener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2017-08-29.
|
* Created by sangbum7.kim on 2017-08-29.
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.helper;
|
package com.samsung.android.sdk.iap.lib.helper;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
@ -14,9 +14,9 @@ import android.text.Html;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib2.activity.BaseActivity;
|
import com.samsung.android.sdk.iap.lib.activity.BaseActivity;
|
||||||
import com.samsung.android.sdk.iap.lib2.dialog.BaseDialogFragment;
|
import com.samsung.android.sdk.iap.lib.dialog.BaseDialogFragment;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2017-08-17.
|
* Created by sangbum7.kim on 2017-08-17.
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.helper;
|
package com.samsung.android.sdk.iap.lib.helper;
|
||||||
|
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -12,20 +12,20 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.samsung.android.iap.IAPConnector;
|
import com.samsung.android.iap.IAPConnector;
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib2.activity.CheckPackageActivity;
|
import com.samsung.android.sdk.iap.lib.activity.CheckPackageActivity;
|
||||||
import com.samsung.android.sdk.iap.lib2.activity.PaymentActivity;
|
import com.samsung.android.sdk.iap.lib.activity.PaymentActivity;
|
||||||
import com.samsung.android.sdk.iap.lib2.listener.OnConsumePurchasedItemsListener;
|
import com.samsung.android.sdk.iap.lib.helper.task.ConsumePurchasedItemsTask;
|
||||||
import com.samsung.android.sdk.iap.lib2.listener.OnGetOwnedListListener;
|
import com.samsung.android.sdk.iap.lib.helper.task.GetOwnedListTask;
|
||||||
import com.samsung.android.sdk.iap.lib2.listener.OnGetProductsDetailsListener;
|
import com.samsung.android.sdk.iap.lib.helper.task.GetProductsDetailsTask;
|
||||||
import com.samsung.android.sdk.iap.lib2.listener.OnPaymentListener;
|
import com.samsung.android.sdk.iap.lib.listener.OnConsumePurchasedItemsListener;
|
||||||
import com.samsung.android.sdk.iap.lib2.service.BaseService;
|
import com.samsung.android.sdk.iap.lib.listener.OnGetOwnedListListener;
|
||||||
import com.samsung.android.sdk.iap.lib2.service.ConsumePurchasedItems;
|
import com.samsung.android.sdk.iap.lib.listener.OnGetProductsDetailsListener;
|
||||||
import com.samsung.android.sdk.iap.lib2.service.OwnedProduct;
|
import com.samsung.android.sdk.iap.lib.listener.OnPaymentListener;
|
||||||
import com.samsung.android.sdk.iap.lib2.service.ProductsDetails;
|
import com.samsung.android.sdk.iap.lib.service.BaseService;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
import com.samsung.android.sdk.iap.lib.service.ConsumePurchasedItems;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.task.ConsumePurchasedItemsTask;
|
import com.samsung.android.sdk.iap.lib.service.OwnedProduct;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask;
|
import com.samsung.android.sdk.iap.lib.service.ProductsDetails;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.task.GetProductsDetailsTask;
|
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -46,9 +46,9 @@ public class IapHelper extends HelperDefine {
|
|||||||
|
|
||||||
// AsyncTask for API
|
// AsyncTask for API
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
private com.samsung.android.sdk.iap.lib2.helper.task.GetProductsDetailsTask mGetProductsDetailsTask = null;
|
private GetProductsDetailsTask mGetProductsDetailsTask = null;
|
||||||
private com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask mGetOwnedListTask = null;
|
private GetOwnedListTask mGetOwnedListTask = null;
|
||||||
private com.samsung.android.sdk.iap.lib2.helper.task.ConsumePurchasedItemsTask mConsumePurchasedItemsTask = null;
|
private ConsumePurchasedItemsTask mConsumePurchasedItemsTask = null;
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
|
|
||||||
private ArrayList<BaseService> mServiceQueue = new ArrayList<BaseService>();
|
private ArrayList<BaseService> mServiceQueue = new ArrayList<BaseService>();
|
||||||
@ -267,7 +267,7 @@ public class IapHelper extends HelperDefine {
|
|||||||
if (mIapConnector == null || mContext == null) {
|
if (mIapConnector == null || mContext == null) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
mGetProductsDetailsTask = new com.samsung.android.sdk.iap.lib2.helper.task.GetProductsDetailsTask(_baseService,
|
mGetProductsDetailsTask = new GetProductsDetailsTask(_baseService,
|
||||||
mIapConnector,
|
mIapConnector,
|
||||||
mContext,
|
mContext,
|
||||||
_productIDs,
|
_productIDs,
|
||||||
@ -344,7 +344,7 @@ public class IapHelper extends HelperDefine {
|
|||||||
if (mIapConnector == null || mContext == null) {
|
if (mIapConnector == null || mContext == null) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
mGetOwnedListTask = new com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask(_baseService,
|
mGetOwnedListTask = new GetOwnedListTask(_baseService,
|
||||||
mIapConnector,
|
mIapConnector,
|
||||||
mContext,
|
mContext,
|
||||||
_productType,
|
_productType,
|
||||||
@ -417,7 +417,7 @@ public class IapHelper extends HelperDefine {
|
|||||||
mConsumePurchasedItemsTask.cancel(true);
|
mConsumePurchasedItemsTask.cancel(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
mConsumePurchasedItemsTask = new com.samsung.android.sdk.iap.lib2.helper.task.ConsumePurchasedItemsTask(_baseService,
|
mConsumePurchasedItemsTask = new ConsumePurchasedItemsTask(_baseService,
|
||||||
mIapConnector,
|
mIapConnector,
|
||||||
mContext,
|
mContext,
|
||||||
_purchaseIds,
|
_purchaseIds,
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.helper.task;
|
package com.samsung.android.sdk.iap.lib.helper.task;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
@ -6,8 +6,9 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.samsung.android.iap.IAPConnector;
|
import com.samsung.android.iap.IAPConnector;
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib2.service.BaseService;
|
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
import com.samsung.android.sdk.iap.lib.service.BaseService;
|
||||||
|
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2017-09-01.
|
* Created by sangbum7.kim on 2017-09-01.
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.helper.task;
|
package com.samsung.android.sdk.iap.lib.helper.task;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -6,9 +6,9 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.samsung.android.iap.IAPConnector;
|
import com.samsung.android.iap.IAPConnector;
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib2.service.ConsumePurchasedItems;
|
import com.samsung.android.sdk.iap.lib.service.ConsumePurchasedItems;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ConsumeVo;
|
import com.samsung.android.sdk.iap.lib.vo.ConsumeVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.helper.task;
|
package com.samsung.android.sdk.iap.lib.helper.task;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -6,9 +6,9 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.samsung.android.iap.IAPConnector;
|
import com.samsung.android.iap.IAPConnector;
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib2.service.OwnedProduct;
|
import com.samsung.android.sdk.iap.lib.service.OwnedProduct;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.OwnedProductVo;
|
import com.samsung.android.sdk.iap.lib.vo.OwnedProductVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.helper.task;
|
package com.samsung.android.sdk.iap.lib.helper.task;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -6,9 +6,9 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.samsung.android.iap.IAPConnector;
|
import com.samsung.android.iap.IAPConnector;
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib2.service.ProductsDetails;
|
import com.samsung.android.sdk.iap.lib.service.ProductsDetails;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ProductVo;
|
import com.samsung.android.sdk.iap.lib.vo.ProductVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -1,13 +1,13 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.listener;
|
package com.samsung.android.sdk.iap.lib.listener;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask;
|
import com.samsung.android.sdk.iap.lib.helper.task.GetOwnedListTask;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ConsumeVo;
|
import com.samsung.android.sdk.iap.lib.vo.ConsumeVo;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback Interface used with {@link com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask}
|
* Callback Interface used with {@link GetOwnedListTask}
|
||||||
*/
|
*/
|
||||||
public interface OnConsumePurchasedItemsListener {
|
public interface OnConsumePurchasedItemsListener {
|
||||||
/**
|
/**
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.samsung.android.sdk.iap.lib.listener;
|
||||||
|
|
||||||
|
import com.samsung.android.sdk.iap.lib.helper.task.GetOwnedListTask;
|
||||||
|
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
||||||
|
import com.samsung.android.sdk.iap.lib.vo.OwnedProductVo;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback Interface used with {@link GetOwnedListTask}
|
||||||
|
*/
|
||||||
|
public interface OnGetOwnedListListener {
|
||||||
|
/**
|
||||||
|
* Callback method to be invoked when {@link GetOwnedListTask} has been finished.
|
||||||
|
*
|
||||||
|
* @param _errorVO
|
||||||
|
* @param _ownedList
|
||||||
|
*/
|
||||||
|
void onGetOwnedProducts(ErrorVo _errorVO, ArrayList<OwnedProductVo> _ownedList);
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.samsung.android.sdk.iap.lib.listener;
|
||||||
|
|
||||||
|
import com.samsung.android.sdk.iap.lib.helper.task.GetProductsDetailsTask;
|
||||||
|
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
||||||
|
import com.samsung.android.sdk.iap.lib.vo.ProductVo;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback Interface used with {@link GetProductsDetailsTask}
|
||||||
|
*/
|
||||||
|
public interface OnGetProductsDetailsListener {
|
||||||
|
/**
|
||||||
|
* Callback method to be invoked when {@link GetProductsDetailsTask} has been finished.
|
||||||
|
*
|
||||||
|
* @param _errorVO
|
||||||
|
* @param _productList
|
||||||
|
*/
|
||||||
|
void onGetProducts(ErrorVo _errorVO, ArrayList<ProductVo> _productList);
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.listener;
|
package com.samsung.android.sdk.iap.lib.listener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback Interface to be invoked when bind to IAPService has been finished.
|
* Callback Interface to be invoked when bind to IAPService has been finished.
|
@ -1,7 +1,7 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.listener;
|
package com.samsung.android.sdk.iap.lib.listener;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.PurchaseVo;
|
import com.samsung.android.sdk.iap.lib.vo.PurchaseVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback Interface to be invoked when payment has been finished.
|
* Callback Interface to be invoked when payment has been finished.
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.listener;
|
package com.samsung.android.sdk.iap.lib.listener;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2018-02-28.
|
* Created by sangbum7.kim on 2018-02-28.
|
@ -1,15 +1,15 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.service;
|
package com.samsung.android.sdk.iap.lib.service;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib.activity.AccountActivity;
|
||||||
import com.samsung.android.sdk.iap.lib2.activity.AccountActivity;
|
import com.samsung.android.sdk.iap.lib.activity.DialogActivity;
|
||||||
import com.samsung.android.sdk.iap.lib2.activity.DialogActivity;
|
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by sangbum7.kim on 2018-02-28.
|
* Created by sangbum7.kim on 2018-02-28.
|
||||||
@ -18,8 +18,8 @@ import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
|||||||
public abstract class BaseService {
|
public abstract class BaseService {
|
||||||
private static final String TAG = BaseService.class.getSimpleName();
|
private static final String TAG = BaseService.class.getSimpleName();
|
||||||
|
|
||||||
protected com.samsung.android.sdk.iap.lib2.vo.ErrorVo mErrorVo = new com.samsung.android.sdk.iap.lib2.vo.ErrorVo();
|
protected ErrorVo mErrorVo = new ErrorVo();
|
||||||
protected com.samsung.android.sdk.iap.lib2.helper.IapHelper mIapHelper = null;
|
protected IapHelper mIapHelper = null;
|
||||||
protected Context mContext = null;
|
protected Context mContext = null;
|
||||||
|
|
||||||
public BaseService(IapHelper _iapHelper, Context _context) {
|
public BaseService(IapHelper _iapHelper, Context _context) {
|
||||||
@ -28,7 +28,7 @@ public abstract class BaseService {
|
|||||||
mErrorVo.setError(HelperDefine.IAP_ERROR_INITIALIZATION, mContext.getString(R.string.mids_sapps_pop_unknown_error_occurred));
|
mErrorVo.setError(HelperDefine.IAP_ERROR_INITIALIZATION, mContext.getString(R.string.mids_sapps_pop_unknown_error_occurred));
|
||||||
}
|
}
|
||||||
|
|
||||||
public com.samsung.android.sdk.iap.lib2.vo.ErrorVo getErrorVo() {
|
public ErrorVo getErrorVo() {
|
||||||
return mErrorVo;
|
return mErrorVo;
|
||||||
}
|
}
|
||||||
|
|
@ -1,13 +1,13 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.service;
|
package com.samsung.android.sdk.iap.lib.service;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
||||||
import com.samsung.android.sdk.iap.lib2.listener.OnConsumePurchasedItemsListener;
|
import com.samsung.android.sdk.iap.lib.listener.OnConsumePurchasedItemsListener;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ConsumeVo;
|
import com.samsung.android.sdk.iap.lib.vo.ConsumeVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -18,9 +18,9 @@ import java.util.ArrayList;
|
|||||||
public class ConsumePurchasedItems extends BaseService {
|
public class ConsumePurchasedItems extends BaseService {
|
||||||
private static final String TAG = ConsumePurchasedItems.class.getSimpleName();
|
private static final String TAG = ConsumePurchasedItems.class.getSimpleName();
|
||||||
|
|
||||||
private com.samsung.android.sdk.iap.lib2.listener.OnConsumePurchasedItemsListener mOnConsumePurchasedItemsListener = null;
|
private OnConsumePurchasedItemsListener mOnConsumePurchasedItemsListener = null;
|
||||||
private static String mPurchaseIds = "";
|
private static String mPurchaseIds = "";
|
||||||
protected ArrayList<com.samsung.android.sdk.iap.lib2.vo.ConsumeVo> mConsumeList = null;
|
protected ArrayList<ConsumeVo> mConsumeList = null;
|
||||||
|
|
||||||
public ConsumePurchasedItems(IapHelper _iapHelper, Context _context, OnConsumePurchasedItemsListener _onConsumePurchasedItemsListener) {
|
public ConsumePurchasedItems(IapHelper _iapHelper, Context _context, OnConsumePurchasedItemsListener _onConsumePurchasedItemsListener) {
|
||||||
super(_iapHelper, _context);
|
super(_iapHelper, _context);
|
@ -1,13 +1,13 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.service;
|
package com.samsung.android.sdk.iap.lib.service;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
||||||
import com.samsung.android.sdk.iap.lib2.listener.OnGetOwnedListListener;
|
import com.samsung.android.sdk.iap.lib.listener.OnGetOwnedListListener;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.OwnedProductVo;
|
import com.samsung.android.sdk.iap.lib.vo.OwnedProductVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -18,9 +18,9 @@ import java.util.ArrayList;
|
|||||||
public class OwnedProduct extends BaseService {
|
public class OwnedProduct extends BaseService {
|
||||||
private static final String TAG = OwnedProduct.class.getSimpleName();
|
private static final String TAG = OwnedProduct.class.getSimpleName();
|
||||||
|
|
||||||
private com.samsung.android.sdk.iap.lib2.listener.OnGetOwnedListListener mOnGetOwnedListListener = null;
|
private OnGetOwnedListListener mOnGetOwnedListListener = null;
|
||||||
private static String mProductType = "";
|
private static String mProductType = "";
|
||||||
protected ArrayList<com.samsung.android.sdk.iap.lib2.vo.OwnedProductVo> mOwnedList = null;
|
protected ArrayList<OwnedProductVo> mOwnedList = null;
|
||||||
|
|
||||||
public OwnedProduct(IapHelper _iapHelper, Context _context, OnGetOwnedListListener _onGetOwnedListListener) {
|
public OwnedProduct(IapHelper _iapHelper, Context _context, OnGetOwnedListListener _onGetOwnedListListener) {
|
||||||
super(_iapHelper, _context);
|
super(_iapHelper, _context);
|
@ -1,13 +1,13 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.service;
|
package com.samsung.android.sdk.iap.lib.service;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib.R;
|
import com.samsung.android.sdk.iap.lib.R;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.IapHelper;
|
import com.samsung.android.sdk.iap.lib.helper.IapHelper;
|
||||||
import com.samsung.android.sdk.iap.lib2.listener.OnGetProductsDetailsListener;
|
import com.samsung.android.sdk.iap.lib.listener.OnGetProductsDetailsListener;
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ProductVo;
|
import com.samsung.android.sdk.iap.lib.vo.ProductVo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
@ -18,9 +18,9 @@ import java.util.ArrayList;
|
|||||||
public class ProductsDetails extends BaseService {
|
public class ProductsDetails extends BaseService {
|
||||||
private static final String TAG = ProductsDetails.class.getSimpleName();
|
private static final String TAG = ProductsDetails.class.getSimpleName();
|
||||||
|
|
||||||
private com.samsung.android.sdk.iap.lib2.listener.OnGetProductsDetailsListener mOnGetProductsDetailsListener = null;
|
private OnGetProductsDetailsListener mOnGetProductsDetailsListener = null;
|
||||||
private static String mProductIds = "";
|
private static String mProductIds = "";
|
||||||
protected ArrayList<com.samsung.android.sdk.iap.lib2.vo.ProductVo> mProductsDetails = null;
|
protected ArrayList<ProductVo> mProductsDetails = null;
|
||||||
|
|
||||||
public ProductsDetails(IapHelper _iapHelper, Context _context, OnGetProductsDetailsListener _onGetProductsDetailsListener) {
|
public ProductsDetails(IapHelper _iapHelper, Context _context, OnGetProductsDetailsListener _onGetProductsDetailsListener) {
|
||||||
super(_iapHelper, _context);
|
super(_iapHelper, _context);
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.vo;
|
package com.samsung.android.sdk.iap.lib.vo;
|
||||||
|
|
||||||
import android.text.format.DateFormat;
|
import android.text.format.DateFormat;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.vo;
|
package com.samsung.android.sdk.iap.lib.vo;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.vo;
|
package com.samsung.android.sdk.iap.lib.vo;
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.HelperDefine;
|
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||||
|
|
||||||
public class ErrorVo {
|
public class ErrorVo {
|
||||||
private int mErrorCode = HelperDefine.IAP_PAYMENT_IS_CANCELED;
|
private int mErrorCode = HelperDefine.IAP_PAYMENT_IS_CANCELED;
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.vo;
|
package com.samsung.android.sdk.iap.lib.vo;
|
||||||
|
|
||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.vo;
|
package com.samsung.android.sdk.iap.lib.vo;
|
||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
@ -1,4 +1,4 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.vo;
|
package com.samsung.android.sdk.iap.lib.vo;
|
||||||
|
|
||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
|
|
@ -1,20 +0,0 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.listener;
|
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask;
|
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.OwnedProductVo;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Callback Interface used with {@link com.samsung.android.sdk.iap.lib2.helper.task.GetOwnedListTask}
|
|
||||||
*/
|
|
||||||
public interface OnGetOwnedListListener {
|
|
||||||
/**
|
|
||||||
* Callback method to be invoked when {@link GetOwnedListTask} has been finished.
|
|
||||||
*
|
|
||||||
* @param _errorVO
|
|
||||||
* @param _ownedList
|
|
||||||
*/
|
|
||||||
void onGetOwnedProducts(ErrorVo _errorVO, ArrayList<OwnedProductVo> _ownedList);
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
package com.samsung.android.sdk.iap.lib2.listener;
|
|
||||||
|
|
||||||
import com.samsung.android.sdk.iap.lib2.helper.task.GetProductsDetailsTask;
|
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ErrorVo;
|
|
||||||
import com.samsung.android.sdk.iap.lib2.vo.ProductVo;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Callback Interface used with {@link com.samsung.android.sdk.iap.lib2.helper.task.GetProductsDetailsTask}
|
|
||||||
*/
|
|
||||||
public interface OnGetProductsDetailsListener {
|
|
||||||
/**
|
|
||||||
* Callback method to be invoked when {@link GetProductsDetailsTask} has been finished.
|
|
||||||
*
|
|
||||||
* @param _errorVO
|
|
||||||
* @param _productList
|
|
||||||
*/
|
|
||||||
void onGetProducts(ErrorVo _errorVO, ArrayList<ProductVo> _productList);
|
|
||||||
}
|
|
@ -1,18 +1,12 @@
|
|||||||
//apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
//apply plugin: 'img-optimizer'
|
apply plugin: 'img-optimizer'
|
||||||
//apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
//apply plugin: 'kotlin-android-extensions'
|
apply plugin: 'kotlin-android-extensions'
|
||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-parcelize'
|
|
||||||
id 'img-optimizer'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "com.pdlive.shayu"
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
compileSdk rootProject.ext.android.compileSdkVersion
|
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
pickFirst "lib/armeabi/libyuvutils.so"
|
pickFirst "lib/armeabi/libyuvutils.so"
|
||||||
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
||||||
@ -54,11 +48,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_18
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_18
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
|
||||||
buildFeatures {
|
|
||||||
buildConfig = true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
>
|
package="com.pdlive.shayu">
|
||||||
|
|
||||||
<queries>
|
<queries>
|
||||||
<package android:name="com.pandoralive.shayu"/>
|
<package android:name="com.pandoralive.shayu"/>
|
||||||
@ -19,7 +19,7 @@
|
|||||||
tools:ignore="ExportedContentProvider" />
|
tools:ignore="ExportedContentProvider" />
|
||||||
|
|
||||||
</queries>
|
</queries>
|
||||||
<application>
|
<application android:allowBackup="true">
|
||||||
<activity
|
<activity
|
||||||
android:name="com.facebook.FacebookActivity"
|
android:name="com.facebook.FacebookActivity"
|
||||||
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
|
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
package com.yunbao.share.adapters;
|
package com.yunbao.share.adapters;
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@ -14,7 +12,6 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
|
|
||||||
import com.pdlive.shayu.R;
|
import com.pdlive.shayu.R;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.utils.ViewUtils;
|
|
||||||
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -26,36 +23,18 @@ import io.rong.imlib.model.Conversation;
|
|||||||
public class InternalShareAdapter extends RecyclerView.Adapter<InternalShareAdapter.ViewHolder> {
|
public class InternalShareAdapter extends RecyclerView.Adapter<InternalShareAdapter.ViewHolder> {
|
||||||
List<SingleConversation> listData = new ArrayList<>();
|
List<SingleConversation> listData = new ArrayList<>();
|
||||||
int selectPosition = -1;
|
int selectPosition = -1;
|
||||||
private int isEmpty = -233;
|
|
||||||
private Context mContext;
|
|
||||||
|
|
||||||
public InternalShareAdapter(Context mContext) {
|
|
||||||
this.mContext = mContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
if (viewType == isEmpty) {
|
|
||||||
return new EmptyViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.view_layout_msg, parent, false));
|
|
||||||
}
|
|
||||||
return new ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_internal_user, parent, false));
|
return new ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_internal_user, parent, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
if (getItemViewType(position) == isEmpty) return;
|
|
||||||
holder.bind(listData.get(position), position);
|
holder.bind(listData.get(position), position);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemViewType(int position) {
|
|
||||||
if (listData.get(position).mCore.getTargetId().equals("isEmpty_-233-pdl-5YK76YC8")) {
|
|
||||||
return isEmpty;
|
|
||||||
}
|
|
||||||
return super.getItemViewType(position);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemCount() {
|
public int getItemCount() {
|
||||||
return listData.size();
|
return listData.size();
|
||||||
@ -65,11 +44,6 @@ public class InternalShareAdapter extends RecyclerView.Adapter<InternalShareAdap
|
|||||||
if (listData == null) {
|
if (listData == null) {
|
||||||
listData = new ArrayList<>();
|
listData = new ArrayList<>();
|
||||||
}
|
}
|
||||||
if (listData.isEmpty()) {
|
|
||||||
Conversation conversation = new Conversation();
|
|
||||||
conversation.setTargetId("isEmpty_-233-pdl-5YK76YC8");
|
|
||||||
listData.add(new SingleConversation(mContext, conversation));
|
|
||||||
}
|
|
||||||
this.listData = listData;
|
this.listData = listData;
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
|
|
||||||
@ -79,19 +53,6 @@ public class InternalShareAdapter extends RecyclerView.Adapter<InternalShareAdap
|
|||||||
return selectPosition;
|
return selectPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<SingleConversation> getListData() {
|
|
||||||
return listData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class EmptyViewHolder extends ViewHolder {
|
|
||||||
|
|
||||||
public EmptyViewHolder(@NonNull View itemView) {
|
|
||||||
super(itemView);
|
|
||||||
ViewUtils.findViewById(itemView, R.id.imageView, ImageView.class).setImageResource(R.mipmap.ic_addressbook_not_search);
|
|
||||||
ViewUtils.findViewById(itemView, R.id.textView, TextView.class).setText(R.string.not_data_message_address_book_list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
ClipPathCircleImage mAvatar;
|
ClipPathCircleImage mAvatar;
|
||||||
TextView userName;
|
TextView userName;
|
||||||
|
@ -31,16 +31,6 @@ public class ShareAppAdapter extends RecyclerView.Adapter<ShareAppAdapter.AppVie
|
|||||||
private List<ShareBean> list;
|
private List<ShareBean> list;
|
||||||
ShareCallback shareCallback;
|
ShareCallback shareCallback;
|
||||||
|
|
||||||
private onShareListener onShareListener;
|
|
||||||
|
|
||||||
public ShareAppAdapter.onShareListener getOnShareListener() {
|
|
||||||
return onShareListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOnShareListener(ShareAppAdapter.onShareListener onShareListener) {
|
|
||||||
this.onShareListener = onShareListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ShareAppAdapter(Context mContext) {
|
public ShareAppAdapter(Context mContext) {
|
||||||
list = new ArrayList<>();
|
list = new ArrayList<>();
|
||||||
this.mContext = mContext;
|
this.mContext = mContext;
|
||||||
@ -135,17 +125,11 @@ public class ShareAppAdapter extends RecyclerView.Adapter<ShareAppAdapter.AppVie
|
|||||||
new Internal(itemView.getContext()).share(bean, shareCallback);
|
new Internal(itemView.getContext()).share(bean, shareCallback);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (onShareListener != null) {
|
|
||||||
onShareListener.onAddShareCount();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public interface onShareListener {
|
|
||||||
void onAddShareCount();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
public static class ShareCallback implements ICallback {
|
public static class ShareCallback implements ICallback {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,38 +1,25 @@
|
|||||||
package com.yunbao.share.ui;
|
package com.yunbao.share.ui;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.net.Uri;
|
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.util.Log;
|
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.lxj.xpopup.XPopup;
|
import com.lxj.xpopup.XPopup;
|
||||||
import com.pdlive.shayu.R;
|
import com.pdlive.shayu.R;
|
||||||
import com.yunbao.common.bean.UserBean;
|
|
||||||
import com.yunbao.common.dialog.AbsDialogFullScreenPopupWindow;
|
import com.yunbao.common.dialog.AbsDialogFullScreenPopupWindow;
|
||||||
import com.yunbao.common.dialog.DebugDialog;
|
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
|
||||||
import com.yunbao.common.http.HttpCallback;
|
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.manager.InstructorRemarkManager;
|
|
||||||
import com.yunbao.common.utils.AppManager;
|
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.share.adapters.InternalShareAdapter;
|
import com.yunbao.share.adapters.InternalShareAdapter;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import io.rong.imkit.conversationlist.model.SingleConversation;
|
import io.rong.imkit.conversationlist.model.SingleConversation;
|
||||||
import io.rong.imkit.userinfo.RongUserInfoManager;
|
|
||||||
import io.rong.imkit.widget.refresh.SmartRefreshLayout;
|
import io.rong.imkit.widget.refresh.SmartRefreshLayout;
|
||||||
import io.rong.imkit.widget.refresh.api.RefreshLayout;
|
import io.rong.imkit.widget.refresh.api.RefreshLayout;
|
||||||
import io.rong.imkit.widget.refresh.listener.OnLoadMoreListener;
|
import io.rong.imkit.widget.refresh.listener.OnLoadMoreListener;
|
||||||
@ -42,7 +29,6 @@ import io.rong.imlib.IRongCoreCallback;
|
|||||||
import io.rong.imlib.IRongCoreEnum;
|
import io.rong.imlib.IRongCoreEnum;
|
||||||
import io.rong.imlib.RongCoreClient;
|
import io.rong.imlib.RongCoreClient;
|
||||||
import io.rong.imlib.model.Conversation;
|
import io.rong.imlib.model.Conversation;
|
||||||
import io.rong.imlib.model.UserInfo;
|
|
||||||
|
|
||||||
public class AppInternalShareDialog extends AbsDialogFullScreenPopupWindow {
|
public class AppInternalShareDialog extends AbsDialogFullScreenPopupWindow {
|
||||||
EditText search;
|
EditText search;
|
||||||
@ -87,14 +73,14 @@ public class AppInternalShareDialog extends AbsDialogFullScreenPopupWindow {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (onItemClickListener != null) {
|
if (onItemClickListener != null) {
|
||||||
onItemClickListener.onItemClick(adapter.getListData().get(adapter.getSelectPosition()).mCore.getTargetId(), adapter.getSelectPosition());
|
onItemClickListener.onItemClick(listData.get(adapter.getSelectPosition()).mCore.getTargetId(), adapter.getSelectPosition());
|
||||||
}
|
}
|
||||||
dismiss();
|
dismiss();
|
||||||
});
|
});
|
||||||
search = findViewById(R.id.search);
|
search = findViewById(R.id.search);
|
||||||
mList = findViewById(R.id.recyclerView);
|
mList = findViewById(R.id.recyclerView);
|
||||||
mRefreshLayout = findViewById(R.id.rc_refresh);
|
mRefreshLayout = findViewById(R.id.rc_refresh);
|
||||||
adapter = new InternalShareAdapter(mContext);
|
adapter = new InternalShareAdapter();
|
||||||
mList.setAdapter(adapter);
|
mList.setAdapter(adapter);
|
||||||
initRefreshView();
|
initRefreshView();
|
||||||
|
|
||||||
@ -154,7 +140,6 @@ public class AppInternalShareDialog extends AbsDialogFullScreenPopupWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void onConversationListRefresh(RefreshLayout refreshLayout) {
|
private void onConversationListRefresh(RefreshLayout refreshLayout) {
|
||||||
search.setText("");
|
|
||||||
listData.clear();
|
listData.clear();
|
||||||
startTime = 0;
|
startTime = 0;
|
||||||
refreshData();
|
refreshData();
|
||||||
@ -162,72 +147,22 @@ public class AppInternalShareDialog extends AbsDialogFullScreenPopupWindow {
|
|||||||
|
|
||||||
private void refreshData() {
|
private void refreshData() {
|
||||||
RongCoreClient.getInstance().getConversationListByPage(new IRongCoreCallback.ResultCallback<List<Conversation>>() {
|
RongCoreClient.getInstance().getConversationListByPage(new IRongCoreCallback.ResultCallback<List<Conversation>>() {
|
||||||
boolean isNeedData = false;
|
|
||||||
List<String> needUidList = new ArrayList<>();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<Conversation> conversations) {
|
public void onSuccess(List<Conversation> conversations) {
|
||||||
isNeedData = false;
|
|
||||||
needUidList.clear();
|
|
||||||
if (conversations.isEmpty()) {
|
if (conversations.isEmpty()) {
|
||||||
mRefreshLayout.finishLoadMoreWithNoMoreData();
|
mRefreshLayout.finishLoadMoreWithNoMoreData();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<SingleConversation> tmp = new ArrayList<>();
|
List<SingleConversation> tmp = new ArrayList<>();
|
||||||
for (Conversation conversation : conversations) {
|
for (Conversation conversation : conversations) {
|
||||||
if(conversation.getTargetId().contains("__system__")){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (StringUtil.isEmpty(conversation.getPortraitUrl())) {
|
|
||||||
isNeedData = true;
|
|
||||||
needUidList.add(conversation.getTargetId());
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
tmp.add(new SingleConversation(getContext(), conversation));
|
tmp.add(new SingleConversation(getContext(), conversation));
|
||||||
}
|
}
|
||||||
if (isNeedData) {
|
|
||||||
checkUserData();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
startTime = conversations.get(conversations.size() - 1).getSentTime();
|
startTime = conversations.get(conversations.size() - 1).getSentTime();
|
||||||
listData.addAll(tmp);
|
listData.addAll(tmp);
|
||||||
adapter.setList(listData);
|
adapter.setList(listData);
|
||||||
mRefreshLayout.finishRefresh(true);
|
mRefreshLayout.finishRefresh(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkUserData() {
|
|
||||||
Iterator<String> iterator = needUidList.iterator();
|
|
||||||
while (iterator.hasNext()) {
|
|
||||||
String userId = iterator.next();
|
|
||||||
CommonHttpUtil.getUserBaseinfo(userId, new HttpCallback() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
|
||||||
if (code == 0 && info.length > 0 && !TextUtils.equals("__system__", userId)) {
|
|
||||||
JSONObject obj = JSON.parseObject(info[0]);
|
|
||||||
UserBean userBean = JSON.toJavaObject(obj, UserBean.class);
|
|
||||||
needUidList.remove(userBean.getId());
|
|
||||||
UserInfo userInfo = new UserInfo(userBean.getId(), userBean.getUserNiceName(), Uri.parse(userBean.getAvatar()));
|
|
||||||
userInfo.setExtra(obj.toString());
|
|
||||||
RongUserInfoManager.getInstance().refreshUserInfoCache(userInfo);
|
|
||||||
Conversation conversation=new Conversation();
|
|
||||||
conversation.setTargetId(userBean.getId());
|
|
||||||
conversation.setConversationTitle(userBean.getUserNiceName());
|
|
||||||
conversation.setPortraitUrl(userBean.getAvatar());
|
|
||||||
SingleConversation singleConversation = new SingleConversation(getContext(), conversation);
|
|
||||||
listData.add(singleConversation);
|
|
||||||
if (needUidList.isEmpty()) {
|
|
||||||
adapter.setList(listData);
|
|
||||||
mRefreshLayout.finishRefresh(true);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Log.i("刷新用户", "3>" + code + "|" + msg + "|" + info.length);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(IRongCoreEnum.CoreErrorCode e) {
|
public void onError(IRongCoreEnum.CoreErrorCode e) {
|
||||||
ToastUtil.show("出错了:" + e.getMessage());
|
ToastUtil.show("出错了:" + e.getMessage());
|
||||||
|
@ -40,16 +40,12 @@ public class SharePopDialog extends AbsDialogPopupWindow {
|
|||||||
private String shareLink;
|
private String shareLink;
|
||||||
private int type;
|
private int type;
|
||||||
private ShareBean bean;
|
private ShareBean bean;
|
||||||
public onShareListener onShareListener;
|
|
||||||
|
|
||||||
public void setOnShareListener(SharePopDialog.onShareListener onShareListener) {
|
|
||||||
this.onShareListener = onShareListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SharePopDialog(@NonNull Context context) {
|
public SharePopDialog(@NonNull Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public SharePopDialog setShareType(int type) {
|
public SharePopDialog setShareType(int type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
return this;
|
return this;
|
||||||
@ -59,7 +55,6 @@ public class SharePopDialog extends AbsDialogPopupWindow {
|
|||||||
this.bean=build;
|
this.bean=build;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SharePopDialog setShareLink(String link) {
|
public SharePopDialog setShareLink(String link) {
|
||||||
this.shareLink = link + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
this.shareLink = link + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0);
|
||||||
return this;
|
return this;
|
||||||
@ -92,14 +87,6 @@ public class SharePopDialog extends AbsDialogPopupWindow {
|
|||||||
dismiss();
|
dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
adapter.setOnShareListener(new ShareAppAdapter.onShareListener() {
|
|
||||||
@Override
|
|
||||||
public void onAddShareCount() {
|
|
||||||
if (onShareListener != null) {
|
|
||||||
onShareListener.onShareAddCount();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
list.setLayoutManager(new GridLayoutManager(getContext(), 3));
|
list.setLayoutManager(new GridLayoutManager(getContext(), 3));
|
||||||
list.setAdapter(adapter);
|
list.setAdapter(adapter);
|
||||||
initData();
|
initData();
|
||||||
@ -150,8 +137,4 @@ public class SharePopDialog extends AbsDialogPopupWindow {
|
|||||||
ToastUtil.show(getContext().getString(com.yunbao.common.R.string.copy_success));
|
ToastUtil.show(getContext().getString(com.yunbao.common.R.string.copy_success));
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface onShareListener {
|
|
||||||
void onShareAddCount();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@
|
|||||||
android:layout_width="168dp"
|
android:layout_width="168dp"
|
||||||
android:layout_height="54dp"
|
android:layout_height="54dp"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="20dp"
|
||||||
android:background="@drawable/bg_msg_address_book_user_btn_fan_cuia"
|
android:background="@drawable/bg_msg_address_book_user_btn_fan"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
<string name="dialog_invite_title">Invite Friends</string>
|
<string name="dialog_invite_title">Invite Friends</string>
|
||||||
<string name="dialog_invite_info">Come to PDLIVE to discover more and better live streams.</string>
|
<string name="dialog_invite_info">Come to PDLIVE to discover more and better live streams.</string>
|
||||||
<string name="dialog_share_copy">Copy</string>
|
<string name="dialog_share_copy">Copy</string>
|
||||||
<string name="dialog_share_app_internal">Site friends</string>
|
<string name="dialog_share_app_internal">Friend</string>
|
||||||
<string name="dialog_share_internal_title">Share To</string>
|
<string name="dialog_share_internal_title">Share To</string>
|
||||||
<string name="dialog_share_internal_cancel">cancel</string>
|
<string name="dialog_share_internal_cancel">cancel</string>
|
||||||
<string name="dialog_share_internal_search">Search nickname</string>
|
<string name="dialog_share_internal_search">Search</string>
|
||||||
<string name="dialog_share_internal_list_btn">Send</string>
|
<string name="dialog_share_internal_list_btn">Share</string>
|
||||||
<string name="dialog_share_success">Share success</string>
|
<string name="dialog_share_success">Success</string>
|
||||||
<string name="dialog_share_success_btn">Go chat</string>
|
<string name="dialog_share_success_btn">Chat</string>
|
||||||
<string name="dialog_share_failure_not_select">Please select friends</string>
|
<string name="dialog_share_failure_not_select">Please select friends</string>
|
||||||
</resources>
|
</resources>
|
@ -4,9 +4,11 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
apply plugin: 'com.google.firebase.crashlytics'
|
apply plugin: 'com.google.firebase.crashlytics'
|
||||||
apply plugin: 'com.alibaba.arouter'
|
apply plugin: 'com.alibaba.arouter'
|
||||||
android {
|
android {
|
||||||
namespace "com.pandoralive.shayu"
|
|
||||||
dexOptions {
|
dexOptions {
|
||||||
jumboMode = true
|
jumboMode = true
|
||||||
|
}
|
||||||
|
project.tasks.getByName("tasks").doFirst {
|
||||||
|
|
||||||
}
|
}
|
||||||
/* applicationVariants.all { variant ->
|
/* applicationVariants.all { variant ->
|
||||||
variant.mergeAssetsProvider.configure {
|
variant.mergeAssetsProvider.configure {
|
||||||
@ -31,7 +33,9 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
compileSdk rootProject.ext.android.compileSdkVersion
|
|
||||||
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
|
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
pickFirst "lib/armeabi/libyuvutils.so"
|
pickFirst "lib/armeabi/libyuvutils.so"
|
||||||
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
||||||
@ -101,11 +105,8 @@ android {
|
|||||||
|
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_18
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_18
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
|
||||||
buildFeatures {
|
|
||||||
buildConfig = true
|
|
||||||
}
|
}
|
||||||
applicationVariants.all { variant ->
|
applicationVariants.all { variant ->
|
||||||
println "清空build文件夹";
|
println "清空build文件夹";
|
||||||
|
9
app/proguard-rules.pro
vendored
9
app/proguard-rules.pro
vendored
@ -194,12 +194,9 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
|||||||
-keep public class com.alibaba.android.arouter.facade.**{*;}
|
-keep public class com.alibaba.android.arouter.facade.**{*;}
|
||||||
-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
|
-keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;}
|
||||||
|
|
||||||
# 如果使用了 byType 的方式获取 Service,需添加下面规则,保护接口
|
# If you use the byType method to obtain Service, add the following rules to protect the interface:
|
||||||
-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
|
-keep interface * implements com.alibaba.android.arouter.facade.template.IProvider
|
||||||
|
|
||||||
# 如果使用了 单类注入,即不定义接口实现 IProvider,需添加下面规则,保护实现
|
|
||||||
-keep class * implements com.alibaba.android.arouter.facade.template.IProvider
|
|
||||||
|
|
||||||
# If single-type injection is used, that is, no interface is defined to implement IProvider, the following rules need to be added to protect the implementation
|
# If single-type injection is used, that is, no interface is defined to implement IProvider, the following rules need to be added to protect the implementation
|
||||||
# -keep class * implements com.alibaba.android.arouter.facade.template.IProvider
|
# -keep class * implements com.alibaba.android.arouter.facade.template.IProvider
|
||||||
|
|
||||||
@ -295,7 +292,3 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode;
|
|||||||
|
|
||||||
-keep class com.shayu.lib_google.**{*;}
|
-keep class com.shayu.lib_google.**{*;}
|
||||||
-keep class com.shayu.lib_huawei.**{*;}
|
-keep class com.shayu.lib_huawei.**{*;}
|
||||||
|
|
||||||
-keep class com.qiniu.**{*;}
|
|
||||||
-keep class com.qiniu.**{public <init>();}
|
|
||||||
-ignorewarnings
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
>
|
package="myname.pdlive.shayu">
|
||||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
|
||||||
<uses-permission
|
<uses-permission
|
||||||
android:name="android.permission.CALL_PHONE"
|
android:name="android.permission.CALL_PHONE"
|
||||||
tools:node="remove" />
|
tools:node="remove" />
|
||||||
|
@ -4,7 +4,6 @@ import static com.yunbao.live.socket.SocketClient.mSocketHandler;
|
|||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.ActivityManager;
|
import android.app.ActivityManager;
|
||||||
import android.app.LauncherActivity;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.net.http.HttpResponseCache;
|
import android.net.http.HttpResponseCache;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
@ -26,7 +25,6 @@ import com.blankj.utilcode.util.Utils;
|
|||||||
import com.facebook.appevents.AppEventsLogger;
|
import com.facebook.appevents.AppEventsLogger;
|
||||||
import com.fm.openinstall.OpenInstall;
|
import com.fm.openinstall.OpenInstall;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.pandoralive.shayu.R;
|
|
||||||
import com.shayu.phonelive.utils.LogUtils;
|
import com.shayu.phonelive.utils.LogUtils;
|
||||||
import com.tencent.imsdk.v2.V2TIMGroupMemberInfo;
|
import com.tencent.imsdk.v2.V2TIMGroupMemberInfo;
|
||||||
import com.tencent.imsdk.v2.V2TIMManager;
|
import com.tencent.imsdk.v2.V2TIMManager;
|
||||||
@ -34,7 +32,6 @@ import com.tencent.imsdk.v2.V2TIMSimpleMsgListener;
|
|||||||
import com.tencent.imsdk.v2.V2TIMUserInfo;
|
import com.tencent.imsdk.v2.V2TIMUserInfo;
|
||||||
import com.umeng.analytics.MobclickAgent;
|
import com.umeng.analytics.MobclickAgent;
|
||||||
import com.umeng.commonsdk.UMConfigure;
|
import com.umeng.commonsdk.UMConfigure;
|
||||||
import com.yalantis.ucrop.UCropActivity;
|
|
||||||
import com.yunbao.common.BuildConfig;
|
import com.yunbao.common.BuildConfig;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.CommonAppContext;
|
import com.yunbao.common.CommonAppContext;
|
||||||
@ -58,7 +55,6 @@ import com.yunbao.common.utils.L;
|
|||||||
import com.yunbao.common.utils.MessageChatNotifyManager;
|
import com.yunbao.common.utils.MessageChatNotifyManager;
|
||||||
import com.yunbao.common.utils.MessageSayHiNotifyManager;
|
import com.yunbao.common.utils.MessageSayHiNotifyManager;
|
||||||
import com.yunbao.common.utils.SpUtil;
|
import com.yunbao.common.utils.SpUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.live.activity.LiveActivity;
|
import com.yunbao.live.activity.LiveActivity;
|
||||||
import com.yunbao.live.activity.SudGameActivity;
|
import com.yunbao.live.activity.SudGameActivity;
|
||||||
import com.yunbao.live.socket.SocketReceiveBean;
|
import com.yunbao.live.socket.SocketReceiveBean;
|
||||||
@ -67,13 +63,10 @@ import com.yunbao.live.utils.LiveImDeletUtil;
|
|||||||
import com.yunbao.live.views.PortraitLiveManager;
|
import com.yunbao.live.views.PortraitLiveManager;
|
||||||
import com.yunbao.live.views.RecommendLiveRoomProvider;
|
import com.yunbao.live.views.RecommendLiveRoomProvider;
|
||||||
import com.yunbao.main.activity.CompleteUserInfoActivity;
|
import com.yunbao.main.activity.CompleteUserInfoActivity;
|
||||||
import com.yunbao.main.activity.EntryActivity;
|
|
||||||
import com.yunbao.main.activity.LoginActivity;
|
|
||||||
import com.yunbao.main.activity.MainActivity;
|
import com.yunbao.main.activity.MainActivity;
|
||||||
import com.yunbao.main.activity.MainHomeCommunityActivity;
|
import com.yunbao.main.activity.MainHomeCommunityActivity;
|
||||||
import com.yunbao.main.activity.MsgSettActivity;
|
import com.yunbao.main.activity.MsgSettActivity;
|
||||||
import com.yunbao.main.activity.PDLiveConversationActivity;
|
import com.yunbao.main.activity.PDLiveConversationActivity;
|
||||||
import com.yunbao.main.activity.RegisterActivity;
|
|
||||||
import com.yunbao.video.activity.VideoPlayActivity;
|
import com.yunbao.video.activity.VideoPlayActivity;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
@ -89,9 +82,6 @@ import io.rong.imkit.config.RongConfigCenter;
|
|||||||
import io.rong.imlib.RongIMClient;
|
import io.rong.imlib.RongIMClient;
|
||||||
import io.rong.imlib.model.Conversation;
|
import io.rong.imlib.model.Conversation;
|
||||||
import io.rong.imlib.model.MessageContent;
|
import io.rong.imlib.model.MessageContent;
|
||||||
import io.rong.message.HQVoiceMessage;
|
|
||||||
import io.rong.message.ImageMessage;
|
|
||||||
import io.rong.message.SightMessage;
|
|
||||||
import io.rong.message.TextMessage;
|
import io.rong.message.TextMessage;
|
||||||
|
|
||||||
//import cn.tillusory.sdk.TiSDK;
|
//import cn.tillusory.sdk.TiSDK;
|
||||||
@ -114,7 +104,6 @@ public class AppContext extends CommonAppContext {
|
|||||||
@Override
|
@Override
|
||||||
public void onActivityResumed(Activity activity) {
|
public void onActivityResumed(Activity activity) {
|
||||||
Log.e("打招呼定时器", "onActivityResumed: " + activity);
|
Log.e("打招呼定时器", "onActivityResumed: " + activity);
|
||||||
MessageChatNotifyManager.getInstance().restart(activity);
|
|
||||||
if (activity instanceof LiveActivity) {
|
if (activity instanceof LiveActivity) {
|
||||||
MessageSayHiNotifyManager.getInstance().stop();
|
MessageSayHiNotifyManager.getInstance().stop();
|
||||||
return;
|
return;
|
||||||
@ -142,18 +131,6 @@ public class AppContext extends CommonAppContext {
|
|||||||
MessageSayHiNotifyManager.getInstance().stop();
|
MessageSayHiNotifyManager.getInstance().stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (activity instanceof LoginActivity) {
|
|
||||||
MessageSayHiNotifyManager.getInstance().stop();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (activity instanceof EntryActivity) {
|
|
||||||
MessageSayHiNotifyManager.getInstance().stop();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (activity instanceof UCropActivity) {
|
|
||||||
MessageSayHiNotifyManager.getInstance().stop();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
MessageSayHiNotifyManager.getInstance().reload();
|
MessageSayHiNotifyManager.getInstance().reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,12 +244,6 @@ public class AppContext extends CommonAppContext {
|
|||||||
//注册屏蔽push弹窗的类
|
//注册屏蔽push弹窗的类
|
||||||
MessageChatNotifyManager.getInstance().addShieldClass(CompleteUserInfoActivity.class);
|
MessageChatNotifyManager.getInstance().addShieldClass(CompleteUserInfoActivity.class);
|
||||||
MessageChatNotifyManager.getInstance().addShieldClass(PDLiveConversationActivity.class);
|
MessageChatNotifyManager.getInstance().addShieldClass(PDLiveConversationActivity.class);
|
||||||
MessageChatNotifyManager.getInstance().addShieldClass(LauncherActivity.class);
|
|
||||||
MessageChatNotifyManager.getInstance().addShieldClass(EntryActivity.class);
|
|
||||||
MessageChatNotifyManager.getInstance().addShieldClass(LoginActivity.class);
|
|
||||||
MessageChatNotifyManager.getInstance().addShieldClass(RegisterActivity.class);
|
|
||||||
MessageChatNotifyManager.getInstance().addShieldClass(UCropActivity.class);
|
|
||||||
|
|
||||||
|
|
||||||
RongcloudIMManager.addRongcloudIMOnReceiveMessageListener(new RongIMClient.OnReceiveMessageWrapperListener() {
|
RongcloudIMManager.addRongcloudIMOnReceiveMessageListener(new RongIMClient.OnReceiveMessageWrapperListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -284,21 +255,7 @@ public class AppContext extends CommonAppContext {
|
|||||||
msg.what = Constants.SOCKET_WHAT_BROADCAST;
|
msg.what = Constants.SOCKET_WHAT_BROADCAST;
|
||||||
try {
|
try {
|
||||||
if (!"".equals(message.getContent()) && message.getContent() != null) {
|
if (!"".equals(message.getContent()) && message.getContent() != null) {
|
||||||
TextMessage content;
|
TextMessage content = (TextMessage) message.getContent();
|
||||||
if (message.getContent() instanceof MessageChatCardContent) {
|
|
||||||
content = new TextMessage(WordUtil.getNewString(R.string.activity_msg_chat_list_card));
|
|
||||||
} else if (message.getContent() instanceof TextMessage) {
|
|
||||||
content = (TextMessage) message.getContent();
|
|
||||||
}else if(message.getContent() instanceof ImageMessage){
|
|
||||||
content = new TextMessage(WordUtil.getNewString(R.string.rc_conversation_summary_content_image));
|
|
||||||
}else if(message.getContent() instanceof SightMessage){
|
|
||||||
content = new TextMessage(WordUtil.getNewString(R.string.rc_conversation_summary_content_sight));
|
|
||||||
}else if(message.getContent() instanceof HQVoiceMessage){
|
|
||||||
content = new TextMessage(WordUtil.getNewString(R.string.rc_conversation_summary_content_voice));
|
|
||||||
}else {
|
|
||||||
System.out.println("未知消息类型:"+message.getContent().getClass().getSimpleName()+"|"+message.getContent());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (content.getContent().contains("_method_")) {
|
if (content.getContent().contains("_method_")) {
|
||||||
msg.obj = content.getContent();
|
msg.obj = content.getContent();
|
||||||
//观众页面
|
//观众页面
|
||||||
@ -321,35 +278,15 @@ public class AppContext extends CommonAppContext {
|
|||||||
|
|
||||||
} else if (message.getConversationType() == Conversation.ConversationType.PRIVATE) {//私聊信息
|
} else if (message.getConversationType() == Conversation.ConversationType.PRIVATE) {//私聊信息
|
||||||
EventBus.getDefault().post(message);
|
EventBus.getDefault().post(message);
|
||||||
MessageIMManager.get(sInstance).resetImUnReadMessageCount(sInstance);
|
|
||||||
if (AppManager.getInstance().getLastActivity() instanceof CompleteUserInfoActivity) {
|
if (AppManager.getInstance().getLastActivity() instanceof CompleteUserInfoActivity) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Log.i("聊天推送", message.getTargetId() + "是否已读:" + message.getReceivedStatus().isRead());
|
|
||||||
if (message.getReceivedStatus().isRead()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
RongIMClient.getInstance().getUnreadCount(Conversation.ConversationType.PRIVATE, message.getTargetId(), new RongIMClient.ResultCallback<Integer>() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Integer integer) {
|
|
||||||
if (integer > 0) {
|
|
||||||
Log.i("聊天推送", message.getTargetId() + "是否已读:" + message.getReceivedStatus().isRead() + "|未读数" + integer);
|
|
||||||
MessageChatNotifyManager.getInstance().push(AppManager.getInstance().getLastActivity()
|
MessageChatNotifyManager.getInstance().push(AppManager.getInstance().getLastActivity()
|
||||||
, message.getTargetId(),
|
, message.getTargetId(),
|
||||||
content.getContent()
|
content.getContent()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(RongIMClient.ErrorCode e) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,6 @@ import androidx.core.app.NotificationManagerCompat;
|
|||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.pandoralive.shayu.R;
|
|
||||||
import com.shayu.phonelive.AppContext;
|
import com.shayu.phonelive.AppContext;
|
||||||
import com.tencent.rtmp.ITXLivePlayListener;
|
import com.tencent.rtmp.ITXLivePlayListener;
|
||||||
import com.tencent.rtmp.TXLiveBase;
|
import com.tencent.rtmp.TXLiveBase;
|
||||||
@ -73,6 +72,7 @@ import java.io.File;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import myname.pdlive.shayu.R;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/9/17.
|
* Created by cxf on 2018/9/17.
|
||||||
|
@ -35,7 +35,6 @@ import com.bumptech.glide.request.target.SimpleTarget;
|
|||||||
import com.bumptech.glide.request.target.Target;
|
import com.bumptech.glide.request.target.Target;
|
||||||
import com.bumptech.glide.request.transition.Transition;
|
import com.bumptech.glide.request.transition.Transition;
|
||||||
import com.makeramen.roundedimageview.RoundedImageView;
|
import com.makeramen.roundedimageview.RoundedImageView;
|
||||||
import com.pandoralive.shayu.R;
|
|
||||||
import com.shayu.phonelive.AppContext;
|
import com.shayu.phonelive.AppContext;
|
||||||
import com.shayu.phonelive.activity.LauncherActivity;
|
import com.shayu.phonelive.activity.LauncherActivity;
|
||||||
import com.yunbao.common.bean.NotificationMsgBean;
|
import com.yunbao.common.bean.NotificationMsgBean;
|
||||||
@ -52,6 +51,7 @@ import io.rong.imlib.ConnectChangeReceiver;
|
|||||||
import io.rong.push.PushType;
|
import io.rong.push.PushType;
|
||||||
import io.rong.push.notification.PushMessageReceiver;
|
import io.rong.push.notification.PushMessageReceiver;
|
||||||
import io.rong.push.notification.PushNotificationMessage;
|
import io.rong.push.notification.PushNotificationMessage;
|
||||||
|
import myname.pdlive.shayu.R;
|
||||||
|
|
||||||
public class CustomMessageReceiver extends PushMessageReceiver {
|
public class CustomMessageReceiver extends PushMessageReceiver {
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,8 @@ apply plugin: 'img-optimizer'
|
|||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdk rootProject.ext.android.compileSdkVersion
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
targetSdk rootProject.ext.android.buildToolsVersion
|
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
pickFirst "lib/armeabi/libyuvutils.so"
|
pickFirst "lib/armeabi/libyuvutils.so"
|
||||||
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
||||||
@ -42,8 +42,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_18
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_18
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.yunbao.baidu"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@ apply plugin: 'img-optimizer'
|
|||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdk rootProject.ext.android.compileSdkVersion
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
targetSdk rootProject.ext.android.buildToolsVersion
|
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||||
packagingOptions {
|
packagingOptions {
|
||||||
pickFirst "lib/armeabi/libyuvutils.so"
|
pickFirst "lib/armeabi/libyuvutils.so"
|
||||||
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
pickFirst "lib/arm64-v8a/libyuvutils.so"
|
||||||
@ -45,8 +45,8 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_18
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_18
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
/>
|
package="com.yunbao.beauty"/>
|
||||||
|
15
build.gradle
15
build.gradle
@ -4,28 +4,27 @@ apply from: "dependencies.gradle"
|
|||||||
|
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.8.22'
|
ext.kotlin_version = '1.6.20'
|
||||||
repositories {
|
repositories {
|
||||||
maven { url "https://mvn.mob.com/android" }
|
maven { url "https://mvn.mob.com/android" }
|
||||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||||
maven { url 'https://maven.aliyun.com/repository/google' }
|
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||||
maven { url 'https://maven.fabric.io/public' }
|
maven { url 'https://maven.fabric.io/public' }
|
||||||
maven { url 'https://maven.faceunity.com/repository/maven-public/' }//美颜库
|
maven { url 'http://maven.faceunity.com/repository/maven-public/' }//美颜库
|
||||||
maven { url 'https://repo1.maven.org/maven2/' }//埋点
|
maven { url 'https://repo1.maven.org/maven2/' }//埋点
|
||||||
maven {url 'https://developer.huawei.com/repo/'}
|
maven {url 'https://developer.huawei.com/repo/'}
|
||||||
maven { url "https://jitpack.io" }
|
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:8.3.1'
|
classpath 'com.android.tools.build:gradle:4.0.2'
|
||||||
//一键压缩png工具
|
//一键压缩png工具
|
||||||
classpath 'com.chenenyu:img-optimizer:1.3.0'
|
classpath 'com.chenenyu:img-optimizer:1.3.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20"
|
||||||
classpath 'com.google.gms:google-services:4.3.3'
|
classpath 'com.google.gms:google-services:4.3.3'
|
||||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
|
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
|
||||||
classpath "com.github.jadepeakpoet.ARouter:arouter-register:1.0.3"
|
classpath "com.alibaba:arouter-register:1.0.2"
|
||||||
classpath 'com.huawei.agconnect:agcp:1.5.2.300'
|
classpath 'com.huawei.agconnect:agcp:1.5.2.300'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,9 +40,9 @@ allprojects {
|
|||||||
maven { url "https://mvn.mob.com/android" }
|
maven { url "https://mvn.mob.com/android" }
|
||||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||||
maven { url 'https://maven.aliyun.com/repository/google' }
|
maven { url 'https://maven.aliyun.com/repository/google' }
|
||||||
maven { url 'https://developer.huawei.com/repo'}//华为库
|
maven { url 'http://developer.huawei.com/repo'}//华为库
|
||||||
maven { url 'https://maven.fabric.io/public' }
|
maven { url 'https://maven.fabric.io/public' }
|
||||||
maven { url 'https://maven.faceunity.com/repository/maven-public/' }//美颜库
|
maven { url 'http://maven.faceunity.com/repository/maven-public/' }//美颜库
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
maven { url 'https://repo1.maven.org/maven2/' }//埋点
|
maven { url 'https://repo1.maven.org/maven2/' }//埋点
|
||||||
google() // Google's Maven repository
|
google() // Google's Maven repository
|
||||||
|
@ -3,8 +3,8 @@ apply plugin: 'img-optimizer'
|
|||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace "com.yunbao.common"
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||||||
compileSdk rootProject.ext.android.compileSdkVersion
|
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||||
@ -59,11 +59,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_18
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility JavaVersion.VERSION_18
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
|
||||||
buildFeatures {
|
|
||||||
buildConfig = true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
@ -73,7 +70,6 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
|
annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
||||||
@ -169,14 +165,14 @@ dependencies {
|
|||||||
//腾讯im
|
//腾讯im
|
||||||
api 'com.tencent.imsdk:imsdk-plus:5.4.666'
|
api 'com.tencent.imsdk:imsdk-plus:5.4.666'
|
||||||
api 'com.google.code.gson:gson:2.8.8'
|
api 'com.google.code.gson:gson:2.8.8'
|
||||||
api 'cn.rongcloud.sdk:rtc_lib:5.6.9' // 音视频通话基础能力库
|
api 'cn.rongcloud.sdk:rtc_lib:5.2.0' // 音视频通话基础能力库
|
||||||
//此处以集成 5.1.2 版本为例
|
//此处以集成 5.1.2 版本为例
|
||||||
api 'cn.rongcloud.sdk:im_lib:5.6.10'
|
api 'cn.rongcloud.sdk:im_lib:5.2.0.2'
|
||||||
|
|
||||||
//此处以集成 5.1.2 版本为例
|
//此处以集成 5.1.2 版本为例
|
||||||
api 'cn.rongcloud.sdk:im_kit:5.6.10' // 即时通讯 UI 基础组件
|
api 'cn.rongcloud.sdk:im_kit:5.2.5.4' // 即时通讯 UI 基础组件
|
||||||
//融云小视频模块
|
//融云小视频模块
|
||||||
api 'cn.rongcloud.sdk:sight:5.6.10'
|
api 'cn.rongcloud.sdk:sight:5.2.5.4'
|
||||||
api 'com.facebook.android:facebook-android-sdk:15.2.0'
|
api 'com.facebook.android:facebook-android-sdk:15.2.0'
|
||||||
implementation 'com.facebook.android:facebook-android-sdk:15.2.0'
|
implementation 'com.facebook.android:facebook-android-sdk:15.2.0'
|
||||||
|
|
||||||
@ -230,7 +226,7 @@ dependencies {
|
|||||||
api project(':lib_google')
|
api project(':lib_google')
|
||||||
|
|
||||||
//samsung插件包
|
//samsung插件包
|
||||||
//api project(':IAP6Helper')
|
api project(':IAP6Helper')
|
||||||
|
|
||||||
//時間選擇器
|
//時間選擇器
|
||||||
api 'com.contrarywind:Android-PickerView:4.1.9'
|
api 'com.contrarywind:Android-PickerView:4.1.9'
|
||||||
@ -243,13 +239,4 @@ dependencies {
|
|||||||
api 'com.github.xuexiangjys:XUI:1.1.6'
|
api 'com.github.xuexiangjys:XUI:1.1.6'
|
||||||
api 'com.github.xuexiangjys.XUtil:xutil-core:2.0.0'
|
api 'com.github.xuexiangjys.XUtil:xutil-core:2.0.0'
|
||||||
|
|
||||||
//ExoPlayer,腾讯的播放器不支持无缝切换
|
|
||||||
api 'com.google.android.exoplayer:exoplayer:2.18.2'
|
|
||||||
api 'com.google.android.exoplayer:exoplayer-core:2.18.2@aar'
|
|
||||||
//文字渐变色
|
|
||||||
api 'com.github.FlyJingFish:GradientTextView:1.2.4'
|
|
||||||
//轮播 一屏显示多个
|
|
||||||
api 'com.github.xiaohaibin:XBanner:androidx_v1.2.6'
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
3
common/proguard-rules.pro
vendored
3
common/proguard-rules.pro
vendored
@ -23,6 +23,3 @@
|
|||||||
# If you keep the line number information, uncomment this to
|
# If you keep the line number information, uncomment this to
|
||||||
# hide the original source file name.
|
# hide the original source file name.
|
||||||
#-renamesourcefileattribute SourceFile
|
#-renamesourcefileattribute SourceFile
|
||||||
-keep class com.qiniu.**{*;}
|
|
||||||
-keep class com.qiniu.**{public <init>();}
|
|
||||||
-ignorewarnings
|
|
@ -1,13 +1,11 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
package="com.yunbao.common">
|
||||||
|
|
||||||
<!-- <uses-permission android:name="android.permission.READ_PHONE_STATE" />-->
|
<!-- <uses-permission android:name="android.permission.READ_PHONE_STATE" />-->
|
||||||
<!-- <uses-permission android:name="android.permission.INTERNET" />-->
|
<!-- <uses-permission android:name="android.permission.INTERNET" />-->
|
||||||
<!-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />-->
|
<!-- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />-->
|
||||||
|
|
||||||
<application
|
<application android:allowBackup="true">
|
||||||
android:allowBackup="true"
|
|
||||||
tools:replace="allowBackup">
|
|
||||||
|
|
||||||
<!-- <meta-data-->
|
<!-- <meta-data-->
|
||||||
<!-- android:name="com.google.ar.core"-->
|
<!-- android:name="com.google.ar.core"-->
|
||||||
@ -67,9 +65,6 @@
|
|||||||
android:name="com.yunbao.common.activity.PreviewVideoActivity"
|
android:name="com.yunbao.common.activity.PreviewVideoActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name="com.yunbao.common.activity.VideoPlayActivity"
|
|
||||||
android:screenOrientation="portrait" />
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
|
@ -128,23 +128,23 @@ public class CommonAppConfig {
|
|||||||
newCommunityTypeList.add(type0);
|
newCommunityTypeList.add(type0);
|
||||||
}
|
}
|
||||||
NewCommunityType type17 = new NewCommunityType();
|
NewCommunityType type17 = new NewCommunityType();
|
||||||
type17.setId(5);
|
type17.setId(17);
|
||||||
type17.setTalk_name(mContext.getResources().getString(R.string.main_active_type_01));
|
type17.setTalk_name(mContext.getResources().getString(R.string.main_active_type_01));
|
||||||
|
|
||||||
NewCommunityType type16 = new NewCommunityType();
|
NewCommunityType type16 = new NewCommunityType();
|
||||||
type16.setId(4);
|
type16.setId(16);
|
||||||
type16.setTalk_name(mContext.getResources().getString(R.string.main_active_type_02));
|
type16.setTalk_name(mContext.getResources().getString(R.string.main_active_type_02));
|
||||||
|
|
||||||
NewCommunityType type15 = new NewCommunityType();
|
NewCommunityType type15 = new NewCommunityType();
|
||||||
type15.setId(3);
|
type15.setId(15);
|
||||||
type15.setTalk_name(mContext.getResources().getString(R.string.main_active_type_03));
|
type15.setTalk_name(mContext.getResources().getString(R.string.main_active_type_03));
|
||||||
|
|
||||||
NewCommunityType type14 = new NewCommunityType();
|
NewCommunityType type14 = new NewCommunityType();
|
||||||
type14.setId(2);
|
type14.setId(14);
|
||||||
type14.setTalk_name(mContext.getResources().getString(R.string.main_active_type_04));
|
type14.setTalk_name(mContext.getResources().getString(R.string.main_active_type_04));
|
||||||
|
|
||||||
NewCommunityType type13 = new NewCommunityType();
|
NewCommunityType type13 = new NewCommunityType();
|
||||||
type13.setId(1);
|
type13.setId(13);
|
||||||
type13.setTalk_name(mContext.getResources().getString(R.string.main_active_type_05));
|
type13.setTalk_name(mContext.getResources().getString(R.string.main_active_type_05));
|
||||||
|
|
||||||
newCommunityTypeList.add(type17);
|
newCommunityTypeList.add(type17);
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
package com.yunbao.common.activity;
|
|
||||||
|
|
||||||
import android.net.Uri;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.VideoView;
|
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
|
|
||||||
import com.yunbao.common.R;
|
|
||||||
|
|
||||||
public class VideoPlayActivity extends AbsActivity {
|
|
||||||
private VideoView videoPlay;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getLayoutId() {
|
|
||||||
return R.layout.activity_google_play;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
|
||||||
Uri url = getIntent().getParcelableExtra("videoUri");
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
videoPlay = findViewById(R.id.videoPlay);
|
|
||||||
videoPlay.setVideoURI(url);
|
|
||||||
videoPlay.start();
|
|
||||||
|
|
||||||
findViewById(R.id.back).setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
}
|
|
||||||
}
|
|
@ -161,7 +161,7 @@ public class CommentAdapter extends RecyclerView.Adapter {
|
|||||||
del.setVisibility(View.GONE);
|
del.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if (bean.getReplyCommentList() != null) {
|
if (bean.getReplyCommentList() != null) {
|
||||||
replyCount.setText(String.format(mContext.getResources().getString(R.string.active_count), String.valueOf(bean.getReplyCommentList().size())));
|
replyCount.setText("共" + bean.getReplyCommentList().size() + "条回复>");
|
||||||
if (bean.getReplyCommentList().size() > 0) {
|
if (bean.getReplyCommentList().size() > 0) {
|
||||||
report1.setTag(bean.getReplyCommentList().get(0));
|
report1.setTag(bean.getReplyCommentList().get(0));
|
||||||
del1.setTag(bean.getReplyCommentList().get(0));
|
del1.setTag(bean.getReplyCommentList().get(0));
|
||||||
@ -214,11 +214,10 @@ public class CommentAdapter extends RecyclerView.Adapter {
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (!bean.isShow()) {
|
if (!bean.isShow()) {
|
||||||
recyclerView.setVisibility(View.VISIBLE);
|
recyclerView.setVisibility(View.VISIBLE);
|
||||||
replyCount.setText(mContext.getResources().getString(R.string.close));
|
replyCount.setText("收起");
|
||||||
} else {
|
} else {
|
||||||
recyclerView.setVisibility(View.GONE);
|
recyclerView.setVisibility(View.GONE);
|
||||||
replyCount.setText(String.format(mContext.getResources().getString(R.string.active_count), String.valueOf(bean.getReplyCommentList().size())))
|
replyCount.setText("共" + bean.getReplyCommentList().size() + "条回复>");
|
||||||
;
|
|
||||||
}
|
}
|
||||||
bean.setShow(!bean.isShow());
|
bean.setShow(!bean.isShow());
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ public class CommentVideoAdapter extends RefreshAdapter<CommentBean> {
|
|||||||
report.setTag(bean);
|
report.setTag(bean);
|
||||||
replyTextView.setTag(bean);
|
replyTextView.setTag(bean);
|
||||||
del1.setTag(bean);
|
del1.setTag(bean);
|
||||||
ImgLoader.displayAvatar(itemView.getContext(), bean.getUser_avatar(), mAvatar);
|
ImgLoader.display(itemView.getContext(), bean.getUser_avatar(), mAvatar);
|
||||||
name.setText(bean.getUser_name());
|
name.setText(bean.getUser_name());
|
||||||
content.setText(bean.getContent());
|
content.setText(bean.getContent());
|
||||||
if (bean.getUser_id().equals(authorId)) {
|
if (bean.getUser_id().equals(authorId)) {
|
||||||
@ -162,7 +162,7 @@ public class CommentVideoAdapter extends RefreshAdapter<CommentBean> {
|
|||||||
del.setVisibility(View.GONE);
|
del.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
if (bean.getReplyCommentList() != null) {
|
if (bean.getReplyCommentList() != null) {
|
||||||
replyCount.setText( String.format(mContext.getResources().getString(R.string.active_count), String.valueOf(bean.getReplyCommentList().size())));
|
replyCount.setText("共" + bean.getReplyCommentList().size() + "条回复>");
|
||||||
if (bean.getReplyCommentList().size() > 0) {
|
if (bean.getReplyCommentList().size() > 0) {
|
||||||
del1.setTag(bean.getReplyCommentList().get(0));
|
del1.setTag(bean.getReplyCommentList().get(0));
|
||||||
replyContent.setText(bean.getReplyCommentList().get(0).getContent());
|
replyContent.setText(bean.getReplyCommentList().get(0).getContent());
|
||||||
@ -214,10 +214,10 @@ public class CommentVideoAdapter extends RefreshAdapter<CommentBean> {
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (!bean.isShow()) {
|
if (!bean.isShow()) {
|
||||||
recyclerView.setVisibility(View.VISIBLE);
|
recyclerView.setVisibility(View.VISIBLE);
|
||||||
replyCount.setText(mContext.getResources().getString(R.string.close));
|
replyCount.setText("收起");
|
||||||
} else {
|
} else {
|
||||||
recyclerView.setVisibility(View.GONE);
|
recyclerView.setVisibility(View.GONE);
|
||||||
replyCount.setText( String.format(mContext.getResources().getString(R.string.active_count), String.valueOf(bean.getReplyCommentList().size())));
|
replyCount.setText("共" + bean.getReplyCommentList().size() + "条回复>");
|
||||||
}
|
}
|
||||||
bean.setShow(!bean.isShow());
|
bean.setShow(!bean.isShow());
|
||||||
}
|
}
|
||||||
|
@ -1,59 +0,0 @@
|
|||||||
package com.yunbao.common.adapter;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.graphics.Color;
|
|
||||||
import android.view.TextureView;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.TreeMap;
|
|
||||||
|
|
||||||
public class DebugDialogAdapter extends RecyclerView.Adapter<DebugDialogAdapter.DebugViewHolder> {
|
|
||||||
TreeMap<String, String> paramMap = new TreeMap<>();
|
|
||||||
private Context mContext;
|
|
||||||
|
|
||||||
public DebugDialogAdapter(Context mContext) {
|
|
||||||
this.mContext = mContext;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParamMap(TreeMap<String, String> paramMap) {
|
|
||||||
this.paramMap = paramMap;
|
|
||||||
notifyDataSetChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public DebugViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
|
||||||
return new DebugViewHolder(new TextView(mContext));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindViewHolder(@NonNull DebugViewHolder holder, int position) {
|
|
||||||
List<String> list = new ArrayList<>(paramMap.keySet());
|
|
||||||
holder.setData(list.get(position), paramMap.get(list.get(position)));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
return paramMap.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
public class DebugViewHolder extends RecyclerView.ViewHolder {
|
|
||||||
|
|
||||||
public DebugViewHolder(@NonNull View itemView) {
|
|
||||||
super(itemView);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setData(String tag, String msg) {
|
|
||||||
((TextView) itemView).setText(tag + ":" + msg);
|
|
||||||
((TextView) itemView).setTextColor(Color.BLACK);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,93 +0,0 @@
|
|||||||
package com.yunbao.common.adapter;
|
|
||||||
|
|
||||||
import android.os.CountDownTimer;
|
|
||||||
import android.util.SparseArray;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.yunbao.common.R;
|
|
||||||
import com.yunbao.common.bean.sendMoneyLongListModel;
|
|
||||||
import com.yunbao.common.views.DragonSendMoneyListViewHolder;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class DragonSendMoneyListAdapter extends RecyclerView.Adapter {
|
|
||||||
RecyclerView send_money_list;
|
|
||||||
boolean isAnchor;
|
|
||||||
SparseArray<CountDownTimer> countDownMap;
|
|
||||||
boolean isAttention;
|
|
||||||
|
|
||||||
public DragonSendMoneyListAdapter setAnchor(boolean anchor) {
|
|
||||||
isAnchor = anchor;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DragonSendMoneyListAdapter setAttention(boolean attention) {
|
|
||||||
isAttention = attention;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<sendMoneyLongListModel> getMoneyLongListModels() {
|
|
||||||
return moneyLongListModels;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DragonSendMoneyListAdapter(RecyclerView send_money_list) {
|
|
||||||
this.send_money_list = send_money_list;
|
|
||||||
countDownMap = new SparseArray<>();
|
|
||||||
}
|
|
||||||
|
|
||||||
List<sendMoneyLongListModel> moneyLongListModels = new ArrayList<>();
|
|
||||||
DragonSendMoneyListViewHolder.DragonSendMoneyListClicksCallBack callBack;
|
|
||||||
|
|
||||||
public void setCallBack(DragonSendMoneyListViewHolder.DragonSendMoneyListClicksCallBack callBack) {
|
|
||||||
this.callBack = callBack;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMoneyLongListModels(List<sendMoneyLongListModel> models) {
|
|
||||||
|
|
||||||
moneyLongListModels.clear();
|
|
||||||
moneyLongListModels.addAll(models);
|
|
||||||
notifyDataSetChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
|
||||||
|
|
||||||
View goodGiftsView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_dragon_send_money_list, parent, false);
|
|
||||||
|
|
||||||
return new DragonSendMoneyListViewHolder(goodGiftsView);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
|
||||||
DragonSendMoneyListViewHolder sendMoneyListViewHolder = (DragonSendMoneyListViewHolder) holder;
|
|
||||||
// sendMoneyLongListModel model = moneyLongListModels.get(position);
|
|
||||||
// long mPkTimeCount2 = Long.parseLong(model.getCountdown());
|
|
||||||
// long time = mPkTimeCount2 * 1000;
|
|
||||||
// if (sendMoneyListViewHolder.countDownTimer != null) {
|
|
||||||
// sendMoneyListViewHolder.countDownTimer.cancel();
|
|
||||||
// }
|
|
||||||
// if (time > 0) {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
sendMoneyListViewHolder.setData(moneyLongListModels.get(position), callBack, isAnchor,isAttention);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
return moneyLongListModels.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemViewType(int position) {
|
|
||||||
return super.getItemViewType(position);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
package com.yunbao.common.adapter;
|
|
||||||
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.yunbao.common.R;
|
|
||||||
import com.yunbao.common.views.LiveBuyGuardPrivilegeViewHolder;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class LiveBuyGuardPrivilegeAdapter extends RecyclerView.Adapter {
|
|
||||||
List<String> guardPrivilege = new ArrayList<>();
|
|
||||||
|
|
||||||
public void setGuardPrivilege(List<String> privilege) {
|
|
||||||
guardPrivilege.clear();
|
|
||||||
guardPrivilege.addAll(privilege);
|
|
||||||
notifyDataSetChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
public LiveBuyGuardPrivilegeAdapter(List<String> guardPrivilege) {
|
|
||||||
this.guardPrivilege = guardPrivilege;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
|
||||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_buy_guard_privilege_item, parent, false);
|
|
||||||
return new LiveBuyGuardPrivilegeViewHolder(herdView);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
|
||||||
LiveBuyGuardPrivilegeViewHolder buyGuardSelectViewHolder = (LiveBuyGuardPrivilegeViewHolder) holder;
|
|
||||||
buyGuardSelectViewHolder.setData(guardPrivilege.get(position));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
return guardPrivilege.size();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,50 +0,0 @@
|
|||||||
package com.yunbao.common.adapter;
|
|
||||||
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.yunbao.common.R;
|
|
||||||
import com.yunbao.common.bean.GuardPriceModel;
|
|
||||||
import com.yunbao.common.views.LiveBuyGuardSelectViewHolder;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class LiveBuyGuardSelectAdapter extends RecyclerView.Adapter {
|
|
||||||
List<GuardPriceModel> price = new ArrayList<>();
|
|
||||||
GuardPriceModel model;
|
|
||||||
|
|
||||||
public LiveBuyGuardSelectAdapter(List<GuardPriceModel> price, GuardPriceModel mModel) {
|
|
||||||
this.price = price;
|
|
||||||
model = mModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
|
||||||
View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_live_buy_guard_slelect_item, parent, false);
|
|
||||||
return new LiveBuyGuardSelectViewHolder(herdView);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
|
||||||
LiveBuyGuardSelectViewHolder buyGuardSelectViewHolder = (LiveBuyGuardSelectViewHolder) holder;
|
|
||||||
buyGuardSelectViewHolder.setData(price.get(position), liveBuyGuardSelectClickListener,model);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
return price.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
private LiveBuyGuardSelectViewHolder.LiveBuyGuardSelectClickListener liveBuyGuardSelectClickListener;
|
|
||||||
|
|
||||||
public LiveBuyGuardSelectAdapter setLiveBuyGuardSelectClickListener(LiveBuyGuardSelectViewHolder.LiveBuyGuardSelectClickListener liveBuyGuardSelectClickListener) {
|
|
||||||
this.liveBuyGuardSelectClickListener = liveBuyGuardSelectClickListener;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
@ -45,6 +45,7 @@ public class SudTitleSelectAdapter extends RecyclerView.Adapter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -17,7 +17,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.makeramen.roundedimageview.RoundedImageView;
|
import com.makeramen.roundedimageview.RoundedImageView;
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.activity.AbsActivity;
|
import com.yunbao.common.activity.AbsActivity;
|
||||||
import com.yunbao.common.bean.ActiveBean;
|
|
||||||
import com.yunbao.common.bean.ActiveOtherBean;
|
import com.yunbao.common.bean.ActiveOtherBean;
|
||||||
import com.yunbao.common.dialog.ImagePreviewDialog;
|
import com.yunbao.common.dialog.ImagePreviewDialog;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
@ -28,19 +27,17 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class UserCommunityAdapter extends RecyclerView.Adapter {
|
public class UserCommunityAdapter extends RecyclerView.Adapter {
|
||||||
private List<ActiveBean> commentBeanList;
|
private List<ActiveOtherBean> commentBeanList;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private onItemClickListener onItemClickListener;
|
private onItemClickListener onItemClickListener;
|
||||||
private boolean isMe;
|
|
||||||
|
|
||||||
public void setOnItemClickListener(UserCommunityAdapter.onItemClickListener onItemClickListener) {
|
public void setOnItemClickListener(UserCommunityAdapter.onItemClickListener onItemClickListener) {
|
||||||
this.onItemClickListener = onItemClickListener;
|
this.onItemClickListener = onItemClickListener;
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserCommunityAdapter(Context content, List<ActiveBean> commentBeanList, boolean isMe) {
|
public UserCommunityAdapter(Context content, List<ActiveOtherBean> commentBeanList) {
|
||||||
this.mContext = content;
|
this.mContext = content;
|
||||||
this.commentBeanList = commentBeanList;
|
this.commentBeanList = commentBeanList;
|
||||||
this.isMe = isMe;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@ -72,7 +69,6 @@ public class UserCommunityAdapter extends RecyclerView.Adapter {
|
|||||||
private TextView likeCount;
|
private TextView likeCount;
|
||||||
private TextView comCount;
|
private TextView comCount;
|
||||||
private TextView shareCount;
|
private TextView shareCount;
|
||||||
private ImageView more_del;
|
|
||||||
|
|
||||||
public CommentViewHolder(@NonNull View itemView) {
|
public CommentViewHolder(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
@ -86,40 +82,19 @@ public class UserCommunityAdapter extends RecyclerView.Adapter {
|
|||||||
likeCount = itemView.findViewById(R.id.likeCount);
|
likeCount = itemView.findViewById(R.id.likeCount);
|
||||||
comCount = itemView.findViewById(R.id.comCount);
|
comCount = itemView.findViewById(R.id.comCount);
|
||||||
shareCount = itemView.findViewById(R.id.shareCount);
|
shareCount = itemView.findViewById(R.id.shareCount);
|
||||||
more_del = itemView.findViewById(R.id.more_del);
|
|
||||||
more_del.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if (onItemClickListener != null) {
|
|
||||||
onItemClickListener.onItemMore((ActiveBean) v.getTag(), getPosition());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
itemView.setOnClickListener(new View.OnClickListener() {
|
itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (onItemClickListener != null) {
|
onItemClickListener.onImgItem((ActiveOtherBean) v.getTag(), getPosition());
|
||||||
ActiveBean activeOtherBean = (ActiveBean) v.getTag();
|
|
||||||
if (activeOtherBean.getImg_or_video().equals("1")) {
|
|
||||||
onItemClickListener.onImgItem(activeOtherBean, getPosition());
|
|
||||||
} else {
|
|
||||||
onItemClickListener.onItemVideo(activeOtherBean, getPosition());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
public void setData(ActiveBean bean) {
|
public void setData(ActiveOtherBean bean) {
|
||||||
itemView.setTag(bean);
|
itemView.setTag(bean);
|
||||||
mAvatar.setTag(bean);
|
mAvatar.setTag(bean);
|
||||||
more_del.setTag(bean);
|
|
||||||
if (isMe) {
|
|
||||||
more_del.setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
|
||||||
more_del.setVisibility(View.INVISIBLE);
|
|
||||||
}
|
|
||||||
ImgLoader.display(mContext, bean.getUser_avatar(), mAvatar);
|
ImgLoader.display(mContext, bean.getUser_avatar(), mAvatar);
|
||||||
userName.setText(bean.getUser_name());
|
userName.setText(bean.getUser_name());
|
||||||
time.setText(bean.getCreate_time());
|
time.setText(bean.getCreate_time());
|
||||||
@ -169,10 +144,8 @@ public class UserCommunityAdapter extends RecyclerView.Adapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public interface onItemClickListener {
|
public interface onItemClickListener {
|
||||||
void onImgItem(ActiveBean activeBean, int position);
|
void onImgItem(ActiveOtherBean activeBean, int position);
|
||||||
|
|
||||||
void onItemMore(ActiveBean activeBean, int position);
|
void onVideoItem(String activeBean, int position);
|
||||||
|
|
||||||
void onItemVideo(ActiveBean activeBean, int position);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class CheckUpgradesModel extends BaseModel {
|
|
||||||
/**
|
|
||||||
* {
|
|
||||||
* "level": 33, // 等级
|
|
||||||
* "rewards": [ // 奖励信息
|
|
||||||
* {
|
|
||||||
* "id": 1,
|
|
||||||
* "reward_name": "星之守護等級牌", // 奖励名称
|
|
||||||
* "image_path": "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png" // 图片链接
|
|
||||||
* },
|
|
||||||
* {
|
|
||||||
* "id": 2,
|
|
||||||
* "reward_name": "人氣票",
|
|
||||||
* "image_path": "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png"
|
|
||||||
* }
|
|
||||||
* ]
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
@SerializedName("level")
|
|
||||||
private String level;
|
|
||||||
@SerializedName("rewards")
|
|
||||||
private List<RewardsModel> rewards;
|
|
||||||
|
|
||||||
public String getLevel() {
|
|
||||||
return level;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CheckUpgradesModel setLevel(String level) {
|
|
||||||
this.level = level;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<RewardsModel> getRewards() {
|
|
||||||
return rewards;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CheckUpgradesModel setRewards(List<RewardsModel> rewards) {
|
|
||||||
this.rewards = rewards;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
@ -43,17 +43,6 @@ public class EnterRoomNewModel extends BaseModel {
|
|||||||
private int quickGiftRemainingQuantity;//剩余的小PD礼物数量
|
private int quickGiftRemainingQuantity;//剩余的小PD礼物数量
|
||||||
@SerializedName("if_viewing_duration_complete")
|
@SerializedName("if_viewing_duration_complete")
|
||||||
private int ifViewingDurationComplete;//通过观看时间获取小PD礼物的次数
|
private int ifViewingDurationComplete;//通过观看时间获取小PD礼物的次数
|
||||||
@SerializedName("sendMoneyLongStatus")
|
|
||||||
private SendMoneyLongStatusModel model;
|
|
||||||
|
|
||||||
public SendMoneyLongStatusModel getModel() {
|
|
||||||
return model;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EnterRoomNewModel setModel(SendMoneyLongStatusModel model) {
|
|
||||||
this.model = model;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getQuickGiftRemainingQuantity() {
|
public int getQuickGiftRemainingQuantity() {
|
||||||
return quickGiftRemainingQuantity;
|
return quickGiftRemainingQuantity;
|
||||||
|
@ -1,142 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import android.text.TextUtils;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class GuardDataTipModel extends BaseModel {
|
|
||||||
/**
|
|
||||||
* {
|
|
||||||
* "guard_name": "星之守護", // 守护名称
|
|
||||||
* "guard_type": 1, // 守护类型
|
|
||||||
* "close_img": "https://ceshi.yaoulive.com/data/upload/20240304/guard_xing_close.png", // 未开通图标
|
|
||||||
* "open_img": "https://ceshi.yaoulive.com/data/upload/20240304/guard_xing_open.png", // 已开通图标
|
|
||||||
* "is_open": true, // 是否开通 是.true 否.false
|
|
||||||
* "price": { // 价格
|
|
||||||
* {
|
|
||||||
* "opening_time": "1個月", // 开通时长
|
|
||||||
* "original_price": "188000", // 原价
|
|
||||||
* "discount_price": "", // 折扣价
|
|
||||||
* "discount": "", // 折扣
|
|
||||||
* "price_key": 1
|
|
||||||
* },
|
|
||||||
* {
|
|
||||||
* "opening_time": "3個月",
|
|
||||||
* "original_price": "564000",
|
|
||||||
* "discount_price": "398000",
|
|
||||||
* "discount": "7.1折",
|
|
||||||
* "price_key": 3
|
|
||||||
* },
|
|
||||||
* {
|
|
||||||
* "opening_time": "6個月",
|
|
||||||
* "original_price": "1128000",
|
|
||||||
* "discount_price": "738000",
|
|
||||||
* "discount": "6.5折",
|
|
||||||
* "price_key": 6
|
|
||||||
* },
|
|
||||||
* {
|
|
||||||
* "opening_time": "12個月",
|
|
||||||
* "original_price": "2256000",
|
|
||||||
* "discount_price": "1314000",
|
|
||||||
* "discount": "5.8折",
|
|
||||||
* "price_key": 12
|
|
||||||
* }
|
|
||||||
* ],
|
|
||||||
* "guard_privilege": [
|
|
||||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png",
|
|
||||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_2.png",
|
|
||||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_3.png",
|
|
||||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png",
|
|
||||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_2.png",
|
|
||||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_3.png",
|
|
||||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png",
|
|
||||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_1.png",
|
|
||||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_2.png",
|
|
||||||
* "https://ceshi.yaoulive.com/data/upload/20240304/tequan_3.png"
|
|
||||||
* ]
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
@SerializedName("guard_name")
|
|
||||||
private String guardName;
|
|
||||||
@SerializedName("guard_type")
|
|
||||||
private int guardType;
|
|
||||||
@SerializedName("close_img")
|
|
||||||
private String closeImg;
|
|
||||||
@SerializedName("open_img")
|
|
||||||
private String openImg;
|
|
||||||
@SerializedName("is_open")
|
|
||||||
private String isOpen;
|
|
||||||
@SerializedName("price")
|
|
||||||
private List<GuardPriceModel> price;
|
|
||||||
@SerializedName("guard_privilege")
|
|
||||||
private List<String> guardPrivilege;
|
|
||||||
|
|
||||||
public String getGuardName() {
|
|
||||||
return guardName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardDataTipModel setGuardName(String guardName) {
|
|
||||||
this.guardName = guardName;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getGuardType() {
|
|
||||||
return guardType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardDataTipModel setGuardType(int guardType) {
|
|
||||||
this.guardType = guardType;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCloseImg() {
|
|
||||||
return closeImg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardDataTipModel setCloseImg(String closeImg) {
|
|
||||||
this.closeImg = closeImg;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOpenImg() {
|
|
||||||
return openImg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardDataTipModel setOpenImg(String openImg) {
|
|
||||||
this.openImg = openImg;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isOpen() {
|
|
||||||
return TextUtils.equals(isOpen, "1");
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIsOpen() {
|
|
||||||
return isOpen;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardDataTipModel setIsOpen(String isOpen) {
|
|
||||||
this.isOpen = isOpen;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<GuardPriceModel> getPrice() {
|
|
||||||
return price;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardDataTipModel setPrice(List<GuardPriceModel> price) {
|
|
||||||
this.price = price;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<String> getGuardPrivilege() {
|
|
||||||
return guardPrivilege;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardDataTipModel setGuardPrivilege(List<String> guardPrivilege) {
|
|
||||||
this.guardPrivilege = guardPrivilege;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class GuardGetGuardOpenInfoModel extends BaseModel {
|
|
||||||
|
|
||||||
@SerializedName("user_info")
|
|
||||||
private GuardUserInfoModel userInfo;
|
|
||||||
@SerializedName("guard_data")
|
|
||||||
private List<GuardDataTipModel> guardData;
|
|
||||||
|
|
||||||
public GuardUserInfoModel getUserInfo() {
|
|
||||||
return userInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardGetGuardOpenInfoModel setUserInfo(GuardUserInfoModel userInfo) {
|
|
||||||
this.userInfo = userInfo;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<GuardDataTipModel> getGuardData() {
|
|
||||||
return guardData;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardGetGuardOpenInfoModel setGuardData(List<GuardDataTipModel> guardData) {
|
|
||||||
this.guardData = guardData;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,142 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
public class GuardGetGuardUserInfoModel extends BaseModel {
|
|
||||||
/**
|
|
||||||
* "info": {
|
|
||||||
* "uid": "98923", // 用户ID
|
|
||||||
* "user_avatar": "https://downs.yaoulive.com/20230706/0572c0f694601f4d2695cd210effbe93.jpeg?imageView2/2/w/600/h/600", // 用户头像链接
|
|
||||||
* "liveuid": "98889", // 主播ID
|
|
||||||
* "live_avatar": "https://ceshi.yaoulive.com/data/upload/20230522/20230526102906.png", // 主播头像链接
|
|
||||||
* "guard_type": 0, // 守护类型 0.未开通 1.星之守护 2.王之守护 3.神之守护
|
|
||||||
* "exp": 0, // 守护经验值
|
|
||||||
* "level": 0, // 守护等级
|
|
||||||
* "endtime": 0, // 到期时间
|
|
||||||
* "user_language": "chinese",
|
|
||||||
* "live_language": "chinese"
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
@SerializedName("uid")
|
|
||||||
private String uid;
|
|
||||||
@SerializedName("user_avatar")
|
|
||||||
private String userAvatar;
|
|
||||||
@SerializedName("liveuid")
|
|
||||||
private String liveuid;
|
|
||||||
@SerializedName("live_avatar")
|
|
||||||
private String liveAvatar;
|
|
||||||
@SerializedName("guard_type")
|
|
||||||
private int guardType;
|
|
||||||
@SerializedName("exp")
|
|
||||||
private String exp;
|
|
||||||
@SerializedName("level")
|
|
||||||
private int level;
|
|
||||||
@SerializedName("endtime")
|
|
||||||
private long endtime;
|
|
||||||
@SerializedName("user_language")
|
|
||||||
private String userLanguage;
|
|
||||||
@SerializedName("live_language")
|
|
||||||
private String liveLanguage;
|
|
||||||
@SerializedName("is_open")
|
|
||||||
private String isOpen;
|
|
||||||
|
|
||||||
public String getIsOpen() {
|
|
||||||
return isOpen;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardGetGuardUserInfoModel setIsOpen(String isOpen) {
|
|
||||||
this.isOpen = isOpen;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUid() {
|
|
||||||
return uid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardGetGuardUserInfoModel setUid(String uid) {
|
|
||||||
this.uid = uid;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserAvatar() {
|
|
||||||
return userAvatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardGetGuardUserInfoModel setUserAvatar(String userAvatar) {
|
|
||||||
this.userAvatar = userAvatar;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLiveuid() {
|
|
||||||
return liveuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardGetGuardUserInfoModel setLiveuid(String liveuid) {
|
|
||||||
this.liveuid = liveuid;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLiveAvatar() {
|
|
||||||
return liveAvatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardGetGuardUserInfoModel setLiveAvatar(String liveAvatar) {
|
|
||||||
this.liveAvatar = liveAvatar;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getGuardType() {
|
|
||||||
return guardType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardGetGuardUserInfoModel setGuardType(int guardType) {
|
|
||||||
this.guardType = guardType;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getExp() {
|
|
||||||
return exp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardGetGuardUserInfoModel setExp(String exp) {
|
|
||||||
this.exp = exp;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getLevel() {
|
|
||||||
return level;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardGetGuardUserInfoModel setLevel(int level) {
|
|
||||||
this.level = level;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long getEndtime() {
|
|
||||||
return endtime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardGetGuardUserInfoModel setEndtime(long endtime) {
|
|
||||||
this.endtime = endtime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserLanguage() {
|
|
||||||
return userLanguage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardGetGuardUserInfoModel setUserLanguage(String userLanguage) {
|
|
||||||
this.userLanguage = userLanguage;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLiveLanguage() {
|
|
||||||
return liveLanguage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardGetGuardUserInfoModel setLiveLanguage(String liveLanguage) {
|
|
||||||
this.liveLanguage = liveLanguage;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,145 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
public class GuardMaturityDateRemindModel extends BaseModel{
|
|
||||||
|
|
||||||
@SerializedName("_method_")
|
|
||||||
private String method;
|
|
||||||
@SerializedName("action")
|
|
||||||
private String action;
|
|
||||||
@SerializedName("is_overdue")
|
|
||||||
private int isOverdue;
|
|
||||||
@SerializedName("days")
|
|
||||||
private int days;
|
|
||||||
@SerializedName("uid")
|
|
||||||
private String uid;
|
|
||||||
@SerializedName("liveuid")
|
|
||||||
private String liveuid;
|
|
||||||
@SerializedName("user_avatar")
|
|
||||||
private String userAvatar;
|
|
||||||
@SerializedName("user_nicename")
|
|
||||||
private String userNicename;
|
|
||||||
@SerializedName("live_avatar")
|
|
||||||
private String liveAvatar;
|
|
||||||
@SerializedName("live_nicename")
|
|
||||||
private String liveNicename;
|
|
||||||
@SerializedName("ct")
|
|
||||||
private String ct;
|
|
||||||
@SerializedName("guard_type")
|
|
||||||
private String guardType;
|
|
||||||
|
|
||||||
public String getGuardType() {
|
|
||||||
return guardType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardMaturityDateRemindModel setGuardType(String guardType) {
|
|
||||||
this.guardType = guardType;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMethod() {
|
|
||||||
return method;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMethod(String method) {
|
|
||||||
this.method = method;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAction() {
|
|
||||||
return action;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAction(String action) {
|
|
||||||
this.action = action;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getIsOverdue() {
|
|
||||||
return isOverdue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIsOverdue(int isOverdue) {
|
|
||||||
this.isOverdue = isOverdue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getDays() {
|
|
||||||
return days;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDays(int days) {
|
|
||||||
this.days = days;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUid() {
|
|
||||||
return uid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUid(String uid) {
|
|
||||||
this.uid = uid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLiveuid() {
|
|
||||||
return liveuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLiveuid(String liveuid) {
|
|
||||||
this.liveuid = liveuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserAvatar() {
|
|
||||||
return userAvatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserAvatar(String userAvatar) {
|
|
||||||
this.userAvatar = userAvatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserNicename() {
|
|
||||||
return userNicename;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserNicename(String userNicename) {
|
|
||||||
this.userNicename = userNicename;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLiveAvatar() {
|
|
||||||
return liveAvatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLiveAvatar(String liveAvatar) {
|
|
||||||
this.liveAvatar = liveAvatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLiveNicename() {
|
|
||||||
return liveNicename;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLiveNicename(String liveNicename) {
|
|
||||||
this.liveNicename = liveNicename;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCt() {
|
|
||||||
return ct;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCt(String ct) {
|
|
||||||
this.ct = ct;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "GuardMaturityDateRemindModel{" +
|
|
||||||
"method='" + method + '\'' +
|
|
||||||
", action='" + action + '\'' +
|
|
||||||
", isOverdue=" + isOverdue +
|
|
||||||
", days=" + days +
|
|
||||||
", uid='" + uid + '\'' +
|
|
||||||
", liveuid='" + liveuid + '\'' +
|
|
||||||
", userAvatar='" + userAvatar + '\'' +
|
|
||||||
", userNicename='" + userNicename + '\'' +
|
|
||||||
", liveAvatar='" + liveAvatar + '\'' +
|
|
||||||
", liveNicename='" + liveNicename + '\'' +
|
|
||||||
", ct='" + ct + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
@ -8,17 +8,6 @@ public class GuardModel extends BaseModel {
|
|||||||
private String type;
|
private String type;
|
||||||
@SerializedName("endtime")
|
@SerializedName("endtime")
|
||||||
private String endtime;
|
private String endtime;
|
||||||
@SerializedName("guard_type")
|
|
||||||
private String guardType;
|
|
||||||
|
|
||||||
public String getGuardType() {
|
|
||||||
return guardType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardModel setGuardType(String guardType) {
|
|
||||||
this.guardType = guardType;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return type;
|
return type;
|
||||||
|
@ -1,70 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
public class GuardPriceModel extends BaseModel {
|
|
||||||
/**
|
|
||||||
* {
|
|
||||||
* "opening_time": "1個月", // 开通时长
|
|
||||||
* "original_price": "188000", // 原价
|
|
||||||
* "discount_price": "", // 折扣价
|
|
||||||
* "discount": "", // 折扣
|
|
||||||
* "price_key": 1
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
@SerializedName("opening_time")
|
|
||||||
private String openingTime;
|
|
||||||
@SerializedName("original_price")
|
|
||||||
private String originalPrice;
|
|
||||||
@SerializedName("discount_price")
|
|
||||||
private String discountPrice;
|
|
||||||
@SerializedName("discount")
|
|
||||||
private String discount;
|
|
||||||
@SerializedName("price_key")
|
|
||||||
private int priceKey;
|
|
||||||
|
|
||||||
public String getOpeningTime() {
|
|
||||||
return openingTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardPriceModel setOpeningTime(String openingTime) {
|
|
||||||
this.openingTime = openingTime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOriginalPrice() {
|
|
||||||
return originalPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardPriceModel setOriginalPrice(String originalPrice) {
|
|
||||||
this.originalPrice = originalPrice;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDiscountPrice() {
|
|
||||||
return discountPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardPriceModel setDiscountPrice(String discountPrice) {
|
|
||||||
this.discountPrice = discountPrice;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDiscount() {
|
|
||||||
return discount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardPriceModel setDiscount(String discount) {
|
|
||||||
this.discount = discount;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getPriceKey() {
|
|
||||||
return priceKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardPriceModel setPriceKey(int priceKey) {
|
|
||||||
this.priceKey = priceKey;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,142 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
public class GuardUserInfoModel extends BaseModel {
|
|
||||||
/**
|
|
||||||
* {
|
|
||||||
* "user_info": { // 用户开通信息
|
|
||||||
* "uid": "98888", // 用户ID
|
|
||||||
* "user_avatar": "https://downs.yaoulive.com/mannine.png", // 用户头像链接
|
|
||||||
* "liveuid": "98889", // 主播ID
|
|
||||||
* "live_avatar": "https://ceshi.yaoulive.com/data/upload/20230522/20230526102906.png", // 主播头像链接
|
|
||||||
* "guard_type": 1, // 守护类型
|
|
||||||
* "exp": 0, // 经验值
|
|
||||||
* "level": 1, // 等级
|
|
||||||
* "endtime": 1710145929, // 到期时间
|
|
||||||
* "user_language": "chinese", // 用户语言
|
|
||||||
* "live_language": "chinese" // 主播语言
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
@SerializedName("uid")
|
|
||||||
private String uid;
|
|
||||||
@SerializedName("user_avatar")
|
|
||||||
private String userAvatar;
|
|
||||||
@SerializedName("liveuid")
|
|
||||||
private String liveuid;
|
|
||||||
@SerializedName("live_avatar")
|
|
||||||
private String liveAvatar;
|
|
||||||
@SerializedName("guard_type")
|
|
||||||
private int guardType;
|
|
||||||
@SerializedName("exp")
|
|
||||||
private String exp;
|
|
||||||
@SerializedName("level")
|
|
||||||
private String level;
|
|
||||||
@SerializedName("endtime")
|
|
||||||
private String endtime;
|
|
||||||
@SerializedName("user_language")
|
|
||||||
private String userLanguage;
|
|
||||||
@SerializedName("live_language")
|
|
||||||
private String liveLanguage;
|
|
||||||
@SerializedName("is_open")
|
|
||||||
private String isOpen;
|
|
||||||
|
|
||||||
public String getIsOpen() {
|
|
||||||
return isOpen;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardUserInfoModel setIsOpen(String isOpen) {
|
|
||||||
this.isOpen = isOpen;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUid() {
|
|
||||||
return uid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardUserInfoModel setUid(String uid) {
|
|
||||||
this.uid = uid;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserAvatar() {
|
|
||||||
return userAvatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardUserInfoModel setUserAvatar(String userAvatar) {
|
|
||||||
this.userAvatar = userAvatar;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLiveuid() {
|
|
||||||
return liveuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardUserInfoModel setLiveuid(String liveuid) {
|
|
||||||
this.liveuid = liveuid;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLiveAvatar() {
|
|
||||||
return liveAvatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardUserInfoModel setLiveAvatar(String liveAvatar) {
|
|
||||||
this.liveAvatar = liveAvatar;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getGuardType() {
|
|
||||||
return guardType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardUserInfoModel setGuardType(int guardType) {
|
|
||||||
this.guardType = guardType;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getExp() {
|
|
||||||
return exp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardUserInfoModel setExp(String exp) {
|
|
||||||
this.exp = exp;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLevel() {
|
|
||||||
return level;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardUserInfoModel setLevel(String level) {
|
|
||||||
this.level = level;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEndtime() {
|
|
||||||
return endtime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardUserInfoModel setEndtime(String endtime) {
|
|
||||||
this.endtime = endtime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserLanguage() {
|
|
||||||
return userLanguage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardUserInfoModel setUserLanguage(String userLanguage) {
|
|
||||||
this.userLanguage = userLanguage;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLiveLanguage() {
|
|
||||||
return liveLanguage;
|
|
||||||
}
|
|
||||||
|
|
||||||
public GuardUserInfoModel setLiveLanguage(String liveLanguage) {
|
|
||||||
this.liveLanguage = liveLanguage;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
@ -56,18 +56,6 @@ public class LiveBean implements Parcelable {
|
|||||||
private int redPacketStatus;
|
private int redPacketStatus;
|
||||||
@SerializedName("giftId")
|
@SerializedName("giftId")
|
||||||
private String giftId;
|
private String giftId;
|
||||||
@SerializedName("sendMoneyLongStatus ")
|
|
||||||
private int sendMoneyLongStatus ;
|
|
||||||
|
|
||||||
public int getSendMoneyLongStatus() {
|
|
||||||
return sendMoneyLongStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LiveBean setSendMoneyLongStatus(int sendMoneyLongStatus) {
|
|
||||||
this.sendMoneyLongStatus = sendMoneyLongStatus;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Map<String,String> params;//用于跳转Activity时扩展参数,例:从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
|
private Map<String,String> params;//用于跳转Activity时扩展参数,例:从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
|
||||||
|
|
||||||
public String getRecommendCardIconSizeTwo() {
|
public String getRecommendCardIconSizeTwo() {
|
||||||
|
@ -43,14 +43,4 @@ public class MessageSayHiBean extends BaseModel{
|
|||||||
public void setStatus(int status) {
|
public void setStatus(int status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "MessageSayHiBean{" +
|
|
||||||
"user=" + user +
|
|
||||||
", model='" + model + '\'' +
|
|
||||||
", nextTime=" + nextTime +
|
|
||||||
", status=" + status +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -14,19 +14,9 @@ public class MessageUserInfoBean extends BaseModel{
|
|||||||
@SerializedName("msg")
|
@SerializedName("msg")
|
||||||
String sayHiMsg;
|
String sayHiMsg;
|
||||||
|
|
||||||
int id=-1;
|
|
||||||
|
|
||||||
int status; //0 需要跳转到 编辑资料页面
|
int status; //0 需要跳转到 编辑资料页面
|
||||||
String extras;
|
String extras;
|
||||||
|
|
||||||
public int getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(int id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getExtras() {
|
public String getExtras() {
|
||||||
return extras;
|
return extras;
|
||||||
}
|
}
|
||||||
@ -113,8 +103,6 @@ public class MessageUserInfoBean extends BaseModel{
|
|||||||
private int is_hello;
|
private int is_hello;
|
||||||
private String star_name;
|
private String star_name;
|
||||||
private String career;
|
private String career;
|
||||||
@SerializedName("en_career")
|
|
||||||
private String enCareer;
|
|
||||||
private String height;
|
private String height;
|
||||||
private String age;
|
private String age;
|
||||||
@SerializedName("open_off")
|
@SerializedName("open_off")
|
||||||
@ -122,14 +110,6 @@ public class MessageUserInfoBean extends BaseModel{
|
|||||||
@SerializedName("rong_online")
|
@SerializedName("rong_online")
|
||||||
private int rongOnline;//0 在线 非0 其他
|
private int rongOnline;//0 在线 非0 其他
|
||||||
|
|
||||||
public String getEnCareer() {
|
|
||||||
return enCareer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEnCareer(String enCareer) {
|
|
||||||
this.enCareer = enCareer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOpenOff(int openOff) {
|
public void setOpenOff(int openOff) {
|
||||||
this.openOff = openOff;
|
this.openOff = openOff;
|
||||||
}
|
}
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
public class NewGuardLevelModel extends BaseModel{
|
|
||||||
|
|
||||||
@SerializedName("guard_type")
|
|
||||||
private int guardType;
|
|
||||||
@SerializedName("cn")
|
|
||||||
private String cn;
|
|
||||||
@SerializedName("en")
|
|
||||||
private String en;
|
|
||||||
|
|
||||||
public int getGuardType() {
|
|
||||||
return guardType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGuardType(int guardType) {
|
|
||||||
this.guardType = guardType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCn() {
|
|
||||||
return cn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCn(String cn) {
|
|
||||||
this.cn = cn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEn() {
|
|
||||||
return en;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEn(String en) {
|
|
||||||
this.en = en;
|
|
||||||
}
|
|
||||||
}
|
|
@ -96,9 +96,6 @@ public class OpenAdModel extends BaseModel {
|
|||||||
}
|
}
|
||||||
return url + "?t=" + System.currentTimeMillis() / 1000;
|
return url + "?t=" + System.currentTimeMillis() / 1000;
|
||||||
}
|
}
|
||||||
public String getOriginalUrl(){
|
|
||||||
return url;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUrl(String url) {
|
public void setUrl(String url) {
|
||||||
this.url = url;
|
this.url = url;
|
||||||
|
@ -1,39 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
public class RewardsModel extends BaseModel {
|
|
||||||
@SerializedName("id")
|
|
||||||
private int id;
|
|
||||||
@SerializedName("reward_name")
|
|
||||||
private String rewardName;
|
|
||||||
@SerializedName("image_path")
|
|
||||||
private String imagePath;
|
|
||||||
|
|
||||||
public int getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public RewardsModel setId(int id) {
|
|
||||||
this.id = id;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRewardName() {
|
|
||||||
return rewardName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public RewardsModel setRewardName(String rewardName) {
|
|
||||||
this.rewardName = rewardName;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getImagePath() {
|
|
||||||
return imagePath;
|
|
||||||
}
|
|
||||||
|
|
||||||
public RewardsModel setImagePath(String imagePath) {
|
|
||||||
this.imagePath = imagePath;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,137 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
public class SendMoneyLongModel extends BaseModel {
|
|
||||||
/**
|
|
||||||
* {
|
|
||||||
* "_method_": "SendMoneyLong",
|
|
||||||
* "action": "0",
|
|
||||||
* "uid": "98888",
|
|
||||||
* "user_nicename": "周末暴打小朋友",
|
|
||||||
* "user_avatar": "https://downs.yaoulive.com/mannine.png",
|
|
||||||
* "liveuid": "98889",
|
|
||||||
* "add_time": 1710318757,
|
|
||||||
* "gold_num": "5000"
|
|
||||||
* "countdown": 300 // 倒计时
|
|
||||||
* "send_money_long_key": "1710384258446",
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
|
|
||||||
@SerializedName("_method_")
|
|
||||||
private String method;
|
|
||||||
@SerializedName("action")
|
|
||||||
private String action;
|
|
||||||
@SerializedName("uid")
|
|
||||||
private String uid;
|
|
||||||
@SerializedName("user_nicename")
|
|
||||||
private String userNicename;
|
|
||||||
@SerializedName("user_avatar")
|
|
||||||
private String userAvatar;
|
|
||||||
@SerializedName("liveuid")
|
|
||||||
private String liveuid;
|
|
||||||
@SerializedName("add_time")
|
|
||||||
private String addTime;
|
|
||||||
@SerializedName("gold_num")
|
|
||||||
private String goldNum;
|
|
||||||
@SerializedName("countdown")
|
|
||||||
private String countdown;
|
|
||||||
@SerializedName("send_money_long_key")
|
|
||||||
private String sendMoneyLongKey;
|
|
||||||
|
|
||||||
public String getSendMoneyLongKey() {
|
|
||||||
return sendMoneyLongKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SendMoneyLongModel setSendMoneyLongKey(String sendMoneyLongKey) {
|
|
||||||
this.sendMoneyLongKey = sendMoneyLongKey;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCountdown() {
|
|
||||||
return countdown;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SendMoneyLongModel setCountdown(String countdown) {
|
|
||||||
this.countdown = countdown;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMethod() {
|
|
||||||
return method;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMethod(String method) {
|
|
||||||
this.method = method;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAction() {
|
|
||||||
return action;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAction(String action) {
|
|
||||||
this.action = action;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUid() {
|
|
||||||
return uid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUid(String uid) {
|
|
||||||
this.uid = uid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserNicename() {
|
|
||||||
return userNicename;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserNicename(String userNicename) {
|
|
||||||
this.userNicename = userNicename;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserAvatar() {
|
|
||||||
return userAvatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUserAvatar(String userAvatar) {
|
|
||||||
this.userAvatar = userAvatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLiveuid() {
|
|
||||||
return liveuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLiveuid(String liveuid) {
|
|
||||||
this.liveuid = liveuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAddTime() {
|
|
||||||
return addTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAddTime(String addTime) {
|
|
||||||
this.addTime = addTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGoldNum() {
|
|
||||||
return goldNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGoldNum(String goldNum) {
|
|
||||||
this.goldNum = goldNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "SendMoneyLongModel{" +
|
|
||||||
"method='" + method + '\'' +
|
|
||||||
", action='" + action + '\'' +
|
|
||||||
", uid='" + uid + '\'' +
|
|
||||||
", userNicename='" + userNicename + '\'' +
|
|
||||||
", userAvatar='" + userAvatar + '\'' +
|
|
||||||
", liveuid='" + liveuid + '\'' +
|
|
||||||
", addTime=" + addTime +
|
|
||||||
", goldNum='" + goldNum + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,154 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
public class SendMoneyLongStatusModel extends BaseModel {
|
|
||||||
/**
|
|
||||||
* "sendMoneyLongStatus": { // 未查询到数据时为空数组
|
|
||||||
* "liveuid": "98889", // 主播ID
|
|
||||||
* "uid": "98888", // 发起用户ID
|
|
||||||
* "addtime": "1710384258446", // 开始时间 毫秒时间戳
|
|
||||||
* "gold_num": "5000", // 金豆数量
|
|
||||||
* "user_nicename": "周末暴打小朋友", // 用户昵称
|
|
||||||
* "user_avatar": "https://downs.yaoulive.com/mannine.png", // 用户头像链接
|
|
||||||
* "countdown": 300 // 倒计时
|
|
||||||
* "start_status": false,
|
|
||||||
* "start_time": "",
|
|
||||||
* "send_money_long_key": "1710397575473",
|
|
||||||
* "participate": 0,
|
|
||||||
* "add_time": "1710397575473"
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
@SerializedName("liveuid")
|
|
||||||
private String liveuid;
|
|
||||||
@SerializedName("uid")
|
|
||||||
private String uid;
|
|
||||||
@SerializedName("addtime")
|
|
||||||
private String addtime;
|
|
||||||
@SerializedName("gold_num")
|
|
||||||
private String goldNum;
|
|
||||||
@SerializedName("user_nicename")
|
|
||||||
private String userNicename;
|
|
||||||
@SerializedName("user_avatar")
|
|
||||||
private String userAvatar;
|
|
||||||
@SerializedName("countdown")
|
|
||||||
private String countdown;
|
|
||||||
@SerializedName("start_status")
|
|
||||||
private String startStatus;
|
|
||||||
@SerializedName("start_time")
|
|
||||||
private String startTime;
|
|
||||||
@SerializedName("send_money_long_key")
|
|
||||||
private String sendMoneyLongKey;
|
|
||||||
@SerializedName("participate")
|
|
||||||
private String participate;
|
|
||||||
@SerializedName("add_time")
|
|
||||||
private String addTime;
|
|
||||||
|
|
||||||
public String getLiveuid() {
|
|
||||||
return liveuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SendMoneyLongStatusModel setLiveuid(String liveuid) {
|
|
||||||
this.liveuid = liveuid;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUid() {
|
|
||||||
return uid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SendMoneyLongStatusModel setUid(String uid) {
|
|
||||||
this.uid = uid;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAddtime() {
|
|
||||||
return addtime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SendMoneyLongStatusModel setAddtime(String addtime) {
|
|
||||||
this.addtime = addtime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGoldNum() {
|
|
||||||
return goldNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SendMoneyLongStatusModel setGoldNum(String goldNum) {
|
|
||||||
this.goldNum = goldNum;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserNicename() {
|
|
||||||
return userNicename;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SendMoneyLongStatusModel setUserNicename(String userNicename) {
|
|
||||||
this.userNicename = userNicename;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserAvatar() {
|
|
||||||
return userAvatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SendMoneyLongStatusModel setUserAvatar(String userAvatar) {
|
|
||||||
this.userAvatar = userAvatar;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCountdown() {
|
|
||||||
return countdown;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SendMoneyLongStatusModel setCountdown(String countdown) {
|
|
||||||
this.countdown = countdown;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStartStatus() {
|
|
||||||
return startStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SendMoneyLongStatusModel setStartStatus(String startStatus) {
|
|
||||||
this.startStatus = startStatus;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStartTime() {
|
|
||||||
return startTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SendMoneyLongStatusModel setStartTime(String startTime) {
|
|
||||||
this.startTime = startTime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSendMoneyLongKey() {
|
|
||||||
return sendMoneyLongKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SendMoneyLongStatusModel setSendMoneyLongKey(String sendMoneyLongKey) {
|
|
||||||
this.sendMoneyLongKey = sendMoneyLongKey;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getParticipate() {
|
|
||||||
return participate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SendMoneyLongStatusModel setParticipate(String participate) {
|
|
||||||
this.participate = participate;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAddTime() {
|
|
||||||
return addTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SendMoneyLongStatusModel setAddTime(String addTime) {
|
|
||||||
this.addTime = addTime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,47 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import android.os.Parcel;
|
|
||||||
import android.os.Parcelable;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 社區动态
|
|
||||||
*/
|
|
||||||
public class ShareBean extends BaseModel implements Parcelable {
|
|
||||||
private int num;
|
|
||||||
|
|
||||||
public int getNum() {
|
|
||||||
return num;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNum(int num) {
|
|
||||||
this.num = num;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected ShareBean(Parcel in) {
|
|
||||||
num = in.readInt();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final Creator<ShareBean> CREATOR = new Creator<ShareBean>() {
|
|
||||||
@Override
|
|
||||||
public ShareBean createFromParcel(Parcel in) {
|
|
||||||
return new ShareBean(in);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ShareBean[] newArray(int size) {
|
|
||||||
return new ShareBean[size];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int describeContents() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
|
||||||
dest.writeInt(num);
|
|
||||||
}
|
|
||||||
}
|
|
@ -67,7 +67,6 @@ public class UserBean implements Parcelable {
|
|||||||
//随机天梯排位赛PK img,仅在主播PK时使用
|
//随机天梯排位赛PK img,仅在主播PK时使用
|
||||||
private String mRankPkImgUrl;
|
private String mRankPkImgUrl;
|
||||||
//是否填写完整资料
|
//是否填写完整资料
|
||||||
@SerializedName("user_info_complete")
|
|
||||||
private int user_info_complete;
|
private int user_info_complete;
|
||||||
//粉丝团等级
|
//粉丝团等级
|
||||||
private int fansLevel;
|
private int fansLevel;
|
||||||
@ -170,14 +169,6 @@ public class UserBean implements Parcelable {
|
|||||||
return user_info_complete;
|
return user_info_complete;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getUser_info_complete() {
|
|
||||||
return user_info_complete;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUser_info_complete(int user_info_complete) {
|
|
||||||
this.user_info_complete = user_info_complete;
|
|
||||||
}
|
|
||||||
|
|
||||||
public UserBean seUserInfoComplete(int userInfoComplete) {
|
public UserBean seUserInfoComplete(int userInfoComplete) {
|
||||||
this.user_info_complete = userInfoComplete;
|
this.user_info_complete = userInfoComplete;
|
||||||
return this;
|
return this;
|
||||||
|
@ -1,154 +0,0 @@
|
|||||||
package com.yunbao.common.bean;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
|
||||||
|
|
||||||
public class sendMoneyLongListModel extends BaseModel {
|
|
||||||
/**
|
|
||||||
* {
|
|
||||||
* "liveuid": "98889", // 主播ID
|
|
||||||
* "uid": "98888", // 用户ID
|
|
||||||
* "addtime": "1710397350011", // 创建时间 毫秒时间戳
|
|
||||||
* "gold_num": "5000", // 金豆数量
|
|
||||||
* "user_nicename": "周末暴打小朋友", // 用户昵称
|
|
||||||
* "user_avatar": "https://downs.yaoulive.com/mannine.png", // 用户头像
|
|
||||||
* "countdown": 300, // 倒计时
|
|
||||||
* "start_status": false,
|
|
||||||
* "start_time": "",
|
|
||||||
* "send_money_long_key": "1710397485729",
|
|
||||||
* "participate": 0, // 是否参与活动 0.未参与 1.已参与
|
|
||||||
* "add_time": "1710397485729"
|
|
||||||
* }
|
|
||||||
*/
|
|
||||||
@SerializedName("liveuid")
|
|
||||||
private String liveuid;
|
|
||||||
@SerializedName("uid")
|
|
||||||
private String uid;
|
|
||||||
@SerializedName("addtime")
|
|
||||||
private String addtime;
|
|
||||||
@SerializedName("gold_num")
|
|
||||||
private String goldNum;
|
|
||||||
@SerializedName("user_nicename")
|
|
||||||
private String userNicename;
|
|
||||||
@SerializedName("user_avatar")
|
|
||||||
private String userAvatar;
|
|
||||||
@SerializedName("countdown")
|
|
||||||
private String countdown;
|
|
||||||
@SerializedName("start_status")
|
|
||||||
private boolean startStatus;
|
|
||||||
@SerializedName("start_time")
|
|
||||||
private String startTime;
|
|
||||||
@SerializedName("send_money_long_key")
|
|
||||||
private String sendMoneyLongKey;
|
|
||||||
@SerializedName("participate")
|
|
||||||
private String participate;
|
|
||||||
@SerializedName("add_time")
|
|
||||||
private String addTime;
|
|
||||||
|
|
||||||
public String getLiveuid() {
|
|
||||||
return liveuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public sendMoneyLongListModel setLiveuid(String liveuid) {
|
|
||||||
this.liveuid = liveuid;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUid() {
|
|
||||||
return uid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public sendMoneyLongListModel setUid(String uid) {
|
|
||||||
this.uid = uid;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAddtime() {
|
|
||||||
return addtime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public sendMoneyLongListModel setAddtime(String addtime) {
|
|
||||||
this.addtime = addtime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getGoldNum() {
|
|
||||||
return goldNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public sendMoneyLongListModel setGoldNum(String goldNum) {
|
|
||||||
this.goldNum = goldNum;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserNicename() {
|
|
||||||
return userNicename;
|
|
||||||
}
|
|
||||||
|
|
||||||
public sendMoneyLongListModel setUserNicename(String userNicename) {
|
|
||||||
this.userNicename = userNicename;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserAvatar() {
|
|
||||||
return userAvatar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public sendMoneyLongListModel setUserAvatar(String userAvatar) {
|
|
||||||
this.userAvatar = userAvatar;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCountdown() {
|
|
||||||
return countdown;
|
|
||||||
}
|
|
||||||
|
|
||||||
public sendMoneyLongListModel setCountdown(String countdown) {
|
|
||||||
this.countdown = countdown;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isStartStatus() {
|
|
||||||
return startStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public sendMoneyLongListModel setStartStatus(boolean startStatus) {
|
|
||||||
this.startStatus = startStatus;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStartTime() {
|
|
||||||
return startTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public sendMoneyLongListModel setStartTime(String startTime) {
|
|
||||||
this.startTime = startTime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSendMoneyLongKey() {
|
|
||||||
return sendMoneyLongKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public sendMoneyLongListModel setSendMoneyLongKey(String sendMoneyLongKey) {
|
|
||||||
this.sendMoneyLongKey = sendMoneyLongKey;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getParticipate() {
|
|
||||||
return participate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public sendMoneyLongListModel setParticipate(String participate) {
|
|
||||||
this.participate = participate;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAddTime() {
|
|
||||||
return addTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public sendMoneyLongListModel setAddTime(String addTime) {
|
|
||||||
this.addTime = addTime;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,76 +0,0 @@
|
|||||||
package com.yunbao.common.dialog;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.graphics.Color;
|
|
||||||
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.lzf.easyfloat.EasyFloat;
|
|
||||||
import com.lzf.easyfloat.enums.ShowPattern;
|
|
||||||
import com.lzf.easyfloat.interfaces.OnPermissionResult;
|
|
||||||
import com.lzf.easyfloat.permission.PermissionUtils;
|
|
||||||
import com.yunbao.common.CommonAppContext;
|
|
||||||
import com.yunbao.common.adapter.DebugDialogAdapter;
|
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
|
||||||
|
|
||||||
import java.util.TreeMap;
|
|
||||||
|
|
||||||
|
|
||||||
public class DebugDialog {
|
|
||||||
RecyclerView recyclerView;
|
|
||||||
TreeMap<String, String> params;
|
|
||||||
DebugDialogAdapter adapter;
|
|
||||||
private static DebugDialog debugDialog;
|
|
||||||
Context mContext;
|
|
||||||
|
|
||||||
public static DebugDialog getInstance(Activity mainActivity) {
|
|
||||||
if (debugDialog == null) {
|
|
||||||
debugDialog = new DebugDialog(mainActivity);
|
|
||||||
}
|
|
||||||
return debugDialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DebugDialog clear() {
|
|
||||||
params.clear();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setParams(String tag, String msg) {
|
|
||||||
params.put(tag, msg);
|
|
||||||
if (adapter != null)
|
|
||||||
adapter.setParamMap(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
private DebugDialog(Context mContext) {
|
|
||||||
this.mContext = mContext;
|
|
||||||
params = new TreeMap<>();
|
|
||||||
if (PermissionUtils.checkPermission(mContext)) {
|
|
||||||
createView();
|
|
||||||
} else {
|
|
||||||
PermissionUtils.requestPermission((Activity) mContext, new OnPermissionResult() {
|
|
||||||
@Override
|
|
||||||
public void permissionResult(boolean b) {
|
|
||||||
ToastUtil.show("悬浮权限" + b);
|
|
||||||
if (b) {
|
|
||||||
createView();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void createView() {
|
|
||||||
recyclerView = new RecyclerView(mContext);
|
|
||||||
adapter = new DebugDialogAdapter(mContext);
|
|
||||||
recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
|
||||||
recyclerView.setAdapter(adapter);
|
|
||||||
recyclerView.setBackgroundColor(Color.WHITE);
|
|
||||||
EasyFloat.with(mContext)
|
|
||||||
.setTag("debug")
|
|
||||||
.setShowPattern(ShowPattern.ALL_TIME)
|
|
||||||
.setLayout(recyclerView)
|
|
||||||
.show();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,49 +0,0 @@
|
|||||||
package com.yunbao.common.dialog;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import com.lxj.xpopup.core.CenterPopupView;
|
|
||||||
import com.yunbao.common.R;
|
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
|
||||||
|
|
||||||
public class DragonRulePopup extends CenterPopupView {
|
|
||||||
LinearLayout list_no;
|
|
||||||
LinearLayout list;
|
|
||||||
|
|
||||||
boolean isList;
|
|
||||||
|
|
||||||
public DragonRulePopup(@NonNull Context context, boolean isList) {
|
|
||||||
super(context);
|
|
||||||
this.isList = isList;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 返回自定义弹窗的布局
|
|
||||||
@Override
|
|
||||||
protected int getImplLayoutId() {
|
|
||||||
return R.layout.dragon_rule_popup;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
|
||||||
@Override
|
|
||||||
protected void onCreate() {
|
|
||||||
super.onCreate();
|
|
||||||
list_no = findViewById(R.id.list_no);
|
|
||||||
list = findViewById(R.id.list);
|
|
||||||
if (!isList){
|
|
||||||
list_no.setVisibility(VISIBLE);
|
|
||||||
list.setVisibility(GONE);
|
|
||||||
}else {
|
|
||||||
list_no.setVisibility(GONE);
|
|
||||||
list.setVisibility(VISIBLE);
|
|
||||||
}
|
|
||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.dragon_close), new ViewClicksAntiShake.ViewClicksCallBack() {
|
|
||||||
@Override
|
|
||||||
public void onViewClicks() {
|
|
||||||
dismiss();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,112 +0,0 @@
|
|||||||
package com.yunbao.common.dialog;
|
|
||||||
|
|
||||||
import android.app.Activity;
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import com.yunbao.common.R;
|
|
||||||
import com.yunbao.common.bean.GuardGetGuardUserInfoModel;
|
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
|
|
||||||
public class GuardBuyTipsDialog {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param context
|
|
||||||
* @param coin 钻石
|
|
||||||
* @param content 购买类型名称
|
|
||||||
* @param simpleCallback
|
|
||||||
*/
|
|
||||||
public static void showBuyOrRenewDialog(Context context, String coin, String content,
|
|
||||||
boolean isOpen, GuardGetGuardUserInfoModel mGuardUserInfoModel, int guardType,
|
|
||||||
DialogUitl.SimpleCallback simpleCallback) {
|
|
||||||
if (context instanceof Activity) {
|
|
||||||
if (((Activity) context).isDestroyed() || ((Activity) context).isFinishing()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final Dialog dialog = new Dialog(context, R.style.dialog2);
|
|
||||||
dialog.setContentView(R.layout.dialog_guard_buy_tips);
|
|
||||||
dialog.setCancelable(true);
|
|
||||||
dialog.setCanceledOnTouchOutside(true);
|
|
||||||
TextView btn_confirm = dialog.findViewById(R.id.btn_confirm);
|
|
||||||
TextView content1 = dialog.findViewById(R.id.content1);
|
|
||||||
TextView content2 = dialog.findViewById(R.id.content2);
|
|
||||||
TextView contentTextView = dialog.findViewById(R.id.content);
|
|
||||||
TextView buyTypeTextView = dialog.findViewById(R.id.buyType);
|
|
||||||
content1.setVisibility(View.VISIBLE);
|
|
||||||
contentTextView.setVisibility(View.VISIBLE);
|
|
||||||
buyTypeTextView.setVisibility(View.VISIBLE);
|
|
||||||
content2.setVisibility(View.GONE);
|
|
||||||
if (TextUtils.isEmpty(coin) && mGuardUserInfoModel == null && !isOpen && guardType == -200) {
|
|
||||||
content1.setVisibility(View.GONE);
|
|
||||||
contentTextView.setVisibility(View.VISIBLE);
|
|
||||||
buyTypeTextView.setVisibility(View.GONE);
|
|
||||||
content2.setVisibility(View.GONE);
|
|
||||||
contentTextView.setText(content);
|
|
||||||
} else {
|
|
||||||
if (!isOpen) {
|
|
||||||
if (!TextUtils.isEmpty(coin)) {
|
|
||||||
contentTextView.setText(context.getString(R.string.guard_buy_tips_1, coin));
|
|
||||||
}
|
|
||||||
if (!TextUtils.isEmpty(content)) {
|
|
||||||
buyTypeTextView.setText("【" + content + "】");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!TextUtils.isEmpty(coin)) {
|
|
||||||
contentTextView.setText(context.getString(R.string.guard_buy_tips_2, coin));
|
|
||||||
}
|
|
||||||
if (!TextUtils.isEmpty(content)) {
|
|
||||||
buyTypeTextView.setText("【" + content + "】");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (mGuardUserInfoModel != null) {
|
|
||||||
if (mGuardUserInfoModel.getGuardType() != 0) {
|
|
||||||
if (TextUtils.equals(mGuardUserInfoModel.getIsOpen(), "1") &&
|
|
||||||
guardType < mGuardUserInfoModel.getGuardType()) {
|
|
||||||
content1.setVisibility(View.GONE);
|
|
||||||
contentTextView.setVisibility(View.GONE);
|
|
||||||
buyTypeTextView.setVisibility(View.GONE);
|
|
||||||
content2.setVisibility(View.VISIBLE);
|
|
||||||
|
|
||||||
} else if (TextUtils.equals(mGuardUserInfoModel.getIsOpen(), "1") && guardType > mGuardUserInfoModel.getGuardType()) {
|
|
||||||
content1.setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
|
||||||
content1.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
content1.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
content1.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
dialog.findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
dialog.dismiss();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
btn_confirm.setText(WordUtil.isNewZh() ? "確認" : "Confirm");
|
|
||||||
btn_confirm.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
if (content2.getVisibility() == View.VISIBLE) {
|
|
||||||
dialog.dismiss();
|
|
||||||
} else {
|
|
||||||
simpleCallback.onConfirmClick(dialog, "");
|
|
||||||
dialog.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
dialog.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,171 +0,0 @@
|
|||||||
package com.yunbao.common.dialog;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.fragment.app.FragmentActivity;
|
|
||||||
|
|
||||||
import com.lxj.xpopup.core.CenterPopupView;
|
|
||||||
import com.yunbao.common.CommonAppConfig;
|
|
||||||
import com.yunbao.common.R;
|
|
||||||
import com.yunbao.common.bean.CheckUpgradesModel;
|
|
||||||
import com.yunbao.common.bean.IMLoginModel;
|
|
||||||
import com.yunbao.common.bean.RewardsModel;
|
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
|
||||||
|
|
||||||
|
|
||||||
public class GuardUpgradePopup extends CenterPopupView {
|
|
||||||
FragmentActivity activity;
|
|
||||||
String mLiveUid;
|
|
||||||
CheckUpgradesModel mUpgradesModel;
|
|
||||||
TextView leave_hint;
|
|
||||||
LinearLayout rewards_line1, rewards_line2, rewards_line3;
|
|
||||||
ImageView rewards_img1, rewards_img2, rewards_img3;
|
|
||||||
TextView rewards_text1, rewards_text2, rewards_text3;
|
|
||||||
|
|
||||||
public GuardUpgradePopup(@NonNull Context context, String liveUid, CheckUpgradesModel upgradesModel, GuardUpgradeCallBack guardUpgradeCallBack) {
|
|
||||||
super(context);
|
|
||||||
activity = (FragmentActivity) context;
|
|
||||||
mLiveUid = liveUid;
|
|
||||||
mUpgradesModel = upgradesModel;
|
|
||||||
mGuardUpgradeCallBack = guardUpgradeCallBack;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected int getImplLayoutId() {
|
|
||||||
return R.layout.guard_upgrade_popup;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
|
||||||
@Override
|
|
||||||
protected void onCreate() {
|
|
||||||
super.onCreate();
|
|
||||||
leave_hint = findViewById(R.id.leave_hint);
|
|
||||||
rewards_line1 = findViewById(R.id.rewards_line1);
|
|
||||||
rewards_line2 = findViewById(R.id.rewards_line2);
|
|
||||||
rewards_line3 = findViewById(R.id.rewards_line3);
|
|
||||||
rewards_img1 = findViewById(R.id.rewards_img1);
|
|
||||||
rewards_img2 = findViewById(R.id.rewards_img2);
|
|
||||||
rewards_img3 = findViewById(R.id.rewards_img3);
|
|
||||||
rewards_text1 = findViewById(R.id.rewards_text1);
|
|
||||||
rewards_text2 = findViewById(R.id.rewards_text2);
|
|
||||||
rewards_text3 = findViewById(R.id.rewards_text3);
|
|
||||||
StringBuffer hintStringBuffer = new StringBuffer();
|
|
||||||
if (WordUtil.isNewZh()) {
|
|
||||||
hintStringBuffer.append("您的守護等級已達到")
|
|
||||||
.append(mUpgradesModel.getLevel())
|
|
||||||
.append("級 可以領取以下獎勵");
|
|
||||||
} else {
|
|
||||||
hintStringBuffer.append("Your guardian level has reached level ")
|
|
||||||
.append(mUpgradesModel.getLevel())
|
|
||||||
.append(" You can receive the following rewards")
|
|
||||||
;
|
|
||||||
}
|
|
||||||
leave_hint.setText(hintStringBuffer.toString());
|
|
||||||
if (mUpgradesModel.getRewards().size() > 0) {
|
|
||||||
if (mUpgradesModel.getRewards().size() == 1) {
|
|
||||||
rewards_line1.setVisibility(INVISIBLE);
|
|
||||||
rewards_line2.setVisibility(VISIBLE);
|
|
||||||
rewards_line3.setVisibility(INVISIBLE);
|
|
||||||
RewardsModel rewardsModel = mUpgradesModel.getRewards().get(0);
|
|
||||||
ImgLoader.display(getContext(), rewardsModel.getImagePath(), rewards_img2);
|
|
||||||
rewards_text2.setText(rewardsModel.getRewardName());
|
|
||||||
} else if (mUpgradesModel.getRewards().size() == 2) {
|
|
||||||
rewards_line1.setVisibility(VISIBLE);
|
|
||||||
rewards_line2.setVisibility(INVISIBLE);
|
|
||||||
rewards_line3.setVisibility(VISIBLE);
|
|
||||||
RewardsModel rewardsModel1 = mUpgradesModel.getRewards().get(0);
|
|
||||||
RewardsModel rewardsModel3 = mUpgradesModel.getRewards().get(1);
|
|
||||||
|
|
||||||
ImgLoader.display(getContext(), rewardsModel1.getImagePath(), rewards_img1);
|
|
||||||
rewards_text1.setText(rewardsModel1.getRewardName());
|
|
||||||
|
|
||||||
ImgLoader.display(getContext(), rewardsModel3.getImagePath(), rewards_img3);
|
|
||||||
rewards_text3.setText(rewardsModel3.getRewardName());
|
|
||||||
|
|
||||||
} else if (mUpgradesModel.getRewards().size() == 3) {
|
|
||||||
rewards_line1.setVisibility(VISIBLE);
|
|
||||||
rewards_line2.setVisibility(VISIBLE);
|
|
||||||
rewards_line3.setVisibility(VISIBLE);
|
|
||||||
RewardsModel rewardsModel1 = mUpgradesModel.getRewards().get(0);
|
|
||||||
RewardsModel rewardsModel2 = mUpgradesModel.getRewards().get(1);
|
|
||||||
RewardsModel rewardsModel3 = mUpgradesModel.getRewards().get(2);
|
|
||||||
|
|
||||||
ImgLoader.display(getContext(), rewardsModel1.getImagePath(), rewards_img1);
|
|
||||||
rewards_text1.setText(rewardsModel1.getRewardName());
|
|
||||||
|
|
||||||
ImgLoader.display(getContext(), rewardsModel2.getImagePath(), rewards_img2);
|
|
||||||
rewards_text2.setText(rewardsModel2.getRewardName());
|
|
||||||
|
|
||||||
ImgLoader.display(getContext(), rewardsModel3.getImagePath(), rewards_img3);
|
|
||||||
rewards_text3.setText(rewardsModel3.getRewardName());
|
|
||||||
} else {
|
|
||||||
rewards_line1.setVisibility(INVISIBLE);
|
|
||||||
rewards_line2.setVisibility(INVISIBLE);
|
|
||||||
rewards_line3.setVisibility(INVISIBLE);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
rewards_line1.setVisibility(INVISIBLE);
|
|
||||||
rewards_line2.setVisibility(INVISIBLE);
|
|
||||||
rewards_line3.setVisibility(INVISIBLE);
|
|
||||||
}
|
|
||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.confirm), new ViewClicksAntiShake.ViewClicksCallBack() {
|
|
||||||
@Override
|
|
||||||
public void onViewClicks() {
|
|
||||||
LiveNetManager.get(getContext())
|
|
||||||
.guardGetRewards(mUpgradesModel.getLevel(), mLiveUid, new HttpCallback<Object>() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(Object data) {
|
|
||||||
ToastUtil.show(WordUtil.isNewZh() ? "領取成功" : "Receive successfully");
|
|
||||||
dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(String error) {
|
|
||||||
ToastUtil.show(error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.view_grade), new ViewClicksAntiShake.ViewClicksCallBack() {
|
|
||||||
@Override
|
|
||||||
public void onViewClicks() {
|
|
||||||
if (mGuardUpgradeCallBack != null) {
|
|
||||||
mGuardUpgradeCallBack.onGuardLevel();
|
|
||||||
}
|
|
||||||
dismiss();
|
|
||||||
StringBuffer htmlUrl = new StringBuffer();
|
|
||||||
IMLoginModel userInfo = IMLoginManager.get(getContext()).getUserInfo();
|
|
||||||
htmlUrl.append(CommonAppConfig.HOST)
|
|
||||||
.append("/h5/Guard/level.html?")
|
|
||||||
.append("token=")
|
|
||||||
.append(userInfo.getToken())
|
|
||||||
.append("&uid=")
|
|
||||||
.append(userInfo.getId())
|
|
||||||
.append("&anchorUid=")
|
|
||||||
.append(mLiveUid)
|
|
||||||
.append("&isZh=")
|
|
||||||
.append(((WordUtil.isNewZh()) ? "1" : "0"));
|
|
||||||
RouteUtil.forwardZhuangBanActivity(htmlUrl.toString());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private GuardUpgradeCallBack mGuardUpgradeCallBack;
|
|
||||||
|
|
||||||
public interface GuardUpgradeCallBack {
|
|
||||||
void onGuardLevel();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,134 +0,0 @@
|
|||||||
package com.yunbao.common.dialog;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.lxj.xpopup.core.AttachPopupView;
|
|
||||||
import com.yunbao.common.R;
|
|
||||||
import com.yunbao.common.adapter.LiveBuyGuardSelectAdapter;
|
|
||||||
import com.yunbao.common.bean.GuardPriceModel;
|
|
||||||
import com.yunbao.common.views.LiveBuyGuardSelectViewHolder;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class LiveBuyGuardSelectPopup extends AttachPopupView {
|
|
||||||
private int mType;
|
|
||||||
private DialogInterface.OnDismissListener onDismissListener;
|
|
||||||
|
|
||||||
private LiveBuyGuardSelectListener buyGuardSelectListener;
|
|
||||||
List<GuardPriceModel> price = new ArrayList<>();
|
|
||||||
LiveBuyGuardSelectAdapter liveBuyGuardSelectAdapter;
|
|
||||||
RecyclerView live_buy_guard_list;
|
|
||||||
GuardPriceModel model;
|
|
||||||
|
|
||||||
public LiveBuyGuardSelectPopup(@NonNull Context context, List<GuardPriceModel> mPrice, GuardPriceModel mModel) {
|
|
||||||
super(context);
|
|
||||||
price = mPrice;
|
|
||||||
model = mModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected int getImplLayoutId() {
|
|
||||||
return R.layout.view_live_buy_guard_slelect;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate() {
|
|
||||||
live_buy_guard_list = findViewById(R.id.live_buy_guard_list);
|
|
||||||
liveBuyGuardSelectAdapter = new LiveBuyGuardSelectAdapter(price,model);
|
|
||||||
live_buy_guard_list.setAdapter(liveBuyGuardSelectAdapter);
|
|
||||||
live_buy_guard_list.setLayoutManager(new LinearLayoutManager(getContext()));
|
|
||||||
liveBuyGuardSelectAdapter.setLiveBuyGuardSelectClickListener(new LiveBuyGuardSelectViewHolder.LiveBuyGuardSelectClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClickListener(GuardPriceModel guardPriceModel) {
|
|
||||||
dialog.dismiss();
|
|
||||||
if (onDismissListener != null) {
|
|
||||||
onDismissListener.onDismiss(null);
|
|
||||||
}
|
|
||||||
if (buyGuardSelectListener != null) {
|
|
||||||
buyGuardSelectListener.onLiveBuyGuardSelectListener(guardPriceModel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.one_month), new ViewClicksAntiShake.ViewClicksCallBack() {
|
|
||||||
// @Override
|
|
||||||
// public void onViewClicks() {
|
|
||||||
// dialog.dismiss();
|
|
||||||
// if (onDismissListener != null) {
|
|
||||||
// onDismissListener.onDismiss(null);
|
|
||||||
// }
|
|
||||||
// if (buyGuardSelectListener != null) {
|
|
||||||
// buyGuardSelectListener.onLiveBuyGuardSelectListener(0);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.tree_month), new ViewClicksAntiShake.ViewClicksCallBack() {
|
|
||||||
// @Override
|
|
||||||
// public void onViewClicks() {
|
|
||||||
// dialog.dismiss();
|
|
||||||
// if (onDismissListener != null) {
|
|
||||||
// onDismissListener.onDismiss(null);
|
|
||||||
// }
|
|
||||||
// if (buyGuardSelectListener != null) {
|
|
||||||
// buyGuardSelectListener.onLiveBuyGuardSelectListener(1);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.six_month), new ViewClicksAntiShake.ViewClicksCallBack() {
|
|
||||||
// @Override
|
|
||||||
// public void onViewClicks() {
|
|
||||||
// dialog.dismiss();
|
|
||||||
// if (onDismissListener != null) {
|
|
||||||
// onDismissListener.onDismiss(null);
|
|
||||||
// }
|
|
||||||
// if (buyGuardSelectListener != null) {
|
|
||||||
// buyGuardSelectListener.onLiveBuyGuardSelectListener(2);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.one_two_month), new ViewClicksAntiShake.ViewClicksCallBack() {
|
|
||||||
// @Override
|
|
||||||
// public void onViewClicks() {
|
|
||||||
// dialog.dismiss();
|
|
||||||
// if (onDismissListener != null) {
|
|
||||||
// onDismissListener.onDismiss(null);
|
|
||||||
// }
|
|
||||||
// if (buyGuardSelectListener != null) {
|
|
||||||
// buyGuardSelectListener.onLiveBuyGuardSelectListener(3);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
if (model == null) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public LiveBuyGuardSelectPopup setOnDismissListener(DialogInterface.OnDismissListener onDismissListener) {
|
|
||||||
this.onDismissListener = onDismissListener;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LiveBuyGuardSelectPopup setBuyGuardSelectListener(LiveBuyGuardSelectListener buyGuardSelectListener) {
|
|
||||||
this.buyGuardSelectListener = buyGuardSelectListener;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDismiss() {
|
|
||||||
super.onDismiss();
|
|
||||||
if (onDismissListener != null) {
|
|
||||||
onDismissListener.onDismiss(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface LiveBuyGuardSelectListener {
|
|
||||||
void onLiveBuyGuardSelectListener(GuardPriceModel guardPriceModel);
|
|
||||||
}
|
|
||||||
}
|
|
@ -16,12 +16,13 @@ import com.yunbao.common.custom.RatioRoundImageView;
|
|||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.StringUtil;
|
import com.yunbao.common.utils.StringUtil;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.utils.ViewUtils;
|
||||||
|
|
||||||
import io.rong.imkit.utils.RouteUtils;
|
import io.rong.imkit.utils.RouteUtils;
|
||||||
import io.rong.imlib.model.Conversation;
|
import io.rong.imlib.model.Conversation;
|
||||||
|
|
||||||
public class MessageChatNotifyDialog extends AbsDialogPositionPopupWindow {
|
public class MessageChatNotifyDialog extends AbsDialogPositionPopupWindow {
|
||||||
private static boolean dialogStatusShow =false;
|
|
||||||
private MessageUserInfoBean liveBean;
|
private MessageUserInfoBean liveBean;
|
||||||
private DialogInterface.OnDismissListener onDismissListener;
|
private DialogInterface.OnDismissListener onDismissListener;
|
||||||
|
|
||||||
@ -43,10 +44,6 @@ public class MessageChatNotifyDialog extends AbsDialogPositionPopupWindow {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isDialogStatusShow() {
|
|
||||||
return dialogStatusShow;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void buildDialog(XPopup.Builder builder) {
|
public void buildDialog(XPopup.Builder builder) {
|
||||||
builder.positionByWindowCenter(true);
|
builder.positionByWindowCenter(true);
|
||||||
@ -70,13 +67,6 @@ public class MessageChatNotifyDialog extends AbsDialogPositionPopupWindow {
|
|||||||
@Override
|
@Override
|
||||||
protected void onShow() {
|
protected void onShow() {
|
||||||
super.onShow();
|
super.onShow();
|
||||||
dialogStatusShow =true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onDismiss() {
|
|
||||||
super.onDismiss();
|
|
||||||
dialogStatusShow =false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -93,7 +83,7 @@ public class MessageChatNotifyDialog extends AbsDialogPositionPopupWindow {
|
|||||||
if (StringUtil.isEmpty(liveBean.getExtras())) {
|
if (StringUtil.isEmpty(liveBean.getExtras())) {
|
||||||
((TextView) findViewById(R.id.description)).setText(liveBean.getUser().getSignature());
|
((TextView) findViewById(R.id.description)).setText(liveBean.getUser().getSignature());
|
||||||
} else {
|
} else {
|
||||||
((TextView) findViewById(R.id.description)).setText(liveBean.getExtras());
|
((TextView) findViewById(R.id.description)).setText(liveBean.getUser().getSignature());
|
||||||
}
|
}
|
||||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||||
dismiss();
|
dismiss();
|
||||||
|
@ -120,20 +120,7 @@ public class MessageLongClickPopuwindow implements View.OnClickListener {
|
|||||||
IMCenter.getInstance().deleteMessages(message.getConversationType(), message.getTargetId(), new int[]{message.getMessageId()}, new RongIMClient.ResultCallback<Boolean>() {
|
IMCenter.getInstance().deleteMessages(message.getConversationType(), message.getTargetId(), new int[]{message.getMessageId()}, new RongIMClient.ResultCallback<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Boolean aBoolean) {
|
public void onSuccess(Boolean aBoolean) {
|
||||||
if(aBoolean){
|
|
||||||
IMCenter.getInstance().deleteRemoteMessages(message.getConversationType(), message.getTargetId(), new Message[]{message}, new RongIMClient.OperationCallback() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSuccess() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onError(RongIMClient.ErrorCode errorCode) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -76,9 +76,9 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow {
|
|||||||
@Override
|
@Override
|
||||||
protected void onDismiss() {
|
protected void onDismiss() {
|
||||||
super.onDismiss();
|
super.onDismiss();
|
||||||
if (onDismissListener != null) {
|
/*if (onDismissListener != null) {
|
||||||
onDismissListener.onItemClick(userInfoBean.getUser().getId() + "", isSayHi ? 2 : 1);
|
onDismissListener.onItemClick(userInfoBean.getUser().getId() + "", isSayHi ? 2 : 1);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isSayHi = false;
|
boolean isSayHi = false;
|
||||||
@ -86,10 +86,6 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow {
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate() {
|
protected void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
if (userInfoBean.getId() == 0) {
|
|
||||||
dismiss();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
findViewById(R.id.liveGo).setOnClickListener(v -> {
|
findViewById(R.id.liveGo).setOnClickListener(v -> {
|
||||||
isSayHi = true;
|
isSayHi = true;
|
||||||
Conversation.ConversationType type = Conversation.ConversationType.PRIVATE;
|
Conversation.ConversationType type = Conversation.ConversationType.PRIVATE;
|
||||||
@ -97,7 +93,7 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow {
|
|||||||
sendMsg(userInfoBean.getSayHiMsg());
|
sendMsg(userInfoBean.getSayHiMsg());
|
||||||
dismiss();
|
dismiss();
|
||||||
});
|
});
|
||||||
avatar = findViewById(R.id.avatar);
|
/* avatar = findViewById(R.id.avatar);
|
||||||
anchorName = findViewById(R.id.anchorName);
|
anchorName = findViewById(R.id.anchorName);
|
||||||
ImgLoader.display(mContext, userInfoBean.getUser().getAvatar(), avatar);
|
ImgLoader.display(mContext, userInfoBean.getUser().getAvatar(), avatar);
|
||||||
anchorName.setText(userInfoBean.getUser().getUserNicename());
|
anchorName.setText(userInfoBean.getUser().getUserNicename());
|
||||||
@ -109,14 +105,14 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow {
|
|||||||
,WordUtil.isNewZh()?"歲":"years old"
|
,WordUtil.isNewZh()?"歲":"years old"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
showTag();
|
showTag();*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showTag() {
|
private void showTag() {
|
||||||
List<String> tags = new ArrayList<>();
|
List<String> tags = new ArrayList<>();
|
||||||
tags.add(userInfoBean.getInfo().getSex() == 1 ? WordUtil.getNewString(R.string.sex_male) : WordUtil.getNewString(R.string.sex_female));
|
tags.add(userInfoBean.getInfo().getSex() == 1 ? WordUtil.getNewString(R.string.sex_male) : WordUtil.getNewString(R.string.sex_female));
|
||||||
if (!StringUtil.isEmpty(userInfoBean.getInfo().getCareer(), userInfoBean.getInfo().getEnCareer())) {
|
if (!StringUtil.isEmpty(userInfoBean.getInfo().getCareer())) {
|
||||||
tags.add(WordUtil.isNewZh() ? userInfoBean.getInfo().getCareer() : userInfoBean.getInfo().getEnCareer());
|
tags.add(userInfoBean.getInfo().getCareer());
|
||||||
}
|
}
|
||||||
if (!StringUtil.isEmpty(userInfoBean.getInfo().getHeight()) && !userInfoBean.getInfo().getHeight().equals("0")) {
|
if (!StringUtil.isEmpty(userInfoBean.getInfo().getHeight()) && !userInfoBean.getInfo().getHeight().equals("0")) {
|
||||||
tags.add(userInfoBean.getInfo().getHeight());
|
tags.add(userInfoBean.getInfo().getHeight());
|
||||||
|
@ -14,7 +14,6 @@ import com.yunbao.common.bean.OpenAdModel;
|
|||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
|
||||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||||
|
|
||||||
public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow {
|
public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow {
|
||||||
@ -66,11 +65,6 @@ public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow {
|
|||||||
mClose = findViewById(R.id.close);
|
mClose = findViewById(R.id.close);
|
||||||
findViewById(R.id.layout).setOnClickListener(v -> dismiss());
|
findViewById(R.id.layout).setOnClickListener(v -> dismiss());
|
||||||
mImageView.setOnClickListener(v -> {
|
mImageView.setOnClickListener(v -> {
|
||||||
if("home_page_banner_battle".equals(model.getOriginalUrl())){
|
|
||||||
RouteUtil.forwardBattlePass();
|
|
||||||
dismiss();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
WebViewActivity.forward(mContext, model.getUrl(), model.getType() != OpenAdModel.TYPE_HOME);
|
WebViewActivity.forward(mContext, model.getUrl(), model.getType() != OpenAdModel.TYPE_HOME);
|
||||||
if (mListener != null) {
|
if (mListener != null) {
|
||||||
mListener.onItemClick(model, 1);
|
mListener.onItemClick(model, 1);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user