update 1.01版本及后续追加功能
@ -22,6 +22,8 @@ android {
|
||||
pickFirst "lib/armeabi/libyuvtools.so"
|
||||
pickFirst "lib/arm64-v8a/libyuvtools.so"
|
||||
pickFirst "lib/armeabi-v7a/libyuvtools.so"
|
||||
pickFirst "lib/arm64-v8a/libc++_shared.so"
|
||||
pickFirst "lib/armeabi-v7a/libc++_shared.so"
|
||||
exclude "lib/arm64-v8a/libmmcv_api_handgesture.so"
|
||||
exclude "lib/arm64-v8a/libmmcv_api_express.so"
|
||||
exclude "lib/arm64-v8a/libMediaEncoder.so"
|
||||
@ -100,8 +102,15 @@ android {
|
||||
}
|
||||
|
||||
variant.outputs.all {
|
||||
|
||||
outputFileName = "[${new Date().format("MM-dd", TimeZone.getTimeZone("GMT+8"))}]友聊-${rootProject.ext.android.otoversionName}-${variant.buildType.name}.apk"
|
||||
def isGoogle = "链接包"
|
||||
if (rootProject.ext.manifestPlaceholders.isGooglePlay) {
|
||||
isGoogle = "谷歌包"
|
||||
}
|
||||
def isTest = "测试服"
|
||||
if (rootProject.ext.manifestPlaceholders.otoServerHost == "https://mo.yomochat.com") {
|
||||
isTest = "正式服"
|
||||
}
|
||||
outputFileName = "[${new Date().format("MM-dd", TimeZone.getTimeZone("GMT+8"))}]友聊-${rootProject.ext.android.otoversionName}-${isGoogle}-${isTest}-${variant.buildType.name}.apk"
|
||||
|
||||
}
|
||||
}
|
||||
@ -110,7 +119,7 @@ android {
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
versionCode rootProject.ext.android.otoversionCode
|
||||
versionName rootProject.ext.android.otoversionName
|
||||
versionName rootProject.ext.android.otoversionName +new Date().format("HHmm", TimeZone.getTimeZone("GMT+8"))
|
||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
@ -186,7 +195,7 @@ dependencies {
|
||||
api project(path: ':common')
|
||||
//api project(path:':FaceUnity')//新娱美颜
|
||||
api project(path:':Share')
|
||||
|
||||
api project(path:':video')
|
||||
api project(path:':TabLayout')
|
||||
api project(path:':ViewPager2Delegate')
|
||||
api project(path:':callkit')//// 音视频通话能力 UI 组件
|
||||
|
@ -144,7 +144,6 @@
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".activity.WebViewActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
@ -267,6 +266,18 @@
|
||||
android:label="绑定手机号码"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".activity.login.BindOneLoginActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".activity.pd.DynamicReportActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".activity.OTOWalletActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
@ -293,6 +304,12 @@
|
||||
<meta-data
|
||||
android:name="com.facebook.sdk.AutoLogAppEventsEnabled"
|
||||
android:value="false" />
|
||||
<meta-data
|
||||
android:name="RONG_KEY"
|
||||
android:value="${rongIMKey}" />
|
||||
<meta-data
|
||||
android:name="com.openinstall.APP_KEY"
|
||||
android:value="rofnt4" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -4,32 +4,32 @@
|
||||
<title>本地HTML页面</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>獎勵說明</h1>
|
||||
<h3>獎勵說明</h3>
|
||||
<p>在您使用平台服務取得和提取收益(包括:互動收益、通話收益)前,您應閱讀並遵守本說明及將來公示的新增的單項說明或規則、操作時的提示以及規則。 我們在此特別提醒您認真閱讀並充分理解本說明,特別是免除或限制我們責任、限制您的權利、規定爭議解決方式的相關條款。 除非您接受本說明,否則您無權使用相關功能。 您一經使用獎勵獲取、收益兌換和提現等相關功能,即視為您已理解並接受本說明。 我們保留根據相關法律規定、主管機關要求、業務開展情況等,對獎勵的領取、兌換、提現規則進行變更、調整、中止或終止的權利,同時也會將變更、調整予以公示並自公示之日起生效。</p>
|
||||
<h1>1、如何獲得獎勵?</h1>
|
||||
<h3>1、如何獲得獎勵?</h3>
|
||||
|
||||
<h1>A.付費消息:</h1>
|
||||
<h3>A.付費消息:</h3>
|
||||
<p>用戶在以下情況將有機會獲得付費方付費訊息星幣價值的固定比例作為獎勵:</p>
|
||||
<p>(1)系統匹配的會話,不同等級時,低等級用戶為付費方;同等級時,男用戶為付費方(目前等級由低到高分別為:未認證用戶,真人認證用戶,達人認證用戶 )。 系統匹配的會話包括:系統匹配的搭訕/訊息(如紅娘牽線)等; </p>
|
||||
<p>(1)系統匹配的會話,不同等級時,低等級用戶為付費方;同等級時,男用戶為付費方(目前等級由低到高分別為:未認證用戶,達人認證用戶 )。 系統匹配的會話包括:系統匹配的搭訕/訊息(如紅娘牽線)等;</p>
|
||||
<p>(2)除系統匹配的會話及平台另有規定外,首發訊息的一方為雙方會話關係中的付費方。 首發訊息包含:一鍵搭訕/搭訕/私訊,以及視訊和語音通話;</p>
|
||||
<p>(3)若一方在會話關係中已經被認定為付費方,則系統配對到同一會話關係時,該方仍為付費方; 當用戶收到其他用戶的付費訊息時,達人認證用戶會獲得該部分付費訊息星幣價值的33%作為獎勵(具體獎勵以平台顯示為準);真人認證用戶可以獲得的獎勵為22%; 未認證用戶僅可獲得11%。 我們鼓勵您進行真人認證交友。</p>
|
||||
<h1>B.禮物:</h1>
|
||||
<p>(3)若一方在會話關係中已經被認定為付費方,則系統配對到同一會話關係時,該方仍為付費方;當用戶收到其他用戶的付費訊息時,達人認證用戶會獲得該部分付費訊息星幣價值的30%作為獎勵(具體獎勵以平台顯示為準); 未認證用戶僅可獲得10%。</p>
|
||||
<h3>B.禮物:</h3>
|
||||
|
||||
<p>1、當用戶收到收益禮物時,達人認證用戶將會獲得該禮物星幣價值的34%作為獎勵;真人認證用戶可以獲得的獎勵為22%;未認證用戶僅可獲得11%。 用戶背包中尚未送出的禮物不能用於提取收益。</p>
|
||||
<p>2、獎勵如何領取? 領取獎勵前,需先進行真人認證,通過認證後,綁定收款方式方可提領。</p>
|
||||
<p>1、當用戶收到收益禮物時,達人認證用戶將會獲得該禮物星幣價值的30%作為獎勵;未認證用戶僅可獲得10%。 用戶背包中尚未送出的禮物不能用於提取收益。</p>
|
||||
<p>2、獎勵如何領取? 領取獎勵前,需先進行達人認證,通過認證後,綁定收款方式方可領取。</p>
|
||||
<p>3.最小提現金額? 10美元起提。</p>
|
||||
<p>4.什麼情況下會領取失敗? 用戶的帳號存在異常; 收款方式異常; 平台技術故障; 用戶被其他用戶舉報、受到平台調查或監管部門有特定要求等存在未解決爭議事項;</p>
|
||||
<p>5.領取失敗後,該筆獎勵會到哪裡? 領取失敗會導致該筆獎勵退回,如有疑問,請聯絡客服。</p>
|
||||
<p>6、其他費用 用戶對其收益應依法納稅,其平台收益相關的報稅、稅費及相關責任義務等由用戶與其合作方(公會、靈活用工平台等)約定,與平台方無關。</p>
|
||||
<p>7、其他聲明 用戶瞭解並同意,獎勵規則具體以平台顯示為準。若因平台系統突發故障、第三方軟體服務商故障、駭客攻擊等導致平台顯示及功能故障,平台將在發現後儘快修復,平台無須因此承擔賠償責任。</p>
|
||||
<p>8.無效獎勵 若經平台核查認定您全部或部分獎勵無效時,平台為履行法定義務、配合相關執法部門或履行社會責任等原因,有權自行決策將與上述無效獎勵對應的用戶側消費款項予以退還;您同意支援平台的相應決策,並配合平台要求退還您的相關獎勵或等價金額。 此時,平台有權從您帳號的收益餘額中自行扣除相應金額,若不足以扣除時,您應在平台作出通知後指定週期內按照本公司告知的方式補足。</p>
|
||||
<h1> 無效獎勵包括但不限於您基於以下情形而獲得的對應獎勵:</h1>
|
||||
<h3> 無效獎勵包括但不限於您基於以下情形而獲得的對應獎勵:</h3>
|
||||
<p>(1)無民事行為能力人或限制民事行為能力人的使用者打賞或進行其他消費而產生的您的獎勵收益;</p>
|
||||
<p>(2)因您透過違法、違規、違反平台規則或違反公序良俗、誠實信用原則的行為而獲取的獎勵收益;</p>
|
||||
<p>(3)因司法/行政機關要求退還/劃撥的收益(及司法/行政機關要求退還/劃撥用戶消費金額時該等消費金額中對應的您的獎勵收益); </p>
|
||||
<p>(4)使用者使用非法收入、作弊收入或非平台指定方式儲值或消費而產生的您的獎勵收益;</p>
|
||||
<p>(5)用戶依法依規撤銷其消費行為(包括但不限於支付通路退款等)時其相應消費所對應的您的獎勵收益;</p>
|
||||
<p>(6)本公司有權基於平台風控判斷、用戶投訴、行政或司法機關的要求等情形確認您的部分或全部獎勵收益無效。 在您使用平台服務取得和提取收益(包括:互動收益、通話收益)前,您應閱讀並遵守本說明及將來公示的新增的單項說明或規則、操作時的提示以及規則。 我們在此特別提醒您認真閱讀並充分理解本說明,特別是免除或限制我們責任、限制您的權利、規定爭議解決方式的相關條款。 除非您接受本說明,否則您無權使用相關功能。 您一經使用獎勵獲取、收益兌換和提現等相關功能,即視為您已理解並接受本說明。 我們保留根據相關法律規定、主管機關要求、業務開展情況等,對獎勵的領取、兌換、提現規則進行變更、調整、中止或終止的權利,同時也會將變更、調整予以公示並自公示之日起生效。</p>
|
||||
<p>(6)本公司有權基於平台風控判斷、用戶投訴、行政或司法機關的要求等情形確認您的部分或全部獎勵收益無效。</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -2,6 +2,8 @@ package com.shayu.onetoone;
|
||||
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
@ -13,6 +15,7 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.facebook.FacebookSdk;
|
||||
import com.fm.openinstall.OpenInstall;
|
||||
import com.shayu.onetoone.activity.fragments.message.ChatMessageFragment;
|
||||
import com.shayu.onetoone.activity.message.ChatActivity;
|
||||
import com.shayu.onetoone.bean.MessageChatAuthContent;
|
||||
@ -111,6 +114,10 @@ public class AppContext extends CommonAppContext {
|
||||
ARouter.printStackTrace();
|
||||
ARouter.init(this);
|
||||
|
||||
if (isMainProcess()) {
|
||||
OpenInstall.init(this);
|
||||
}
|
||||
|
||||
|
||||
ProviderManager<BaseUiConversation> providerManager = RongConfigCenter.conversationListConfig().getProviderManager();
|
||||
providerManager.replaceProvider(PrivateConversationProvider.class, new CustomConversationProvider());
|
||||
@ -201,4 +208,17 @@ public class AppContext extends CommonAppContext {
|
||||
}
|
||||
|
||||
}
|
||||
public boolean isMainProcess() {
|
||||
int pid = android.os.Process.myPid();
|
||||
ActivityManager activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
|
||||
if (activityManager.getRunningAppProcesses() == null) {
|
||||
return true;
|
||||
}
|
||||
for (ActivityManager.RunningAppProcessInfo appProcess : activityManager.getRunningAppProcesses()) {
|
||||
if (appProcess.pid == pid) {
|
||||
return getApplicationInfo().packageName.equals(appProcess.processName);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,14 @@
|
||||
package com.shayu.onetoone.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
@ -22,7 +26,7 @@ import java.util.Locale;
|
||||
* Activity基类
|
||||
*/
|
||||
public abstract class AbsOTOActivity extends AppCompatActivity {
|
||||
public Context mContext;
|
||||
public Activity mContext;
|
||||
|
||||
@Override
|
||||
public Resources getResources() {
|
||||
@ -59,6 +63,73 @@ public abstract class AbsOTOActivity extends AppCompatActivity {
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
|
||||
window.setStatusBarColor(0);
|
||||
}
|
||||
public static int getCurrentNavigationBarHeight(Activity activity) {
|
||||
if (isNavigationBarShown(activity)) {
|
||||
return getNavigationBarHeight(activity);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
public static boolean navigationGestureEnabled(Context context) {
|
||||
int val = Settings.Global.getInt(context.getContentResolver(), getDeviceInfo(), 0);
|
||||
return val != 0;
|
||||
}
|
||||
/**
|
||||
* 获取设备信息(目前支持几大主流的全面屏手机,亲测华为、小米、oppo、魅族、vivo都可以)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String getDeviceInfo() {
|
||||
String brand = Build.BRAND;
|
||||
if (TextUtils.isEmpty(brand))
|
||||
return "navigationbar_is_min";
|
||||
if (brand.equalsIgnoreCase("HUAWEI")) {
|
||||
return "navigationbar_is_min";
|
||||
} else if (brand.equalsIgnoreCase("XIAOMI")) {
|
||||
return "force_fsg_nav_bar";
|
||||
} else if (brand.equalsIgnoreCase("VIVO")) {
|
||||
return "navigation_gesture_on";
|
||||
} else if (brand.equalsIgnoreCase("OPPO")) {
|
||||
return "navigation_gesture_on";
|
||||
} else {
|
||||
return "navigationbar_is_min";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 非全面屏下 虚拟按键是否打开
|
||||
*
|
||||
* @param activity
|
||||
* @return
|
||||
*/
|
||||
public static boolean isNavigationBarShown(Activity activity) {
|
||||
//虚拟键的view,为空或者不可见时是隐藏状态
|
||||
View view = activity.findViewById(android.R.id.navigationBarBackground);
|
||||
if (view == null) {
|
||||
return false;
|
||||
}
|
||||
int visible = view.getVisibility();
|
||||
if (visible == View.GONE || visible == View.INVISIBLE) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 非全面屏下 虚拟键高度(无论是否隐藏)
|
||||
*
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
public static int getNavigationBarHeight(Context context) {
|
||||
int result = 0;
|
||||
int resourceId = context.getResources().getIdentifier("navigation_bar_height", "dimen", "android");
|
||||
if (resourceId > 0) {
|
||||
result = context.getResources().getDimensionPixelSize(resourceId);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* 设置布局id
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.shayu.onetoone.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@ -17,6 +18,7 @@ import com.shayu.onetoone.listener.OnDialogClickListener;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.HtmlUrlUtils;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
@ -82,7 +84,7 @@ public class EndCallActivity extends AbsOTOActivity {
|
||||
.getTargetUserInfo(user.getUser().getId(), new HttpCallback<UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean data) {
|
||||
if (data.getInfo().getName_auth() == 2) {
|
||||
if (data.getInfo().isNameAuth()) {
|
||||
RouteManager.forwardActivity(extras.getString("path"), extras);
|
||||
EndCallActivity.this.finish();
|
||||
} else {
|
||||
@ -101,7 +103,13 @@ public class EndCallActivity extends AbsOTOActivity {
|
||||
ViewClicksAntiShake.clicksAntiShake(applyButton, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext, false, HtmlUrlUtils.URL_PAY_COIN));
|
||||
mContext.startActivity(new Intent(mContext, OTOWalletActivity.class).putExtra("p", 0));
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(avatar, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
UserManager.toHomePage(user.getUser().getId()+"");
|
||||
}
|
||||
});
|
||||
findViewById(R.id.close).setOnClickListener(v -> finish());
|
||||
|
@ -105,7 +105,6 @@ public class LauncherActivity extends AbsOTOActivity implements View.OnClickList
|
||||
// getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS);
|
||||
// EventBus.getDefault().register(this);
|
||||
setStatusBar();
|
||||
setContentView(R.layout.activity_launcher);
|
||||
mContext = this;
|
||||
mRoot = findViewById(R.id.root);
|
||||
mCover = findViewById(R.id.cover);
|
||||
@ -115,8 +114,7 @@ public class LauncherActivity extends AbsOTOActivity implements View.OnClickList
|
||||
mBtnSkipVideo = findViewById(R.id.btn_skip_video);
|
||||
mBtnSkipImage.setOnClickListener(this);
|
||||
mBtnSkipVideo.setOnClickListener(this);
|
||||
//ImgLoader.display(mContext, R.mipmap.screen, mCover);
|
||||
mCover.setBackgroundColor(Color.WHITE);
|
||||
ImgLoader.display(mContext, R.mipmap.oto_screen, mCover);
|
||||
mHandler = new Handler() {
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
@ -130,7 +128,7 @@ public class LauncherActivity extends AbsOTOActivity implements View.OnClickList
|
||||
}
|
||||
}
|
||||
};
|
||||
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 10);
|
||||
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
|
||||
LogUtil.uploadErrorLog(sInstance);
|
||||
SpUtil.getInstance().setBooleanValue("NOTIFICATION", NotificationManagerCompat.from(this).areNotificationsEnabled());
|
||||
}
|
||||
|
@ -1,9 +1,14 @@
|
||||
package com.shayu.onetoone.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.activity.result.ActivityResult;
|
||||
import androidx.activity.result.ActivityResultCallback;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
@ -83,6 +88,22 @@ public class MainActivity extends AbsOTOActivity {
|
||||
Bus.getOff(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_main;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean onCreate() {
|
||||
registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback<ActivityResult>() {
|
||||
@Override
|
||||
public void onActivityResult(ActivityResult result) {
|
||||
fragments.get(viewPager.getCurrentItem()).onResult(result.getResultCode(), result.getResultCode(), result.getData());
|
||||
}
|
||||
});
|
||||
return super.onCreate();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main(Bundle savedInstanceState) {
|
||||
Bus.getOn(this);
|
||||
@ -117,6 +138,8 @@ public class MainActivity extends AbsOTOActivity {
|
||||
public Boolean invoke(View itemView, Integer index, Boolean select, Boolean fromUse) {
|
||||
if (select) {
|
||||
viewPager.setCurrentItem(index);
|
||||
OTONetManager.getInstance(mContext)
|
||||
.push(null);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -126,7 +149,7 @@ public class MainActivity extends AbsOTOActivity {
|
||||
});
|
||||
RongcloudIMManager.connectIM(mContext);
|
||||
showRedPoint(-1);
|
||||
UnReadMessageManager.getInstance().addObserver(new Conversation.ConversationType[]{Conversation.ConversationType.SYSTEM, Conversation.ConversationType.PRIVATE}, new UnReadMessageManager.IUnReadMessageObserver() {
|
||||
UnReadMessageManager.getInstance().addObserver(new Conversation.ConversationType[]{Conversation.ConversationType.PRIVATE}, new UnReadMessageManager.IUnReadMessageObserver() {
|
||||
@Override
|
||||
public void onCountChanged(int count) {
|
||||
showRedPoint(count);
|
||||
@ -303,8 +326,9 @@ public class MainActivity extends AbsOTOActivity {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_main;
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
fragments.get(viewPager.getCurrentItem()).onResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -14,6 +14,7 @@ import com.shayu.onetoone.bean.FriendAppMoneyLogModel;
|
||||
import com.shayu.onetoone.bean.FriendAppMoneySumModel;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.HtmlUrlUtils;
|
||||
import com.yanzhenjie.recyclerview.SwipeRecyclerView;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
@ -92,7 +93,7 @@ public class MyArnActivity extends AbsOTOActivity {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
RouteManager.forwardWebViewActivity(WordUtil.getNewString(R.string.my_arnings_reward_description),
|
||||
"file:android_asset/Reward_instructions.html"
|
||||
HtmlUrlUtils.getArnInfo()
|
||||
);
|
||||
}
|
||||
});
|
||||
|
@ -0,0 +1,225 @@
|
||||
package com.shayu.onetoone.activity;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.animation.AccelerateInterpolator;
|
||||
import android.view.animation.DecelerateInterpolator;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.android.billingclient.api.BillingResult;
|
||||
import com.android.billingclient.api.Purchase;
|
||||
import com.android.billingclient.api.PurchasesResponseListener;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.fragment.GoogleFragment;
|
||||
import com.yunbao.common.fragment.LoadingDialog;
|
||||
import com.yunbao.common.fragment.WalletFragment;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.GoogleBillingUtilNew;
|
||||
import com.yunbao.common.utils.HXLinePagerIndicator;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import net.lucode.hackware.magicindicator.MagicIndicator;
|
||||
import net.lucode.hackware.magicindicator.ViewPagerHelper;
|
||||
import net.lucode.hackware.magicindicator.buildins.UIUtil;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.CommonNavigator;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.CommonNavigatorAdapter;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerIndicator;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.abs.IPagerTitleView;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.indicators.LinePagerIndicator;
|
||||
import net.lucode.hackware.magicindicator.buildins.commonnavigator.titles.ColorTransitionPagerTitleView;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@Route(path = RouteUtil.PATH_COIN)
|
||||
public class OTOWalletActivity extends AbsActivity {
|
||||
ViewPager vp_content;
|
||||
static OTOWalletActivity mw;
|
||||
Fragment[] fragments = null;
|
||||
private Handler payHandler = new Handler();
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_my_wallet;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
super.main();
|
||||
mw = OTOWalletActivity.this;
|
||||
setTitle(mContext.getString(R.string.wallet));
|
||||
GoogleBillingUtilNew.getInstance().initGooglePay(mContext);
|
||||
vp_content = (ViewPager) findViewById(R.id.vp_content);
|
||||
TextView rView = (TextView) findViewById(R.id.rView);
|
||||
if(getPackageName().equals("com.pdlive.shayu")) {
|
||||
findViewById(R.id.redPacketMain).setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
findViewById(R.id.redPacketMain).setVisibility(View.INVISIBLE);
|
||||
}
|
||||
findViewById(R.id.redPacketMain).setOnClickListener(v -> {
|
||||
RouteUtil.forwardRedPacketList();
|
||||
});
|
||||
rView.setOnClickListener(v -> {
|
||||
LoadingDialog loadingDialog = new LoadingDialog();
|
||||
loadingDialog.show(getSupportFragmentManager(), "LoadingDialog");
|
||||
loadingDialog.setShowText(getString(R.string.order_query));
|
||||
GoogleBillingUtilNew.getInstance().queryPurchasesAsync(new PurchasesResponseListener() {
|
||||
@Override
|
||||
public void onQueryPurchasesResponse(@NonNull BillingResult billingResult, @NonNull List<Purchase> list) {
|
||||
if (list.size() == 0) {
|
||||
loadingDialog.setShowText(getString(R.string.order_query_success));
|
||||
payHandler.postDelayed(() -> loadingDialog.dismiss(), 2000);
|
||||
} else {
|
||||
loadingDialog.setShowText(getString(R.string.order_query));
|
||||
//消费订单
|
||||
GoogleBillingUtilNew.getInstance().consume(list);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
int finalI = i;
|
||||
payHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
//谷歌掉单处理
|
||||
CommonHttpUtil
|
||||
.Google_sec_pay(list.get(finalI).getPurchaseToken(),
|
||||
list.get(finalI).getOrderId(),
|
||||
list.get(finalI).getProducts().get(0),
|
||||
new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (finalI == list.size() - 1) {
|
||||
loadingDialog.setShowText(getString(R.string.order_query_success));
|
||||
loadingDialog.dismiss();
|
||||
}
|
||||
ToastUtil.show("充值已到账");
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
final String[] titles = { mContext.getString(R.string.coins), mContext.getString(R.string.golden_beans)};
|
||||
if (getIntent().getStringExtra("tag") != null) {
|
||||
Log.i("tss", "首充");
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == false) {
|
||||
//链接版本
|
||||
fragments = new Fragment[]{
|
||||
//new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&first_page=1&m=Mall&a=walletcoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=onetoone" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")),
|
||||
new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&first_page=1&a=walletgold&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=onetoone" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")),
|
||||
new WalletFragment(this, CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&first_page=1&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=onetoone" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"))};
|
||||
} else {
|
||||
rView.setVisibility(View.VISIBLE);
|
||||
fragments = new Fragment[]{
|
||||
//new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaycoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=onetoone" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")),
|
||||
new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaygole&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=onetoone" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")),
|
||||
new WalletFragment(this, CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&first_page=1&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"))};
|
||||
}
|
||||
} else {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY == false) {
|
||||
Log.i("tss", "不是首充");
|
||||
//链接版本
|
||||
fragments = new Fragment[]{
|
||||
//new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletcoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=onetoone" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")),
|
||||
new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletgold&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=onetoone" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")),
|
||||
new WalletFragment(this, CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=onetoone" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"))};
|
||||
} else {
|
||||
rView.setVisibility(View.VISIBLE);
|
||||
fragments = new Fragment[]{
|
||||
//new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaycoin&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=onetoone" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")),
|
||||
new GoogleFragment(CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&a=googlepaygole&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&package_name=onetoone" + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")),
|
||||
new WalletFragment(this, CommonAppConfig.HOST + "/index.php?g=Appapi&m=Mall&first_page=1&a=walletbean&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + ((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"))};
|
||||
}
|
||||
}
|
||||
MagicIndicator magicIndicator = (MagicIndicator) findViewById(R.id.magic_indicator);
|
||||
CommonNavigator commonNavigator = new CommonNavigator(this);
|
||||
commonNavigator.setAdjustMode(true);
|
||||
commonNavigator.setAdapter(new CommonNavigatorAdapter() {
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return titles == null ? 0 : titles.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPagerTitleView getTitleView(Context context, final int index) {
|
||||
ColorTransitionPagerTitleView colorTransitionPagerTitleView = new ColorTransitionPagerTitleView(context);
|
||||
colorTransitionPagerTitleView.setNormalColor(Color.GRAY);
|
||||
colorTransitionPagerTitleView.setSelectedColor(Color.BLACK);
|
||||
colorTransitionPagerTitleView.setTextAppearance(OTOWalletActivity.this, R.style.TabLayoutTextStyle);
|
||||
colorTransitionPagerTitleView.setText(titles[index]);
|
||||
colorTransitionPagerTitleView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
vp_content.setCurrentItem(index);
|
||||
}
|
||||
});
|
||||
return colorTransitionPagerTitleView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPagerIndicator getIndicator(Context context) {
|
||||
HXLinePagerIndicator indicator = new HXLinePagerIndicator(context);
|
||||
indicator.setMode(LinePagerIndicator.MODE_EXACTLY);
|
||||
indicator.setLineHeight(UIUtil.dip2px(context, 4));
|
||||
indicator.setLineWidth(UIUtil.dip2px(context, 20));
|
||||
indicator.setRoundRadius(UIUtil.dip2px(context, 3));
|
||||
indicator.setStartInterpolator(new AccelerateInterpolator());
|
||||
indicator.setEndInterpolator(new DecelerateInterpolator(2.0f));
|
||||
return indicator;
|
||||
}
|
||||
});
|
||||
magicIndicator.setNavigator(commonNavigator);
|
||||
|
||||
//每项只进入一次
|
||||
vp_content.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
return fragments[position];
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return fragments.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getPageTitle(int position) {
|
||||
return titles[position];
|
||||
}
|
||||
});
|
||||
ViewPagerHelper.bind(magicIndicator, vp_content);
|
||||
int index=getIntent().getIntExtra("p",0)-1;
|
||||
if(index<0){
|
||||
index=0;
|
||||
}
|
||||
magicIndicator.onPageSelected(index);
|
||||
vp_content.setCurrentItem(index);
|
||||
|
||||
}
|
||||
|
||||
public static void dis() {
|
||||
mw.finish();
|
||||
}
|
||||
|
||||
}
|
@ -17,33 +17,42 @@ import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.ConversationUtils;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.ReportCommunityBean;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.AndroidBug5497Workaround;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DeviceUtils;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.share.ui.InvitePopDialog;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
import com.yunbao.video.activity.VideoPlayActivity;
|
||||
import com.yunbao.video.utils.VideoStorge;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@Route(path = RouteManager.ACTIVITY_WEB_VIEW)
|
||||
public class WebViewActivity extends AbsOTOActivity {
|
||||
WebView webView;
|
||||
String titleString;
|
||||
boolean needAutoHeight = false;
|
||||
private ValueCallback<Uri[]> mValueCallback2;
|
||||
private final int CHOOSE_ANDROID_5 = 200;//Android 5.0以上的
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
@ -55,6 +64,7 @@ public class WebViewActivity extends AbsOTOActivity {
|
||||
Bus.getOn(this);
|
||||
webView = findViewById(R.id.webView);
|
||||
titleString = getIntent().getStringExtra("title");
|
||||
needAutoHeight = getIntent().getBooleanExtra("autoHeight", false);
|
||||
if (!StringUtil.isEmpty(titleString)) {
|
||||
setTitle(titleString);
|
||||
}
|
||||
@ -77,6 +87,7 @@ public class WebViewActivity extends AbsOTOActivity {
|
||||
settings.setDomStorageEnabled(true);
|
||||
webView.addJavascriptInterface(JavascriptInterfaceUtils.getInstance().setmContext(this, webView)
|
||||
.setPageClose(true)
|
||||
.setPDLive(false)
|
||||
.setLiveZhuangBana(false), "androidObject");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
@ -86,13 +97,13 @@ public class WebViewActivity extends AbsOTOActivity {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
if (!url.contains("token") && url.startsWith("http")) {
|
||||
if (!url.contains("token") && url.startsWith("http") && UserManager.getUserBean() != null) {
|
||||
IMLoginModel userInfo = UserManager.getUserBean().getUser();
|
||||
url += "&uid=" + userInfo.getId() + "&token=" + userInfo.getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
|
||||
}
|
||||
Log.i("WebView", url);
|
||||
webView.loadUrl(url);
|
||||
AndroidBug5497Workaround.assistActivity(this);
|
||||
// AndroidBug5497Workaround.assistActivity(this);
|
||||
|
||||
webView.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
@ -116,8 +127,13 @@ public class WebViewActivity extends AbsOTOActivity {
|
||||
} else {
|
||||
setTitle(titleString);
|
||||
}
|
||||
int height = view.getMeasuredHeight();
|
||||
Log.e("网页高度", height + "");
|
||||
if (needAutoHeight) {
|
||||
int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext);
|
||||
Log.e("网页高度", height + "");
|
||||
if (!navigationGestureEnabled(mContext)) {
|
||||
view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -125,6 +141,62 @@ public class WebViewActivity extends AbsOTOActivity {
|
||||
super.onReceivedHttpError(view, request, errorResponse);
|
||||
}
|
||||
});
|
||||
webView.setWebChromeClient(new WebChromeClient() {
|
||||
@Override
|
||||
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) {
|
||||
mValueCallback2 = filePathCallback;
|
||||
WebChromeClient.FileChooserParams mFileChooserParams;
|
||||
mFileChooserParams = fileChooserParams;
|
||||
String at = Arrays.toString(mFileChooserParams.getAcceptTypes());
|
||||
String type;
|
||||
if (at.contains("image/")) {//图片
|
||||
type = "image/*";
|
||||
} else if (at.contains("video/")) {
|
||||
type = "video/*";
|
||||
} else {
|
||||
type = "*/*";
|
||||
}
|
||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.setType(type);
|
||||
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
|
||||
//((MainActivity) mContext).setResult(CHOOSE_ANDROID_5, intent);
|
||||
startActivityForResult(intent, CHOOSE_ANDROID_5);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
processResultAndroid5(requestCode, data);
|
||||
}
|
||||
|
||||
|
||||
private void processResultAndroid5(int resultCode, Intent intent) {
|
||||
if (mValueCallback2 == null) {
|
||||
return;
|
||||
}
|
||||
if (resultCode == -1 && intent != null || (resultCode == CHOOSE_ANDROID_5 && intent != null)) {
|
||||
String dataString = intent.getDataString();
|
||||
ClipData clipData = intent.getClipData();
|
||||
Uri[] results = null;
|
||||
if (clipData != null) {
|
||||
results = new Uri[clipData.getItemCount()];
|
||||
for (int i = 0; i < clipData.getItemCount(); i++) {
|
||||
ClipData.Item item = clipData.getItemAt(i);
|
||||
results[i] = item.getUri();
|
||||
}
|
||||
}
|
||||
if (dataString != null) {
|
||||
results = new Uri[]{Uri.parse(dataString)};
|
||||
}
|
||||
mValueCallback2.onReceiveValue(results);
|
||||
} else {
|
||||
mValueCallback2.onReceiveValue(null);
|
||||
}
|
||||
mValueCallback2 = null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -146,6 +218,18 @@ public class WebViewActivity extends AbsOTOActivity {
|
||||
.showDialog();
|
||||
} else if (event.getMethod().equals("androidCallChat")) {
|
||||
ConversationUtils.startConversation(mContext, event.getData());
|
||||
} else if (event.getMethod().equals("androidOTOEditUser")) {
|
||||
RouteManager.forwardActivity(RouteManager.PATH_EDITPROFILE);
|
||||
} else if (event.getMethod().equals("reportCommunity")) {
|
||||
ReportCommunityBean reportCommunityBean = JSON.parseObject(event.getData(), ReportCommunityBean.class);
|
||||
RouteManager.forwardLiveReportActivity(reportCommunityBean.getDynamic_id(), 1, reportCommunityBean.getCommunity_type(), reportCommunityBean.getComment_id());
|
||||
} else if (TextUtils.equals(event.getMethod(), "androidPlayVideo")) {
|
||||
VideoStorge.getInstance().put(Constants.VIDEO_COMMUNITY, event.getVideoBeanList());
|
||||
VideoPlayActivity.forward(mContext, event.getPosition(), Constants.VIDEO_COMMUNITY, 1);
|
||||
} else if (event.getMethod().equals("androidOTOToHomePage")) {
|
||||
UserManager.toHomePage(event.getData());
|
||||
}else if (event.getMethod().equals("androidHitOn")){
|
||||
ConversationUtils.hitOn(mContext,event.getData(),null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.shayu.onetoone.activity.fragments;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@ -32,12 +33,6 @@ public abstract class BaseFragment extends Fragment {
|
||||
return itemView.findViewById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化页面
|
||||
*
|
||||
* @param itemView 布局view
|
||||
*/
|
||||
public abstract void initView(View itemView);
|
||||
|
||||
/**
|
||||
* 创建页面
|
||||
@ -45,5 +40,16 @@ public abstract class BaseFragment extends Fragment {
|
||||
* @return 布局
|
||||
*/
|
||||
public abstract View createView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState);
|
||||
/**
|
||||
* 初始化页面
|
||||
*
|
||||
* @param itemView 布局view
|
||||
*/
|
||||
public abstract void initView(View itemView);
|
||||
|
||||
|
||||
public void onResult(int requestCode, int resultCode, Intent intent) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,6 +5,8 @@ import static android.content.Context.CLIPBOARD_SERVICE;
|
||||
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
@ -12,36 +14,64 @@ import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.webkit.ValueCallback;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebResourceRequest;
|
||||
import android.webkit.WebResourceResponse;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
|
||||
import androidx.activity.result.ActivityResult;
|
||||
import androidx.activity.result.ActivityResultCallback;
|
||||
import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.activity.AbsOTOActivity;
|
||||
import com.shayu.onetoone.activity.MainActivity;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.ConversationUtils;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMUserFullInfo;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.ReportCommunityBean;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.AndroidBug5497Workaround;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.ProcessImageUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.share.ui.InvitePopDialog;
|
||||
import com.yunbao.video.activity.VideoPlayActivity;
|
||||
import com.yunbao.video.utils.VideoStorge;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 动态主页面
|
||||
*/
|
||||
public class DynamicFragment extends BaseFragment {
|
||||
private WebView webView;
|
||||
private ValueCallback<Uri[]> mValueCallback2;
|
||||
private final int CHOOSE_ANDROID_5 = 200;//Android 5.0以上的
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
@ -49,6 +79,11 @@ public class DynamicFragment extends BaseFragment {
|
||||
Bus.getOff(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView(View itemView) {
|
||||
Bus.getOn(this);
|
||||
@ -60,11 +95,11 @@ public class DynamicFragment extends BaseFragment {
|
||||
webView.addJavascriptInterface(JavascriptInterfaceUtils.getInstance().setmContext(getActivity(), webView)
|
||||
.setPermitSetHigh(false)
|
||||
.setPageClose(true)
|
||||
.setPDLive(false)
|
||||
.setLiveZhuangBana(false), "androidObject");
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
// AndroidBug5497Workaround.assistActivity(getActivity());
|
||||
|
||||
webView.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
@ -84,6 +119,7 @@ public class DynamicFragment extends BaseFragment {
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
int height = view.getMeasuredHeight();
|
||||
AndroidBug5497Workaround.assistActivity(getActivity());
|
||||
Log.e("网页高度", height + "");
|
||||
}
|
||||
|
||||
@ -92,6 +128,30 @@ public class DynamicFragment extends BaseFragment {
|
||||
super.onReceivedHttpError(view, request, errorResponse);
|
||||
}
|
||||
});
|
||||
webView.setWebChromeClient(new WebChromeClient() {
|
||||
@Override
|
||||
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) {
|
||||
mValueCallback2 = filePathCallback;
|
||||
WebChromeClient.FileChooserParams mFileChooserParams;
|
||||
mFileChooserParams = fileChooserParams;
|
||||
String at = Arrays.toString(mFileChooserParams.getAcceptTypes());
|
||||
String type;
|
||||
if (at.contains("image/")) {//图片
|
||||
type = "image/*";
|
||||
} else if (at.contains("video/")) {
|
||||
type = "video/*";
|
||||
} else {
|
||||
type = "*/*";
|
||||
}
|
||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.setType(type);
|
||||
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
|
||||
//((MainActivity) mContext).setResult(CHOOSE_ANDROID_5, intent);
|
||||
startActivityForResult(intent,CHOOSE_ANDROID_5);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
IMLoginModel userInfo = UserManager.getUserBean().getUser();
|
||||
String url = CommonAppConfig.HOST + "/h5/shequ/index.html#/h5/shequ?stack-key-1=698c5f85%20&uid="
|
||||
+ userInfo.getId() + "&token=" + userInfo.getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0");
|
||||
@ -99,6 +159,12 @@ public class DynamicFragment extends BaseFragment {
|
||||
webView.loadUrl(url);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_dynamic, container, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制到剪贴板
|
||||
*/
|
||||
@ -110,18 +176,56 @@ public class DynamicFragment extends BaseFragment {
|
||||
}
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_dynamic, container, false);
|
||||
public void onResult(int requestCode, int resultCode, Intent intent) {
|
||||
processResultAndroid5(resultCode, intent);
|
||||
}
|
||||
|
||||
private void processResultAndroid5(int resultCode, Intent intent) {
|
||||
if (mValueCallback2 == null) {
|
||||
return;
|
||||
}
|
||||
if (resultCode == -1 && intent != null) {
|
||||
String dataString = intent.getDataString();
|
||||
ClipData clipData = intent.getClipData();
|
||||
Uri[] results = null;
|
||||
if (clipData != null) {
|
||||
results = new Uri[clipData.getItemCount()];
|
||||
for (int i = 0; i < clipData.getItemCount(); i++) {
|
||||
ClipData.Item item = clipData.getItemAt(i);
|
||||
results[i] = item.getUri();
|
||||
}
|
||||
}
|
||||
if (dataString != null) {
|
||||
results = new Uri[]{Uri.parse(dataString)};
|
||||
}
|
||||
mValueCallback2.onReceiveValue(results);
|
||||
} else {
|
||||
mValueCallback2.onReceiveValue(null);
|
||||
}
|
||||
mValueCallback2 = null;
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void event(JavascriptInterfaceEvent event) {
|
||||
if (event.getMethod().equals("androidInviteShare")) {
|
||||
new InvitePopDialog(mContext)
|
||||
/* new InvitePopDialog(mContext)
|
||||
.setTitle("快來認識更多有趣的朋友吧!")
|
||||
.setUrl(event.getData())
|
||||
.showDialog();
|
||||
.showDialog();*/
|
||||
} else if (event.getMethod().equals("androidCallChat")) {
|
||||
ConversationUtils.startConversation(mContext, event.getData());
|
||||
} else if (event.getMethod().equals("androidOTOEditUser")) {
|
||||
RouteManager.forwardActivity(RouteManager.PATH_EDITPROFILE);
|
||||
} else if (event.getMethod().equals("reportCommunity")) {
|
||||
ReportCommunityBean reportCommunityBean = JSON.parseObject(event.getData(), ReportCommunityBean.class);
|
||||
RouteManager.forwardLiveReportActivity(reportCommunityBean.getDynamic_id(), 1, reportCommunityBean.getCommunity_type(), reportCommunityBean.getComment_id());
|
||||
}else if (TextUtils.equals(event.getMethod(), "androidPlayVideo")) {
|
||||
VideoStorge.getInstance().put(Constants.VIDEO_COMMUNITY, event.getVideoBeanList());
|
||||
VideoPlayActivity.forward(mContext, event.getPosition(), Constants.VIDEO_COMMUNITY, 1);
|
||||
}else if(event.getMethod().equals("androidOTOToHomePage")){
|
||||
UserManager.toHomePage(event.getData());
|
||||
}else if (event.getMethod().equals("androidHitOn")){
|
||||
ConversationUtils.hitOn(mContext,event.getData(),null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,6 +59,10 @@ public class FriendsFragment extends BaseFragment {
|
||||
|
||||
ViewPager2 viewPager2;
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_friends, container, false);
|
||||
}
|
||||
@Override
|
||||
public void initView(View itemView) {
|
||||
Bus.getOn(this);
|
||||
@ -124,7 +128,7 @@ public class FriendsFragment extends BaseFragment {
|
||||
RouteManager.forwardActivity(RouteManager.ACTIVITY_MATCHING);
|
||||
return;
|
||||
}
|
||||
int money = 100;
|
||||
String money = "100";
|
||||
if (configBean != null) {
|
||||
money = configBean.getMatePrice();
|
||||
}
|
||||
@ -163,11 +167,11 @@ public class FriendsFragment extends BaseFragment {
|
||||
String value = SpUtil.getStringValue("match_data");
|
||||
if (!StringUtil.isEmpty(value)) {
|
||||
MatchingItemSizeBean data = JSONObject.parseObject(value, MatchingItemSizeBean.class);
|
||||
if (data.getNum() > 0) {
|
||||
/* if (data.getNum() > 0) {
|
||||
matching.setImageResource(R.mipmap.ic_matching_free);
|
||||
} else {
|
||||
matching.setImageResource(R.mipmap.ic_matching);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
Bundle screen = getActivity().getIntent().getBundleExtra("screen");
|
||||
if (screen != null) {
|
||||
@ -176,20 +180,16 @@ public class FriendsFragment extends BaseFragment {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_friends, container, false);
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void event(HomeBusEvent event) {
|
||||
if (event.getType() == HomeBusEvent.TYPE_UPDATE_MATCHING) {
|
||||
int num = event.getMatching();
|
||||
if (num > 0) {
|
||||
/* if (num > 0) {
|
||||
matching.setImageResource(R.mipmap.ic_matching_free);
|
||||
} else {
|
||||
matching.setImageResource(R.mipmap.ic_matching);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
if (event.getType() == HomeBusEvent.TYPE_SHOW_MATCHING) {
|
||||
int show = event.getMatching();
|
||||
|
@ -41,23 +41,19 @@ import com.shayu.onetoone.bean.UserBean;
|
||||
import com.shayu.onetoone.bean.UserItemBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.HtmlUrlUtils;
|
||||
import com.shayu.onetoone.utils.MainHttpConsts;
|
||||
import com.shayu.onetoone.utils.MainHttpUtil;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.shayu.onetoone.view.CustomMyViewHolder;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.MyWalletActivity;
|
||||
import com.shayu.onetoone.activity.OTOWalletActivity;
|
||||
import com.yunbao.common.bean.GoogleBean;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LevelBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.APKManager;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.SVGAViewUtils;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
@ -125,7 +121,8 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
//RouteUtil.forwardUserHome(mContext, CommonAppConfig.getInstance().getUid(), 2);
|
||||
RouteManager.forwardEditProfileActivity();
|
||||
// RouteManager.forwardEditProfileActivity();
|
||||
UserManager.toHomePage(UserManager.getUserBean().getUser().getId() + "");
|
||||
}
|
||||
});
|
||||
|
||||
@ -135,7 +132,8 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
//RouteUtil.forwardUserHome(mContext, CommonAppConfig.getInstance().getUid(), 2);
|
||||
RouteManager.forwardEditProfileActivity();
|
||||
// RouteManager.forwardEditProfileActivity();
|
||||
UserManager.toHomePage(UserManager.getUserBean().getUser().getId() + "");
|
||||
}
|
||||
});
|
||||
fansNum = itemView.findViewById(R.id.fans);
|
||||
@ -354,12 +352,18 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
} else {
|
||||
coin.setText(coins);
|
||||
}
|
||||
if (yuanbaos.length() > 11) {
|
||||
star_coin.setText(yuanbaos.substring(0, yuanbaos.length() - 9) + "M");
|
||||
} else if (yuanbaos.length() > 9) {
|
||||
star_coin.setText(yuanbaos.substring(0, yuanbaos.length() - 6) + "K");
|
||||
} else if (yuanbaos.length() > 6) {
|
||||
star_coin.setText(yuanbaos.substring(0, yuanbaos.length() - 3));
|
||||
int length = yuanbaos.length();
|
||||
try {
|
||||
length = ((int)Double.parseDouble(yuanbaos) + "").length();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (length > 11) {
|
||||
star_coin.setText(((int)Double.parseDouble(yuanbaos)/1000000000) + "G");
|
||||
} else if (length > 9) {
|
||||
star_coin.setText(((int)Double.parseDouble(yuanbaos)/1000000) + "M");
|
||||
} else if (length > 6) {
|
||||
star_coin.setText(((int)Double.parseDouble(yuanbaos)/1000)+"K");
|
||||
} else {
|
||||
star_coin.setText(yuanbaos);
|
||||
}
|
||||
@ -399,13 +403,18 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
*/
|
||||
private void initAuth(AuthBean data) {
|
||||
if (data.getName_auth() == 2) {
|
||||
authStatus.setVisibility(View.VISIBLE);
|
||||
authStatus.setVisibility(View.GONE);
|
||||
mName.setMaxEms(4);
|
||||
} else {
|
||||
authStatus.setVisibility(View.GONE);
|
||||
mName.setMaxEms(6);
|
||||
}
|
||||
mName.invalidate();
|
||||
UserBean bean = UserManager.getUserBean();
|
||||
if (bean.getInfo().isAuth()) {
|
||||
authStatus.setImageResource(R.mipmap.ic_person_auth);
|
||||
authStatus.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -530,7 +539,7 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
} else {
|
||||
switch (bean.getId()) {
|
||||
case 2:
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 0));
|
||||
mContext.startActivity(new Intent(mContext, OTOWalletActivity.class).putExtra("p", 0));
|
||||
break;
|
||||
case 13:
|
||||
forwardSetting();
|
||||
@ -552,17 +561,20 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
} else if (i == R.id.signature) {
|
||||
// mContext.startActivity(new Intent(mContext, EditProfileActivity.class));
|
||||
} else if (i == R.id.lt_star_coin) {
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||
mContext.startActivity(new Intent(mContext, OTOWalletActivity.class).putExtra("p", 1));
|
||||
// RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext, false, HtmlUrlUtils.URL_PAY_GOLD));
|
||||
// mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1)) ;
|
||||
// mContext.startActivity(new Intent(mContext, OTOWalletActivity.class).putExtra("p", 1)) ;
|
||||
// Bundle bundle = new Bundle();
|
||||
// bundle.putString("type", "yuanbao");
|
||||
// RouteManager.forwardActivity(RouteManager.ACTIVITY_DIAMOND_EXCHANGE, bundle);
|
||||
} else if (i == R.id.btn_coin) {
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 0));
|
||||
mContext.startActivity(new Intent(mContext, OTOWalletActivity.class).putExtra("p", 0));
|
||||
// RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext, false, HtmlUrlUtils.URL_PAY_COIN));
|
||||
} else if (i == R.id.btn_gold) {
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 2));
|
||||
//mContext.startActivity(new Intent(mContext, OTOWalletActivity.class).putExtra("p", 2));
|
||||
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=0";
|
||||
url = CommonAppConfig.HOST + "/h5/task/index.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken();
|
||||
RouteManager.forwardWebViewActivity(null, url);
|
||||
// Bundle bundle = new Bundle();
|
||||
// bundle.putString("type", "coin");
|
||||
// RouteManager.forwardActivity(RouteManager.ACTIVITY_DIAMOND_EXCHANGE, bundle);
|
||||
|
@ -95,8 +95,10 @@ public class HomeRankFragment extends BaseFragment {
|
||||
if (appbarListener != null) {
|
||||
if (verticalOffset == 0) {
|
||||
appbarListener.onShow(true);
|
||||
hv.show();
|
||||
} else if (Math.abs(verticalOffset) >= appBarLayout.getTotalScrollRange()) {
|
||||
appbarListener.onShow(false);
|
||||
hv.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -259,5 +261,13 @@ public class HomeRankFragment extends BaseFragment {
|
||||
public void clear() {
|
||||
setVisibility(View.INVISIBLE, -1, mItem1, mItem2, mItem3);
|
||||
}
|
||||
|
||||
public void hide() {
|
||||
setVisibility(View.INVISIBLE,-1,mItem1,mItem2,mItem3);
|
||||
}
|
||||
|
||||
public void show() {
|
||||
setVisibility(View.VISIBLE,-1,mItem1,mItem2,mItem3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ import java.util.List;
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import io.rong.common.RLog;
|
||||
@ -30,6 +29,7 @@ import io.rong.imkit.widget.FixedLinearLayoutManager;
|
||||
import io.rong.imkit.widget.adapter.BaseAdapter;
|
||||
import io.rong.imkit.widget.adapter.ViewHolder;
|
||||
import io.rong.imkit.widget.refresh.SmartRefreshLayout;
|
||||
import io.rong.imkit.widget.refresh.api.RefreshLayout;
|
||||
import io.rong.imkit.widget.refresh.wrapper.RongRefreshHeader;
|
||||
|
||||
public abstract class AbsConversationFragment extends ConversationFragment {
|
||||
@ -50,6 +50,7 @@ public abstract class AbsConversationFragment extends ConversationFragment {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
rootView = getLayoutView(inflater, container, savedInstanceState);
|
||||
mContext = getActivity();
|
||||
onCreate();
|
||||
this.mList = (RecyclerView) rootView.findViewById(io.rong.imkit.R.id.rc_message_list);
|
||||
this.mRongExtension = (RongExtension) rootView.findViewById(io.rong.imkit.R.id.rc_extension);
|
||||
this.mRefreshLayout = (SmartRefreshLayout) rootView.findViewById(io.rong.imkit.R.id.rc_refresh);
|
||||
@ -163,9 +164,25 @@ public abstract class AbsConversationFragment extends ConversationFragment {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
super.onLoadMore(refreshLayout);
|
||||
loadData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
super.onRefresh(refreshLayout);
|
||||
refreshData();
|
||||
}
|
||||
|
||||
public abstract View getLayoutView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState);
|
||||
|
||||
public abstract void main();
|
||||
public void onCreate(){}
|
||||
|
||||
public void loadData(){};
|
||||
public void refreshData(){};
|
||||
|
||||
public Intent getIntent() {
|
||||
return getActivity().getIntent();
|
||||
|
@ -2,7 +2,9 @@ package com.shayu.onetoone.activity.fragments.message;
|
||||
|
||||
import static android.content.Context.CLIPBOARD_SERVICE;
|
||||
|
||||
import android.Manifest;
|
||||
import static com.shayu.onetoone.activity.message.ChatActivity.CALL_CHAT_TYPE_CHAT_UP;
|
||||
import static com.shayu.onetoone.activity.message.ChatActivity.CALL_CHAT_TYPE_MATCH;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
@ -10,8 +12,9 @@ import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.InputFilter;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -25,11 +28,11 @@ import androidx.annotation.Nullable;
|
||||
import androidx.core.content.FileProvider;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.blankj.utilcode.util.PermissionUtils;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.lzf.easyfloat.EasyFloat;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.adapter.ChatAlbumRecyclerViewAdapter;
|
||||
import com.shayu.onetoone.adapter.MsgChatMessageListAdapter;
|
||||
import com.shayu.onetoone.bean.FollowBean;
|
||||
import com.shayu.onetoone.bean.GiftBean;
|
||||
@ -39,6 +42,7 @@ import com.shayu.onetoone.bean.SendConsumeBean;
|
||||
import com.shayu.onetoone.bean.UserBean;
|
||||
import com.shayu.onetoone.dialog.BottomListDialog;
|
||||
import com.shayu.onetoone.dialog.MsgChatClickDialog;
|
||||
import com.shayu.onetoone.dialog.MsgChatUserIntroduceDialog;
|
||||
import com.shayu.onetoone.dialog.TipsDialog;
|
||||
import com.shayu.onetoone.event.MessageMsgBusEvent;
|
||||
import com.shayu.onetoone.event.MoneyUpdateEvent;
|
||||
@ -53,11 +57,11 @@ import com.shayu.onetoone.utils.UserManager;
|
||||
import com.shayu.onetoone.view.MsgInputPanelForAudio;
|
||||
import com.shayu.onetoone.view.MsgInputPanelForGift;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.adapter.SpaceGridItemDecoration;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.ProcessImageUtil;
|
||||
@ -77,13 +81,13 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.lifecycle.Observer;
|
||||
import io.rong.calllib.RongCallClient;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import io.rong.imkit.IMCenter;
|
||||
import io.rong.imkit.config.RongConfigCenter;
|
||||
import io.rong.imkit.conversation.MessageListAdapter;
|
||||
import io.rong.imkit.conversation.extension.InputMode;
|
||||
import io.rong.imkit.conversation.extension.RongExtensionViewModel;
|
||||
import io.rong.imkit.conversation.extension.component.inputpanel.InputPanel;
|
||||
import io.rong.imkit.model.UiMessage;
|
||||
import io.rong.imkit.picture.PictureSelector;
|
||||
import io.rong.imkit.picture.config.PictureMimeType;
|
||||
@ -119,10 +123,17 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
TextView home;
|
||||
ImageView sex;
|
||||
ImageView status;
|
||||
ImageView auth;
|
||||
TextView num;
|
||||
Button follow;
|
||||
RongExtensionViewModel mExtensionViewModel;
|
||||
|
||||
private RecyclerView albumRecyclerView;
|
||||
private ImageView albumImageView;
|
||||
private TextView albumText;
|
||||
private Button sayHi;
|
||||
private ChatAlbumRecyclerViewAdapter adapter;
|
||||
|
||||
|
||||
private String token;
|
||||
private static final String TAG = "聊天界面";
|
||||
@ -137,11 +148,41 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
return targetUser.get();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public View getLayoutView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.rc_conversation_fragment, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
updateUserInfo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
this.albumRecyclerView = (RecyclerView) rootView.findViewById(R.id.album_recycler_view);
|
||||
this.albumImageView = rootView.findViewById(R.id.album_image);
|
||||
this.albumText = rootView.findViewById(R.id.album_text);
|
||||
this.sayHi = rootView.findViewById(R.id.sayHi);
|
||||
this.adapter = new ChatAlbumRecyclerViewAdapter(mContext);
|
||||
albumRecyclerView.setAdapter(adapter);
|
||||
albumRecyclerView.addItemDecoration(new SpaceGridItemDecoration(10));
|
||||
}
|
||||
int chatType=-1;
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
Bus.getOn(this);
|
||||
targetId = getActivity().getIntent().getStringExtra("targetId");
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
if (bundle != null) {
|
||||
chatType = bundle.getInt("type", -1);
|
||||
String data = bundle.getString("data");
|
||||
System.out.println("获取类型:" + chatType);
|
||||
System.out.println("获取数据:" + data);
|
||||
}
|
||||
num = findViewById(R.id.num);
|
||||
numLayout = findViewById(R.id.constraintLayout2);
|
||||
numLayout.setVisibility(View.INVISIBLE);
|
||||
@ -150,6 +191,16 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
cameraUtil = new ProcessImageUtil(getActivity(), mContext.getPackageName() + ".fileprovider");
|
||||
|
||||
mRongExtension.setVisibility(View.VISIBLE);
|
||||
this.mList.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||
@Override
|
||||
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
|
||||
super.onScrolled(recyclerView, dx, dy);
|
||||
System.out.println("dy = " + dy + " <<<<<<<<<<<<");
|
||||
if (dy > 5) {
|
||||
hideAlbum();
|
||||
}
|
||||
}
|
||||
});
|
||||
// img.setOnClickListener(v -> cameraUtil.getImageByCamera());
|
||||
initCamera();
|
||||
|
||||
@ -199,20 +250,77 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
}
|
||||
});
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(albumImageView, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (isHideAlbum()) {
|
||||
showAlbum();
|
||||
} else {
|
||||
hideAlbum();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(sayHi, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
|
||||
SendMessageManager.chatUp(targetId, new OnSendMessageListener() {
|
||||
@Override
|
||||
public void onSuccess(String token, SendConsumeBean bean) {
|
||||
super.onSuccess(token, bean);
|
||||
Conversation.ConversationType conversationType = Conversation.ConversationType.PRIVATE;
|
||||
TextMessage messageContent = TextMessage.obtain(bean.getAccostMsg());
|
||||
Message message = Message.obtain(targetId, conversationType, messageContent);
|
||||
IMCenter.getInstance().sendMessage(message, null, null, new IRongCallback.ISendMessageCallback() {
|
||||
@Override
|
||||
public void onAttached(Message message) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Message message) {
|
||||
sayHi.setVisibility(View.GONE);
|
||||
SendMessageManager.onCallSuccess(token, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Message message, RongIMClient.ErrorCode errorCode) {
|
||||
ToastUtil.show("消息发送失败:" + errorCode.getMessage());
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
updateMyInfo();
|
||||
showRedPoint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getLayoutView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.rc_conversation_fragment, container, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void main() {
|
||||
|
||||
}
|
||||
|
||||
MsgChatUserIntroduceDialog userIntroduceDialog = null;
|
||||
|
||||
private void showUserIntroduce() {
|
||||
int type = -1;
|
||||
try {
|
||||
type = getActivity().getIntent().getExtras().getInt("type", -1);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (userIntroduceDialog != null || type != CALL_CHAT_TYPE_MATCH) {
|
||||
return;
|
||||
}
|
||||
userIntroduceDialog = new MsgChatUserIntroduceDialog(mContext)
|
||||
.setUserBean(targetUser.get());
|
||||
userIntroduceDialog.showDialog();
|
||||
|
||||
}
|
||||
|
||||
private void initCamera() {
|
||||
cameraUtil.setImageResultCallback(new ImageResultCallback() {
|
||||
@Override
|
||||
@ -247,6 +355,9 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
field = mRongExtension.getInputPanel().getClass().getDeclaredField("mExtensionViewModel");
|
||||
field.setAccessible(true);
|
||||
mExtensionViewModel = (RongExtensionViewModel) field.get(mRongExtension.getInputPanel());
|
||||
if (mExtensionViewModel != null) {
|
||||
mExtensionViewModel.getInputModeLiveData().postValue(InputMode.NormalMode);
|
||||
}
|
||||
mSendBtn = mInputPanel.getRootView().findViewById(R.id.send_btn);
|
||||
img = mInputPanel.getRootView().findViewById(R.id.input_panel_image_btn);
|
||||
video = mInputPanel.getRootView().findViewById(R.id.input_panel_video_btn);
|
||||
@ -271,7 +382,14 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
});
|
||||
this.mExtensionViewModel.getInputModeLiveData().observe(getViewLifecycleOwner(), new Observer<InputMode>() {
|
||||
public void onChanged(InputMode inputMode) {
|
||||
updateViewByInputMode(inputMode);
|
||||
//updateViewByInputMode(inputMode);
|
||||
System.out.println(inputMode + "<<<<<<<<<<<<");
|
||||
hideAlbum();
|
||||
if (inputMode == InputMode.TextInput) {
|
||||
giftPanel.hide();
|
||||
audio.hide();
|
||||
}
|
||||
mEmojiToggleBtn.setImageResource(io.rong.imkit.R.drawable.rc_ext_input_panel_emoji);
|
||||
}
|
||||
});
|
||||
mVoiceToggleBtn.setOnClickListener(view -> {
|
||||
@ -283,21 +401,29 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
gift.setOnClickListener(v -> {
|
||||
mExtensionViewModel.getInputModeLiveData().postValue(InputMode.NormalMode);
|
||||
audio.hide();
|
||||
giftPanel.show();
|
||||
new Handler(Looper.getMainLooper())
|
||||
.postDelayed(() -> {
|
||||
giftPanel.show();
|
||||
}, 100);
|
||||
});
|
||||
mEmojiToggleBtn.setOnClickListener(v -> {
|
||||
if (mExtensionViewModel.getInputModeLiveData().getValue() == InputMode.TextInput) {
|
||||
if (mExtensionViewModel != null) {
|
||||
audio.hide();
|
||||
giftPanel.hide();
|
||||
mExtensionViewModel.getInputModeLiveData().postValue(InputMode.EmoticonMode);
|
||||
} else {
|
||||
mExtensionViewModel.getInputModeLiveData().postValue(InputMode.TextInput);
|
||||
if (mExtensionViewModel.getInputModeLiveData().getValue() != null && ((InputMode) mExtensionViewModel.getInputModeLiveData().getValue()).equals(InputMode.EmoticonMode)) {
|
||||
mExtensionViewModel.getInputModeLiveData().postValue(InputMode.EmoticonMode);
|
||||
} else {
|
||||
mExtensionViewModel.getInputModeLiveData().postValue(InputMode.EmoticonMode);
|
||||
}
|
||||
mEmojiToggleBtn.setImageResource(io.rong.imkit.R.drawable.rc_ext_input_panel_emoji);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(video, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
hideAlbum();
|
||||
if (call.getTag() != null) {
|
||||
ToastUtil.show(R.string.toast_call_not_unlock);
|
||||
AppManager.runDebugCode(() -> {
|
||||
@ -326,6 +452,7 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
ViewClicksAntiShake.clicksAntiShake(call, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
hideAlbum();
|
||||
if (call.getTag() != null) {
|
||||
ToastUtil.show(R.string.toast_call_not_unlock);
|
||||
AppManager.runDebugCode(() -> {
|
||||
@ -337,7 +464,7 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
@Override
|
||||
public void onApply(Dialog dialog) {
|
||||
super.onApply(dialog);
|
||||
callAudio();
|
||||
callAudio();
|
||||
}
|
||||
}).showDialog();
|
||||
|
||||
@ -354,6 +481,7 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
ViewClicksAntiShake.clicksAntiShake(img, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
hideAlbum();
|
||||
new BottomListDialog(mContext)
|
||||
.setStrings(Arrays.asList(WordUtil.getNewString(R.string.album), WordUtil.getNewString(R.string.camera)))
|
||||
.setSelect(new OnItemClickListener<String>() {
|
||||
@ -417,7 +545,7 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
}
|
||||
|
||||
private void updateViewByInputMode(InputMode inputMode) {
|
||||
if(inputMode==InputMode.TextInput){
|
||||
if (inputMode == InputMode.TextInput) {
|
||||
audio.hide();
|
||||
giftPanel.hide();
|
||||
}
|
||||
@ -551,18 +679,19 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
home = findViewById(R.id.home);
|
||||
star = findViewById(R.id.star);
|
||||
follow = findViewById(R.id.follow);
|
||||
auth = findViewById(R.id.auth);
|
||||
targetId = getIntent().getStringExtra("targetId");
|
||||
updateUserInfo();
|
||||
ViewClicksAntiShake.clicksAntiShake(home, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
UserManager.toHomePage(targetId,true);
|
||||
UserManager.toHomePage(targetId, true);
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(avatar, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
UserManager.toHomePage(targetId,true);
|
||||
UserManager.toHomePage(targetId, true);
|
||||
}
|
||||
});
|
||||
follow.setOnClickListener(v -> {
|
||||
@ -591,9 +720,9 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
ImgLoader.display(mContext, data.getUser().getAvatar(), avatar);
|
||||
uname.setText(data.getUser().getUserNicename());
|
||||
sign.setText(data.getUser().getSignature());
|
||||
if(StringUtil.isEmpty(data.getInfo().getStar_name())){
|
||||
if (StringUtil.isEmpty(data.getInfo().getStar_name())) {
|
||||
star.setVisibility(View.GONE);
|
||||
}else {
|
||||
} else {
|
||||
star.setText("我是" + data.getInfo().getStar_name());
|
||||
}
|
||||
if (data.getUser().getSex() == 1) {
|
||||
@ -601,6 +730,9 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
} else {
|
||||
sex.setImageResource(R.mipmap.ic_message_tab_woman);
|
||||
}
|
||||
if (data.getInfo().isAuth()) {
|
||||
auth.setVisibility(View.VISIBLE);
|
||||
}
|
||||
System.out.println("同性別:" + data.getUser().getSex() + "|" + UserManager.getUserBean().getUser().getSex());
|
||||
if (data.getUser().getSex() == UserManager.getUserBean().getUser().getSex()) {
|
||||
call.setVisibility(View.GONE);
|
||||
@ -624,9 +756,22 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
video.setImageResource(R.mipmap.ic_msg_video_lock);
|
||||
call.setTag("true");
|
||||
}
|
||||
if (data.getUser().getIsAccost() == 0 || chatType==CALL_CHAT_TYPE_CHAT_UP ) {
|
||||
sayHi.setVisibility(View.GONE);
|
||||
} else {
|
||||
sayHi.setVisibility(View.VISIBLE);
|
||||
}
|
||||
UserInfo info = new UserInfo(data.getUser().getId() + "", data.getUser().getUserNicename(), Uri.parse(data.getUser().getAvatar()));
|
||||
info.setExtra(JSONObject.toJSONString(data));
|
||||
RongUserInfoManager.getInstance().refreshUserInfoCache(info);
|
||||
showUserIntroduce();
|
||||
if (data.getUser().getUserAlbum().isEmpty()) {
|
||||
hideAlbum();
|
||||
albumImageView.setVisibility(View.GONE);
|
||||
} else {
|
||||
adapter.setData(data.getUser().getUserAlbum());
|
||||
showAlbum();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -670,7 +815,7 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
public void onItemClick(String bean, int position) {
|
||||
if (bean.equals(WordUtil.getNewString(R.string.copy))) {
|
||||
copyText(data);
|
||||
} else if(bean.equals(WordUtil.getNewString(R.string.delete))){
|
||||
} else if (bean.equals(WordUtil.getNewString(R.string.delete))) {
|
||||
delete(data);
|
||||
}
|
||||
}
|
||||
@ -783,7 +928,8 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
}
|
||||
});
|
||||
}
|
||||
private void callVideo(){
|
||||
|
||||
private void callVideo() {
|
||||
MsgCheckUtils.checkAuth(mContext, targetId, new OnSendMessageListener() {
|
||||
@Override
|
||||
public void onSuccess(String token, SendConsumeBean bean) {
|
||||
@ -835,7 +981,8 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
}
|
||||
});
|
||||
}
|
||||
private void callAudio(){
|
||||
|
||||
private void callAudio() {
|
||||
MsgCheckUtils.checkAuth(mContext, targetId, new OnSendMessageListener() {
|
||||
@Override
|
||||
public void onSuccess(String token, SendConsumeBean bean) {
|
||||
@ -888,12 +1035,49 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadData() {
|
||||
super.loadData();
|
||||
hideAlbum();
|
||||
}
|
||||
|
||||
private boolean isHideAlbum() {
|
||||
return albumRecyclerView.getVisibility() == View.GONE;
|
||||
}
|
||||
|
||||
private void hideAlbum() {
|
||||
if (albumRecyclerView.getVisibility() == View.GONE) {
|
||||
return;
|
||||
}
|
||||
giftPanel.hide();
|
||||
audio.hide();
|
||||
albumText.setVisibility(View.GONE);
|
||||
albumRecyclerView.setVisibility(View.GONE);
|
||||
albumImageView.setImageResource(R.mipmap.ic_chat_album_down);
|
||||
}
|
||||
|
||||
private void showAlbum() {
|
||||
if (albumRecyclerView.getVisibility() == View.VISIBLE) {
|
||||
return;
|
||||
}
|
||||
mExtensionViewModel.getInputModeLiveData().postValue(InputMode.NormalMode);
|
||||
new Handler(Looper.getMainLooper())
|
||||
.postDelayed(() -> {
|
||||
albumText.setVisibility(View.VISIBLE);
|
||||
albumRecyclerView.setVisibility(View.VISIBLE);
|
||||
albumImageView.setImageResource(R.mipmap.ic_chat_album_up);
|
||||
}, 300);
|
||||
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void moneyEvent(MoneyUpdateEvent event) {
|
||||
if (giftPanel != null) {
|
||||
giftPanel.updateMoney(event.getMoney());
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void event(MessageMsgBusEvent event) {
|
||||
if (event.getType() == MessageMsgBusEvent.TYPE_UPDATE_POINT) {
|
||||
@ -905,7 +1089,7 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
numLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
num.setText(event.getNum() + "");
|
||||
}else if(event.getType()==MessageMsgBusEvent.TYPE_UPDATE_STAR){
|
||||
} else if (event.getType() == MessageMsgBusEvent.TYPE_UPDATE_STAR) {
|
||||
giftPanel.updateMoney(event.getContent());
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,34 @@
|
||||
package com.shayu.onetoone.activity.fragments.message;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.activity.fragments.BaseFragment;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
|
||||
public class ChatUserIntroduceViewPageFragment extends BaseFragment {
|
||||
Context mContext;
|
||||
ImageView imageView;
|
||||
String imgUrl;
|
||||
|
||||
public ChatUserIntroduceViewPageFragment(Context mContext,String imgUrl) {
|
||||
this.mContext = mContext;
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.item_chat_full_album, container, false);
|
||||
}
|
||||
@Override
|
||||
public void initView(View itemView) {
|
||||
imageView=findViewById(R.id.imageView);
|
||||
ImgLoader.display(mContext, imgUrl, imageView);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,141 @@
|
||||
package com.shayu.onetoone.activity.login;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.dialog.BindOneLoginDialog;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.MainHttpUtil;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMUserFullInfo;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.ProcessImageUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@Route(path = RouteManager.ACTIVITY_BIND_OPEN_INSTALL)
|
||||
public class BindOneLoginActivity extends AbsActivity {
|
||||
|
||||
RoundedImageView avatar;
|
||||
EditText edit_user, edit_code;
|
||||
Button btn_enter;
|
||||
|
||||
public static BindOneLoginActivity act;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_bind_one_login;
|
||||
}
|
||||
|
||||
private ProcessImageUtil mImageUtil;
|
||||
|
||||
private void updataImg() {
|
||||
|
||||
DialogUitl.showStringArrayDialog(mContext, new Integer[]{
|
||||
R.string.camera, R.string.alumb}, new DialogUitl.StringArrayDialogCallback() {
|
||||
@Override
|
||||
public void onItemClick(String text, int tag) {
|
||||
if (tag == R.string.camera) {
|
||||
mImageUtil.getImageByCamera();
|
||||
} else {
|
||||
mImageUtil.getImageByAlumb();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
super.main();
|
||||
act = this;
|
||||
avatar = (RoundedImageView) findViewById(R.id.avatar);
|
||||
edit_user = (EditText) findViewById(R.id.edit_user);
|
||||
edit_code = (EditText) findViewById(R.id.edit_code);
|
||||
btn_enter = (Button) findViewById(R.id.btn_enter);
|
||||
mImageUtil = new ProcessImageUtil(this);
|
||||
mImageUtil.setImageResultCallback(new ImageResultCallback() {
|
||||
@Override
|
||||
public void beforeCamera() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(File file) {
|
||||
if (file != null) {
|
||||
MainHttpUtil.updateAvatar(file, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
ToastUtil.show(R.string.edit_profile_update_avatar_success);
|
||||
UserBean bean = CommonAppConfig.getInstance().getUserBean();
|
||||
if (bean != null) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
bean.setAvatar(obj.getString("avatar"));
|
||||
bean.setAvatarThumb(obj.getString("avatarThumb"));
|
||||
ImgLoader.displayAvatar(mContext, UserManager.getUserBean().getUser().getAvatar(), avatar);
|
||||
V2TIMUserFullInfo v2TIMUserFullInfo = new V2TIMUserFullInfo();
|
||||
v2TIMUserFullInfo.setFaceUrl(obj.getString("avatarThumb"));
|
||||
V2TIMManager.getInstance().setSelfInfo(v2TIMUserFullInfo, new V2TIMCallback() {
|
||||
@Override
|
||||
public void onError(int code, String desc) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure() {
|
||||
}
|
||||
});
|
||||
ImgLoader.displayAvatar(mContext, UserManager.getUserBean().getUser().getAvatar(), avatar);
|
||||
|
||||
edit_user.setText(UserManager.getUserBean().getUser().getUserNicename());
|
||||
//禁止修改名字
|
||||
edit_user.setEnabled(false);
|
||||
|
||||
//禁止修改头像
|
||||
/* avatar.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ToastUtil.show("1111");
|
||||
updataImg();
|
||||
}
|
||||
});*/
|
||||
|
||||
btn_enter.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
BindOneLoginDialog fragment = new BindOneLoginDialog();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("name", edit_user.getText().toString() + "");
|
||||
bundle.putString("code", edit_code.getText().toString() + "");
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(getSupportFragmentManager(), "OneLoginDialog");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -50,6 +50,7 @@ public class ChooseLabelActivity extends AbsOTOActivity {
|
||||
LableChooseAdapter lableChooseAdapter;
|
||||
|
||||
List<LabelBean.Children> myLabelList = new ArrayList<>();
|
||||
List<LabelBean> srcLabel=new ArrayList<>();
|
||||
|
||||
LabelTagAdapter myAdapter;
|
||||
|
||||
@ -75,6 +76,7 @@ public class ChooseLabelActivity extends AbsOTOActivity {
|
||||
OTONetManager.getInstance(mContext).getSysLabel(new HttpCallback<List<LabelBean>>() {
|
||||
@Override
|
||||
public void onSuccess(List<LabelBean> data) {
|
||||
srcLabel=data;
|
||||
lableChooseAdapter.setList(data);
|
||||
|
||||
}
|
||||
@ -93,18 +95,25 @@ public class ChooseLabelActivity extends AbsOTOActivity {
|
||||
}
|
||||
|
||||
private void getUserLabel() {
|
||||
|
||||
OTONetManager.getInstance(mContext).getBaseInfos(true, new com.yunbao.common.http.base.HttpCallback<com.shayu.onetoone.bean.UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(com.shayu.onetoone.bean.UserBean data) {
|
||||
String[] strs = data.getInfo().getCn_label().split(",");
|
||||
List<String> tempStrlist = Arrays.asList(strs);
|
||||
|
||||
String[] ids = data.getInfo().getLabel_id().split(",");
|
||||
List<String> tempIdlist = Arrays.asList(ids);
|
||||
|
||||
for (int i = 0; i < tempStrlist.size(); i++) {
|
||||
myLabelList.add(new LabelBean.Children(Integer.parseInt(tempIdlist.get(i)), tempStrlist.get(i)));
|
||||
for (LabelBean labelBean : srcLabel) {
|
||||
for (LabelBean.Children labelBean2 : labelBean.getChildren()) {
|
||||
for (String sid : ids) {
|
||||
if(labelBean2.getId()==Integer.parseInt(sid)){
|
||||
labelBean2.setSelect(true);
|
||||
myLabelList.add(new LabelBean.Children(labelBean2.getId(),labelBean2.getCn_title()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (myLabelList.size() > 0) {
|
||||
findViewById(R.id.notitle).setVisibility(View.GONE);
|
||||
} else {
|
||||
findViewById(R.id.notitle).setVisibility(View.VISIBLE);
|
||||
}
|
||||
myAdapter.setData(myLabelList);
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import com.shayu.onetoone.activity.AbsOTOActivity;
|
||||
import com.shayu.onetoone.bean.AvatarBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.shayu.onetoone.view.UserAvatarPopup;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
@ -137,12 +138,12 @@ public class CompleteActivity extends AbsOTOActivity {
|
||||
userSex2 = findViewById(R.id.user_sex_2);
|
||||
userBirthday = findViewById(R.id.userBirthday);
|
||||
btnRegister = findViewById(R.id.btn_register);
|
||||
avatarUrl = CommonAppConfig.getInstance().getUserBean().getAvatar();
|
||||
avatarUrl = UserManager.getUserBean().getUser().getAvatar();
|
||||
if (!StringUtils.isEmpty(avatarUrl)) {
|
||||
ImgLoader.display(CompleteActivity.this, avatarUrl, userAvatar);
|
||||
}
|
||||
if (!StringUtils.isEmpty(CommonAppConfig.getInstance().getUserBean().getUserNiceName())) {
|
||||
userNickName.setText(CommonAppConfig.getInstance().getUserBean().getUserNiceName());
|
||||
if (!StringUtils.isEmpty(UserManager.getUserBean().getUser().getUserNicename())) {
|
||||
userNickName.setText(UserManager.getUserBean().getUser().getUserNicename());
|
||||
}
|
||||
editHead.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@ -180,7 +181,7 @@ public class CompleteActivity extends AbsOTOActivity {
|
||||
selectedDate.set(year, month, day);
|
||||
Calendar startCalendar = Calendar.getInstance();
|
||||
Calendar endCalendar = Calendar.getInstance();
|
||||
startCalendar.set(1990, 1, 1);
|
||||
startCalendar.set(1900, 0, 1);
|
||||
endCalendar.setTime(new Date());
|
||||
TimePickerView pvTime = new TimePickerBuilder(CompleteActivity.this, new OnTimeSelectListener() {
|
||||
@Override
|
||||
|
@ -207,14 +207,14 @@ public class EntryActivity extends AbsOTOActivity {
|
||||
btn_tip1.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
WebViewActivity.forward(EntryActivity.this, HtmlConfig.LOGIN_PRIVCAY, false);
|
||||
RouteManager.forwardWebViewActivity(null, HtmlConfig.OTO_LOGIN_PRIVCAY);
|
||||
}
|
||||
});
|
||||
|
||||
btn_tip.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
WebViewActivity.forward(EntryActivity.this, HtmlConfig.LOGIN_PRIVCAY1, false);
|
||||
RouteManager.forwardWebViewActivity(null, HtmlConfig.OTO_LOGIN_PRIVCAY1);
|
||||
|
||||
}
|
||||
});
|
||||
@ -610,13 +610,13 @@ public class EntryActivity extends AbsOTOActivity {
|
||||
*/
|
||||
private void getBaseUserInfo() {
|
||||
OTONetManager.getInstance(mContext)
|
||||
.getBaseInfos(true,new HttpCallback<UserBean>() {
|
||||
.getBaseInfos(true, new HttpCallback<UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean data) {
|
||||
UserManager.saveUserBean(mContext,data);
|
||||
UserManager.saveUserBean(mContext, data);
|
||||
if (mFirstLogin) {
|
||||
if (CommonAppConfig.IS_GOOGLE_PLAY) {
|
||||
RouteManager.forwardMainActivity();
|
||||
RouteManager.forwardActivity(RouteManager.ACTIVITY_BIND_OPEN_INSTALL);
|
||||
} else {
|
||||
OTONetManager.getInstance(mContext)
|
||||
.getRandJoinAnchor(new HttpCallback<JoinAnchorBean>() {
|
||||
|
@ -20,6 +20,7 @@ import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@ -421,6 +422,7 @@ public class RegisterActivity extends AbsActivity {
|
||||
yqm_view.setVisibility(View.GONE);
|
||||
//推广的码
|
||||
mPromoCode = data.getString("admin_id") + "";
|
||||
|
||||
//用户的码
|
||||
UserID = data.getString("user_id") + "";
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.ConversationUtils;
|
||||
import com.shayu.onetoone.utils.HtmlUrlUtils;
|
||||
import com.yunbao.common.activity.MyWalletActivity;
|
||||
import com.shayu.onetoone.activity.OTOWalletActivity;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
@ -266,13 +266,13 @@ public class CallAudioActivity extends AbsOTOActivity implements View.OnClickLis
|
||||
callMsg.setTag(true);
|
||||
}
|
||||
}
|
||||
|
||||
TipsDialog tipsWindowDialog = null;
|
||||
private void showWindow(boolean toChatView, boolean toPay) {
|
||||
if(!CallClientManager.getManager().isCalling()){
|
||||
return;
|
||||
}
|
||||
if (!PermissionUtils.checkPermission(this)) {
|
||||
new TipsDialog(mContext)
|
||||
tipsWindowDialog = new TipsDialog(mContext)
|
||||
.setTitle(WordUtil.getNewString(R.string.permission_hint))
|
||||
.setApplyText(WordUtil.getNewString(R.string.permission_setting))
|
||||
.setCancelText(WordUtil.getNewString(R.string.permission_cancel))
|
||||
@ -288,10 +288,16 @@ public class CallAudioActivity extends AbsOTOActivity implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
tipsWindowDialog=null;
|
||||
}
|
||||
})
|
||||
.showDialog();
|
||||
|
||||
@Override
|
||||
public void onCancel(Dialog dialog) {
|
||||
super.onCancel(dialog);
|
||||
tipsWindowDialog=null;
|
||||
}
|
||||
});
|
||||
tipsWindowDialog.showDialog();
|
||||
return;
|
||||
}
|
||||
ImageView icon = new ImageView(mContext);
|
||||
@ -355,7 +361,7 @@ public class CallAudioActivity extends AbsOTOActivity implements View.OnClickLis
|
||||
if (toPay) {
|
||||
Log.e(TAG, "调起支付界面");
|
||||
// RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext,false,HtmlUrlUtils.URL_PAY_COIN));
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||
mContext.startActivity(new Intent(mContext, OTOWalletActivity.class).putExtra("p", 1));
|
||||
}
|
||||
if (toChatView) {
|
||||
ConversationUtils.startConversation(mContext, targetId);
|
||||
@ -445,6 +451,10 @@ public class CallAudioActivity extends AbsOTOActivity implements View.OnClickLis
|
||||
CallClientManager.getManager().endCall();
|
||||
return;
|
||||
}
|
||||
if (tipsWindowDialog != null) {
|
||||
tipsWindowDialog.dismiss();
|
||||
tipsWindowDialog = null;
|
||||
}
|
||||
tipsDialog = new TipsTextDialog(mContext)
|
||||
.setTips(String.format(WordUtil.getNewString(R.string.call_tips), msg))
|
||||
.setOnItemClickListener(new OnItemClickListener<String>() {
|
||||
|
@ -45,7 +45,7 @@ import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.ConversationUtils;
|
||||
import com.shayu.onetoone.utils.HtmlUrlUtils;
|
||||
import com.yunbao.common.activity.MyWalletActivity;
|
||||
import com.shayu.onetoone.activity.OTOWalletActivity;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
@ -363,12 +363,14 @@ public class CallVideoActivity extends AbsOTOActivity {
|
||||
micSwitch.setImageResource(!enabled ? R.mipmap.ic_call_audio_select : R.mipmap.ic_call_audio);
|
||||
}
|
||||
|
||||
TipsDialog tipsWindowDialog = null;
|
||||
|
||||
private void showWindow(boolean toChatView, boolean toPay) {
|
||||
if(!CallClientManager.getManager().isCalling()){
|
||||
if (!CallClientManager.getManager().isCalling()) {
|
||||
return;
|
||||
}
|
||||
if (!PermissionUtils.checkPermission(this)) {
|
||||
new TipsDialog(mContext)
|
||||
tipsWindowDialog = new TipsDialog(mContext)
|
||||
.setTitle(WordUtil.getNewString(R.string.permission_hint))
|
||||
.setApplyText(WordUtil.getNewString(R.string.permission_setting))
|
||||
.setCancelText(WordUtil.getNewString(R.string.permission_cancel))
|
||||
@ -384,10 +386,16 @@ public class CallVideoActivity extends AbsOTOActivity {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
tipsWindowDialog=null;
|
||||
}
|
||||
})
|
||||
.showDialog();
|
||||
|
||||
@Override
|
||||
public void onCancel(Dialog dialog) {
|
||||
super.onCancel(dialog);
|
||||
tipsWindowDialog=null;
|
||||
}
|
||||
});
|
||||
tipsWindowDialog.showDialog();
|
||||
return;
|
||||
}
|
||||
myView.removeAllViews();
|
||||
@ -460,7 +468,7 @@ public class CallVideoActivity extends AbsOTOActivity {
|
||||
}).show();
|
||||
if (toPay) {
|
||||
// RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext, false, HtmlUrlUtils.URL_PAY_COIN));
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||
mContext.startActivity(new Intent(mContext, OTOWalletActivity.class).putExtra("p", 1));
|
||||
}
|
||||
if (toChatView) {
|
||||
ConversationUtils.startConversation(mContext, targetId);
|
||||
@ -641,6 +649,10 @@ public class CallVideoActivity extends AbsOTOActivity {
|
||||
CallClientManager.getManager().endCall();
|
||||
return;
|
||||
}
|
||||
if (tipsWindowDialog != null) {
|
||||
tipsWindowDialog.dismiss();
|
||||
tipsWindowDialog = null;
|
||||
}
|
||||
tipsDialog = new TipsTextDialog(mContext)
|
||||
.setTips(String.format(WordUtil.getNewString(R.string.call_tips), msg))
|
||||
.setOnItemClickListener(new OnItemClickListener<String>() {
|
||||
@ -707,7 +719,7 @@ public class CallVideoActivity extends AbsOTOActivity {
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if(!CallClientManager.getManager().isCalling()) {
|
||||
if (!CallClientManager.getManager().isCalling()) {
|
||||
EasyFloat.dismiss("call");
|
||||
}
|
||||
CallClientManager.getManager().removeOnVoIPCallListener(CallVideoActivity.class);
|
||||
|
@ -29,6 +29,7 @@ import com.yunbao.common.utils.ProcessImageUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@ -96,8 +97,11 @@ public class MsgMoreGreetConfigActivity extends AbsOTOActivity {
|
||||
});
|
||||
cancel.setOnClickListener(v -> clearGreet());
|
||||
recyclerView.setOnClickListener(v -> adapter.notifyDataSetChanged());
|
||||
findViewById(R.id.upload_img).setOnClickListener(v -> {
|
||||
imageUtil.getImageByAlumb(false);
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.upload_img), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
imageUtil.getImageByAlumb(true);
|
||||
}
|
||||
});
|
||||
initData();
|
||||
imageUtil.setImageResultCallback(new ImageResultCallback() {
|
||||
@ -202,7 +206,7 @@ public class MsgMoreGreetConfigActivity extends AbsOTOActivity {
|
||||
public void onSuccess(List<GreetBean> data) {
|
||||
List<GreetBean> list = new ArrayList<>();
|
||||
for (GreetBean item : data) {
|
||||
if (item.getType() == 0) {
|
||||
if (item.getType() == 1) {
|
||||
list.add(item);
|
||||
} else if (item.getType() == 2) {
|
||||
ImgLoader.display(mContext, item.getContent(), (ImageView) findViewById(R.id.imageView5));
|
||||
|
@ -0,0 +1,236 @@
|
||||
package com.shayu.onetoone.activity.pd;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.lzy.okgo.model.Response;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.JsonBean;
|
||||
import com.yunbao.common.http.LiveHttpConsts;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.interfaces.KeyBoardHeightChangeListener;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.KeyBoardHeightUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/12/15.
|
||||
* 直播间举报 短视频举报功能共用此页面
|
||||
*/
|
||||
@Route(path = RouteManager.PATH_LIVEREPORT)
|
||||
public class DynamicReportActivity extends AbsActivity implements DynamicReportAdapter.ActionListener, KeyBoardHeightChangeListener {
|
||||
|
||||
public static void forward(Context context, String toUid) {
|
||||
Intent intent = new Intent(context, DynamicReportActivity.class);
|
||||
intent.putExtra(Constants.TO_UID, toUid);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void forward2(Context context, String VideoId) {
|
||||
Intent intent = new Intent(context, DynamicReportActivity.class);
|
||||
intent.putExtra(Constants.VIDEO_ID, VideoId);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void forward3(Context context, String dynamic_id, int intoIndex, String community_type, String comment_id) {
|
||||
Intent intent = new Intent(context, DynamicReportActivity.class);
|
||||
intent.putExtra(Constants.TO_UID, dynamic_id);
|
||||
intent.putExtra(Constants.INTOINDEX, intoIndex);
|
||||
intent.putExtra("community_type", community_type);
|
||||
intent.putExtra("comment_id", comment_id);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
private String community_type;
|
||||
private String comment_id;
|
||||
private String mToUid;
|
||||
private String mVideoId;
|
||||
private int mIntoIndex;
|
||||
private RecyclerView mRecyclerView;
|
||||
private DynamicReportAdapter mAdapter;
|
||||
private KeyBoardHeightUtil mKeyBoardHeightUtil;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_video_report;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void main() {
|
||||
setTitle(mContext.getString(R.string.report));
|
||||
mToUid = getIntent().getStringExtra(Constants.TO_UID);
|
||||
mVideoId = getIntent().getStringExtra(Constants.VIDEO_ID);
|
||||
mIntoIndex = getIntent().getIntExtra(Constants.INTOINDEX, 0);
|
||||
community_type = getIntent().getStringExtra("community_type");
|
||||
comment_id = getIntent().getStringExtra("comment_id");
|
||||
mRecyclerView = findViewById(R.id.recyclerView);
|
||||
mRecyclerView.setHasFixedSize(true);
|
||||
mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||
mKeyBoardHeightUtil = new KeyBoardHeightUtil(mContext, findViewById(android.R.id.content), this);
|
||||
LiveHttpUtil.getLiveReportList(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
List<DynamicReportBean> list = JSON.parseArray(Arrays.toString(info), DynamicReportBean.class);
|
||||
mAdapter = new DynamicReportAdapter(mContext, list);
|
||||
mAdapter.setActionListener(DynamicReportActivity.this);
|
||||
if (mRecyclerView != null) {
|
||||
mRecyclerView.setAdapter(mAdapter);
|
||||
}
|
||||
if (mKeyBoardHeightUtil != null) {
|
||||
mKeyBoardHeightUtil.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReportClick(DynamicReportBean bean, String text) {
|
||||
// if (TextUtils.isEmpty(mToUid)) {
|
||||
// return;
|
||||
// }
|
||||
// if (bean == null) {
|
||||
// ToastUtil.show(R.string.video_report_tip_3);
|
||||
// return;
|
||||
// }
|
||||
// String content = bean.getName();
|
||||
// if (!TextUtils.isEmpty(text)) {
|
||||
// content += " " + text;
|
||||
// }
|
||||
// LiveHttpUtil.setReport(mToUid, content, mReportCallback);
|
||||
}
|
||||
|
||||
Dialog loading = null;
|
||||
|
||||
@Override
|
||||
public void onReportClick(DynamicReportBean bean, String text, File file1, File file2, File file3) {
|
||||
if (TextUtils.isEmpty(mToUid)) {
|
||||
mToUid = "";
|
||||
}
|
||||
if (bean == null) {
|
||||
ToastUtil.show(R.string.video_report_tip_3);
|
||||
return;
|
||||
}
|
||||
if (loading != null) {
|
||||
loading.dismiss();
|
||||
loading = null;
|
||||
}
|
||||
String content = "";
|
||||
try {
|
||||
content = bean.getName();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (!TextUtils.isEmpty(text)) {
|
||||
content += " " + text;
|
||||
} else {
|
||||
text = " ";
|
||||
}
|
||||
loading = DialogUitl.loadingDialog(mContext, "loading...");
|
||||
loading.show();
|
||||
if (mIntoIndex == 0) {
|
||||
LiveHttpUtil.setReport(mToUid, content, file1, file2, file3, mVideoId, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
loading.dismiss();
|
||||
loading = null;
|
||||
if (code == 0) {
|
||||
ToastUtil.show(R.string.video_report_tip_4);
|
||||
onBackPressed();
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Response<JsonBean> response) {
|
||||
super.onError(response);
|
||||
loading.dismiss();
|
||||
loading = null;
|
||||
System.err.println("举报异常:" + response.message());
|
||||
}
|
||||
});
|
||||
} else {
|
||||
CommonHttpUtil.setCommunityReport(community_type, comment_id, mToUid, text, file1, file2, file3, bean.getId(), new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
loading.dismiss();
|
||||
loading = null;
|
||||
if (code == 0) {
|
||||
ToastUtil.show(R.string.video_report_tip_4);
|
||||
onBackPressed();
|
||||
} else {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Response<JsonBean> response) {
|
||||
super.onError(response);
|
||||
loading.dismiss();
|
||||
loading = null;
|
||||
System.err.println("举报异常:" + response.message());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onKeyBoardHeightChanged(int visibleHeight, int keyboardHeight) {
|
||||
if (mRecyclerView != null) {
|
||||
mRecyclerView.setTranslationY(-keyboardHeight);
|
||||
}
|
||||
if (keyboardHeight > 0 && mAdapter != null) {
|
||||
mRecyclerView.smoothScrollToPosition(mAdapter.getItemCount() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSoftInputShowed() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private void release() {
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.GET_LIVE_REPORT_LIST);
|
||||
LiveHttpUtil.cancel(LiveHttpConsts.SET_REPORT);
|
||||
if (mKeyBoardHeightUtil != null) {
|
||||
mKeyBoardHeightUtil.release();
|
||||
}
|
||||
mKeyBoardHeightUtil = null;
|
||||
if (mAdapter != null) {
|
||||
mAdapter.setActionListener(null);
|
||||
}
|
||||
mAdapter = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
release();
|
||||
super.onBackPressed();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
release();
|
||||
super.onDestroy();
|
||||
}
|
||||
}
|
@ -0,0 +1,297 @@
|
||||
package com.shayu.onetoone.activity.pd;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.shayu.onetoone.R;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.ProcessImageUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/12/15.
|
||||
* 增加功能:可以上传3张图片
|
||||
*/
|
||||
|
||||
public class DynamicReportAdapter extends RecyclerView.Adapter {
|
||||
|
||||
private static final int HEAD = -1;
|
||||
private static final int FOOT = -2;
|
||||
private static final int NORMAL = 0;
|
||||
private static final int NORMAL_LAST = 1;
|
||||
|
||||
private List<DynamicReportBean> mList;
|
||||
private LayoutInflater mInflater;
|
||||
private Drawable mCheckedDrawable;
|
||||
private Drawable mUnCheckedDrawable;
|
||||
private int mCheckedPosition;
|
||||
private View.OnClickListener mOnClickListener;
|
||||
private View.OnClickListener mReportListener;
|
||||
private FootVh mFootVh;
|
||||
private ActionListener mActionListener;
|
||||
private DynamicReportBean mCurVideoReportBean;
|
||||
private ProcessImageUtil mImageUtil;
|
||||
private Context mContext;
|
||||
private ImageView mIvPh1, mIvPh2, mIvPh3;
|
||||
private int photoIndex = 0;
|
||||
private File mFile1, mFile2, mFile3;
|
||||
|
||||
public DynamicReportAdapter(Context context, List<DynamicReportBean> list) {
|
||||
mContext = context;
|
||||
mList = list;
|
||||
mInflater = LayoutInflater.from(context);
|
||||
mCheckedDrawable = ContextCompat.getDrawable(context, R.mipmap.icon_cash_radio_1);
|
||||
mUnCheckedDrawable = ContextCompat.getDrawable(context, R.mipmap.icon_cash_radio_0);
|
||||
mCheckedPosition = -1;
|
||||
imageUtilInit();
|
||||
mOnClickListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Object tag = v.getTag();
|
||||
if (tag == null) {
|
||||
return;
|
||||
}
|
||||
int position = (int) tag;
|
||||
DynamicReportBean bean = mList.get(position - 1);
|
||||
if (mCheckedPosition == position) {
|
||||
bean.setChecked(false);
|
||||
notifyItemChanged(position, Constants.PAYLOAD);
|
||||
mCheckedPosition = -1;
|
||||
mCurVideoReportBean = null;
|
||||
} else {
|
||||
if (mCheckedPosition >= 0) {
|
||||
mList.get(mCheckedPosition - 1).setChecked(false);
|
||||
notifyItemChanged(mCheckedPosition, Constants.PAYLOAD);
|
||||
}
|
||||
bean.setChecked(true);
|
||||
notifyItemChanged(position, Constants.PAYLOAD);
|
||||
mCheckedPosition = position;
|
||||
mCurVideoReportBean = bean;
|
||||
}
|
||||
}
|
||||
};
|
||||
mReportListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.btn_report) {
|
||||
if (mFootVh != null) {
|
||||
mFootVh.submit();
|
||||
}
|
||||
} else if (v.getId() == R.id.photo1) {
|
||||
photoIndex = 0;
|
||||
if (mFootVh != null) {
|
||||
mFootVh.showAddPhoto();
|
||||
}
|
||||
} else if (v.getId() == R.id.photo2) {
|
||||
photoIndex = 1;
|
||||
if (mFootVh != null) {
|
||||
mFootVh.showAddPhoto();
|
||||
}
|
||||
} else if (v.getId() == R.id.photo3) {
|
||||
photoIndex = 2;
|
||||
if (mFootVh != null) {
|
||||
mFootVh.showAddPhoto();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private void imageUtilInit() {
|
||||
mImageUtil = new ProcessImageUtil((DynamicReportActivity) mContext, mContext.getPackageName() + ".fileprovider");
|
||||
mImageUtil.setImageResultCallback(new ImageResultCallback() {
|
||||
@Override
|
||||
public void beforeCamera() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(File file) {
|
||||
if (file != null) {
|
||||
if (photoIndex == 0) {
|
||||
mFile1 = file;
|
||||
ImgLoader.display(mContext, file, mIvPh1);
|
||||
} else if (photoIndex == 1) {
|
||||
mFile2 = file;
|
||||
ImgLoader.display(mContext, file, mIvPh2);
|
||||
} else if (photoIndex == 2) {
|
||||
mFile3 = file;
|
||||
ImgLoader.display(mContext, file, mIvPh3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
if (position == 0) {
|
||||
return HEAD;
|
||||
} else if (position == mList.size() + 1) {
|
||||
return FOOT;
|
||||
} else {
|
||||
if (position == mList.size()) {
|
||||
return NORMAL_LAST;
|
||||
}
|
||||
return NORMAL;
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
if (viewType == HEAD) {
|
||||
return new HeadVh(mInflater.inflate(R.layout.item_live_report_head, parent, false));
|
||||
} else if (viewType == FOOT) {
|
||||
if (mFootVh == null) {
|
||||
mFootVh = new FootVh(mInflater.inflate(R.layout.item_live_report_foot, parent, false));
|
||||
}
|
||||
return mFootVh;
|
||||
} else {
|
||||
if (viewType == NORMAL_LAST) {
|
||||
return new Vh(mInflater.inflate(R.layout.item_live_report_2, parent, false));
|
||||
}
|
||||
return new Vh(mInflater.inflate(R.layout.item_live_report, parent, false));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vh, int position) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vh, int position, @NonNull List payloads) {
|
||||
Object payload = payloads.size() > 0 ? payloads.get(0) : null;
|
||||
if (vh instanceof Vh) {
|
||||
((Vh) vh).setData(mList.get(position - 1), position, payload);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mList.size() + 2;
|
||||
}
|
||||
|
||||
class HeadVh extends RecyclerView.ViewHolder {
|
||||
|
||||
public HeadVh(View itemView) {
|
||||
super(itemView);
|
||||
}
|
||||
}
|
||||
|
||||
class FootVh extends RecyclerView.ViewHolder {
|
||||
|
||||
EditText mEditText;
|
||||
|
||||
public FootVh(View itemView) {
|
||||
super(itemView);
|
||||
mEditText = itemView.findViewById(R.id.edit);
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(itemView.findViewById(R.id.btn_report), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
mReportListener.onClick(itemView.findViewById(R.id.btn_report));
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(itemView.findViewById(R.id.photo1), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
mReportListener.onClick(itemView.findViewById(R.id.photo1));
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(itemView.findViewById(R.id.photo2), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
mReportListener.onClick(itemView.findViewById(R.id.photo2));
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(itemView.findViewById(R.id.photo3), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
mReportListener.onClick(itemView.findViewById(R.id.photo3));
|
||||
}
|
||||
});
|
||||
mIvPh1 = itemView.findViewById(R.id.ivPh1);
|
||||
mIvPh2 = itemView.findViewById(R.id.ivPh2);
|
||||
mIvPh3 = itemView.findViewById(R.id.ivPh3);
|
||||
}
|
||||
|
||||
void submit() {
|
||||
String text = mEditText.getText().toString().trim();
|
||||
if (mActionListener != null) {
|
||||
// mActionListener.onReportClick(mCurVideoReportBean, text);
|
||||
mActionListener.onReportClick(mCurVideoReportBean, text, mFile1, mFile2, mFile3);
|
||||
}
|
||||
}
|
||||
|
||||
void showAddPhoto() {
|
||||
DialogUitl.showStringArrayDialog(mContext, new Integer[]{
|
||||
R.string.camera, R.string.alumb}, new DialogUitl.StringArrayDialogCallback() {
|
||||
@Override
|
||||
public void onItemClick(String text, int tag) {
|
||||
if (tag == R.string.camera) {
|
||||
mImageUtil.getImageByCamera();
|
||||
} else {
|
||||
mImageUtil.getImageByAlumb();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
class Vh extends RecyclerView.ViewHolder {
|
||||
|
||||
ImageView mImg;
|
||||
TextView mText;
|
||||
|
||||
public Vh(View itemView) {
|
||||
super(itemView);
|
||||
mImg = itemView.findViewById(R.id.img);
|
||||
mText = itemView.findViewById(R.id.text);
|
||||
itemView.setOnClickListener(mOnClickListener);
|
||||
}
|
||||
|
||||
void setData(DynamicReportBean bean, int position, Object payload) {
|
||||
if (payload == null) {
|
||||
itemView.setTag(position);
|
||||
mText.setText(bean.getName());
|
||||
}
|
||||
mImg.setImageDrawable(bean.isChecked() ? mCheckedDrawable : mUnCheckedDrawable);
|
||||
}
|
||||
}
|
||||
|
||||
public interface ActionListener {
|
||||
void onReportClick(DynamicReportBean bean, String text);
|
||||
|
||||
void onReportClick(DynamicReportBean bean, String text, File file1, File file2, File file3);
|
||||
}
|
||||
|
||||
public void setActionListener(ActionListener actionListener) {
|
||||
mActionListener = actionListener;
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.shayu.onetoone.activity.pd;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/12/15.
|
||||
*/
|
||||
|
||||
public class DynamicReportBean {
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private boolean checked;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public boolean isChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
public void setChecked(boolean checked) {
|
||||
this.checked = checked;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VideoReportBean{" +
|
||||
"id='" + id + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -114,19 +114,19 @@ public class SettingActivity extends AbsActivity {
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.qa), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getQAUrl());
|
||||
RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getQAUrl(), true);
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.user_agreement), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
RouteManager.forwardWebViewActivity(null,HtmlUrlUtils.getUserAgreement());
|
||||
RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getUserAgreement());
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.server_agreement), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
RouteManager.forwardWebViewActivity(null,HtmlUrlUtils.getServerAgreement());
|
||||
RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getServerAgreement());
|
||||
}
|
||||
});
|
||||
intiData();
|
||||
@ -134,7 +134,7 @@ public class SettingActivity extends AbsActivity {
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private void intiData() {
|
||||
versionCode.setText(VersionUtil.getVersion()+"("+VersionUtil.getVersionCode()+")");
|
||||
versionCode.setText(VersionUtil.getVersion() + "(" + VersionUtil.getVersionCode() + ")");
|
||||
cacheSize.setText(GlideCatchUtil.getInstance().getCacheSize());
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@ import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.UserBean;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
@ -67,41 +68,21 @@ public class EditNameActivity extends AbsActivity {
|
||||
return;
|
||||
}
|
||||
|
||||
OTONetManager.getInstance(EditNameActivity.this).setFiled("user_nicename", content, new com.yunbao.common.http.base.HttpCallback<HttpCallbackModel>() {
|
||||
OTONetManager.getInstance(EditNameActivity.this).setFiled("user_nicename", content, new HttpCallback<HttpCallbackModel>() {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
ToastUtil.show(data.getMsg());
|
||||
if (data.getCode() == 0) {
|
||||
UserBean u = CommonAppConfig.getInstance().getUserBean();
|
||||
if (u != null) {
|
||||
u.setUserNiceName(content);
|
||||
V2TIMUserFullInfo v2TIMUserFullInfo = new V2TIMUserFullInfo();
|
||||
v2TIMUserFullInfo.setNickname(content);
|
||||
V2TIMManager.getInstance().setSelfInfo(v2TIMUserFullInfo, new V2TIMCallback() {
|
||||
@Override
|
||||
public void onError(int code, String desc) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
}
|
||||
});
|
||||
}
|
||||
Intent intent = getIntent();
|
||||
intent.putExtra(Constants.NICK_NAME, content);
|
||||
setResult(RESULT_OK, intent);
|
||||
finish();
|
||||
} else if (data.getCode() == 2001) {
|
||||
//余额不足,跳转支付页面
|
||||
RouteUtil.forwardMyCoin(mContext);
|
||||
ToastUtil.show(data.getMsg());
|
||||
} else {
|
||||
ToastUtil.show(data.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.event.UpdateFieldEvent;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.interfaces.ActivityResultCallback;
|
||||
import com.yunbao.common.interfaces.ImageResultCallback;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
@ -110,7 +111,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
}
|
||||
});
|
||||
userInfo = UserManager.getUserBean();
|
||||
OTONetManager.getInstance(mContext).getBaseInfos(true, new com.yunbao.common.http.base.HttpCallback<UserBean>() {
|
||||
OTONetManager.getInstance(mContext).getBaseInfos(false, new com.yunbao.common.http.base.HttpCallback<UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean data) {
|
||||
showData(data);
|
||||
@ -221,7 +222,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
|
||||
} else if (i == R.id.btn_sex) {
|
||||
// forwardSex();
|
||||
/*new XPopup.Builder(mContext).asCustom(new UpdateSexPopup(mContext, userModel.getSex(), new UpdateSexPopup.UpdateSexCallBack() {
|
||||
new XPopup.Builder(mContext).asCustom(new OTOUpdateSexPopup(mContext, (int) userInfo.getUser().getSex(), new OTOUpdateSexPopup.UpdateSexCallBack() {
|
||||
@Override
|
||||
public void onSex(int sex) {
|
||||
userSex = sex;
|
||||
@ -230,19 +231,32 @@ public class EditProfileActivity extends AbsActivity {
|
||||
@Override
|
||||
public void onSuccess(HttpCallbackModel data) {
|
||||
if (data.getCode() == 0) {
|
||||
ToastUtil.show("修改成功");
|
||||
UserManager.updateUserBean(mContext, new HttpCallback<UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean data) {
|
||||
userInfo = data;
|
||||
showData(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
ToastUtil.show(data.getMsg());
|
||||
userModel.setSex(sex);
|
||||
showData(userModel);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
})).show();*/
|
||||
})).show();
|
||||
} else if (i == R.id.btn_city) {
|
||||
CountryPicker.newInstance(null, new OnPick() {
|
||||
@Override
|
||||
@ -319,6 +333,8 @@ public class EditProfileActivity extends AbsActivity {
|
||||
}
|
||||
}
|
||||
});
|
||||
/* String url=CommonAppConfig.HOST + "/h5/table/Modify-information.html" + "?token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid();
|
||||
RouteManager.forwardWebViewActivity("NoTitle",url);*/
|
||||
}
|
||||
|
||||
private void showTaskDialog() {
|
||||
@ -425,7 +441,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
|
||||
Calendar startCalendar = Calendar.getInstance();
|
||||
Calendar endCalendar = Calendar.getInstance();
|
||||
startCalendar.set(1990, 1, 1);
|
||||
startCalendar.set(1900, 0, 1);
|
||||
endCalendar.setTime(new Date());
|
||||
|
||||
TimePickerView pvTime = new TimePickerBuilder(EditProfileActivity.this, new OnTimeSelectListener() {
|
||||
@ -518,7 +534,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
} else if (userInfo.getUser().getSex() == 2) {
|
||||
mSex.setText(R.string.sex_female);
|
||||
}
|
||||
tag.setText(userInfo.getInfo().getCn_label());
|
||||
tag.setText(userInfo.getInfo().toCnLabelString());
|
||||
mCity.setText(userInfo.getInfo().getArea());
|
||||
if (!StringUtil.isEmpty(userInfo.getUser().getMobile())) {
|
||||
mobile = userInfo.getUser().getMobile();
|
||||
|
@ -0,0 +1,116 @@
|
||||
package com.shayu.onetoone.activity.user;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.core.BottomPopupView;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
public class OTOUpdateSexPopup extends BottomPopupView {
|
||||
private int sex;
|
||||
private LinearLayout linearMan, linearGirl;
|
||||
private ImageView imageMan, imageGirl;
|
||||
private TextView textMan, textGirl, tips;
|
||||
Button submit;
|
||||
int selectSex;
|
||||
private UpdateSexCallBack callBack;
|
||||
|
||||
public OTOUpdateSexPopup(@NonNull Context context, int sex, UpdateSexCallBack callBack) {
|
||||
super(context);
|
||||
this.sex = sex;
|
||||
selectSex = sex;
|
||||
this.callBack = callBack;
|
||||
}
|
||||
|
||||
// 返回自定义弹窗的布局
|
||||
@Override
|
||||
protected int getImplLayoutId() {
|
||||
return R.layout.view_oto_update_sex_popup;
|
||||
}
|
||||
|
||||
// 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
initView();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
linearMan = findViewById(R.id.linear_man);
|
||||
imageMan = findViewById(R.id.image_man);
|
||||
textMan = findViewById(R.id.text_man);
|
||||
linearGirl = findViewById(R.id.linear_girl);
|
||||
imageGirl = findViewById(R.id.image_girl);
|
||||
textGirl = findViewById(R.id.text_girl);
|
||||
tips = findViewById(R.id.tips);
|
||||
submit = findViewById(R.id.submit);
|
||||
if (sex == 0) {
|
||||
ImgLoader.display(getContext(), R.mipmap.icon_male_default, imageMan);
|
||||
ImgLoader.display(getContext(), R.mipmap.icon_female_default, imageGirl);
|
||||
textMan.setTextColor(Color.parseColor("#999999"));
|
||||
textGirl.setTextColor(Color.parseColor("#999999"));
|
||||
} else if (sex == 1) {
|
||||
setSexMan();
|
||||
} else if (sex == 2) {
|
||||
setSexWoman();
|
||||
}
|
||||
if(StringUtil.isEmpty(UserManager.getUserBean().getInfo().getNextDay())){
|
||||
tips.setText(String.format(WordUtil.getNewString(R.string.dialog_set_sex_tips1),UserManager.getUserBean().getInfo().getDay()));
|
||||
submit.setEnabled(true);
|
||||
}else{
|
||||
tips.setText(UserManager.getUserBean().getInfo().getNextDay());
|
||||
submit.setEnabled(false);
|
||||
}
|
||||
ViewClicksAntiShake.clicksAntiShake(linearMan, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
selectSex = 1;
|
||||
setSexMan();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(linearGirl, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
selectSex = 2;
|
||||
setSexWoman();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(submit, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
if(callBack!=null){
|
||||
callBack.onSex(selectSex);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void setSexMan(){
|
||||
ImgLoader.display(getContext(), R.mipmap.icon_male_highlighted, imageMan);
|
||||
ImgLoader.display(getContext(), R.mipmap.icon_female_default, imageGirl);
|
||||
textMan.setTextColor(Color.parseColor("#333333"));
|
||||
textGirl.setTextColor(Color.parseColor("#999999"));
|
||||
}
|
||||
private void setSexWoman(){
|
||||
ImgLoader.display(getContext(), R.mipmap.icon_male_default, imageMan);
|
||||
ImgLoader.display(getContext(), R.mipmap.icon_female_highlight, imageGirl);
|
||||
textMan.setTextColor(Color.parseColor("#999999"));
|
||||
textGirl.setTextColor(Color.parseColor("#333333"));
|
||||
}
|
||||
public interface UpdateSexCallBack {
|
||||
void onSex(int sex);
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.shayu.onetoone.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.dialog.FullImageViewDialog;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ChatAlbumRecyclerViewAdapter extends RecyclerView.Adapter<ChatAlbumRecyclerViewAdapter.ViewHolder> {
|
||||
private Context mContext;
|
||||
List<String> userAlbum = new ArrayList<>();
|
||||
|
||||
public ChatAlbumRecyclerViewAdapter(Context mContext) {
|
||||
this.mContext = mContext;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new ViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_chat_album, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
holder.setData(userAlbum.get(position), position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return userAlbum.size();
|
||||
}
|
||||
|
||||
public void setData(List<String> userAlbum) {
|
||||
this.userAlbum = userAlbum;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder {
|
||||
ImageView imageView;
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
imageView = itemView.findViewById(R.id.imageView);
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
new FullImageViewDialog(mContext)
|
||||
.setImgUrl((String)imageView.getTag())
|
||||
.showDialog();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setData(String imgUrl, int position) {
|
||||
imageView.setTag(imgUrl);
|
||||
ImgLoader.display(mContext, imgUrl, imageView);
|
||||
}
|
||||
}
|
||||
}
|
@ -77,6 +77,7 @@ public class HomeRankListAdapter extends RecyclerView.Adapter<HomeRankListAdapte
|
||||
private ImageView ic_level;
|
||||
private TextView money;
|
||||
private Button follow;
|
||||
private View linearLayout3;
|
||||
|
||||
public ViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
@ -88,6 +89,7 @@ public class HomeRankListAdapter extends RecyclerView.Adapter<HomeRankListAdapte
|
||||
ic_level = itemView.findViewById(R.id.ic_level);
|
||||
money = itemView.findViewById(R.id.money);
|
||||
follow = itemView.findViewById(R.id.follow);
|
||||
linearLayout3 = itemView.findViewById(R.id.linearLayout3);
|
||||
}
|
||||
|
||||
private void setData(HomeRankBean bean, int position) {
|
||||
@ -106,9 +108,13 @@ public class HomeRankListAdapter extends RecyclerView.Adapter<HomeRankListAdapte
|
||||
follow.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (type == HomeRankFragment.TYPE_CHARM) {
|
||||
level.setText("Lv." + bean.getCharmLevel());
|
||||
level.setText("" + bean.getCharmLevel());
|
||||
ic_level.setImageResource(R.mipmap.icon_yan);
|
||||
linearLayout3.setBackgroundResource(R.mipmap.icon_yan_bg);
|
||||
} else {
|
||||
level.setText("Lv." + bean.getWealthLevel());
|
||||
level.setText("" + bean.getWealthLevel());
|
||||
ic_level.setImageResource(R.mipmap.icon_wealth);
|
||||
linearLayout3.setBackgroundResource(R.mipmap.wealth_bg);
|
||||
}
|
||||
ImgLoader.display(mContext, bean.getAvatar(), avatar);
|
||||
if(bean.getUid().equals(UserManager.getUserBean().getUser().getId()+"")){
|
||||
|
@ -110,7 +110,7 @@ public class HomeRecommendListAdapter extends RecyclerView.Adapter<HomeRecommend
|
||||
} else {
|
||||
sex.setImageResource(R.mipmap.ic_message_tab_woman);
|
||||
}
|
||||
if (itemBean.getName_auth() == 2) {
|
||||
if (itemBean.isNameAuth()) {
|
||||
auth.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
auth.setVisibility(View.GONE);
|
||||
@ -134,48 +134,20 @@ public class HomeRecommendListAdapter extends RecyclerView.Adapter<HomeRecommend
|
||||
ConversationUtils.startConversation(mContext, itemBean.getId() + "");
|
||||
return;
|
||||
}
|
||||
SendMessageManager.chatUp(itemBean.getId() + "", new OnSendMessageListener() {
|
||||
@Override
|
||||
public void onSuccess(String token, SendConsumeBean bean) {
|
||||
super.onSuccess(token, bean);
|
||||
System.out.println("搭讪回调:" + JSONObject.toJSONString(bean));
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("token", token);
|
||||
bundle.putInt("type", ChatActivity.CALL_CHAT_TYPE_CHAT_UP);
|
||||
bundle.putString("data", JSONObject.toJSONString(bean));
|
||||
ConversationUtils.startConversation(mContext, itemBean.getId() + "", bundle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int status, String msg, SendConsumeBean bean) {
|
||||
super.onError(status, msg, bean);
|
||||
if (status == OnSendMessageListener.STATUS_NOT_PRICE) {
|
||||
new TipsDialog(mContext)
|
||||
.setTitle(WordUtil.getNewString(R.string.money_title))
|
||||
.setApplyText(WordUtil.getNewString(R.string.money_apply))
|
||||
.setOnDialogClickListener(new OnDialogClickListener() {
|
||||
@Override
|
||||
public void onApply(Dialog dialog) {
|
||||
super.onApply(dialog);
|
||||
}
|
||||
})
|
||||
.showDialog();
|
||||
} else {
|
||||
new TipsDialog(mContext)
|
||||
.setTitle(msg)
|
||||
.showDialog();
|
||||
}
|
||||
}
|
||||
});
|
||||
ConversationUtils.hitOn(mContext,itemBean.getId()+"",null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void addTag(List<String> tags) {
|
||||
int index=0;
|
||||
for (String tag : tags) {
|
||||
if (StringUtil.isEmpty(tag)) {
|
||||
continue;
|
||||
}
|
||||
if(index++==2){
|
||||
return;
|
||||
}
|
||||
TextView tagView = (TextView) LayoutInflater.from(mContext).inflate(R.layout.item_home_recommend_tag, (ViewGroup) itemView.getRootView(), false);
|
||||
tagView.setText(tag);
|
||||
tagLayout.addView(tagView);
|
||||
|
@ -6,9 +6,11 @@ import android.view.ViewGroup;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.bean.SystemMessageBean;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.shayu.onetoone.view.SystemNoticeUiMessage;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
@ -44,6 +46,12 @@ public class MessageInteractionConversationListAdapter extends MessageListAdapte
|
||||
holder.setText(R.id.text, bean.getUser_nicename());
|
||||
holder.setText(R.id.time, new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()).format(new Date(bean.getAddtime() * 1000)));
|
||||
ImgLoader.display(holder.getContext(), bean.getAvatar(), holder.getView(R.id.ico));
|
||||
ViewClicksAntiShake.clicksAntiShake(holder.getView(R.id.ico), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
UserManager.toHomePage(bean.getUid()+"");
|
||||
}
|
||||
});
|
||||
//ImgLoader.display(holder.getContext(), bean.getAvatar(), holder.getView(R.id.img_item_interaction));//右侧头像
|
||||
|
||||
}
|
||||
|
@ -16,10 +16,12 @@ import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.bean.FollowBean;
|
||||
import com.shayu.onetoone.bean.HomeItemBean;
|
||||
import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -102,7 +104,12 @@ public class MyFriendListAdapter extends RecyclerView.Adapter<MyFriendListAdapte
|
||||
submit.setText(R.string.activity_my_friend_list_item_0);
|
||||
}
|
||||
submit.setOnClickListener(v -> follow(bean.getId() + "", submit));
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(avatar, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
UserManager.toHomePage(bean.getId()+"");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void follow(String targetId, Button follow) {
|
||||
|
@ -6,7 +6,7 @@ public class GreetBean extends BaseModel {
|
||||
private String id;
|
||||
private int uid;
|
||||
private String content;
|
||||
private int type;
|
||||
private int type = 1;
|
||||
private long createTime;
|
||||
private long updateTime;
|
||||
private int status;
|
||||
|
@ -17,12 +17,12 @@ public class HomeItemBean extends BaseModel {
|
||||
private int b_y;
|
||||
private int b_ym;
|
||||
private int b_ymd;
|
||||
private int name_auth;//1未认证 2已认证 3审核中 4被拒绝
|
||||
private String name_auth;//真人认证 1 未提交 2 已认证 3已提交 4被驳回
|
||||
private long name_auth_time;
|
||||
private String auth_front;
|
||||
private String auth_back;
|
||||
private String auth_remark;
|
||||
private int sage_auth;//1未认证 2已认证 3审核中 4被拒绝
|
||||
private String sage_auth;//达人认证 1 未提交 2 已认证 3已提交 4被驳回
|
||||
private long sage_auth_time;
|
||||
private int is_hot;
|
||||
private String vodie_price;
|
||||
@ -141,11 +141,11 @@ public class HomeItemBean extends BaseModel {
|
||||
this.b_ymd = b_ymd;
|
||||
}
|
||||
|
||||
public int getName_auth() {
|
||||
public String getName_auth() {
|
||||
return name_auth;
|
||||
}
|
||||
|
||||
public void setName_auth(int name_auth) {
|
||||
public void setName_auth(String name_auth) {
|
||||
this.name_auth = name_auth;
|
||||
}
|
||||
|
||||
@ -181,11 +181,11 @@ public class HomeItemBean extends BaseModel {
|
||||
this.auth_remark = auth_remark;
|
||||
}
|
||||
|
||||
public int getSage_auth() {
|
||||
public String getSage_auth() {
|
||||
return sage_auth;
|
||||
}
|
||||
|
||||
public void setSage_auth(int sage_auth) {
|
||||
public void setSage_auth(String sage_auth) {
|
||||
this.sage_auth = sage_auth;
|
||||
}
|
||||
|
||||
@ -327,4 +327,12 @@ public class HomeItemBean extends BaseModel {
|
||||
public void setIs_accost(int is_accost) {
|
||||
this.is_accost = is_accost;
|
||||
}
|
||||
|
||||
public boolean isNameAuth() {
|
||||
return "2".equals(getName_auth());
|
||||
}
|
||||
|
||||
public boolean isAuth() {
|
||||
return "2".equals(getSage_auth());
|
||||
}
|
||||
}
|
||||
|
@ -5,37 +5,37 @@ import com.yunbao.common.bean.BaseModel;
|
||||
|
||||
public class MessageConsumeConfigBean extends BaseModel {
|
||||
@SerializedName("vodiePrice")
|
||||
private int videoPrice;//视频扣费金额
|
||||
private int mp3Price;//音频扣费金额
|
||||
private int price;//消息扣费金额
|
||||
private String videoPrice;//视频扣费金额
|
||||
private String mp3Price;//音频扣费金额
|
||||
private String price;//消息扣费金额
|
||||
private int pingTime;//心跳时间,单位秒
|
||||
private int matePrice;//匹配金額
|
||||
private String matePrice;//匹配金額
|
||||
private int mateTime;//匹配時間
|
||||
|
||||
public MessageConsumeConfigBean() {
|
||||
}
|
||||
|
||||
public int getVideoPrice() {
|
||||
public String getVideoPrice() {
|
||||
return videoPrice;
|
||||
}
|
||||
|
||||
public void setVideoPrice(int videoPrice) {
|
||||
public void setVideoPrice(String videoPrice) {
|
||||
this.videoPrice = videoPrice;
|
||||
}
|
||||
|
||||
public int getMp3Price() {
|
||||
public String getMp3Price() {
|
||||
return mp3Price;
|
||||
}
|
||||
|
||||
public void setMp3Price(int mp3Price) {
|
||||
public void setMp3Price(String mp3Price) {
|
||||
this.mp3Price = mp3Price;
|
||||
}
|
||||
|
||||
public int getPrice() {
|
||||
public String getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(int price) {
|
||||
public void setPrice(String price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
@ -47,11 +47,11 @@ public class MessageConsumeConfigBean extends BaseModel {
|
||||
this.pingTime = pingTime;
|
||||
}
|
||||
|
||||
public int getMatePrice() {
|
||||
public String getMatePrice() {
|
||||
return matePrice;
|
||||
}
|
||||
|
||||
public void setMatePrice(int matePrice) {
|
||||
public void setMatePrice(String matePrice) {
|
||||
this.matePrice = matePrice;
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,10 @@ package com.shayu.onetoone.bean;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class UserBean extends BaseModel {
|
||||
IMLoginModel user;
|
||||
@ -60,8 +64,8 @@ public class UserBean extends BaseModel {
|
||||
public static class UserInfo {
|
||||
private int id;
|
||||
private String label_id;
|
||||
private String cn_label;
|
||||
private String en_label;
|
||||
private List<String> cn_label;
|
||||
private List<String> en_label;
|
||||
private int first_mate;
|
||||
private long create_time;
|
||||
private long update_time;
|
||||
@ -69,12 +73,12 @@ public class UserBean extends BaseModel {
|
||||
private int b_y;
|
||||
private int b_ym;
|
||||
private String b_ymd;
|
||||
private int name_auth;//1 未提交 2 已认证 3已提交 4被驳回
|
||||
private String name_auth;//真人认证 1 未提交 2 已认证 3已提交 4被驳回
|
||||
private long name_auth_time;
|
||||
private String auth_front;
|
||||
private String auth_back;
|
||||
private String auth_remark;
|
||||
private int sage_auth;//1 未提交 2 已认证 3已提交 4被驳回
|
||||
private String sage_auth;//达人认证 1 未提交 2 已认证 3已提交 4被驳回
|
||||
private long sage_auth_time;
|
||||
private int is_hot;
|
||||
private String vodie_price;
|
||||
@ -84,9 +88,30 @@ public class UserBean extends BaseModel {
|
||||
private int is_hello;
|
||||
private String star_name;
|
||||
|
||||
@SerializedName("xg_num")
|
||||
private String day;//下次修改天数
|
||||
@SerializedName("djs")
|
||||
private String nextDay;;//下次修改天数,如果为空则认为可以修改,下次天数使用day,例:本次可立即修改,下次修改需等待day天
|
||||
|
||||
public UserInfo() {
|
||||
}
|
||||
|
||||
public String getDay() {
|
||||
return day;
|
||||
}
|
||||
|
||||
public void setDay(String day) {
|
||||
this.day = day;
|
||||
}
|
||||
|
||||
public String getNextDay() {
|
||||
return nextDay;
|
||||
}
|
||||
|
||||
public void setNextDay(String nextDay) {
|
||||
this.nextDay = nextDay;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
@ -103,19 +128,31 @@ public class UserBean extends BaseModel {
|
||||
this.label_id = label_id;
|
||||
}
|
||||
|
||||
public String getCn_label() {
|
||||
public List<String> getCn_label() {
|
||||
return cn_label;
|
||||
}
|
||||
|
||||
public String toCnLabelString(){
|
||||
if(cn_label==null||cn_label.isEmpty()){
|
||||
return "";
|
||||
}
|
||||
StringBuilder sb=new StringBuilder();
|
||||
for (String s : cn_label) {
|
||||
sb.append(s).append(",");
|
||||
}
|
||||
return sb.substring(0,sb.toString().length()-1);
|
||||
}
|
||||
public void setCn_label(String cn_label) {
|
||||
this.cn_label = Arrays.asList(cn_label.split(","));
|
||||
}
|
||||
public void setCn_label(List<String> cn_label) {
|
||||
this.cn_label = cn_label;
|
||||
}
|
||||
|
||||
public String getEn_label() {
|
||||
public List<String> getEn_label() {
|
||||
return en_label;
|
||||
}
|
||||
|
||||
public void setEn_label(String en_label) {
|
||||
public void setEn_label(List<String> en_label) {
|
||||
this.en_label = en_label;
|
||||
}
|
||||
|
||||
@ -175,11 +212,14 @@ public class UserBean extends BaseModel {
|
||||
this.b_ymd = b_ymd;
|
||||
}
|
||||
|
||||
public int getName_auth() {
|
||||
public String getName_auth() {
|
||||
if (StringUtil.isEmpty(name_auth)) {
|
||||
name_auth = "0";
|
||||
}
|
||||
return name_auth;
|
||||
}
|
||||
|
||||
public void setName_auth(int name_auth) {
|
||||
public void setName_auth(String name_auth) {
|
||||
this.name_auth = name_auth;
|
||||
}
|
||||
|
||||
@ -215,11 +255,14 @@ public class UserBean extends BaseModel {
|
||||
this.auth_remark = auth_remark;
|
||||
}
|
||||
|
||||
public int getSage_auth() {
|
||||
public String getSage_auth() {
|
||||
if(StringUtil.isEmpty(sage_auth)){
|
||||
sage_auth = "0";
|
||||
}
|
||||
return sage_auth;
|
||||
}
|
||||
|
||||
public void setSage_auth(int sage_auth) {
|
||||
public void setSage_auth(String sage_auth) {
|
||||
this.sage_auth = sage_auth;
|
||||
}
|
||||
|
||||
@ -286,6 +329,14 @@ public class UserBean extends BaseModel {
|
||||
public void setStar_name(String star_name) {
|
||||
this.star_name = star_name;
|
||||
}
|
||||
|
||||
public boolean isNameAuth() {
|
||||
return "2".equals(getName_auth());
|
||||
}
|
||||
|
||||
public boolean isAuth() {
|
||||
return "2".equals(getSage_auth());
|
||||
}
|
||||
}
|
||||
|
||||
public static class UserLevel {
|
||||
|
@ -0,0 +1,179 @@
|
||||
package com.shayu.onetoone.dialog;
|
||||
|
||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_cn;
|
||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_us;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.http.HttpClient;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.NoviceInstructorManager;
|
||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
public class BindOneLoginDialog extends AbsDialogFragment {
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.dialog_bind_one_login;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int getDialogStyle() {
|
||||
return R.style.dialog2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canCancel() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setWindowAttributes(Window window) {
|
||||
window.setWindowAnimations(R.style.bottomToTopAnim);
|
||||
WindowManager.LayoutParams params = window.getAttributes();
|
||||
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
params.gravity = Gravity.CENTER;
|
||||
window.setAttributes(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
RoundedImageView avatar = (RoundedImageView) mRootView.findViewById(R.id.avatar);
|
||||
TextView text_code = (TextView) mRootView.findViewById(R.id.text_code);
|
||||
TextView text_username = (TextView) mRootView.findViewById(R.id.text_username);
|
||||
findViewById(R.id.btn_close).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
Button btn_enter = (Button) mRootView.findViewById(R.id.btn_enter);
|
||||
Bundle bundle = getArguments();
|
||||
if (bundle == null) {
|
||||
return;
|
||||
}
|
||||
ImgLoader.displayAvatar(mContext, CommonAppConfig.getInstance().getUserBean().getAvatar(), avatar);
|
||||
text_username.setText(mContext.getString(R.string.edit_profile_nickname) + ":" + bundle.getString("name"));
|
||||
if (!bundle.getString("code").equals("")) {
|
||||
text_code.setText(mContext.getString(R.string.invite_code) + ":" + bundle.getString("code"));
|
||||
} else {
|
||||
text_code.setText(mContext.getString(R.string.invite_code) + ":無");
|
||||
}
|
||||
|
||||
btn_enter.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
HttpClient.getInstance().post("User.userBindAgentAdmin", "User.userBindAgentAdmin")
|
||||
.params("invitation_code", bundle.getString("code"))
|
||||
.params("user_nicename", bundle.getString("name"))
|
||||
.execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
HttpClient.getInstance().post("Home.getRandJoinAnchor", "Home.getRandJoinAnchor")
|
||||
.execute(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
dismiss();
|
||||
if (info != null && info.length != 0 && !StringUtil.isEmpty(info[0])) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
if (obj.containsKey("home_zdy_img_us")) {
|
||||
home_zdy_img_us = obj.getString("home_zdy_img_us");
|
||||
home_zdy_img_cn = obj.getString("home_zdy_img_cn");
|
||||
}
|
||||
RouteManager.forwardMainActivity();
|
||||
IMLoginManager.get(mContext).setNewUserGif(true);
|
||||
IMLoginManager.get(mContext).setisNewUserOne(true);
|
||||
gotoLive(obj.getString("anchor_id"));
|
||||
if (obj.containsKey("home_zdy_pop")) {
|
||||
NoviceInstructorManager.get(mContext).setHomeZdyPop(obj.getString("home_zdy_pop"));
|
||||
}
|
||||
// OneLoginActivity.act.finish();
|
||||
} else {
|
||||
RouteManager.forwardMainActivity();
|
||||
// OneLoginActivity.act.finish();
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (msg.contains("暱稱重複,請重新輸入")) {
|
||||
ToastUtil.show(R.string.edit_one_5);
|
||||
} else if (msg.contains("該邀請碼不存在,請重新輸入")) {
|
||||
ToastUtil.show(R.string.edit_one_6);
|
||||
} else if (msg.contains("暱稱不合法")) {
|
||||
ToastUtil.show(R.string.edit_one_7);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void gotoLive(final String live_id) {
|
||||
LiveHttpUtil.getLiveInfo(live_id, new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0 && info.length > 0) {
|
||||
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||
if (liveBean == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal));
|
||||
NoviceInstructorManager.get(mContext).setFrist(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCheckError(String contextError) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCheckError(String contextError) {
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
RouteManager.forwardMainActivity();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.shayu.onetoone.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.yunbao.common.dialog.AbsFullDialogPopupWindow;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
|
||||
public class FullImageViewDialog extends AbsFullDialogPopupWindow {
|
||||
ImageView image;
|
||||
String imgUrl;
|
||||
private OnItemClickListener<FirstTipsDialog> onItemClickListener;
|
||||
|
||||
public FullImageViewDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public FullImageViewDialog setImgUrl(String imgUrl) {
|
||||
this.imgUrl = imgUrl;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.hasShadowBg(false);
|
||||
builder.dismissOnBackPressed(false);
|
||||
builder.dismissOnTouchOutside(false);
|
||||
builder.customAnimator(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.activity_full_image;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void dismiss() {
|
||||
image.setAlpha(0f);
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onShow() {
|
||||
super.onShow();
|
||||
ImgLoader.display(mContext,imgUrl,image);
|
||||
image.setOnClickListener(v -> {
|
||||
dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
image = findViewById(R.id.image);
|
||||
findViewById(R.id.rootView).setBackgroundColor(Color.BLACK);
|
||||
}
|
||||
}
|
@ -29,7 +29,7 @@ import com.shayu.onetoone.view.MsgInputPanelForGift;
|
||||
import com.shayu.onetoone.widget.PagerConfig;
|
||||
import com.shayu.onetoone.widget.PagerGridLayoutManager;
|
||||
import com.shayu.onetoone.widget.PagerGridSnapHelper;
|
||||
import com.yunbao.common.activity.MyWalletActivity;
|
||||
import com.shayu.onetoone.activity.OTOWalletActivity;
|
||||
import com.yunbao.common.dialog.AbsDialogPopupWindow;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
@ -139,7 +139,7 @@ public class GiftDialog extends AbsDialogPopupWindow {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
//RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext, false, HtmlUrlUtils.URL_PAY_COIN));
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||
mContext.startActivity(new Intent(mContext, OTOWalletActivity.class).putExtra("p", 1));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -0,0 +1,149 @@
|
||||
package com.shayu.onetoone.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.activity.fragments.message.ChatUserIntroduceViewPageFragment;
|
||||
import com.shayu.onetoone.bean.UserBean;
|
||||
import com.yunbao.common.dialog.AbsFullDialogPopupWindow;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MsgChatUserIntroduceDialog extends AbsFullDialogPopupWindow {
|
||||
UserBean userBean;
|
||||
|
||||
ViewPager2 viewPager;
|
||||
ImageView left, right;
|
||||
TextView uname,content;
|
||||
View start;
|
||||
|
||||
List<ChatUserIntroduceViewPageFragment> imgList;
|
||||
|
||||
public MsgChatUserIntroduceDialog(@NonNull Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public MsgChatUserIntroduceDialog setUserBean(UserBean userBean) {
|
||||
this.userBean = userBean;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildDialog(XPopup.Builder builder) {
|
||||
builder.dismissOnBackPressed(false);
|
||||
builder.dismissOnTouchOutside(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int bindLayoutId() {
|
||||
return R.layout.dialog_chat_user_introduce;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
viewPager = findViewById(R.id.vp2);
|
||||
left = findViewById(R.id.left);
|
||||
right = findViewById(R.id.right);
|
||||
start = findViewById(R.id.start);
|
||||
uname = findViewById(R.id.uname);
|
||||
content = findViewById(R.id.content);
|
||||
|
||||
uname.setText(userBean.getUser().getUserNicename());
|
||||
content.setText(userBean.getUser().getSignature());
|
||||
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(left, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
int currentItem = viewPager.getCurrentItem();
|
||||
if (currentItem - 1 >= 0) {
|
||||
viewPager.setCurrentItem(currentItem - 1);
|
||||
|
||||
} else {
|
||||
ToastUtil.show("已经是第一张了");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(100,right, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
int currentItem = viewPager.getCurrentItem();
|
||||
if (currentItem + 1 < imgList.size()) {
|
||||
viewPager.setCurrentItem(currentItem + 1);
|
||||
|
||||
} else {
|
||||
ToastUtil.show("已到最后一张");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ViewClicksAntiShake.clicksAntiShake(100,start, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.close), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
imgList = new ArrayList<>();
|
||||
for (String s : userBean.getUser().getUserAlbum()) {
|
||||
imgList.add(new ChatUserIntroduceViewPageFragment(mContext, s));
|
||||
}
|
||||
if(imgList.isEmpty()){
|
||||
imgList.add(new ChatUserIntroduceViewPageFragment(mContext,userBean.getUser().getAvatar()));
|
||||
}
|
||||
if(imgList.size()==1){
|
||||
left.setVisibility(View.GONE);
|
||||
right.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
viewPager.setAdapter(new FragmentStateAdapter((FragmentActivity) mContext) {
|
||||
@NonNull
|
||||
@Override
|
||||
public Fragment createFragment(int position) {
|
||||
return imgList.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return imgList.size();
|
||||
}
|
||||
});
|
||||
viewPager.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
super.onPageSelected(position);
|
||||
if(position-1 >=0){
|
||||
left.setImageResource(R.mipmap.ic_chat_user_introduce_left);
|
||||
}else{
|
||||
left.setImageResource(R.mipmap.ic_chat_user_introduce_left_end);
|
||||
}
|
||||
if(position+1 < imgList.size()){
|
||||
right.setImageResource(R.mipmap.ic_chat_user_introduce_right);
|
||||
}else{
|
||||
right.setImageResource(R.mipmap.ic_chat_user_introduce_right_end);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -51,7 +51,7 @@ public class MsgMoreDialog extends AttachPopupView{
|
||||
}
|
||||
});
|
||||
UserBean bean = UserManager.getUserBean();
|
||||
if (bean.getInfo().getSage_auth()!=2) {
|
||||
if (!bean.getInfo().isAuth()) {
|
||||
config.setVisibility(GONE);
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.listener.OnDialogClickListener;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.utils.HtmlUrlUtils;
|
||||
import com.yunbao.common.activity.MyWalletActivity;
|
||||
import com.shayu.onetoone.activity.OTOWalletActivity;
|
||||
import com.yunbao.common.dialog.AbsDialogCenterPopupWindow;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
@ -116,7 +116,7 @@ public class TipsDialog extends AbsDialogCenterPopupWindow {
|
||||
applyText.equals(WordUtil.getNewString(R.string.money_apply))
|
||||
|| applyText.equals(WordUtil.getNewString(R.string.dialog_to_money_tip)))) {
|
||||
// RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext, false, HtmlUrlUtils.URL_PAY_COIN));
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||
mContext.startActivity(new Intent(mContext, OTOWalletActivity.class).putExtra("p", 1));
|
||||
}
|
||||
if (onDialogClickListener != null) {
|
||||
onDialogClickListener.onApply(dialog);
|
||||
|
@ -276,9 +276,6 @@ public class CallClientManager {
|
||||
}
|
||||
long time = getTime(activeTime);
|
||||
time = time % 10;
|
||||
if (time == 0) {
|
||||
time = 10;
|
||||
}
|
||||
if (isCallVideo) {
|
||||
SendMessageManager.endVideoMessage(targetId, time + "", new SendMessageListener());
|
||||
} else {
|
||||
|
@ -198,7 +198,7 @@ public class OTONetManager {
|
||||
uuid,
|
||||
nickName,
|
||||
avatar,
|
||||
CommonAppConfig.IS_GOOGLE_PLAY ? "1" : "3",
|
||||
CommonAppConfig.IS_GOOGLE_PLAY ? "6" : "8",
|
||||
DEVICE,
|
||||
sign,
|
||||
"Android",
|
||||
@ -659,7 +659,7 @@ public class OTONetManager {
|
||||
.subscribe(new Consumer<ResponseModel<MessageConsumeConfigBean>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<MessageConsumeConfigBean> model) throws Exception {
|
||||
CacheManager.consumeCache.put(toUid,model.getData().getInfo());
|
||||
CacheManager.consumeCache.put(toUid, model.getData().getInfo());
|
||||
if (callback != null) {
|
||||
callback.onSuccess(model.getData().getInfo());
|
||||
}
|
||||
@ -1475,6 +1475,30 @@ public class OTONetManager {
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
/**
|
||||
* 后端要求的每次点击tab都要调用下
|
||||
*/
|
||||
public void push(HttpCallback<HttpCallbackModel> callback) {
|
||||
API.get().otoApi(mContext)
|
||||
.push()
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(listResponseModel -> {
|
||||
if (listResponseModel.getData().getCode() == 0) {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(new HttpCallbackModel(listResponseModel.getData().getCode(), listResponseModel.getData().getMsg()));
|
||||
}
|
||||
} else {
|
||||
if (callback != null) {
|
||||
callback.onError(listResponseModel.getData().getMsg());
|
||||
}
|
||||
}
|
||||
}, throwable -> {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(com.yunbao.common.R.string.net_error));
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.shayu.onetoone.manager;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.yunbao.common.Constants;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@ -40,9 +41,12 @@ public class RouteManager {
|
||||
|
||||
//达人认证入口
|
||||
public static final String ACTIVITY_AUTH_BLOGGER_INLET = "/activity/AuthBloggerInletActivity";
|
||||
public static final String ACTIVITY_END_CALL="/activity/EndCallActivity";
|
||||
public static final String ACTIVITY_END_CALL = "/activity/EndCallActivity";
|
||||
|
||||
public static final String ACTIVITY_BLACK_LIST = "/activity/AuthBloggerInletActivity";
|
||||
public static final String ACTIVITY_BIND_OPEN_INSTALL = "/activity/BindOneLoginActivity";
|
||||
|
||||
public static final String PATH_LIVEREPORT = "/activity/LiveReportActivity";
|
||||
|
||||
/**
|
||||
* 达人认证入口
|
||||
@ -70,7 +74,7 @@ public class RouteManager {
|
||||
* 选择标签
|
||||
*/
|
||||
public static void forwardChooseLabelActivity(boolean isUserHome) {
|
||||
ARouter.getInstance().build(ACTIVITY_CHOOSE_LABEL).withBoolean("isUserHome",isUserHome).navigation();
|
||||
ARouter.getInstance().build(ACTIVITY_CHOOSE_LABEL).withBoolean("isUserHome", isUserHome).navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -112,7 +116,15 @@ public class RouteManager {
|
||||
}
|
||||
|
||||
public static void forwardWebViewActivity(String title, String url) {
|
||||
ARouter.getInstance().build(ACTIVITY_WEB_VIEW).withString("title", title).withString("url", url).navigation();
|
||||
forwardWebViewActivity(title, url, false);
|
||||
}
|
||||
|
||||
public static void forwardWebViewActivity(String title, String url, boolean autoHeight) {
|
||||
ARouter.getInstance().build(ACTIVITY_WEB_VIEW)
|
||||
.withString("title", title)
|
||||
.withString("url", url)
|
||||
.withBoolean("autoHeight", autoHeight)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
public static void forwardActivity(String path) {
|
||||
@ -120,10 +132,27 @@ public class RouteManager {
|
||||
}
|
||||
|
||||
public static void forwardActivity(String path, Bundle bundle) {
|
||||
ARouter.getInstance().build(path).with( bundle).navigation();
|
||||
}
|
||||
public static void forwardActivity(String path, Serializable serializable) {
|
||||
ARouter.getInstance().build(path).withSerializable("data", serializable).navigation();
|
||||
ARouter.getInstance().build(path).with(bundle).navigation();
|
||||
}
|
||||
|
||||
public static void forwardActivity(String path, Serializable serializable) {
|
||||
ARouter.getInstance().build(path).withSerializable("data", serializable).navigation();
|
||||
}
|
||||
/**
|
||||
* 举报个人
|
||||
*/
|
||||
public static void forwardLiveReportActivity(String touid) {
|
||||
ARouter.getInstance().build(PATH_LIVEREPORT)
|
||||
.withString(Constants.TO_UID, touid)
|
||||
.navigation();
|
||||
}
|
||||
|
||||
public static void forwardLiveReportActivity(String dynamicId, int intoIndex, String communityType, String commentId) {
|
||||
ARouter.getInstance().build(PATH_LIVEREPORT)
|
||||
.withString(Constants.TO_UID, dynamicId)
|
||||
.withInt(Constants.INTOINDEX, intoIndex)
|
||||
.withString("community_type", communityType)
|
||||
.withString("comment_id", commentId)
|
||||
.navigation();
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public class SendMessageManager {
|
||||
"not",
|
||||
"视频消息",
|
||||
time,
|
||||
2,
|
||||
0,
|
||||
false
|
||||
);
|
||||
send(sendData, listener);
|
||||
@ -66,7 +66,7 @@ public class SendMessageManager {
|
||||
"not",
|
||||
"音频消息",
|
||||
time,
|
||||
2,
|
||||
0,
|
||||
false
|
||||
);
|
||||
send(sendData, listener);
|
||||
@ -102,10 +102,6 @@ public class SendMessageManager {
|
||||
send(sendData, listener);
|
||||
}
|
||||
public static void endVideoMessage(String toUid, String time, OnSendMessageListener listener) {
|
||||
if ("0".equals(time)) {
|
||||
listener.onError(504,"时间错误");
|
||||
return;
|
||||
}
|
||||
SendData sendData = new SendData(toUid,
|
||||
2,
|
||||
"not",
|
||||
|
@ -185,7 +185,7 @@ public interface OneToOneApi {
|
||||
Observable<ResponseModel<List<HomeItemBean>>> search(
|
||||
@Query("keyword") String keyword,
|
||||
@Query("age") String age,
|
||||
@Query("name_auth") String name_auth,
|
||||
@Query("sage_auth") String name_auth,
|
||||
@Query("sex") String sex,
|
||||
@Query("star") String star,
|
||||
@Query("p") String p
|
||||
@ -375,6 +375,12 @@ public interface OneToOneApi {
|
||||
Observable<ResponseModel<List<UserItemBean>>> getMenu();
|
||||
@GET("/api/public/?service=Message.setMessageReadAll")
|
||||
Observable<ResponseModel<List<BaseModel>>> messageReadAll();
|
||||
|
||||
/**
|
||||
* 后端要求的每次点击tab都要调用下
|
||||
*/
|
||||
@GET("/api/public/?service=Friendappinfos.push")
|
||||
Observable<ResponseModel<BaseModel>> push();
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,6 +6,9 @@ import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.bean.UserBean;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -27,25 +30,47 @@ public class CustomConversationProvider extends BaseConversationProvider {
|
||||
public void bindViewHolder(ViewHolder holder, BaseUiConversation uiConversation, int position, List<BaseUiConversation> list, IViewProviderListener<BaseUiConversation> listener) {
|
||||
String targetId = uiConversation.mCore.getTargetId();
|
||||
UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(targetId);
|
||||
int sex = -2;
|
||||
if (userInfo != null) {
|
||||
JSONObject json = JSONObject.parseObject(userInfo.getExtra());
|
||||
if (json.containsKey("sex")) {
|
||||
sex = json.getInteger("sex");
|
||||
} else if (json.containsKey("giftNum")) {
|
||||
UserBean bean = JSONObject.parseObject(json.toJSONString(), UserBean.class);
|
||||
sex = (int) bean.getUser().getSex();
|
||||
}
|
||||
holder.getView(R.id.sex).setVisibility(View.VISIBLE);
|
||||
try {
|
||||
if (json.getInteger("sex") == -1) {
|
||||
if (sex == -1 || sex == -2) {
|
||||
holder.getView(R.id.sex).setVisibility(View.GONE);
|
||||
} else if (json.getInteger("sex") == 1) {
|
||||
} else if (sex == 1) {
|
||||
holder.setImageResource(R.id.sex, R.mipmap.ic_message_tab_man);
|
||||
} else {
|
||||
holder.setImageResource(R.id.sex, R.mipmap.ic_message_tab_woman);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
holder.getView(R.id.sex).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
}
|
||||
super.bindViewHolder(holder, uiConversation, position, list, listener);
|
||||
|
||||
if (userInfo != null && sex > 0) {
|
||||
JSONObject json = JSONObject.parseObject(userInfo.getExtra());
|
||||
boolean tmp = false;
|
||||
if (json.containsKey("sex")) {
|
||||
tmp = true;
|
||||
} else if (json.containsKey("giftNum")) {
|
||||
tmp = true;
|
||||
}
|
||||
if (tmp) {
|
||||
ViewClicksAntiShake.clicksAntiShake(holder.getView(R.id.rc_conversation_portrait), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
UserManager.toHomePage(userInfo.getUserId());
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,19 @@
|
||||
package com.shayu.onetoone.utils;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.activity.message.ChatActivity;
|
||||
import com.shayu.onetoone.bean.SendConsumeBean;
|
||||
import com.shayu.onetoone.dialog.TipsDialog;
|
||||
import com.shayu.onetoone.listener.OnDialogClickListener;
|
||||
import com.shayu.onetoone.listener.OnSendMessageListener;
|
||||
import com.shayu.onetoone.manager.SendMessageManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import io.rong.imkit.utils.RouteUtils;
|
||||
import io.rong.imlib.model.Conversation;
|
||||
@ -18,11 +28,57 @@ public class ConversationUtils {
|
||||
}
|
||||
|
||||
public static void startConversation(Context mContext, String targetId, Bundle bundle) {
|
||||
if(targetId.equals(UserManager.getUserBean().getUser().getId()+"")){
|
||||
if (targetId.equals(UserManager.getUserBean().getUser().getId() + "")) {
|
||||
ToastUtil.show("不能与自己对话");
|
||||
return;
|
||||
}
|
||||
bundle.putString("test","ssssssssssss");
|
||||
ConversationIdentifier conversationIdentifier = new ConversationIdentifier(Conversation.ConversationType.PRIVATE, targetId);
|
||||
RouteUtils.routeToConversationActivity(mContext, conversationIdentifier, false, bundle);
|
||||
}
|
||||
|
||||
/**
|
||||
* 搭讪
|
||||
*/
|
||||
public static void hitOn(Context mContext, String targetId, OnSendMessageListener listener) {
|
||||
SendMessageManager.chatUp(targetId + "", new OnSendMessageListener() {
|
||||
@Override
|
||||
public void onSuccess(String token, SendConsumeBean bean) {
|
||||
super.onSuccess(token, bean);
|
||||
System.out.println("搭讪回调:" + JSONObject.toJSONString(bean));
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString("token", token);
|
||||
bundle.putInt("type", ChatActivity.CALL_CHAT_TYPE_CHAT_UP);
|
||||
bundle.putString("data", JSONObject.toJSONString(bean));
|
||||
ConversationUtils.startConversation(mContext, targetId, bundle);
|
||||
if (listener != null) {
|
||||
listener.onSuccess(token, bean);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int status, String msg, SendConsumeBean bean) {
|
||||
super.onError(status, msg, bean);
|
||||
if (listener != null) {
|
||||
listener.onError(status, msg, bean);
|
||||
}
|
||||
if (status == OnSendMessageListener.STATUS_NOT_PRICE) {
|
||||
new TipsDialog(mContext)
|
||||
.setTitle(WordUtil.getNewString(R.string.money_title))
|
||||
.setApplyText(WordUtil.getNewString(R.string.money_apply))
|
||||
.setOnDialogClickListener(new OnDialogClickListener() {
|
||||
@Override
|
||||
public void onApply(Dialog dialog) {
|
||||
super.onApply(dialog);
|
||||
}
|
||||
})
|
||||
.showDialog();
|
||||
} else {
|
||||
new TipsDialog(mContext)
|
||||
.setTitle(msg)
|
||||
.showDialog();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -79,13 +79,20 @@ public class HtmlUrlUtils {
|
||||
* 用户协议
|
||||
*/
|
||||
public static String getUserAgreement() {
|
||||
return CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=59";
|
||||
return CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=674";
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务协议
|
||||
*/
|
||||
public static String getServerAgreement() {
|
||||
return CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=668";
|
||||
return CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=675";
|
||||
}
|
||||
|
||||
/**
|
||||
* 收益说明
|
||||
*/
|
||||
public static String getArnInfo() {
|
||||
return CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=676";
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ public class MainHttpUtil {
|
||||
HttpClient.getInstance().get("Login.userLoginByThird", MainHttpConsts.LOGIN_BY_THIRD)
|
||||
.params("openid", openid)
|
||||
.params("nicename", nicename)
|
||||
.params("app_source", CommonAppConfig.IS_GOOGLE_PLAY == true ? "1" : "3")
|
||||
.params("app_source", CommonAppConfig.IS_GOOGLE_PLAY == true ? "6" : "8")
|
||||
.params("avatar", avatar)
|
||||
.params("type", type)
|
||||
.params("source", DEVICE)
|
||||
@ -83,7 +83,7 @@ public class MainHttpUtil {
|
||||
String sign = MD5Util.getMD5("openid=" + openid + "&" + SALT);
|
||||
HttpClient.getInstance().get("Login.userLoginByThird", MainHttpConsts.LOGIN_BY_THIRD)
|
||||
.params("openid", openid)
|
||||
.params("app_source", CommonAppConfig.IS_GOOGLE_PLAY == true ? "1" : "3")
|
||||
.params("app_source", CommonAppConfig.IS_GOOGLE_PLAY == true ? "6" : "8")
|
||||
.params("admin_id", promoCode)
|
||||
.params("uuid_Device", uuidDevice)
|
||||
.params("nicename", nicename)
|
||||
@ -576,7 +576,7 @@ public class MainHttpUtil {
|
||||
public static void register(String UserID, String invitecode, String user_login, String promo_code, String uuidDevice, int countryCode, String pass, String pass2, String code, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Login.userReg", MainHttpConsts.REGISTER)
|
||||
.params("user_login", user_login)
|
||||
.params("app_source", CommonAppConfig.IS_GOOGLE_PLAY == true ? "1" : "3")
|
||||
.params("app_source", CommonAppConfig.IS_GOOGLE_PLAY == true ? "6" : "8")
|
||||
//增加参数:推广码
|
||||
.params("user_activation_key", promo_code)
|
||||
.params("admin_id", promo_code)
|
||||
|
@ -35,14 +35,14 @@ public class MsgCheckUtils {
|
||||
.getTargetUserInfo(Integer.parseInt(targetId), new HttpCallback<UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean data) {
|
||||
if (data.getInfo().getName_auth() == 2) {
|
||||
if (data.getInfo().isNameAuth()) {
|
||||
listener.onSuccess("", null);
|
||||
} else if (data.getInfo().getName_auth() == 3) {
|
||||
listener.onError(data.getInfo().getName_auth(), "當前正在審核中,請耐心等待");
|
||||
} else if ("3".equals(data.getInfo().getName_auth())) {
|
||||
listener.onError(Integer.parseInt(data.getInfo().getName_auth()), "當前正在審核中,請耐心等待");
|
||||
} else {
|
||||
listener.onError(data.getInfo().getName_auth(), "");
|
||||
listener.onError(Integer.parseInt(data.getInfo().getName_auth()), "");
|
||||
}
|
||||
if (data.getInfo().getName_auth() != 2) {
|
||||
if (!data.getInfo().isNameAuth()) {
|
||||
AppManager.runDebugCode(() -> {
|
||||
new TipsDialog(mContext)
|
||||
.setTitle("测试模式,是否强行拨打")
|
||||
|
@ -54,6 +54,25 @@ public class UserManager {
|
||||
IMLoginManager.get(mContext).setupLoginUser(bean.getUser());
|
||||
SpUtil.setStringValue("oto_user_info", JSONObject.toJSONString(bean));
|
||||
}
|
||||
public static void updateUserBean(Context mContext,HttpCallback<UserBean> callback){
|
||||
OTONetManager.getInstance(mContext)
|
||||
.getBaseInfos(false, new HttpCallback<UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean data) {
|
||||
if(callback!=null) {
|
||||
callback.onSuccess(data);
|
||||
}
|
||||
saveUserBean(mContext,data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
if (callback != null) {
|
||||
callback.onError(error);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void follow(Context mContext, String userId, OnItemClickListener<FollowBean> listener) {
|
||||
OTONetManager.getInstance(mContext)
|
||||
@ -120,6 +139,7 @@ public class UserManager {
|
||||
}
|
||||
|
||||
public static void toHomePage(int userId) {
|
||||
toHomePage(userId + "");
|
||||
}
|
||||
public static void toHomePage(String userId,boolean isGoto) {
|
||||
toHomePage(userId+"");
|
||||
|
@ -5,6 +5,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.shayu.onetoone.R;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
@ -22,6 +23,8 @@ public abstract class AbsInputPanel {
|
||||
View rootView;
|
||||
boolean isShow = false;
|
||||
|
||||
OnItemClickListener<Boolean> onShowListener;
|
||||
|
||||
public AbsInputPanel(String targetId, FragmentActivity mContext, RongExtension mRongExtension, int layout) {
|
||||
this.mContext = mContext;
|
||||
this.mRongExtension = mRongExtension;
|
||||
@ -50,13 +53,25 @@ public abstract class AbsInputPanel {
|
||||
rootLayout.addView(rootView);
|
||||
|
||||
rootLayout.setVisibility(View.VISIBLE);
|
||||
if (onShowListener != null) {
|
||||
onShowListener.onItemClick(true, View.VISIBLE);
|
||||
}
|
||||
return View.VISIBLE;
|
||||
}
|
||||
|
||||
public void hide() {
|
||||
rootLayout.removeAllViews();
|
||||
rootLayout.setVisibility(View.GONE);
|
||||
if (rootLayout.getVisibility() != View.GONE) {
|
||||
rootLayout.removeAllViews();
|
||||
rootLayout.setVisibility(View.GONE);
|
||||
}
|
||||
if (onShowListener != null) {
|
||||
onShowListener.onItemClick(false, View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void init(View viewGroup);
|
||||
|
||||
public void setOnHideListener(OnItemClickListener<Boolean> onShowListener) {
|
||||
this.onShowListener = onShowListener;
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ import com.shayu.onetoone.utils.UserManager;
|
||||
import com.shayu.onetoone.widget.PagerConfig;
|
||||
import com.shayu.onetoone.widget.PagerGridLayoutManager;
|
||||
import com.shayu.onetoone.widget.PagerGridSnapHelper;
|
||||
import com.yunbao.common.activity.MyWalletActivity;
|
||||
import com.shayu.onetoone.activity.OTOWalletActivity;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
@ -131,7 +131,7 @@ public class MsgInputPanelForGift extends AbsInputPanel {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
//RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext, false, HtmlUrlUtils.URL_PAY_COIN));
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||
mContext.startActivity(new Intent(mContext, OTOWalletActivity.class).putExtra("p", 1));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
9
OneToOne/src/main/res/drawable/border_yellow.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="60dp" />
|
||||
<solid android:color="#FFBE41" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
9
OneToOne/src/main/res/drawable/button_chat_hi.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:width="98dp" android:height="39dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#ffded9f8" />
|
||||
<corners android:topLeftRadius="20dp" android:topRightRadius="20dp" android:bottomLeftRadius="20dp" android:bottomRightRadius="20dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
132
OneToOne/src/main/res/layout/activity_bind_one_login.xml
Normal file
@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/color_white">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/edit_invitation_code"
|
||||
android:textColor="#fffd8d41"
|
||||
android:textSize="29sp"
|
||||
android:layout_marginTop="75dp"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="115dp"
|
||||
android:layout_height="115dp"
|
||||
android:layout_marginTop="35dp"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="115dp"
|
||||
android:layout_height="115dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_border_color="#FFFFFF"
|
||||
app:riv_border_width="2dp"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="gone"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="19dp"
|
||||
android:src="@mipmap/icon_edit"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="47dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/border_grey_50">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="27dp"
|
||||
android:layout_marginRight="26dp"
|
||||
android:src="@mipmap/icon_username"/>
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_user"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="left|center"
|
||||
android:hint="@string/edit_profile_name_empty"
|
||||
android:background="@null"
|
||||
android:maxLength="10"
|
||||
android:singleLine="true"
|
||||
android:textColor="#161616"
|
||||
android:textColorHint="#B6B6B6"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="47dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:background="@drawable/border_grey_50">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginLeft="27dp"
|
||||
android:layout_marginRight="26dp"
|
||||
android:src="@mipmap/icon_invitecode"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="left|center"
|
||||
android:hint="@string/main_input_invatation_code"
|
||||
android:inputType="text"
|
||||
android:background="@null"
|
||||
android:maxLength="20"
|
||||
android:singleLine="true"
|
||||
android:textColor="#161616"
|
||||
android:textColorHint="#B6B6B6"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_enter"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/border_fdbe40"
|
||||
android:gravity="center"
|
||||
android:text="@string/edit_enter_app"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -100,7 +100,7 @@
|
||||
android:layout_height="21dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginEnd="14dp"
|
||||
|
||||
android:visibility="gone"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#F7F8F9"
|
||||
@ -329,7 +330,9 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_person"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick">
|
||||
android:onClick="editProfileClick"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -1,7 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/image"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/rootView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</ImageView>
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</LinearLayout>
|
@ -90,7 +90,7 @@
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recommendList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
@ -100,7 +100,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_empty"
|
||||
app:spanCount="2"
|
||||
tools:itemCount="3"
|
||||
tools:itemCount="5"
|
||||
tools:listitem="@layout/item_home_hot">
|
||||
|
||||
|
||||
|
@ -218,6 +218,7 @@
|
||||
android:id="@+id/toBlogger"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
@ -277,6 +278,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
@ -306,6 +308,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
@ -453,6 +456,7 @@
|
||||
android:id="@+id/checkVersion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="10dp"
|
||||
|
15
OneToOne/src/main/res/layout/activity_video_report.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@color/white"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="65dp"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<include layout="@layout/view_title" />
|
||||
</FrameLayout>
|
78
OneToOne/src/main/res/layout/dialog_bind_one_login.xml
Normal file
@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:paddingLeft="40dp"
|
||||
android:paddingRight="40dp">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="400dp"
|
||||
android:gravity="center|top"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_dialog">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/edit_one_3"
|
||||
android:layout_marginTop="30dp"
|
||||
android:textColor="#ff303030"
|
||||
android:textSize="22sp"/>
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="115dp"
|
||||
android:layout_height="115dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_border_color="#FFFFFF"
|
||||
app:riv_border_width="2dp"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<TextView android:id="@+id/text_username"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="用户昵称昵称"
|
||||
android:textColor="#ff303030"
|
||||
android:textSize="20sp"/>
|
||||
|
||||
<TextView android:id="@+id/text_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="邀请码:ABC123"
|
||||
android:textColor="#BFBFBF"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_enter"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:background="@drawable/border_fdbe40"
|
||||
android:gravity="center"
|
||||
android:text="@string/edit_one_4"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<ImageView android:id="@+id/btn_close"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_marginRight="15dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:src="@mipmap/icon_live_user_5"/>
|
||||
|
||||
</RelativeLayout>
|
135
OneToOne/src/main/res/layout/dialog_chat_user_introduce.xml
Normal file
@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/root_layout"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/vp_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@mipmap/bg_chat_user_introduce"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginTop="80dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:layout_marginBottom="160dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<!-- <ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
|
||||
android:src="@mipmap/oto_screen"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginStart="11dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>-->
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/vp2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginStart="11dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:orientation="horizontal"
|
||||
app:layoutManager="androidx.vp_layout.widget.GridLayoutManager"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:spanCount="1"
|
||||
tools:listitem="@layout/item_chat_full_album" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/title_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="11dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:background="#4dd9d9d9"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/vp_layout"
|
||||
app:layout_constraintEnd_toStartOf="@+id/right"
|
||||
app:layout_constraintStart_toEndOf="@+id/left">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/uname"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="13dp"
|
||||
android:layout_marginTop="11dp"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="TextView"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:layout_marginBottom="11dp"
|
||||
android:text="TextView"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="-10dp"
|
||||
android:src="@mipmap/ic_chat_user_introduce_left"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/vp_layout"
|
||||
app:layout_constraintEnd_toStartOf="@+id/vp_layout"
|
||||
app:layout_constraintTop_toTopOf="@+id/vp_layout" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/right"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="-10dp"
|
||||
android:src="@mipmap/ic_chat_user_introduce_right"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/vp_layout"
|
||||
app:layout_constraintStart_toEndOf="@+id/vp_layout"
|
||||
app:layout_constraintTop_toTopOf="@+id/vp_layout" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/vp_layout"
|
||||
app:srcCompat="@mipmap/ic_chat_user_introduce_start" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toTopOf="@+id/vp_layout"
|
||||
app:layout_constraintEnd_toEndOf="@+id/vp_layout"
|
||||
app:layout_constraintStart_toEndOf="@+id/vp_layout"
|
||||
app:srcCompat="@mipmap/ic_chat_user_introduce_close" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -81,10 +81,10 @@
|
||||
android:id="@+id/matching"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="56dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:srcCompat="@mipmap/ic_matching_free" />
|
||||
android:layout_marginEnd="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/btn_top"
|
||||
app:layout_constraintEnd_toStartOf="@+id/btn_top"
|
||||
app:layout_constraintTop_toTopOf="@+id/btn_top"
|
||||
app:srcCompat="@mipmap/ic_matching_new" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -450,6 +450,7 @@
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:spanCount="2"
|
||||
tools:itemCount="5"
|
||||
|
@ -278,7 +278,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@+id/iconLevel"
|
||||
android:text="Lv.0"
|
||||
android:textSize="11sp"
|
||||
tools:text="Lv.999"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</RelativeLayout>
|
||||
@ -405,6 +406,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
@ -545,6 +547,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
|
18
OneToOne/src/main/res/layout/item_chat_album.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="49dp"
|
||||
android:layout_height="49dp">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/imageView"
|
||||
app:riv_corner_radius="5dp"
|
||||
android:layout_width="49dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_height="49dp"
|
||||
android:src="@mipmap/app_logo"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
17
OneToOne/src/main/res/layout/item_chat_full_album.xml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/app_logo"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -5,8 +5,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="167dp"
|
||||
android:maxHeight="167dp"
|
||||
android:layout_marginTop="16dp">
|
||||
android:maxHeight="167dp">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
|
34
OneToOne/src/main/res/layout/item_live_report.xml
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:background="@color/white"
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingRight="15dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_cash_radio_1"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_toRightOf="@id/img"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="16sp"
|
||||
/>
|
||||
|
||||
<View
|
||||
style="@style/line2"
|
||||
android:layout_alignParentBottom="true"
|
||||
/>
|
||||
</RelativeLayout>
|
30
OneToOne/src/main/res/layout/item_live_report_2.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:background="@color/white"
|
||||
android:paddingLeft="15dp"
|
||||
android:paddingRight="15dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_cash_radio_1"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_toRightOf="@id/img"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="16sp"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
94
OneToOne/src/main/res/layout/item_live_report_foot.xml
Normal file
@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/bg_dialog"
|
||||
android:layout_marginTop="20dp"
|
||||
android:gravity="top"
|
||||
android:padding="5dp"
|
||||
android:hint="@string/video_report_tip_2"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="14sp"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<RelativeLayout
|
||||
android:id="@+id/photo1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
>
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/ivPh1"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_corner_radius="7dp"
|
||||
android:src="@mipmap/report_add"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/photo2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
>
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/ivPh2"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_corner_radius="7dp"
|
||||
android:src="@mipmap/report_add"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
<RelativeLayout
|
||||
android:id="@+id/photo3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
>
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/ivPh3"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_corner_radius="7dp"
|
||||
android:src="@mipmap/report_add"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_report"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginLeft="30dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/border_yellow"
|
||||
android:gravity="center"
|
||||
android:text="@string/video_report_submit"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
</LinearLayout>
|
11
OneToOne/src/main/res/layout/item_live_report_head.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="46dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="15dp"
|
||||
android:text="@string/video_report_tip_1"
|
||||
android:textColor="@color/gray1"
|
||||
android:textSize="13sp"
|
||||
/>
|
@ -99,6 +99,19 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/rc_refresh" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/sayHi"
|
||||
android:layout_width="98dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:text="@string/activity_chat_say_hi_text"
|
||||
android:background="@drawable/button_chat_hi"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginBottom="11dp"
|
||||
android:textColor="#8E7DDF"
|
||||
app:layout_constraintBottom_toTopOf="@+id/rc_extension"
|
||||
android:layout_height="39dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rc_notification_container"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -3,16 +3,16 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="135dp">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_back"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:scaleType="center"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:scaleType="center"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/ic_top_break" />
|
||||
@ -64,6 +64,7 @@
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/view_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="91dp"
|
||||
android:layout_marginTop="14dp"
|
||||
@ -118,18 +119,21 @@
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="TextView"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:textColor="#333333"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"
|
||||
tools:text="TextView" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/status"
|
||||
@ -137,29 +141,38 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@mipmap/ic_message_msg_status_online" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/auth"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="5dp"
|
||||
android:src="@mipmap/ic_person_auth"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/user_tag_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_weight="1">
|
||||
android:layout_weight="1"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/star_up"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
tools:visibility="gone"
|
||||
android:background="@mipmap/bg_message_msg_title_heartbeat"
|
||||
android:gravity="center_horizontal"
|
||||
android:padding="3dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
tools:text="心动值95%"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="10sp" />
|
||||
android:textSize="10sp"
|
||||
android:visibility="gone"
|
||||
tools:text="心动值95%"
|
||||
tools:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@ -179,13 +192,14 @@
|
||||
android:id="@+id/star"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="center"
|
||||
tools:text="TextView"
|
||||
android:textColor="#888888"
|
||||
android:textSize="12sp" />
|
||||
android:textSize="12sp"
|
||||
tools:text="TextView" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -202,12 +216,12 @@
|
||||
android:id="@+id/signature"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="center"
|
||||
tools:text="TextView"
|
||||
android:textColor="#888888"
|
||||
android:textSize="12sp" />
|
||||
android:textSize="12sp"
|
||||
tools:text="TextView" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@ -227,4 +241,42 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/view_layout">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_text"
|
||||
android:layout_width="match_parent"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#555555"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/activity_chat_album_text" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/album_recycler_view"
|
||||
android:layout_width="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:layout_height="wrap_content"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
tools:listitem="@layout/item_chat_album" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/album_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/ic_chat_album_up"
|
||||
/>
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
98
OneToOne/src/main/res/layout/view_oto_update_sex_popup.xml
Normal file
@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="233.5dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@mipmap/bg_gift_completely"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_man"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_man"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@mipmap/icon_male_highlighted" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_man"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="9.5dp"
|
||||
android:text="@string/man_student"
|
||||
android:textColor="#333333"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linear_girl"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/image_girl"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@mipmap/icon_female_highlight" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_girl"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="9.5dp"
|
||||
android:text="@string/girl_student"
|
||||
android:textColor="#333333"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/submit"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="本次可立即修改,下次修改需等待*天" />
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/submit"
|
||||
android:layout_width="110dp"
|
||||
android:layout_height="38dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/bg_home_search_btn"
|
||||
android:text="@string/modify_pwd_confirm_2"
|
||||
android:textColor="#FFF"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -11,7 +11,7 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:id="@+id/titleView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
|
BIN
OneToOne/src/main/res/mipmap-xxhdpi/bg_chat_user_introduce.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 177 KiB |
BIN
OneToOne/src/main/res/mipmap-xxhdpi/ic_chat_album_down.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
OneToOne/src/main/res/mipmap-xxhdpi/ic_chat_album_up.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
BIN
OneToOne/src/main/res/mipmap-xxhdpi/ic_matching_new.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
OneToOne/src/main/res/mipmap-xxhdpi/ic_person_auth.png
Normal file
After Width: | Height: | Size: 10 KiB |