Compare commits
143 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 73cdf9ca43 | |||
| 37d2f0b975 | |||
| f15c609f1c | |||
|
|
d7bc2615d6 | ||
|
|
21473b1d69 | ||
|
|
9bdee649d8 | ||
|
|
f1a8cd3a68 | ||
|
|
a39005b1a9 | ||
|
|
ec1197e5da | ||
|
|
45372f37b8 | ||
|
|
df93b9495a | ||
|
|
86d730cdf1 | ||
|
|
f356446c03 | ||
|
|
bf7bc6b786 | ||
|
|
6a3c15e3e7 | ||
|
|
07d3b190e2 | ||
|
|
27b316d39b | ||
|
|
f928fcd4bc | ||
|
|
adcafc7e16 | ||
|
|
b191dfb1be | ||
|
|
192b0cb417 | ||
|
|
a2435cbe95 | ||
|
|
8925d478da | ||
|
|
926de0463c | ||
|
|
993b09b853 | ||
|
|
e6c8495158 | ||
|
|
e15953dc64 | ||
|
|
4ff529ace9 | ||
|
|
530622c72c | ||
|
|
7f38739ddc | ||
|
|
bc549d52f6 | ||
|
|
14f0de093e | ||
|
|
51457738d2 | ||
|
|
d8a0427791 | ||
|
|
8abf92d42c | ||
|
|
fc2d700a31 | ||
|
|
867029fa3a | ||
|
|
52e199b901 | ||
|
|
c5d537fb4d | ||
|
|
e081f1e058 | ||
|
|
7bedf93dd5 | ||
|
|
000929fd02 | ||
|
|
3e5ba2ba19 | ||
|
|
a25ce2034f | ||
|
|
1625135d0c | ||
|
|
add3589683 | ||
|
|
45a5d6ad61 | ||
|
|
7b62409bf1 | ||
|
|
45ad8a9810 | ||
|
|
a788c347de | ||
|
|
c3d4cb8d62 | ||
|
|
916a1447f0 | ||
|
|
b2ee091c03 | ||
|
|
cf169e9a4e | ||
|
|
ea0ff70595 | ||
|
|
ce37918745 | ||
|
|
260b615d2b | ||
|
|
45566001a7 | ||
|
|
12482b6624 | ||
|
|
2d7684a5c8 | ||
|
|
c1d6b67322 | ||
|
|
69c0d5f28a | ||
|
|
d541a4d506 | ||
|
|
4b46c72f5a | ||
|
|
e191fb82a3 | ||
|
|
32ebfa719d | ||
|
|
c94f549531 | ||
|
|
6d98afa319 | ||
| 20ccb37ccf | |||
|
|
79fa6be313 | ||
|
|
210e755fed | ||
| a6faf12ff6 | |||
|
|
e2148c3f31 | ||
|
|
869ca75464 | ||
|
|
ce48a7dcf0 | ||
|
|
866024ae95 | ||
| b40abb9bc0 | |||
|
|
37217e529e | ||
|
|
eedbbb5304 | ||
| 4b3b47b65f | |||
| c015459cf1 | |||
| 326ced4646 | |||
| 18970c22cf | |||
| 00db8a00c7 | |||
|
|
0756dd9560 | ||
| f3195bbcf8 | |||
| 4e4b5f90bb | |||
| 3150489384 | |||
| 9ff382e35b | |||
| bcd8f7af52 | |||
| 3595b89672 | |||
| 6e8842d30d | |||
| 7b5cd9b797 | |||
| 9ec241f2a3 | |||
| a876018b0a | |||
| ea397af123 | |||
| a475e5dc2f | |||
| 54258c3f13 | |||
| d383a08013 | |||
|
|
fed6289f67 | ||
|
|
9b301eba25 | ||
| d1edf6bdd8 | |||
|
|
7ca8694aed | ||
|
|
406c67bf3a | ||
|
|
d643df72bc | ||
| a3dacf1f59 | |||
| 37605f46b7 | |||
|
|
a4895df622 | ||
| fc63cbbf50 | |||
| b7ba717cb9 | |||
| 0c5ef0befe | |||
|
|
84d4423069 | ||
|
|
0721ff4f37 | ||
| a5b0ee757c | |||
|
|
82fd35305a | ||
| e89e82483b | |||
| 57bda40a82 | |||
|
|
93aa8e55e5 | ||
| 2e907bc1ed | |||
| 8d984951c3 | |||
|
|
dd6600a89e | ||
|
|
233469c7e4 | ||
| 357ece2ebe | |||
|
|
72e9633045 | ||
|
|
7a31ca52da | ||
|
|
33930f3e32 | ||
| 8e19ddcc99 | |||
|
|
1a58311e26 | ||
| 9360e5438c | |||
| fa8d8a7421 | |||
|
|
bebf0820ca | ||
| e1f4e8dde4 | |||
| 2b59b1b4fe | |||
| cee1476ab1 | |||
| 20a6bae5ff | |||
| b6732adfd2 | |||
| bec031688e | |||
| 7f11195ede | |||
| d4ff9c3072 | |||
| 0a442e7df9 | |||
| 52f1a78e36 | |||
|
|
6bcaf2ba9c | ||
|
|
3de972d12c |
@@ -1,96 +1,96 @@
|
||||
<resources>
|
||||
|
||||
<string name="camera_dialog_title">警告</string>
|
||||
<string name="sorry_no_permission">抱歉,你所使用的证书权限或SDK不包括该功能。</string>
|
||||
<string name="camera_dialog_message">相机权限被禁用或者相机被别的应用占用!</string>
|
||||
<string name="camera_dialog_open">重试</string>
|
||||
<string name="sorry_no_permission">抱歉,你所使用的證書權限或SDK不包括該功能。</string>
|
||||
<string name="camera_dialog_message">相機權限被禁用或者相機被別的應用佔用!</string>
|
||||
<string name="camera_dialog_open">重試</string>
|
||||
<string name="camera_dialog_back">退出</string>
|
||||
|
||||
<string name="fu_base_debug">Resolution:\n\t%dX%d\nFPS: %d\nRender time:\n\t%dms</string>
|
||||
<string name="save_photo_success">保存照片成功!</string>
|
||||
<string name="save_video_success">保存视频成功!</string>
|
||||
<string name="save_video_failed">保存视频失败!</string>
|
||||
<string name="save_video_too_short">视频太短啦!</string>
|
||||
<string name="save_video_wait">视频处理中请稍等</string>
|
||||
<string name="fu_base_is_tracking_text">未检测到人脸</string>
|
||||
<string name="fu_base_incomplete_face_text">人脸不全</string>
|
||||
<string name="fu_base_input_type_single">单输入</string>
|
||||
<string name="fu_base_input_type_double">双输入</string>
|
||||
<string name="save_video_success">保存視頻成功!</string>
|
||||
<string name="save_video_failed">保存視頻失敗!</string>
|
||||
<string name="save_video_too_short">視頻太短啦!</string>
|
||||
<string name="save_video_wait">視頻處理中請稍等</string>
|
||||
<string name="fu_base_is_tracking_text">未檢測到人臉</string>
|
||||
<string name="fu_base_incomplete_face_text">人臉不全</string>
|
||||
<string name="fu_base_input_type_single">單輸入</string>
|
||||
<string name="fu_base_input_type_double">雙輸入</string>
|
||||
|
||||
<string name="beauty_box_heavy_blur_fine">磨皮</string>
|
||||
<string name="beauty_box_color_level">美白</string>
|
||||
<string name="beauty_box_red_level">红润</string>
|
||||
<string name="beauty_box_sharpen">锐化</string>
|
||||
<string name="beauty_box_red_level">紅潤</string>
|
||||
<string name="beauty_box_sharpen">銳化</string>
|
||||
<string name="beauty_box_eye_bright">亮眼</string>
|
||||
<string name="beauty_box_tooth_whiten">美牙</string>
|
||||
<string name="beauty_box_eye_enlarge">大眼</string>
|
||||
<string name="beauty_box_eye_circle">圆眼</string>
|
||||
<string name="beauty_box_eye_circle">圓眼</string>
|
||||
<string name="beauty_box_cheek_natural">自然</string>
|
||||
<string name="beauty_box_cheek_goddess">女神</string>
|
||||
<string name="beauty_box_cheek_long_face">长脸</string>
|
||||
<string name="beauty_box_cheek_round_face">圆脸</string>
|
||||
<string name="beauty_box_cheek_thinning">瘦脸</string>
|
||||
<string name="beauty_box_cheek_v">V脸</string>
|
||||
<string name="beauty_box_cheek_narrow">窄脸</string>
|
||||
<string name="beauty_box_cheek_short">短脸</string>
|
||||
<string name="beauty_box_cheek_small">小脸</string>
|
||||
<string name="beauty_box_cheek_long_face">長臉</string>
|
||||
<string name="beauty_box_cheek_round_face">圓臉</string>
|
||||
<string name="beauty_box_cheek_thinning">瘦臉</string>
|
||||
<string name="beauty_box_cheek_v">V臉</string>
|
||||
<string name="beauty_box_cheek_narrow">窄臉</string>
|
||||
<string name="beauty_box_cheek_short">短臉</string>
|
||||
<string name="beauty_box_cheek_small">小臉</string>
|
||||
<string name="beauty_box_intensity_chin">下巴</string>
|
||||
<string name="beauty_box_intensity_forehead">额头</string>
|
||||
<string name="beauty_box_intensity_forehead">額頭</string>
|
||||
<string name="beauty_box_intensity_nose">瘦鼻</string>
|
||||
<string name="beauty_box_intensity_mouth">嘴型</string>
|
||||
<string name="beauty_box_cheekbones">瘦颧骨</string>
|
||||
<string name="beauty_box_lower_jaw">瘦下颌骨</string>
|
||||
<string name="beauty_radio_skin_beauty">美肤</string>
|
||||
<string name="beauty_box_cheekbones">瘦顴骨</string>
|
||||
<string name="beauty_box_lower_jaw">瘦下頜骨</string>
|
||||
<string name="beauty_radio_skin_beauty">美膚</string>
|
||||
<string name="beauty_radio_face_shape">美型</string>
|
||||
<string name="beauty_radio_filter">滤镜</string>
|
||||
<string name="beauty_radio_style">风格推荐</string>
|
||||
<string name="beauty_radio_filter">濾鏡</string>
|
||||
<string name="beauty_radio_style">風格推薦</string>
|
||||
<string name="beauty_micro_pouch">去黑眼圈</string>
|
||||
<string name="beauty_micro_nasolabial">去法令纹</string>
|
||||
<string name="beauty_micro_nasolabial">去法令紋</string>
|
||||
<string name="beauty_micro_smile">微笑嘴角</string>
|
||||
<string name="beauty_brow_height">眉毛上下</string>
|
||||
<string name="beauty_brow_space">眉间距</string>
|
||||
<string name="beauty_micro_canthus">开眼角</string>
|
||||
<string name="beauty_micro_philtrum">缩人中</string>
|
||||
<string name="beauty_micro_long_nose">长鼻</string>
|
||||
<string name="beauty_brow_space">眉間距</string>
|
||||
<string name="beauty_micro_canthus">開眼角</string>
|
||||
<string name="beauty_micro_philtrum">縮人中</string>
|
||||
<string name="beauty_micro_long_nose">長鼻</string>
|
||||
<string name="beauty_micro_eye_space">眼距</string>
|
||||
<string name="beauty_micro_eye_rotate">眼睛角度</string>
|
||||
|
||||
<string name="makeup_radio_lipstick">口红</string>
|
||||
<string name="makeup_radio_blusher">腮红</string>
|
||||
<string name="makeup_radio_lipstick">口紅</string>
|
||||
<string name="makeup_radio_blusher">腮紅</string>
|
||||
<string name="makeup_radio_eyebrow">眉毛</string>
|
||||
<string name="makeup_radio_eye_shadow">眼影</string>
|
||||
<string name="makeup_radio_eye_liner">眼线</string>
|
||||
<string name="makeup_radio_eye_liner">眼線</string>
|
||||
<string name="makeup_radio_eyelash">睫毛</string>
|
||||
<string name="makeup_radio_contact_lens">美瞳</string>
|
||||
<string name="makeup_radio_foundation">粉底</string>
|
||||
<string name="makeup_radio_highlight">高光</string>
|
||||
<string name="makeup_radio_shadow">阴影</string>
|
||||
<string name="makeup_radio_remove">卸妆</string>
|
||||
<string name="makeup_customize">自定义</string>
|
||||
<string name="makeup_radio_shadow">陰影</string>
|
||||
<string name="makeup_radio_remove">卸妝</string>
|
||||
<string name="makeup_customize">自定義</string>
|
||||
<string name="makeup_peach_blossom">桃花</string>
|
||||
<string name="makeup_boyfriend">男友</string>
|
||||
<string name="makeup_clear">清透</string>
|
||||
<string name="makeup_grapefruit">西柚</string>
|
||||
<string name="select_data_photo">选择图片</string>
|
||||
<string name="select_data_video">选择视频</string>
|
||||
<string name="select_data_title">请从相册中选择图片或视频</string>
|
||||
<string name="image_file_does_not_exist">所选图片文件不存在。</string>
|
||||
<string name="video_file_does_not_exist">所选视频文件不存在。</string>
|
||||
<string name="select_data_photo">選擇圖片</string>
|
||||
<string name="select_data_video">選擇視頻</string>
|
||||
<string name="select_data_title">請從相冊中選擇圖片或視頻</string>
|
||||
<string name="image_file_does_not_exist">所選圖片文件不存在。</string>
|
||||
<string name="video_file_does_not_exist">所選視頻文件不存在。</string>
|
||||
|
||||
<string name="future_warrior">张嘴试试</string>
|
||||
<string name="jet_mask">鼓腮帮子</string>
|
||||
<string name="sdx2">皱眉试试</string>
|
||||
<string name="future_warrior">張嘴試試</string>
|
||||
<string name="jet_mask">鼓腮幫子</string>
|
||||
<string name="sdx2">皺眉試試</string>
|
||||
<string name="luhantongkuan_ztt_fu">眨一眨眼</string>
|
||||
<string name="qingqing_ztt_fu">嘟嘴试试</string>
|
||||
<string name="xiaobianzi_zh_fu">微笑触发</string>
|
||||
<string name="xiaoxueshen_ztt_fu">吹气触发</string>
|
||||
<string name="hez_ztt_fu">张嘴试试</string>
|
||||
<string name="qingqing_ztt_fu">嘟嘴試試</string>
|
||||
<string name="xiaobianzi_zh_fu">微笑觸發</string>
|
||||
<string name="xiaoxueshen_ztt_fu">吹氣觸發</string>
|
||||
<string name="hez_ztt_fu">張嘴試試</string>
|
||||
<string name="push_hand">推出手掌</string>
|
||||
<string name="fu_lm_koreaheart">单手手指比心</string>
|
||||
<string name="ssd_thread_six">比个六</string>
|
||||
<string name="ssd_thread_cute">双拳靠近脸颊卖萌</string>
|
||||
<string name="fu_lm_koreaheart">單手手指比心</string>
|
||||
<string name="ssd_thread_six">比個六</string>
|
||||
<string name="ssd_thread_cute">雙拳靠近臉頰賣萌</string>
|
||||
|
||||
<string name="origin">原图</string>
|
||||
<string name="origin">原圖</string>
|
||||
<string name="bailiang_1">白亮 1</string>
|
||||
<string name="bailiang_2">白亮 2</string>
|
||||
<string name="bailiang_3">白亮 3</string>
|
||||
@@ -109,23 +109,23 @@
|
||||
<string name="xiaoqingxin_3">小清新 3</string>
|
||||
<string name="xiaoqingxin_4">小清新 4</string>
|
||||
<string name="xiaoqingxin_6">小清新 6</string>
|
||||
<string name="lengsediao_1">冷色调 1</string>
|
||||
<string name="lengsediao_2">冷色调 2</string>
|
||||
<string name="lengsediao_3">冷色调 3</string>
|
||||
<string name="lengsediao_4">冷色调 4</string>
|
||||
<string name="lengsediao_7">冷色调 7</string>
|
||||
<string name="lengsediao_8">冷色调 8</string>
|
||||
<string name="lengsediao_11">冷色调 11</string>
|
||||
<string name="nuansediao_1">暖色调 1</string>
|
||||
<string name="nuansediao_2">暖色调 2</string>
|
||||
<string name="gexing_1">个性 1</string>
|
||||
<string name="gexing_2">个性 2</string>
|
||||
<string name="gexing_3">个性 3</string>
|
||||
<string name="gexing_4">个性 4</string>
|
||||
<string name="gexing_5">个性 5</string>
|
||||
<string name="gexing_7">个性 7</string>
|
||||
<string name="gexing_10">个性 10</string>
|
||||
<string name="gexing_11">个性 11</string>
|
||||
<string name="lengsediao_1">冷色調 1</string>
|
||||
<string name="lengsediao_2">冷色調 2</string>
|
||||
<string name="lengsediao_3">冷色調 3</string>
|
||||
<string name="lengsediao_4">冷色調 4</string>
|
||||
<string name="lengsediao_7">冷色調 7</string>
|
||||
<string name="lengsediao_8">冷色調 8</string>
|
||||
<string name="lengsediao_11">冷色調 11</string>
|
||||
<string name="nuansediao_1">暖色調 1</string>
|
||||
<string name="nuansediao_2">暖色調 2</string>
|
||||
<string name="gexing_1">個性 1</string>
|
||||
<string name="gexing_2">個性 2</string>
|
||||
<string name="gexing_3">個性 3</string>
|
||||
<string name="gexing_4">個性 4</string>
|
||||
<string name="gexing_5">個性 5</string>
|
||||
<string name="gexing_7">個性 7</string>
|
||||
<string name="gexing_10">個性 10</string>
|
||||
<string name="gexing_11">個性 11</string>
|
||||
<string name="heibai_1">黑白 1</string>
|
||||
<string name="heibai_2">黑白 2</string>
|
||||
<string name="heibai_3">黑白 3</string>
|
||||
@@ -138,14 +138,14 @@
|
||||
<string name="ziran_6">自然 6</string>
|
||||
<string name="ziran_7">自然 7</string>
|
||||
<string name="ziran_8">自然 8</string>
|
||||
<string name="zhiganhui_1">质感灰 1</string>
|
||||
<string name="zhiganhui_2">质感灰 2</string>
|
||||
<string name="zhiganhui_3">质感灰 3</string>
|
||||
<string name="zhiganhui_4">质感灰 4</string>
|
||||
<string name="zhiganhui_5">质感灰 5</string>
|
||||
<string name="zhiganhui_6">质感灰 6</string>
|
||||
<string name="zhiganhui_7">质感灰 7</string>
|
||||
<string name="zhiganhui_8">质感灰 8</string>
|
||||
<string name="zhiganhui_1">質感灰 1</string>
|
||||
<string name="zhiganhui_2">質感灰 2</string>
|
||||
<string name="zhiganhui_3">質感灰 3</string>
|
||||
<string name="zhiganhui_4">質感灰 4</string>
|
||||
<string name="zhiganhui_5">質感灰 5</string>
|
||||
<string name="zhiganhui_6">質感灰 6</string>
|
||||
<string name="zhiganhui_7">質感灰 7</string>
|
||||
<string name="zhiganhui_8">質感灰 8</string>
|
||||
<string name="mitao_1">蜜桃 1</string>
|
||||
<string name="mitao_2">蜜桃 2</string>
|
||||
<string name="mitao_3">蜜桃 3</string>
|
||||
@@ -155,85 +155,85 @@
|
||||
<string name="mitao_7">蜜桃 7</string>
|
||||
<string name="mitao_8">蜜桃 8</string>
|
||||
|
||||
<string name="beauty_face_style_none">无</string>
|
||||
<string name="beauty_face_style_1">风格 1</string>
|
||||
<string name="beauty_face_style_2">风格 2</string>
|
||||
<string name="beauty_face_style_3">风格 3</string>
|
||||
<string name="beauty_face_style_4">风格 4</string>
|
||||
<string name="beauty_face_style_5">风格 5</string>
|
||||
<string name="beauty_face_style_6">风格 6</string>
|
||||
<string name="beauty_face_style_7">风格 7</string>
|
||||
<string name="beauty_face_style_toast">使用%s先取消“风格推荐”</string>
|
||||
<string name="beauty_face_style_none">無</string>
|
||||
<string name="beauty_face_style_1">風格 1</string>
|
||||
<string name="beauty_face_style_2">風格 2</string>
|
||||
<string name="beauty_face_style_3">風格 3</string>
|
||||
<string name="beauty_face_style_4">風格 4</string>
|
||||
<string name="beauty_face_style_5">風格 5</string>
|
||||
<string name="beauty_face_style_6">風格 6</string>
|
||||
<string name="beauty_face_style_7">風格 7</string>
|
||||
<string name="beauty_face_style_toast">使用%s先取消“風格推薦”</string>
|
||||
|
||||
<string name="poster_take_photo">对准线框 正脸拍摄</string>
|
||||
<string name="poster_change_face_error">替换失败</string>
|
||||
<string name="poster_template_face_none">未识别模板的人脸,请重新选择模板</string>
|
||||
<string name="dialog_no_track_face">未检测到人脸,请重新拍摄</string>
|
||||
<string name="dialog_no_incomplete_face">人脸不全,请重新拍摄</string>
|
||||
<string name="dialog_face_rotation_not_valid">人脸偏转角度过大,请正脸拍摄。</string>
|
||||
<string name="poster_take_photo">對準線框 正臉拍攝</string>
|
||||
<string name="poster_change_face_error">替換失敗</string>
|
||||
<string name="poster_template_face_none">未識別模板的人臉,請重新選擇模板</string>
|
||||
<string name="dialog_no_track_face">未檢測到人臉,請重新拍攝</string>
|
||||
<string name="dialog_no_incomplete_face">人臉不全,請重新拍攝</string>
|
||||
<string name="dialog_face_rotation_not_valid">人臉偏轉角度過大,請正臉拍攝。</string>
|
||||
<string name="dialog_got">知道啦</string>
|
||||
<string name="tip_dual_face">检测到多人,请选择一人进行换脸</string>
|
||||
<string name="tip_dual_face">檢測到多人,請選擇一人進行換臉</string>
|
||||
|
||||
<string name="animoji_filter">Animoji</string>
|
||||
<string name="cartoon_filter">动漫滤镜</string>
|
||||
<string name="cartoon_filter">動漫濾鏡</string>
|
||||
|
||||
<string name="delete_avatar_model">删除模型</string>
|
||||
<string name="delete_avatar_model">刪除模型</string>
|
||||
<string name="new_avatar_model">新建模型</string>
|
||||
<string name="edit_avatar_model">编辑模型</string>
|
||||
<string name="edit_avatar_model">編輯模型</string>
|
||||
|
||||
<string name="avatar_face_hair">发型</string>
|
||||
<string name="avatar_face_face">脸型</string>
|
||||
<string name="avatar_face_hair">髮型</string>
|
||||
<string name="avatar_face_face">臉型</string>
|
||||
<string name="avatar_face_eye">眼睛</string>
|
||||
<string name="avatar_face_lip">嘴唇</string>
|
||||
<string name="avatar_face_nose">鼻子</string>
|
||||
|
||||
<string name="avatar_face_length">脸型长度</string>
|
||||
<string name="avatar_face_width">脸颊宽度</string>
|
||||
<string name="avatar_chin_width">下颚宽度</string>
|
||||
<string name="avatar_face_length">臉型長度</string>
|
||||
<string name="avatar_face_width">臉頰寬度</string>
|
||||
<string name="avatar_chin_width">下顎寬度</string>
|
||||
<string name="avatar_chin_height">下巴高低</string>
|
||||
<string name="avatar_eye_position">眼睛位置</string>
|
||||
<string name="avatar_eye_corner_height">眼角高度</string>
|
||||
<string name="avatar_eye_height">眼睛高低</string>
|
||||
<string name="avatar_eye_width">眼睛宽窄</string>
|
||||
<string name="avatar_eye_width">眼睛寬窄</string>
|
||||
<string name="avatar_nose_position">鼻子位置</string>
|
||||
<string name="avatar_nose_width">鼻翼宽窄</string>
|
||||
<string name="avatar_nose_height">鼻头高低</string>
|
||||
<string name="avatar_nose_width">鼻翼寬窄</string>
|
||||
<string name="avatar_nose_height">鼻頭高低</string>
|
||||
<string name="avatar_mouth_position">嘴部位置</string>
|
||||
<string name="avatar_up_lip_thickness">上唇厚度</string>
|
||||
<string name="avatar_down_lip_thickness">下唇厚度</string>
|
||||
<string name="avatar_lip_width">嘴唇宽度</string>
|
||||
<string name="model_empty_tip">你还没有创建过模型哦</string>
|
||||
<string name="dialog_reset_avatar_model">是否将所有参数恢复到默认值?</string>
|
||||
<string name="avatar_face_customize">自定义</string>
|
||||
<string name="avatar_lip_width">嘴唇寬度</string>
|
||||
<string name="model_empty_tip">你還沒有創建過模型哦</string>
|
||||
<string name="dialog_reset_avatar_model">是否將所有參數恢復到默認值?</string>
|
||||
<string name="avatar_face_customize">自定義</string>
|
||||
<string name="avatar_save_succeed">保存成功</string>
|
||||
|
||||
<string name="live_photo_back_not_save">返回后当前操作将不会被保存哦</string>
|
||||
<string name="live_photo_btn_delete">删除</string>
|
||||
<string name="live_photo_back_not_save">返回后當前操作將不會被保存哦</string>
|
||||
<string name="live_photo_btn_delete">刪除</string>
|
||||
<string name="live_photo_btn_cancel">取消</string>
|
||||
<string name="live_photo_btn_delete_">删除(%d)</string>
|
||||
<string name="live_photo_delete_effect">删除道具</string>
|
||||
<string name="live_photo__delete_all">全选</string>
|
||||
<string name="live_photo_empty_list_tip">你还没有创建过道具哦</string>
|
||||
<string name="confirm">确定</string>
|
||||
<string name="live_photo_btn_delete_">刪除(%d)</string>
|
||||
<string name="live_photo_delete_effect">刪除道具</string>
|
||||
<string name="live_photo__delete_all">全選</string>
|
||||
<string name="live_photo_empty_list_tip">你還沒有創建過道具哦</string>
|
||||
<string name="confirm">確定</string>
|
||||
<string name="cancel">取消</string>
|
||||
<string name="dialog_confirm_delete">确定删除所选中的道具?</string>
|
||||
<string name="toast_delete_succeed">删除成功</string>
|
||||
<string name="toast_delete_failed">删除失败</string>
|
||||
<string name="dialog_confirm_delete">確定刪除所選中的道具?</string>
|
||||
<string name="toast_delete_succeed">刪除成功</string>
|
||||
<string name="toast_delete_failed">刪除失敗</string>
|
||||
<string name="live_photo_save_succeed">道具保存成功</string>
|
||||
<string name="recover">恢复</string>
|
||||
<string name="recover">恢復</string>
|
||||
|
||||
<string name="makeup_lip_fog">雾面</string>
|
||||
<string name="makeup_lip_moist1">润泽Ⅰ</string>
|
||||
<string name="makeup_lip_moist2">润泽Ⅱ</string>
|
||||
<string name="makeup_lip_fog">霧面</string>
|
||||
<string name="makeup_lip_moist1">潤澤Ⅰ</string>
|
||||
<string name="makeup_lip_moist2">潤澤Ⅱ</string>
|
||||
<string name="makeup_lip_pearl">珠光</string>
|
||||
<string name="makeup_lip_bitelip">咬唇</string>
|
||||
<string name="makeup_blusher_apple">苹果肌</string>
|
||||
<string name="makeup_blusher_apple">蘋果肌</string>
|
||||
<string name="makeup_blusher_fan">扇形</string>
|
||||
<string name="makeup_blusher_eye_corner">眼角</string>
|
||||
<string name="makeup_blusher_slight_drunk">微醺</string>
|
||||
<string name="makeup_highlight_one">高光 I</string>
|
||||
<string name="makeup_highlight_two">高光 II</string>
|
||||
<string name="makeup_shadow_one">阴影 I</string>
|
||||
<string name="makeup_shadow_one">陰影 I</string>
|
||||
<string name="makeup_pupil_1">蜜糖</string>
|
||||
<string name="makeup_pupil_2">奶茶</string>
|
||||
<string name="makeup_pupil_3">水波</string>
|
||||
@@ -241,106 +241,106 @@
|
||||
<string name="makeup_pupil_5">孔雀</string>
|
||||
<string name="makeup_pupil_6">星河</string>
|
||||
<string name="makeup_pupil_7">落目</string>
|
||||
<string name="makeup_pupil_8">极光</string>
|
||||
<string name="makeup_eyebrow_willow">柳叶眉</string>
|
||||
<string name="makeup_pupil_8">極光</string>
|
||||
<string name="makeup_eyebrow_willow">柳恭弘=叶 恭弘眉</string>
|
||||
<string name="makeup_eyebrow_wild">野生眉</string>
|
||||
<string name="makeup_eyebrow_classical">古典眉</string>
|
||||
<string name="makeup_eyebrow_standard">标准眉</string>
|
||||
<string name="makeup_eye_shadow_single">单色眼影</string>
|
||||
<string name="makeup_eye_shadow_double1">双色眼影 I</string>
|
||||
<string name="makeup_eye_shadow_double2">双色眼影 II</string>
|
||||
<string name="makeup_eye_shadow_double3">双色眼影 III</string>
|
||||
<string name="makeup_eyebrow_standard">標準眉</string>
|
||||
<string name="makeup_eye_shadow_single">單色眼影</string>
|
||||
<string name="makeup_eye_shadow_double1">雙色眼影 I</string>
|
||||
<string name="makeup_eye_shadow_double2">雙色眼影 II</string>
|
||||
<string name="makeup_eye_shadow_double3">雙色眼影 III</string>
|
||||
<string name="makeup_eye_shadow_triple1">三色眼影 I</string>
|
||||
<string name="makeup_eye_shadow_triple2">三色眼影 II</string>
|
||||
<string name="makeup_eyelash_natural1">自然型 I</string>
|
||||
<string name="makeup_eyelash_natural2">自然型 II</string>
|
||||
<string name="makeup_eyelash_thick1">浓密型 I</string>
|
||||
<string name="makeup_eyelash_thick2">浓密型 II</string>
|
||||
<string name="makeup_eyelash_exaggerate1">夸张型 I</string>
|
||||
<string name="makeup_eyelash_exaggerate2">夸张型 II</string>
|
||||
<string name="makeup_eye_linear_cat">猫眼</string>
|
||||
<string name="makeup_eyelash_thick1">濃密型 I</string>
|
||||
<string name="makeup_eyelash_thick2">濃密型 II</string>
|
||||
<string name="makeup_eyelash_exaggerate1">誇張型 I</string>
|
||||
<string name="makeup_eyelash_exaggerate2">誇張型 II</string>
|
||||
<string name="makeup_eye_linear_cat">貓眼</string>
|
||||
<string name="makeup_eye_linear_drooping">下垂眼</string>
|
||||
<string name="makeup_eye_linear_pull_open">拉开眼距</string>
|
||||
<string name="makeup_eye_linear_pull_open">拉開眼距</string>
|
||||
<string name="makeup_eye_linear_pull_close">拉近眼距</string>
|
||||
<string name="makeup_eye_linear_long">长眼</string>
|
||||
<string name="makeup_eye_linear_circular">圆眼</string>
|
||||
<string name="makeup_eye_linear_long">長眼</string>
|
||||
<string name="makeup_eye_linear_circular">圓眼</string>
|
||||
|
||||
<string name="makeup_combination_diadiatu">嗲嗲兔</string>
|
||||
<string name="makeup_combination_dongling">冻龄</string>
|
||||
<string name="makeup_combination_guofeng">国风</string>
|
||||
<string name="makeup_combination_dongling">凍齡</string>
|
||||
<string name="makeup_combination_guofeng">國風</string>
|
||||
<string name="makeup_combination_hunxie">混血</string>
|
||||
<string name="makeup_combination_sexy">性感</string>
|
||||
<string name="makeup_combination_sweet">甜美</string>
|
||||
<string name="makeup_combination_neighbor">邻家</string>
|
||||
<string name="makeup_combination_occident">欧美</string>
|
||||
<string name="makeup_combination_charming">妩媚</string>
|
||||
<string name="makeup_combination_jianling">减龄</string>
|
||||
<string name="makeup_combination_neighbor">鄰家</string>
|
||||
<string name="makeup_combination_occident">歐美</string>
|
||||
<string name="makeup_combination_charming">嫵媚</string>
|
||||
<string name="makeup_combination_jianling">減齡</string>
|
||||
<string name="makeup_combination_nuandong">暖冬</string>
|
||||
<string name="makeup_combination_hongfeng">红枫</string>
|
||||
<string name="makeup_combination_hongfeng">紅楓</string>
|
||||
<string name="makeup_combination_shaonv">少女</string>
|
||||
<string name="makeup_combination_ziyun">紫韵</string>
|
||||
<string name="makeup_combination_yanshimao">厌世猫</string>
|
||||
<string name="makeup_combination_renyu">人鱼</string>
|
||||
<string name="makeup_combination_ziyun">紫韻</string>
|
||||
<string name="makeup_combination_yanshimao">厭世貓</string>
|
||||
<string name="makeup_combination_renyu">人魚</string>
|
||||
<string name="makeup_combination_chuqiu">初秋</string>
|
||||
<string name="makeup_combination_qianzhihe">千纸鹤</string>
|
||||
<string name="makeup_combination_qianzhihe">千紙鶴</string>
|
||||
<string name="makeup_combination_chaomo">超模</string>
|
||||
<string name="makeup_combination_chuju">雏菊</string>
|
||||
<string name="makeup_combination_gangfeng">港风</string>
|
||||
<string name="makeup_combination_chuju">雛菊</string>
|
||||
<string name="makeup_combination_gangfeng">港風</string>
|
||||
<string name="makeup_combination_rose">Rose</string>
|
||||
|
||||
<string name="slimming">瘦身</string>
|
||||
<string name="long_legs">长腿</string>
|
||||
<string name="thin_waist">细腰</string>
|
||||
<string name="long_legs">長腿</string>
|
||||
<string name="thin_waist">細腰</string>
|
||||
<string name="beautify_shoulder">美肩</string>
|
||||
<string name="beautify_hip_slim">美臀</string>
|
||||
<string name="beautify_head_slim">小头</string>
|
||||
<string name="beautify_head_slim">小頭</string>
|
||||
<string name="beautify_leg_thin_slim">瘦腿</string>
|
||||
<string name="toast_not_detect_body">未检测到人体</string>
|
||||
<string name="pta_human_full_body">全身驱动</string>
|
||||
<string name="pta_human_half_body">半身驱动</string>
|
||||
<string name="toast_not_detect_body">未檢測到人體</string>
|
||||
<string name="pta_human_full_body">全身驅動</string>
|
||||
<string name="pta_human_half_body">半身驅動</string>
|
||||
|
||||
|
||||
<string name="select_data_photo_or_video">载入图片或视频</string>
|
||||
<string name="toast_not_detect_gesture">未检测到手势</string>
|
||||
<string name="select_data_photo_or_video">載入圖片或視頻</string>
|
||||
<string name="toast_not_detect_gesture">未檢測到手勢</string>
|
||||
|
||||
<string name="bg_seg_green_graphic">抠像</string>
|
||||
<string name="bg_seg_green_graphic">摳像</string>
|
||||
<string name="bg_seg_green_background">背景</string>
|
||||
<string name="bg_seg_green_key_color">关键颜色</string>
|
||||
<string name="bg_seg_green_key_color">關鍵顏色</string>
|
||||
<string name="bg_seg_green_similarity">相似度</string>
|
||||
<string name="bg_seg_green_smooth">平滑</string>
|
||||
<string name="bg_seg_green_alpha">祛色度</string>
|
||||
<string name="bg_seg_green_safe_area">安全区域</string>
|
||||
<string name="bg_seg_green_safe_area">安全區域</string>
|
||||
<string name="bg_seg_green_science">科技</string>
|
||||
<string name="bg_seg_green_beach">沙滩</string>
|
||||
<string name="bg_seg_green_beach">沙灘</string>
|
||||
<string name="bg_seg_green_classroom">教室</string>
|
||||
<string name="bg_seg_green_forest">森林</string>
|
||||
<string name="bg_seg_green_ink">水墨画</string>
|
||||
<string name="dialog_guide_bg_seg_green">请使用纯色背景拍摄,推荐绿色幕布效果最佳</string>
|
||||
<string name="bg_seg_green_ink">水墨畫</string>
|
||||
<string name="dialog_guide_bg_seg_green">請使用純色背景拍攝,推薦綠色幕布效果最佳</string>
|
||||
<string name="dialog_i_know">我知道了</string>
|
||||
|
||||
<string name="download_error">下载失败</string>
|
||||
<string name="download_error">下載失敗</string>
|
||||
<string name="back">返回</string>
|
||||
|
||||
<string name="safe_area_tips">白色区域为安全区域,不参与绿幕抠像</string>
|
||||
<string name="safe_area_tips">白色區域為安全區域,不參与綠幕摳像</string>
|
||||
|
||||
<string name="brow_height_tips">眉毛上下功能仅支持在高端机上使用</string>
|
||||
<string name="brow_space_tips">眉间距功能仅支持在高端机上使用</string>
|
||||
<string name="brow_height_tips">眉毛上下功能僅支持在高端機上使用</string>
|
||||
<string name="brow_space_tips">眉間距功能僅支持在高端機上使用</string>
|
||||
|
||||
|
||||
<string name="home_function_name_beauty">美颜</string>
|
||||
<string name="home_function_name_makeup">美妆</string>
|
||||
<string name="home_function_name_sticker">贴纸</string>
|
||||
<string name="home_function_name_beauty_body">美体</string>
|
||||
<string name="home_function_name_beauty">美顏</string>
|
||||
<string name="home_function_name_makeup">美妝</string>
|
||||
<string name="home_function_name_sticker">貼紙</string>
|
||||
<string name="home_function_name_beauty_body">美體</string>
|
||||
|
||||
<string name="toast_not_detect_face">未检测到人脸</string>
|
||||
<string name="toast_not_detect_face_or_body">未检测到人脸或人体</string>
|
||||
<string name="toast_not_detect_face">未檢測到人臉</string>
|
||||
<string name="toast_not_detect_face_or_body">未檢測到人臉或人體</string>
|
||||
|
||||
<string name="makeup_combination_naicha">奶茶</string>
|
||||
<string name="makeup_combination_dousha">豆沙</string>
|
||||
<string name="makeup_combination_chaoa">超A</string>
|
||||
<string name="home_function_name_big_head">搞笑大头</string>
|
||||
<string name="home_function_name_big_head">搞笑大頭</string>
|
||||
<string name="home_function_name_animoji">Animoji</string>
|
||||
<string name="home_function_name_fine_sticker">精品贴纸</string>
|
||||
<string name="home_function_name_fine_sticker">精品貼紙</string>
|
||||
<string name="dialog_reset">重置</string>
|
||||
<string name="menu_diy">自定義</string>
|
||||
|
||||
|
||||
@@ -16,33 +16,33 @@
|
||||
<string name="fu_base_input_type_single">SingleInput</string>
|
||||
<string name="fu_base_input_type_double">DualInput</string>
|
||||
|
||||
<string name="beauty_box_heavy_blur_fine">Fine smooth</string>
|
||||
<string name="beauty_box_color_level">Whiten</string>
|
||||
<string name="beauty_box_red_level">Ruddy</string>
|
||||
<string name="beauty_box_heavy_blur_fine">Buffing</string>
|
||||
<string name="beauty_box_color_level">Skin Tone</string>
|
||||
<string name="beauty_box_red_level">Rosy</string>
|
||||
<string name="beauty_box_sharpen">Sharpen</string>
|
||||
<string name="beauty_box_eye_bright">Eye brighten</string>
|
||||
<string name="beauty_box_tooth_whiten">Tooth whiten</string>
|
||||
<string name="beauty_box_eye_enlarge">Eye enlarge</string>
|
||||
<string name="beauty_box_eye_circle">Eye round</string>
|
||||
<string name="beauty_box_cheek_natural">Natural</string>
|
||||
<string name="beauty_box_eye_bright">Brighen</string>
|
||||
<string name="beauty_box_tooth_whiten">Whiten</string>
|
||||
<string name="beauty_box_eye_enlarge">Enlarge</string>
|
||||
<string name="beauty_box_eye_circle">Round</string>
|
||||
<string name="beauty_box_cheek_natural">Origin</string>
|
||||
<string name="beauty_box_cheek_goddess">Goddess</string>
|
||||
<string name="beauty_box_cheek_long_face">Long face</string>
|
||||
<string name="beauty_box_cheek_round_face">Round face</string>
|
||||
<string name="beauty_box_cheekbones">Cheekbone</string>
|
||||
<string name="beauty_box_lower_jaw">Jawbone</string>
|
||||
<string name="beauty_box_cheek_thinning">Cheek thin</string>
|
||||
<string name="beauty_box_cheek_v">V face</string>
|
||||
<string name="beauty_box_cheek_narrow">CheekNarrow</string>
|
||||
<string name="beauty_box_cheek_short">Cheek short</string>
|
||||
<string name="beauty_box_cheek_small">Cheek small</string>
|
||||
<string name="beauty_box_intensity_chin">Chin</string>
|
||||
<string name="beauty_box_intensity_forehead">Forehead</string>
|
||||
<string name="beauty_box_intensity_nose">Nose</string>
|
||||
<string name="beauty_box_intensity_mouth">Mouth</string>
|
||||
<string name="beauty_radio_skin_beauty">Skin</string>
|
||||
<string name="beauty_radio_face_shape">Reshape</string>
|
||||
<string name="beauty_box_cheekbones">Cheek</string>
|
||||
<string name="beauty_box_lower_jaw">Jaw</string>
|
||||
<string name="beauty_box_cheek_thinning">Lower Width</string>
|
||||
<string name="beauty_box_cheek_v">V Shape</string>
|
||||
<string name="beauty_box_cheek_narrow">Upper Width</string>
|
||||
<string name="beauty_box_cheek_short">Short Face</string>
|
||||
<string name="beauty_box_cheek_small">Size Face</string>
|
||||
<string name="beauty_box_intensity_chin">Chin Length</string>
|
||||
<string name="beauty_box_intensity_forehead">Hairline</string>
|
||||
<string name="beauty_box_intensity_nose">Nose Size</string>
|
||||
<string name="beauty_box_intensity_mouth">Mouth Size</string>
|
||||
<string name="beauty_radio_skin_beauty">Skincare</string>
|
||||
<string name="beauty_radio_face_shape">Beauty type</string>
|
||||
<string name="beauty_radio_filter">Filter</string>
|
||||
<string name="beauty_radio_style">Presets</string>
|
||||
<string name="beauty_radio_style">Style recommend</string>
|
||||
<string name="makeup_radio_lipstick">Lipstick</string>
|
||||
<string name="makeup_radio_blusher">Blush</string>
|
||||
<string name="makeup_radio_eyebrow">Eyebrow</string>
|
||||
@@ -59,16 +59,16 @@
|
||||
<string name="makeup_boyfriend">Boyfriend</string>
|
||||
<string name="makeup_clear">Clear</string>
|
||||
<string name="makeup_grapefruit">Grapefruit</string>
|
||||
<string name="beauty_micro_pouch">Circle</string>
|
||||
<string name="beauty_micro_nasolabial">Wrinkles</string>
|
||||
<string name="beauty_micro_pouch">Dark Circles</string>
|
||||
<string name="beauty_micro_nasolabial">Laugh Line</string>
|
||||
<string name="beauty_micro_smile">Smile</string>
|
||||
<string name="beauty_brow_height">Brow height</string>
|
||||
<string name="beauty_brow_space">Brow space</string>
|
||||
<string name="beauty_micro_canthus">Canthus</string>
|
||||
<string name="beauty_micro_philtrum">Philtrum</string>
|
||||
<string name="beauty_micro_long_nose">Length</string>
|
||||
<string name="beauty_micro_eye_space">Eye distance</string>
|
||||
<string name="beauty_micro_eye_rotate">Slant</string>
|
||||
<string name="beauty_brow_height">Brow Position</string>
|
||||
<string name="beauty_brow_space">Brow Distance</string>
|
||||
<string name="beauty_micro_canthus">Inner Corner</string>
|
||||
<string name="beauty_micro_philtrum">Mouth Position</string>
|
||||
<string name="beauty_micro_long_nose">Nose Lift</string>
|
||||
<string name="beauty_micro_eye_space">Eye Distance</string>
|
||||
<string name="beauty_micro_eye_rotate">Eye Upturn</string>
|
||||
<string name="beauty_face_style_none">None</string>
|
||||
<string name="beauty_face_style_1">Style 1</string>
|
||||
<string name="beauty_face_style_2">Style 2</string>
|
||||
@@ -77,7 +77,7 @@
|
||||
<string name="beauty_face_style_5">Style 5</string>
|
||||
<string name="beauty_face_style_6">Style 6</string>
|
||||
<string name="beauty_face_style_7">Style 7</string>
|
||||
<string name="beauty_face_style_toast">To use %s, cancel \'Presets\' first.</string>
|
||||
<string name="beauty_face_style_toast">To use %s, cancel \'Style recommend\' first.</string>
|
||||
|
||||
<string name="select_data_photo">Photo</string>
|
||||
<string name="select_data_video">Video</string>
|
||||
|
||||
@@ -5,6 +5,9 @@ apply plugin: 'com.alibaba.arouter'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
|
||||
android {
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
@@ -22,8 +25,6 @@ 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"
|
||||
@@ -38,7 +39,7 @@ android {
|
||||
exclude 'lib/arm64-v8a/libmmcv_base.so'
|
||||
exclude 'lib/arm64-v8a/libmmcrypto.so'
|
||||
exclude 'lib/arm64-v8a/libMNN.so'
|
||||
// exclude 'lib/arm64-v8a/libc++_shared.so'
|
||||
pickFirst 'lib/arm64-v8a/libc++_shared.so'
|
||||
exclude 'lib/arm64-v8a/libmmcv_api_base.so'
|
||||
exclude 'lib/arm64-v8a/libmmcv_api_beauty.so'
|
||||
exclude 'lib/arm64-v8a/libmmcv_api_bodylandmark.so'
|
||||
@@ -59,7 +60,7 @@ android {
|
||||
exclude 'lib/armeabi-v7a/libmmcv_base.so'
|
||||
exclude 'lib/armeabi-v7a/libmmcrypto.so'
|
||||
exclude 'lib/armeabi-v7a/libMNN.so'
|
||||
// exclude 'lib/armeabi-v7a/libc++_shared.so'
|
||||
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
|
||||
exclude 'lib/armeabi-v7a/libmmcv_api_base.so'
|
||||
exclude 'lib/armeabi-v7a/libmmcv_api_beauty.so'
|
||||
exclude 'lib/armeabi-v7a/libmmcv_api_bodylandmark.so'
|
||||
@@ -102,24 +103,18 @@ android {
|
||||
}
|
||||
|
||||
variant.outputs.all {
|
||||
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"
|
||||
|
||||
outputFileName = "[${new Date().format("MM-dd", TimeZone.getTimeZone("GMT+8"))}]友聊-${rootProject.ext.android.otoversionName}-${variant.buildType.name}.apk"
|
||||
|
||||
}
|
||||
}
|
||||
defaultConfig {
|
||||
applicationId "com.shayu.onetoonenew"
|
||||
//applicationId "com.shayu.onetoonenew"
|
||||
applicationId "com.pdlive.shayu"
|
||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||||
versionCode rootProject.ext.android.otoversionCode
|
||||
versionName rootProject.ext.android.otoversionName //+new Date().format("HHmm", TimeZone.getTimeZone("GMT+8"))
|
||||
versionName rootProject.ext.android.otoversionName
|
||||
manifestPlaceholders = rootProject.ext.manifestPlaceholders
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||||
@@ -191,11 +186,15 @@ dependencies {
|
||||
implementation project(path: ':lib_country_code')
|
||||
annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
|
||||
implementation platform('com.google.firebase:firebase-bom:30.5.0')
|
||||
implementation 'com.google.firebase:firebase-crashlytics'
|
||||
//common
|
||||
api project(path: ':common')
|
||||
//api project(path:':FaceUnity')//新娱美颜
|
||||
api project(path:':Share')
|
||||
api project(path:':video')
|
||||
api project(path:':main')
|
||||
|
||||
api project(path:':TabLayout')
|
||||
api project(path:':ViewPager2Delegate')
|
||||
api project(path:':callkit')//// 音视频通话能力 UI 组件
|
||||
|
||||
63
OneToOne/google-services-oto.json
Normal file
63
OneToOne/google-services-oto.json
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "903482201540",
|
||||
"project_id": "onetoone-71170",
|
||||
"storage_bucket": "onetoone-71170.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:903482201540:android:132978cdf497f4d8634091",
|
||||
"android_client_info": {
|
||||
"package_name": "com.shayu.onetoonenew"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "903482201540-ddno3ro8fp0lqqoeodbhbnpqf7f8d439.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.shayu.onetoonenew",
|
||||
"certificate_hash": "b66dc8d21cfcf6c729577ddcf0c312b2a31ed872"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "903482201540-e9ua9huoejtubp7pgsbu3iq76tqkoorp.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.shayu.onetoonenew",
|
||||
"certificate_hash": "15fc5e70cf238323bf7111c8c627803985478e87"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "903482201540-k3cffuuhsed23kkiuopufhf54ano7do4.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.shayu.onetoonenew",
|
||||
"certificate_hash": "38cc19306c9facee36a9224e9a4070bc0be15c7d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "903482201540-s2j96h6k7go0ah51ksi7es8mt7qhankh.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyCrhj-7WjwdYUHBMzz9Ntie_S474slGjVY"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "903482201540-s2j96h6k7go0ah51ksi7es8mt7qhankh.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "903482201540",
|
||||
"project_id": "onetoone-71170",
|
||||
"storage_bucket": "onetoone-71170.appspot.com"
|
||||
"project_number": "292494634914",
|
||||
"project_id": "pdlive-1631521064967",
|
||||
"storage_bucket": "pdlive-1631521064967.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:903482201540:android:132978cdf497f4d8634091",
|
||||
"mobilesdk_app_id": "1:292494634914:android:d8db197d7e7a6c3a3a4cfb",
|
||||
"android_client_info": {
|
||||
"package_name": "com.shayu.onetoonenew"
|
||||
"package_name": "com.pdlive.shayu"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
@@ -17,42 +17,49 @@
|
||||
"client_id": "903482201540-ddno3ro8fp0lqqoeodbhbnpqf7f8d439.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.shayu.onetoonenew",
|
||||
"certificate_hash": "b66dc8d21cfcf6c729577ddcf0c312b2a31ed872"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "903482201540-e9ua9huoejtubp7pgsbu3iq76tqkoorp.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.shayu.onetoonenew",
|
||||
"certificate_hash": "15fc5e70cf238323bf7111c8c627803985478e87"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "903482201540-k3cffuuhsed23kkiuopufhf54ano7do4.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.shayu.onetoonenew",
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "38cc19306c9facee36a9224e9a4070bc0be15c7d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "903482201540-s2j96h6k7go0ah51ksi7es8mt7qhankh.apps.googleusercontent.com",
|
||||
"client_id": "292494634914-ctr3fptp5mkv2qqr4gkgjo9uluq2joqb.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "15fc5e70cf238323bf7111c8c627803985478e87"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-ejtqvaj86a2lldv0di2pr3d5gngprahd.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.pdlive.shayu",
|
||||
"certificate_hash": "b66dc8d21cfcf6c729577ddcf0c312b2a31ed872"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyCrhj-7WjwdYUHBMzz9Ntie_S474slGjVY"
|
||||
"current_key": "AIzaSyDVnuGnQzjI_vDrxh20Hv_S1OMUD7Vp3zU"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "903482201540-s2j96h6k7go0ah51ksi7es8mt7qhankh.apps.googleusercontent.com",
|
||||
"client_id": "292494634914-ha2kbgtclkv20hl3a1l8r7861a1a0m5i.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "292494634914-v9j4rei86q2pfh9as4seotb23vr2744a.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "com.live.pd"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -144,6 +144,7 @@
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".activity.WebViewActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
@@ -266,18 +267,6 @@
|
||||
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"
|
||||
@@ -292,9 +281,6 @@
|
||||
<meta-data
|
||||
android:name="SERVER_HOST"
|
||||
android:value="${otoServerHost}" />
|
||||
<meta-data
|
||||
android:name="IS_GOOGLE_PLAY"
|
||||
android:value="${isGooglePlay}" />
|
||||
<meta-data
|
||||
android:name="com.facebook.sdk.ApplicationId"
|
||||
android:value="@string/facebook_app_id" />
|
||||
@@ -305,11 +291,21 @@
|
||||
android:name="com.facebook.sdk.AutoLogAppEventsEnabled"
|
||||
android:value="false" />
|
||||
<meta-data
|
||||
android:name="RONG_KEY"
|
||||
android:value="${rongIMKey}" />
|
||||
android:name="IS_GOOGLE_PLAY"
|
||||
android:value="${isGooglePlay}" />
|
||||
<meta-data
|
||||
android:name="IS_UPLOAD_ERROR_LOG"
|
||||
android:value="${isUploadLog}" />
|
||||
<meta-data
|
||||
android:name="IS_PLUGIN_MODEL"
|
||||
android:value="${isPluginModel}" />
|
||||
<meta-data
|
||||
android:name="firebase_crashlytics_collection_enabled"
|
||||
android:value="${isUploadLog}" />
|
||||
<meta-data
|
||||
android:name="com.openinstall.APP_KEY"
|
||||
android:value="rofnt4" />
|
||||
android:value="smvslm" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -4,32 +4,32 @@
|
||||
<title>本地HTML页面</title>
|
||||
</head>
|
||||
<body>
|
||||
<h3>獎勵說明</h3>
|
||||
<h1>獎勵說明</h1>
|
||||
<p>在您使用平台服務取得和提取收益(包括:互動收益、通話收益)前,您應閱讀並遵守本說明及將來公示的新增的單項說明或規則、操作時的提示以及規則。 我們在此特別提醒您認真閱讀並充分理解本說明,特別是免除或限制我們責任、限制您的權利、規定爭議解決方式的相關條款。 除非您接受本說明,否則您無權使用相關功能。 您一經使用獎勵獲取、收益兌換和提現等相關功能,即視為您已理解並接受本說明。 我們保留根據相關法律規定、主管機關要求、業務開展情況等,對獎勵的領取、兌換、提現規則進行變更、調整、中止或終止的權利,同時也會將變更、調整予以公示並自公示之日起生效。</p>
|
||||
<h3>1、如何獲得獎勵?</h3>
|
||||
<h1>1、如何獲得獎勵?</h1>
|
||||
|
||||
<h3>A.付費消息:</h3>
|
||||
<h1>A.付費消息:</h1>
|
||||
<p>用戶在以下情況將有機會獲得付費方付費訊息星幣價值的固定比例作為獎勵:</p>
|
||||
<p>(1)系統匹配的會話,不同等級時,低等級用戶為付費方;同等級時,男用戶為付費方(目前等級由低到高分別為:未認證用戶,達人認證用戶 )。 系統匹配的會話包括:系統匹配的搭訕/訊息(如紅娘牽線)等;</p>
|
||||
<p>(1)系統匹配的會話,不同等級時,低等級用戶為付費方;同等級時,男用戶為付費方(目前等級由低到高分別為:未認證用戶,真人認證用戶,達人認證用戶 )。 系統匹配的會話包括:系統匹配的搭訕/訊息(如紅娘牽線)等; </p>
|
||||
<p>(2)除系統匹配的會話及平台另有規定外,首發訊息的一方為雙方會話關係中的付費方。 首發訊息包含:一鍵搭訕/搭訕/私訊,以及視訊和語音通話;</p>
|
||||
<p>(3)若一方在會話關係中已經被認定為付費方,則系統配對到同一會話關係時,該方仍為付費方;當用戶收到其他用戶的付費訊息時,達人認證用戶會獲得該部分付費訊息星幣價值的30%作為獎勵(具體獎勵以平台顯示為準); 未認證用戶僅可獲得10%。</p>
|
||||
<h3>B.禮物:</h3>
|
||||
<p>(3)若一方在會話關係中已經被認定為付費方,則系統配對到同一會話關係時,該方仍為付費方; 當用戶收到其他用戶的付費訊息時,達人認證用戶會獲得該部分付費訊息星幣價值的33%作為獎勵(具體獎勵以平台顯示為準);真人認證用戶可以獲得的獎勵為22%; 未認證用戶僅可獲得11%。 我們鼓勵您進行真人認證交友。</p>
|
||||
<h1>B.禮物:</h1>
|
||||
|
||||
<p>1、當用戶收到收益禮物時,達人認證用戶將會獲得該禮物星幣價值的30%作為獎勵;未認證用戶僅可獲得10%。 用戶背包中尚未送出的禮物不能用於提取收益。</p>
|
||||
<p>2、獎勵如何領取? 領取獎勵前,需先進行達人認證,通過認證後,綁定收款方式方可領取。</p>
|
||||
<p>1、當用戶收到收益禮物時,達人認證用戶將會獲得該禮物星幣價值的34%作為獎勵;真人認證用戶可以獲得的獎勵為22%;未認證用戶僅可獲得11%。 用戶背包中尚未送出的禮物不能用於提取收益。</p>
|
||||
<p>2、獎勵如何領取? 領取獎勵前,需先進行真人認證,通過認證後,綁定收款方式方可提領。</p>
|
||||
<p>3.最小提現金額? 10美元起提。</p>
|
||||
<p>4.什麼情況下會領取失敗? 用戶的帳號存在異常; 收款方式異常; 平台技術故障; 用戶被其他用戶舉報、受到平台調查或監管部門有特定要求等存在未解決爭議事項;</p>
|
||||
<p>5.領取失敗後,該筆獎勵會到哪裡? 領取失敗會導致該筆獎勵退回,如有疑問,請聯絡客服。</p>
|
||||
<p>6、其他費用 用戶對其收益應依法納稅,其平台收益相關的報稅、稅費及相關責任義務等由用戶與其合作方(公會、靈活用工平台等)約定,與平台方無關。</p>
|
||||
<p>7、其他聲明 用戶瞭解並同意,獎勵規則具體以平台顯示為準。若因平台系統突發故障、第三方軟體服務商故障、駭客攻擊等導致平台顯示及功能故障,平台將在發現後儘快修復,平台無須因此承擔賠償責任。</p>
|
||||
<p>8.無效獎勵 若經平台核查認定您全部或部分獎勵無效時,平台為履行法定義務、配合相關執法部門或履行社會責任等原因,有權自行決策將與上述無效獎勵對應的用戶側消費款項予以退還;您同意支援平台的相應決策,並配合平台要求退還您的相關獎勵或等價金額。 此時,平台有權從您帳號的收益餘額中自行扣除相應金額,若不足以扣除時,您應在平台作出通知後指定週期內按照本公司告知的方式補足。</p>
|
||||
<h3> 無效獎勵包括但不限於您基於以下情形而獲得的對應獎勵:</h3>
|
||||
<h1> 無效獎勵包括但不限於您基於以下情形而獲得的對應獎勵:</h1>
|
||||
<p>(1)無民事行為能力人或限制民事行為能力人的使用者打賞或進行其他消費而產生的您的獎勵收益;</p>
|
||||
<p>(2)因您透過違法、違規、違反平台規則或違反公序良俗、誠實信用原則的行為而獲取的獎勵收益;</p>
|
||||
<p>(3)因司法/行政機關要求退還/劃撥的收益(及司法/行政機關要求退還/劃撥用戶消費金額時該等消費金額中對應的您的獎勵收益); </p>
|
||||
<p>(4)使用者使用非法收入、作弊收入或非平台指定方式儲值或消費而產生的您的獎勵收益;</p>
|
||||
<p>(5)用戶依法依規撤銷其消費行為(包括但不限於支付通路退款等)時其相應消費所對應的您的獎勵收益;</p>
|
||||
<p>(6)本公司有權基於平台風控判斷、用戶投訴、行政或司法機關的要求等情形確認您的部分或全部獎勵收益無效。</p>
|
||||
<p>(6)本公司有權基於平台風控判斷、用戶投訴、行政或司法機關的要求等情形確認您的部分或全部獎勵收益無效。 在您使用平台服務取得和提取收益(包括:互動收益、通話收益)前,您應閱讀並遵守本說明及將來公示的新增的單項說明或規則、操作時的提示以及規則。 我們在此特別提醒您認真閱讀並充分理解本說明,特別是免除或限制我們責任、限制您的權利、規定爭議解決方式的相關條款。 除非您接受本說明,否則您無權使用相關功能。 您一經使用獎勵獲取、收益兌換和提現等相關功能,即視為您已理解並接受本說明。 我們保留根據相關法律規定、主管機關要求、業務開展情況等,對獎勵的領取、兌換、提現規則進行變更、調整、中止或終止的權利,同時也會將變更、調整予以公示並自公示之日起生效。</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.shayu.onetoone;
|
||||
|
||||
|
||||
import static com.yunbao.live.socket.SocketClient.mSocketHandler;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
@@ -8,14 +10,20 @@ import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Process;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.blankj.utilcode.util.Utils;
|
||||
import com.facebook.FacebookSdk;
|
||||
import com.fm.openinstall.OpenInstall;
|
||||
import com.google.firebase.FirebaseApp;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
import com.shayu.onetoone.activity.fragments.message.ChatMessageFragment;
|
||||
import com.shayu.onetoone.activity.message.ChatActivity;
|
||||
import com.shayu.onetoone.bean.MessageChatAuthContent;
|
||||
@@ -30,18 +38,35 @@ import com.shayu.onetoone.provider.MessageChatTipsItemProvider;
|
||||
import com.shayu.onetoone.provider.OTOCallEndMessageItemProvider;
|
||||
import com.shayu.onetoone.utils.ChatPluginExtensionConfig;
|
||||
import com.shayu.onetoone.utils.NeverCrashUtils;
|
||||
import com.tencent.imsdk.v2.V2TIMGroupMemberInfo;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMSimpleMsgListener;
|
||||
import com.tencent.imsdk.v2.V2TIMUserInfo;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.umeng.commonsdk.UMConfigure;
|
||||
import com.yunbao.common.BuildConfig;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.bean.AnchorStartLiveBean;
|
||||
import com.yunbao.common.bean.CrashSaveBean;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.imrongcloud.InstructorSendReward;
|
||||
import com.yunbao.common.manager.imrongcloud.InstructorSendRewardProvider;
|
||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RecommendLiveRoom;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.AppManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.L;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.socket.SocketReceiveBean;
|
||||
import com.yunbao.live.socket.SocketRyClient;
|
||||
import com.yunbao.live.views.PortraitLiveManager;
|
||||
import com.yunbao.live.views.RecommendLiveRoomProvider;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
@@ -59,6 +84,7 @@ import io.rong.imkit.utils.RouteUtils;
|
||||
import io.rong.imkit.widget.adapter.ProviderManager;
|
||||
import io.rong.imlib.IMLibRTCClient;
|
||||
import io.rong.imlib.RongIMClient;
|
||||
import io.rong.imlib.model.Conversation;
|
||||
import io.rong.imlib.model.InitOption;
|
||||
import io.rong.imlib.model.Message;
|
||||
import io.rong.imlib.model.MessageContent;
|
||||
@@ -114,10 +140,6 @@ 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());
|
||||
@@ -163,8 +185,143 @@ public class AppContext extends CommonAppContext {
|
||||
RongConfigCenter.conversationConfig().replaceMessageProvider(CallEndMessageItemProvider.class, new OTOCallEndMessageItemProvider());
|
||||
RongExtensionManager.getInstance().setExtensionConfig(new ChatPluginExtensionConfig());
|
||||
|
||||
initPDLive();
|
||||
|
||||
}
|
||||
|
||||
private void initPDLive(){
|
||||
|
||||
registerFirebaseCrash();
|
||||
//初始化 邀请码库
|
||||
if (isMainProcess()) {
|
||||
OpenInstall.init(this);
|
||||
}
|
||||
//设置LOG开关,默认为false
|
||||
UMConfigure.setLogEnabled(true);
|
||||
|
||||
|
||||
//友盟正式初始化
|
||||
UMConfigure.init(getApplicationContext(), "64e40ee55488fe7b3afa2c96", "PDLive", UMConfigure.DEVICE_TYPE_PHONE,
|
||||
"64e40ee55488fe7b3afa2c96");
|
||||
|
||||
//集成umeng-crash-vx.x.x.aar,则需要关闭原有统计SDK异常捕获功能
|
||||
MobclickAgent.setCatchUncaughtExceptions(false);
|
||||
//PushSDK初始化(如使用推送SDK,必须调用此方法)
|
||||
|
||||
//统计SDK是否支持采集在子进程中打点的自定义事件,默认不支持
|
||||
UMConfigure.setProcessEvent(true);//支持多进程打点
|
||||
MobclickAgent.setPageCollectionMode(MobclickAgent.PageMode.AUTO);
|
||||
UMConfigure.submitPolicyGrantResult(getApplicationContext(), true);
|
||||
|
||||
registerActivityLifecycleCallbacks(new AdjustLifecycleCallbacks());
|
||||
//初始化 AndroidUtilCode
|
||||
Utils.init(this);
|
||||
|
||||
RongConfigCenter.conversationConfig().addMessageProvider(new RecommendLiveRoomProvider(getApplicationContext()));
|
||||
|
||||
RongcloudIMManager.addRongcloudIMOnReceiveMessageListener(new RongIMClient.OnReceiveMessageWrapperListener() {
|
||||
@Override
|
||||
public boolean onReceived(io.rong.imlib.model.Message message, int i, boolean b, boolean b1) {
|
||||
Log.e("wewe", message.getConversationType() + "112121");
|
||||
MessageIMManager.get(sInstance).getSystemForRongcloud(message);
|
||||
//融云直播间聊天
|
||||
android.os.Message msg = android.os.Message.obtain();
|
||||
msg.what = Constants.SOCKET_WHAT_BROADCAST;
|
||||
try {
|
||||
if (!"".equals(message.getContent()) && message.getContent() != null) {
|
||||
TextMessage content = (TextMessage) message.getContent();
|
||||
if (content.getContent().contains("_method_")) {
|
||||
msg.obj = content.getContent();
|
||||
//观众页面
|
||||
if (SocketRyClient.mSocketHandler != null
|
||||
&& (TextUtils.equals("__system__", message.getTargetId())
|
||||
|| ("g" + PortraitLiveManager.liveID).contains(message.getTargetId()))) {
|
||||
SocketRyClient.mSocketHandler.sendMessage(msg);
|
||||
} else if (content.getContent().contains("LivePK_anchorStartLiveNotify")) {//开播通知
|
||||
SocketReceiveBean received = JSON.parseObject(content.getContent(), SocketReceiveBean.class);
|
||||
JSONObject map = received.getMsg().getJSONObject(0);
|
||||
sendStartAnchorLive(map);
|
||||
}else if(content.getContent().contains("Chat_messageNotify")){
|
||||
//TODO 各种通知
|
||||
}else if(content.getContent().contains("Chat_callAudioNotify")){
|
||||
|
||||
}else if(content.getContent().contains("Chat_callVideoNotify")){
|
||||
|
||||
}
|
||||
//主播页面
|
||||
if (TextUtils.isEmpty(PortraitLiveManager.liveID) && SocketRyClient.mSocketHandler != null) {
|
||||
SocketRyClient.mSocketHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
} else if (message.getConversationType() == Conversation.ConversationType.PRIVATE) {//私聊信息
|
||||
EventBus.getDefault().post(message);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void sendStartAnchorLive(JSONObject map) {
|
||||
AnchorStartLiveBean bean = new AnchorStartLiveBean(AnchorStartLiveBean.TYPE_LIVE);
|
||||
bean.setAnchorName(map.getString("anchorName"));
|
||||
bean.setRoomId(map.getString("roomid"));
|
||||
bean.setAvatar(map.getString("avatar"));
|
||||
Bus.get().post(bean);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//监听im消息
|
||||
V2TIMManager.getInstance().addSimpleMsgListener(new V2TIMSimpleMsgListener() {
|
||||
@Override
|
||||
public void onRecvGroupTextMessage(String msgID, String groupID, V2TIMGroupMemberInfo sender, String text) {
|
||||
super.onRecvGroupTextMessage(msgID, groupID, sender, text);
|
||||
Log.e("asasas", text);
|
||||
android.os.Message msg = android.os.Message.obtain();
|
||||
msg.what = Constants.SOCKET_WHAT_BROADCAST;
|
||||
msg.obj = text;
|
||||
if (mSocketHandler != null && Ingroup == 1) {
|
||||
mSocketHandler.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecvC2CTextMessage(String msgID, V2TIMUserInfo sender, String text) {
|
||||
super.onRecvC2CTextMessage(msgID, sender, text);
|
||||
android.os.Message msg = android.os.Message.obtain();
|
||||
msg.what = Constants.SOCKET_WHAT_BROADCAST;
|
||||
msg.obj = text;
|
||||
if (mSocketHandler != null) {
|
||||
CommonAppContext.Ingroup = 1;
|
||||
mSocketHandler.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public void registerFirebaseCrash() {
|
||||
|
||||
FirebaseAnalytics.getInstance(this);
|
||||
FirebaseApp.initializeApp(this);
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
private static final class AdjustLifecycleCallbacks implements ActivityLifecycleCallbacks {
|
||||
@Override
|
||||
public void onActivityResumed(Activity activity) {
|
||||
@@ -208,17 +365,4 @@ 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,14 +1,10 @@
|
||||
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;
|
||||
@@ -18,6 +14,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.shayu.onetoone.R;
|
||||
import com.yunbao.common.activity.AbsActivity;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
|
||||
import java.util.Locale;
|
||||
@@ -25,35 +22,13 @@ import java.util.Locale;
|
||||
/**
|
||||
* Activity基类
|
||||
*/
|
||||
public abstract class AbsOTOActivity extends AppCompatActivity {
|
||||
public Activity mContext;
|
||||
public abstract class AbsOTOActivity extends AbsActivity {
|
||||
public Context mContext;
|
||||
|
||||
@Override
|
||||
public Resources getResources() {
|
||||
Resources res = super.getResources();
|
||||
Configuration config = new Configuration();
|
||||
config.setToDefaults();
|
||||
config.locale = IMLoginManager.get(this).getLocaleLanguage();
|
||||
if(config.locale== Locale.SIMPLIFIED_CHINESE){
|
||||
config.locale=Locale.TRADITIONAL_CHINESE;
|
||||
}
|
||||
res.updateConfiguration(config, res.getDisplayMetrics());
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
if(onCreate()) {
|
||||
setStatusBar();
|
||||
}
|
||||
setContentView(getLayoutId());
|
||||
mContext = this;
|
||||
main(savedInstanceState);
|
||||
View view=findViewById(R.id.btn_back);
|
||||
if(view!=null){
|
||||
view.setOnClickListener(v -> finish());
|
||||
}
|
||||
}
|
||||
private void setStatusBar() {
|
||||
|
||||
@@ -63,73 +38,6 @@ 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,6 +1,5 @@
|
||||
package com.shayu.onetoone.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
@@ -18,7 +17,6 @@ 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;
|
||||
@@ -84,7 +82,7 @@ public class EndCallActivity extends AbsOTOActivity {
|
||||
.getTargetUserInfo(user.getUser().getId(), new HttpCallback<UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean data) {
|
||||
if (data.getInfo().isNameAuth()) {
|
||||
if (data.getInfo().getName_auth() == 2) {
|
||||
RouteManager.forwardActivity(extras.getString("path"), extras);
|
||||
EndCallActivity.this.finish();
|
||||
} else {
|
||||
@@ -103,13 +101,7 @@ public class EndCallActivity extends AbsOTOActivity {
|
||||
ViewClicksAntiShake.clicksAntiShake(applyButton, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
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()+"");
|
||||
RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext, false, HtmlUrlUtils.URL_PAY_COIN));
|
||||
}
|
||||
});
|
||||
findViewById(R.id.close).setOnClickListener(v -> finish());
|
||||
|
||||
@@ -43,7 +43,7 @@ public class HomeSearchActivity extends AbsOTOActivity {
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_search;
|
||||
return R.layout.activity_oto_search;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,7 +34,7 @@ public class HomepageRankingActivity extends AbsOTOActivity {
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_main_list;
|
||||
return R.layout.activity_main_otolist;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,7 +6,6 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@@ -105,6 +104,7 @@ 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);
|
||||
@@ -114,7 +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.oto_screen, mCover);
|
||||
ImgLoader.display(mContext, R.mipmap.screen, mCover);
|
||||
mHandler = new Handler() {
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
package com.shayu.onetoone.activity;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
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;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.angcyo.tablayout.DslTabLayout;
|
||||
import com.angcyo.tablayout.DslTabLayoutConfig;
|
||||
import com.angcyo.tablayout.delegate2.ViewPager2Delegate;
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.firebase.messaging.FirebaseMessaging;
|
||||
import com.lxj.xpopup.core.BasePopupView;
|
||||
import com.shayu.onetoone.AppContext;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
@@ -25,6 +26,7 @@ import com.shayu.onetoone.R;
|
||||
import com.shayu.onetoone.activity.fragments.BaseFragment;
|
||||
import com.shayu.onetoone.activity.fragments.DynamicFragment;
|
||||
import com.shayu.onetoone.activity.fragments.FriendsFragment;
|
||||
import com.shayu.onetoone.activity.fragments.LiveFragment;
|
||||
import com.shayu.onetoone.activity.fragments.MessageFragment;
|
||||
import com.shayu.onetoone.activity.fragments.MyFragment;
|
||||
import com.shayu.onetoone.activity.fragments.message.MsgMessageFragment;
|
||||
@@ -41,9 +43,14 @@ import com.shayu.onetoone.manager.OTONetManager;
|
||||
import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.manager.SendMessageManager;
|
||||
import com.shayu.onetoone.utils.UserManager;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.activity.WebViewActivity;
|
||||
import com.yunbao.common.bean.AnchorStartLiveBean;
|
||||
import com.yunbao.common.bean.ConfigBean;
|
||||
import com.yunbao.common.bean.LiveBean;
|
||||
import com.yunbao.common.event.RongIMConnectionStatusEvent;
|
||||
import com.yunbao.common.http.LiveHttpUtil;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
@@ -52,11 +59,14 @@ import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.DialogUitl;
|
||||
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.VersionUtil;
|
||||
import com.yunbao.common.views.APKUpdateCustomPopup;
|
||||
import com.yunbao.common.views.APKUpdateOneToOnePopup;
|
||||
import com.yunbao.main.dialog.AnchorStartLiveNotifyDialog;
|
||||
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
@@ -64,9 +74,13 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.rongcloud.rtc.api.RCRTCConfig;
|
||||
import cn.rongcloud.rtc.api.RCRTCEngine;
|
||||
import io.rong.imkit.manager.UnReadMessageManager;
|
||||
import io.rong.imlib.RongIMClient;
|
||||
import io.rong.imlib.model.Conversation;
|
||||
import io.rong.push.PushManager;
|
||||
import io.rong.push.PushType;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.functions.Function4;
|
||||
@@ -81,6 +95,8 @@ public class MainActivity extends AbsOTOActivity {
|
||||
private DslTabLayout dslTabLayout;
|
||||
private long mLastClickBackTime;//上次点击back键的时间
|
||||
private boolean isInstallApk = false;
|
||||
private static final String TAG = "MainActivity";
|
||||
private List<AnchorStartLiveBean> startListNotifyList = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
@@ -88,26 +104,11 @@ 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);
|
||||
fragments.add(new FriendsFragment());
|
||||
fragments.add(new LiveFragment());
|
||||
fragments.add(new DynamicFragment());
|
||||
fragments.add(new MessageFragment());
|
||||
fragments.add(new MyFragment());
|
||||
@@ -138,8 +139,6 @@ 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;
|
||||
}
|
||||
@@ -149,7 +148,7 @@ public class MainActivity extends AbsOTOActivity {
|
||||
});
|
||||
RongcloudIMManager.connectIM(mContext);
|
||||
showRedPoint(-1);
|
||||
UnReadMessageManager.getInstance().addObserver(new Conversation.ConversationType[]{Conversation.ConversationType.PRIVATE}, new UnReadMessageManager.IUnReadMessageObserver() {
|
||||
UnReadMessageManager.getInstance().addObserver(new Conversation.ConversationType[]{Conversation.ConversationType.SYSTEM, Conversation.ConversationType.PRIVATE}, new UnReadMessageManager.IUnReadMessageObserver() {
|
||||
@Override
|
||||
public void onCountChanged(int count) {
|
||||
showRedPoint(count);
|
||||
@@ -157,13 +156,14 @@ public class MainActivity extends AbsOTOActivity {
|
||||
});
|
||||
CallClientManager.getManager();
|
||||
checkVersion();
|
||||
initPDLive();
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查版本更新
|
||||
*/
|
||||
private void checkVersion() {
|
||||
if(true)
|
||||
if (true)
|
||||
return;
|
||||
CommonAppConfig.getInstance().getConfig(new CommonCallback<ConfigBean>() {
|
||||
@Override
|
||||
@@ -317,6 +317,65 @@ public class MainActivity extends AbsOTOActivity {
|
||||
}
|
||||
}
|
||||
|
||||
private void initPDLive() {
|
||||
RCRTCConfig.Builder config = RCRTCConfig.Builder.create();
|
||||
config.enableEncoderTexture(false);//新娱美颜 需要关闭这个
|
||||
RCRTCEngine.getInstance().init(this, config.build());
|
||||
|
||||
if (getIntent().getStringExtra("liveid") != null) {
|
||||
LiveHttpUtil.getLiveInfo(getIntent().getStringExtra("liveid") + "", new com.yunbao.common.http.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);
|
||||
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||
@Override
|
||||
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||
RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveSdk), Integer.parseInt(liveTypeVal));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCheckError(String contextError) {
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ToastUtil.show("直播已结束");
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (getIntent().getStringExtra("type") != null && getIntent().getStringExtra("type").equals("2")) {
|
||||
//跳转消息列表
|
||||
if (viewPager != null) {
|
||||
viewPager.setCurrentItem(2);
|
||||
}
|
||||
|
||||
} else if (getIntent().getStringExtra("type") != null && getIntent().getStringExtra("type").equals("8")) {
|
||||
WebViewActivity.forward(mContext, getIntent().getStringExtra("activityUrl"), true, false);
|
||||
}
|
||||
FirebaseMessaging.getInstance().getToken()
|
||||
.addOnCompleteListener(new OnCompleteListener<String>() {
|
||||
@Override
|
||||
public void onComplete(@NonNull Task<String> task) {
|
||||
if (!task.isSuccessful()) {
|
||||
Log.w(TAG, "Fetching FCM registration token failed", task.getException());
|
||||
return;
|
||||
}
|
||||
|
||||
// Get new FCM registration token
|
||||
String token = task.getResult();
|
||||
|
||||
// Log and toast
|
||||
Log.d(TAG, token);
|
||||
PushManager.getInstance()
|
||||
.onReceiveToken(MainActivity.this, PushType.GOOGLE_FCM, token);
|
||||
// Toast.makeText(MainActivity.this, token, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
CommonAppConfig.getInstance().setLaunched(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
@@ -326,9 +385,8 @@ public class MainActivity extends AbsOTOActivity {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
fragments.get(viewPager.getCurrentItem()).onResult(requestCode, resultCode, data);
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_main;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -343,6 +401,20 @@ public class MainActivity extends AbsOTOActivity {
|
||||
AppContext.exit();
|
||||
}
|
||||
|
||||
private void notifyLiveFlot() {
|
||||
if (startListNotifyList.iterator().hasNext()) {
|
||||
AnchorStartLiveBean bean = startListNotifyList.iterator().next();
|
||||
new AnchorStartLiveNotifyDialog(mContext, bean)
|
||||
.setOnDismissListener(dialog -> {
|
||||
startListNotifyList.remove(bean);
|
||||
if (startListNotifyList.iterator().hasNext()) {
|
||||
notifyLiveFlot();
|
||||
}
|
||||
})
|
||||
.showDialog();
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void busEvent(MessageMsgBusEvent event) {
|
||||
if (event.getType() == MessageMsgBusEvent.TYPE_ALL_READ) {
|
||||
@@ -356,6 +428,18 @@ public class MainActivity extends AbsOTOActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void busEvent(AnchorStartLiveBean event) {
|
||||
if (!IMLoginManager.get(mContext).isLiveNotifySettings()) return;
|
||||
|
||||
if (startListNotifyList.isEmpty()) {
|
||||
startListNotifyList.add(event);
|
||||
notifyLiveFlot();
|
||||
} else {
|
||||
startListNotifyList.add(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户被踢下线
|
||||
*
|
||||
|
||||
@@ -14,7 +14,6 @@ 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;
|
||||
@@ -93,7 +92,7 @@ public class MyArnActivity extends AbsOTOActivity {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
RouteManager.forwardWebViewActivity(WordUtil.getNewString(R.string.my_arnings_reward_description),
|
||||
HtmlUrlUtils.getArnInfo()
|
||||
"file:android_asset/Reward_instructions.html"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,225 +0,0 @@
|
||||
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,42 +17,33 @@ 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 com.yunbao.video.activity.VideoPlayActivity;
|
||||
import com.yunbao.video.utils.VideoStorge;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
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() {
|
||||
@@ -64,7 +55,6 @@ 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);
|
||||
}
|
||||
@@ -87,7 +77,6 @@ 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);
|
||||
@@ -97,13 +86,13 @@ public class WebViewActivity extends AbsOTOActivity {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
if (!url.contains("token") && url.startsWith("http") && UserManager.getUserBean() != null) {
|
||||
if (!url.contains("token") && url.startsWith("http")) {
|
||||
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
|
||||
@@ -127,13 +116,8 @@ public class WebViewActivity extends AbsOTOActivity {
|
||||
} else {
|
||||
setTitle(titleString);
|
||||
}
|
||||
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)");
|
||||
}
|
||||
}
|
||||
int height = view.getMeasuredHeight();
|
||||
Log.e("网页高度", height + "");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -141,62 +125,6 @@ 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;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -218,18 +146,6 @@ 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,7 +1,6 @@
|
||||
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;
|
||||
@@ -33,13 +32,6 @@ public abstract class BaseFragment extends Fragment {
|
||||
return itemView.findViewById(id);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建页面
|
||||
*
|
||||
* @return 布局
|
||||
*/
|
||||
public abstract View createView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState);
|
||||
/**
|
||||
* 初始化页面
|
||||
*
|
||||
@@ -47,9 +39,11 @@ public abstract class BaseFragment extends Fragment {
|
||||
*/
|
||||
public abstract void initView(View itemView);
|
||||
|
||||
|
||||
public void onResult(int requestCode, int resultCode, Intent intent) {
|
||||
|
||||
}
|
||||
/**
|
||||
* 创建页面
|
||||
*
|
||||
* @return 布局
|
||||
*/
|
||||
public abstract View createView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState);
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ 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;
|
||||
@@ -14,79 +12,32 @@ 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() {
|
||||
super.onDestroy();
|
||||
Bus.getOff(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView(View itemView) {
|
||||
Bus.getOn(this);
|
||||
webView = itemView.findViewById(R.id.webView);
|
||||
WebSettings settings = webView.getSettings();
|
||||
settings.setJavaScriptEnabled(true); // 是否开启JS支持
|
||||
@@ -95,11 +46,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
|
||||
@@ -119,7 +70,6 @@ public class DynamicFragment extends BaseFragment {
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
int height = view.getMeasuredHeight();
|
||||
AndroidBug5497Workaround.assistActivity(getActivity());
|
||||
Log.e("网页高度", height + "");
|
||||
}
|
||||
|
||||
@@ -128,30 +78,6 @@ 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");
|
||||
@@ -159,12 +85,6 @@ 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制到剪贴板
|
||||
*/
|
||||
@@ -176,56 +96,7 @@ public class DynamicFragment extends BaseFragment {
|
||||
}
|
||||
|
||||
@Override
|
||||
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)
|
||||
.setTitle("快來認識更多有趣的朋友吧!")
|
||||
.setUrl(event.getData())
|
||||
.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);
|
||||
}
|
||||
public View createView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
return inflater.inflate(R.layout.fragment_dynamic, container, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,10 +59,6 @@ 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);
|
||||
@@ -128,7 +124,7 @@ public class FriendsFragment extends BaseFragment {
|
||||
RouteManager.forwardActivity(RouteManager.ACTIVITY_MATCHING);
|
||||
return;
|
||||
}
|
||||
String money = "100";
|
||||
int money = 100;
|
||||
if (configBean != null) {
|
||||
money = configBean.getMatePrice();
|
||||
}
|
||||
@@ -167,11 +163,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) {
|
||||
@@ -180,16 +176,20 @@ 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();
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.shayu.onetoone.activity.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.yunbao.main.views.MainHomeViewHolder;
|
||||
|
||||
public class LiveFragment extends BaseFragment {
|
||||
MainHomeViewHolder viewHolder;
|
||||
public LiveFragment() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initView(View itemView) {
|
||||
viewHolder.loadData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View createView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
if(viewHolder==null){
|
||||
viewHolder=new MainHomeViewHolder(getContext(),container);
|
||||
}
|
||||
return viewHolder.getContentView();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
viewHolder.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
viewHolder.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
viewHolder.onStart();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStop() {
|
||||
super.onStop();
|
||||
viewHolder.onStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
viewHolder.onDestroy();
|
||||
}
|
||||
}
|
||||
@@ -41,19 +41,23 @@ 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.shayu.onetoone.activity.OTOWalletActivity;
|
||||
import com.yunbao.common.activity.MyWalletActivity;
|
||||
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;
|
||||
@@ -121,8 +125,7 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
//RouteUtil.forwardUserHome(mContext, CommonAppConfig.getInstance().getUid(), 2);
|
||||
// RouteManager.forwardEditProfileActivity();
|
||||
UserManager.toHomePage(UserManager.getUserBean().getUser().getId() + "");
|
||||
RouteManager.forwardEditProfileActivity();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -132,8 +135,7 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
//RouteUtil.forwardUserHome(mContext, CommonAppConfig.getInstance().getUid(), 2);
|
||||
// RouteManager.forwardEditProfileActivity();
|
||||
UserManager.toHomePage(UserManager.getUserBean().getUser().getId() + "");
|
||||
RouteManager.forwardEditProfileActivity();
|
||||
}
|
||||
});
|
||||
fansNum = itemView.findViewById(R.id.fans);
|
||||
@@ -352,18 +354,12 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
} else {
|
||||
coin.setText(coins);
|
||||
}
|
||||
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");
|
||||
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));
|
||||
} else {
|
||||
star_coin.setText(yuanbaos);
|
||||
}
|
||||
@@ -403,18 +399,13 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
*/
|
||||
private void initAuth(AuthBean data) {
|
||||
if (data.getName_auth() == 2) {
|
||||
authStatus.setVisibility(View.GONE);
|
||||
authStatus.setVisibility(View.VISIBLE);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -539,7 +530,7 @@ public class MyFragment extends BaseFragment implements OnItemClickListener<User
|
||||
} else {
|
||||
switch (bean.getId()) {
|
||||
case 2:
|
||||
mContext.startActivity(new Intent(mContext, OTOWalletActivity.class).putExtra("p", 0));
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 0));
|
||||
break;
|
||||
case 13:
|
||||
forwardSetting();
|
||||
@@ -561,20 +552,17 @@ 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, OTOWalletActivity.class).putExtra("p", 1));
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||
// RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getPayUrl(mContext, false, HtmlUrlUtils.URL_PAY_GOLD));
|
||||
// mContext.startActivity(new Intent(mContext, OTOWalletActivity.class).putExtra("p", 1)) ;
|
||||
// mContext.startActivity(new Intent(mContext, MyWalletActivity.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, OTOWalletActivity.class).putExtra("p", 0));
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.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, 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);
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 2));
|
||||
// Bundle bundle = new Bundle();
|
||||
// bundle.putString("type", "coin");
|
||||
// RouteManager.forwardActivity(RouteManager.ACTIVITY_DIAMOND_EXCHANGE, bundle);
|
||||
|
||||
@@ -95,10 +95,8 @@ 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();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -261,13 +259,5 @@ 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,6 +19,7 @@ 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;
|
||||
@@ -29,7 +30,6 @@ 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,7 +50,6 @@ 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);
|
||||
@@ -164,25 +163,9 @@ 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,9 +2,7 @@ package com.shayu.onetoone.activity.fragments.message;
|
||||
|
||||
import static android.content.Context.CLIPBOARD_SERVICE;
|
||||
|
||||
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.Manifest;
|
||||
import android.app.Dialog;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
@@ -12,9 +10,8 @@ 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;
|
||||
@@ -28,11 +25,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;
|
||||
@@ -42,7 +39,6 @@ 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;
|
||||
@@ -57,11 +53,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;
|
||||
@@ -81,13 +77,13 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import io.rong.calllib.RongCallClient;
|
||||
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;
|
||||
@@ -123,17 +119,10 @@ 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 = "聊天界面";
|
||||
@@ -148,41 +137,11 @@ 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);
|
||||
@@ -191,16 +150,6 @@ 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();
|
||||
|
||||
@@ -250,77 +199,20 @@ 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
|
||||
@@ -355,9 +247,6 @@ 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);
|
||||
@@ -382,14 +271,7 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
});
|
||||
this.mExtensionViewModel.getInputModeLiveData().observe(getViewLifecycleOwner(), new Observer<InputMode>() {
|
||||
public void onChanged(InputMode 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);
|
||||
updateViewByInputMode(inputMode);
|
||||
}
|
||||
});
|
||||
mVoiceToggleBtn.setOnClickListener(view -> {
|
||||
@@ -401,29 +283,21 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
gift.setOnClickListener(v -> {
|
||||
mExtensionViewModel.getInputModeLiveData().postValue(InputMode.NormalMode);
|
||||
audio.hide();
|
||||
new Handler(Looper.getMainLooper())
|
||||
.postDelayed(() -> {
|
||||
giftPanel.show();
|
||||
}, 100);
|
||||
giftPanel.show();
|
||||
});
|
||||
mEmojiToggleBtn.setOnClickListener(v -> {
|
||||
if (mExtensionViewModel != null) {
|
||||
if (mExtensionViewModel.getInputModeLiveData().getValue() == InputMode.TextInput) {
|
||||
audio.hide();
|
||||
giftPanel.hide();
|
||||
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);
|
||||
|
||||
mExtensionViewModel.getInputModeLiveData().postValue(InputMode.EmoticonMode);
|
||||
} else {
|
||||
mExtensionViewModel.getInputModeLiveData().postValue(InputMode.TextInput);
|
||||
}
|
||||
});
|
||||
|
||||
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(() -> {
|
||||
@@ -452,7 +326,6 @@ 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(() -> {
|
||||
@@ -464,7 +337,7 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
@Override
|
||||
public void onApply(Dialog dialog) {
|
||||
super.onApply(dialog);
|
||||
callAudio();
|
||||
callAudio();
|
||||
}
|
||||
}).showDialog();
|
||||
|
||||
@@ -481,7 +354,6 @@ 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>() {
|
||||
@@ -545,7 +417,7 @@ public class ChatMessageFragment extends AbsConversationFragment {
|
||||
}
|
||||
|
||||
private void updateViewByInputMode(InputMode inputMode) {
|
||||
if (inputMode == InputMode.TextInput) {
|
||||
if(inputMode==InputMode.TextInput){
|
||||
audio.hide();
|
||||
giftPanel.hide();
|
||||
}
|
||||
@@ -679,19 +551,18 @@ 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 -> {
|
||||
@@ -720,9 +591,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) {
|
||||
@@ -730,9 +601,6 @@ 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);
|
||||
@@ -756,22 +624,9 @@ 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
|
||||
@@ -815,7 +670,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);
|
||||
}
|
||||
}
|
||||
@@ -928,8 +783,7 @@ 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) {
|
||||
@@ -981,8 +835,7 @@ 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) {
|
||||
@@ -1035,49 +888,12 @@ 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) {
|
||||
@@ -1089,7 +905,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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,141 +0,0 @@
|
||||
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,7 +50,6 @@ public class ChooseLabelActivity extends AbsOTOActivity {
|
||||
LableChooseAdapter lableChooseAdapter;
|
||||
|
||||
List<LabelBean.Children> myLabelList = new ArrayList<>();
|
||||
List<LabelBean> srcLabel=new ArrayList<>();
|
||||
|
||||
LabelTagAdapter myAdapter;
|
||||
|
||||
@@ -76,7 +75,6 @@ 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);
|
||||
|
||||
}
|
||||
@@ -95,25 +93,18 @@ 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(",");
|
||||
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);
|
||||
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)));
|
||||
}
|
||||
myAdapter.setData(myLabelList);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ 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;
|
||||
@@ -138,12 +137,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 = UserManager.getUserBean().getUser().getAvatar();
|
||||
avatarUrl = CommonAppConfig.getInstance().getUserBean().getAvatar();
|
||||
if (!StringUtils.isEmpty(avatarUrl)) {
|
||||
ImgLoader.display(CompleteActivity.this, avatarUrl, userAvatar);
|
||||
}
|
||||
if (!StringUtils.isEmpty(UserManager.getUserBean().getUser().getUserNicename())) {
|
||||
userNickName.setText(UserManager.getUserBean().getUser().getUserNicename());
|
||||
if (!StringUtils.isEmpty(CommonAppConfig.getInstance().getUserBean().getUserNiceName())) {
|
||||
userNickName.setText(CommonAppConfig.getInstance().getUserBean().getUserNiceName());
|
||||
}
|
||||
editHead.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
@@ -181,7 +180,7 @@ public class CompleteActivity extends AbsOTOActivity {
|
||||
selectedDate.set(year, month, day);
|
||||
Calendar startCalendar = Calendar.getInstance();
|
||||
Calendar endCalendar = Calendar.getInstance();
|
||||
startCalendar.set(1900, 0, 1);
|
||||
startCalendar.set(1990, 1, 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) {
|
||||
RouteManager.forwardWebViewActivity(null, HtmlConfig.OTO_LOGIN_PRIVCAY);
|
||||
WebViewActivity.forward(EntryActivity.this, HtmlConfig.LOGIN_PRIVCAY, false);
|
||||
}
|
||||
});
|
||||
|
||||
btn_tip.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
RouteManager.forwardWebViewActivity(null, HtmlConfig.OTO_LOGIN_PRIVCAY1);
|
||||
WebViewActivity.forward(EntryActivity.this, HtmlConfig.LOGIN_PRIVCAY1, false);
|
||||
|
||||
}
|
||||
});
|
||||
@@ -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.forwardActivity(RouteManager.ACTIVITY_BIND_OPEN_INSTALL);
|
||||
RouteManager.forwardMainActivity();
|
||||
} else {
|
||||
OTONetManager.getInstance(mContext)
|
||||
.getRandJoinAnchor(new HttpCallback<JoinAnchorBean>() {
|
||||
|
||||
@@ -20,7 +20,6 @@ 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;
|
||||
@@ -422,7 +421,6 @@ 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.shayu.onetoone.activity.OTOWalletActivity;
|
||||
import com.yunbao.common.activity.MyWalletActivity;
|
||||
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)) {
|
||||
tipsWindowDialog = new TipsDialog(mContext)
|
||||
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,16 +288,10 @@ public class CallAudioActivity extends AbsOTOActivity implements View.OnClickLis
|
||||
}
|
||||
}
|
||||
});
|
||||
tipsWindowDialog=null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel(Dialog dialog) {
|
||||
super.onCancel(dialog);
|
||||
tipsWindowDialog=null;
|
||||
}
|
||||
});
|
||||
tipsWindowDialog.showDialog();
|
||||
})
|
||||
.showDialog();
|
||||
return;
|
||||
}
|
||||
ImageView icon = new ImageView(mContext);
|
||||
@@ -361,7 +355,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, OTOWalletActivity.class).putExtra("p", 1));
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||
}
|
||||
if (toChatView) {
|
||||
ConversationUtils.startConversation(mContext, targetId);
|
||||
@@ -451,10 +445,6 @@ 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.shayu.onetoone.activity.OTOWalletActivity;
|
||||
import com.yunbao.common.activity.MyWalletActivity;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.interfaces.OnItemClickListener;
|
||||
@@ -363,14 +363,12 @@ 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)) {
|
||||
tipsWindowDialog = new TipsDialog(mContext)
|
||||
new TipsDialog(mContext)
|
||||
.setTitle(WordUtil.getNewString(R.string.permission_hint))
|
||||
.setApplyText(WordUtil.getNewString(R.string.permission_setting))
|
||||
.setCancelText(WordUtil.getNewString(R.string.permission_cancel))
|
||||
@@ -386,16 +384,10 @@ public class CallVideoActivity extends AbsOTOActivity {
|
||||
}
|
||||
}
|
||||
});
|
||||
tipsWindowDialog=null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel(Dialog dialog) {
|
||||
super.onCancel(dialog);
|
||||
tipsWindowDialog=null;
|
||||
}
|
||||
});
|
||||
tipsWindowDialog.showDialog();
|
||||
})
|
||||
.showDialog();
|
||||
return;
|
||||
}
|
||||
myView.removeAllViews();
|
||||
@@ -468,7 +460,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, OTOWalletActivity.class).putExtra("p", 1));
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||
}
|
||||
if (toChatView) {
|
||||
ConversationUtils.startConversation(mContext, targetId);
|
||||
@@ -649,10 +641,6 @@ 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>() {
|
||||
@@ -719,7 +707,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);
|
||||
|
||||
@@ -2,11 +2,8 @@ package com.shayu.onetoone.activity.message;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -35,7 +32,6 @@ import com.shayu.onetoone.manager.RouteManager;
|
||||
import com.shayu.onetoone.manager.SendMessageManager;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.RouteUtil;
|
||||
import com.yunbao.common.utils.SpUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
@@ -96,9 +92,7 @@ public class ChatActivity extends AbsOTOActivity {
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
if (bundle != null) {
|
||||
int bundleInt = bundle.getInt("type", -1);
|
||||
// bundleInt=CALL_CHAT_TYPE_MATCH;
|
||||
String data = bundle.getString("data");
|
||||
// data="{\"accostMsg\":\"\",\"code\":0,\"mateUser\":{\"giftNum\":0,\"info\":{\"area\":\"\",\"auth\":false,\"auth_back\":\"\",\"auth_remark\":\"\",\"b_y\":1996,\"b_ym\":199611,\"b_ymd\":\"19961122\",\"cn_label\":[],\"create_time\":0,\"en_label\":[],\"first_mate\":0,\"id\":353551,\"is_hello\":1,\"is_hot\":0,\"label_id\":\"\",\"nameAuth\":true,\"name_auth\":\"2\",\"name_auth_time\":0,\"price\":\"0.00\",\"sage_auth\":\"1\",\"sage_auth_time\":0,\"sex\":1,\"star\":11,\"star_name\":\"天蝎座\",\"update_time\":1700615190,\"vodie_price\":\"0.00\"},\"level\":{\"charm\":20,\"charm_icon\":\"https://downs.yaoulive.com/20231117/8337cffc7a880988543a7e3da1fc8668.png\",\"charm_level\":1,\"charm_level_update\":0,\"charm_update\":1700716732,\"create_time\":1700716732,\"exp\":0,\"exp_update\":0,\"icon\":\"\",\"id\":353551,\"level\":10,\"level_update\":1700716732,\"wealth\":40,\"wealth_icon\":\"https://downs.yaoulive.com/20231123/9239a063fefa972762e58fba32099e70.png\",\"wealth_level\":9,\"wealth_level_update\":0,\"wealth_update\":1700716732},\"status\":0,\"user\":{\"agentSwitch\":\"\",\"area\":\"\",\"avatar\":\"https://downs.yaoulive.com/20231126230429_3748b35536c0cd799cf3677677a9c676?imageView2/2/w/600/h/600\",\"avatar2\":\"\",\"avatarThumb\":\"https://downs.yaoulive.com/20231126230429_3748b35536c0cd799cf3677677a9c676?imageView2/2/w/200/h/200\",\"birthday\":\"1996-11-22\",\"city\":\"\",\"coin\":0,\"consumption\":31105,\"contentColor\":\"\",\"contribution\":\"\",\"createTime\":\"\",\"customColorId\":\"\",\"dress\":{\"avatarFrame\":\"\",\"bubble\":\"\",\"medal\":\"\",\"medalNew\":\"\"},\"endColor\":\"\",\"familySwitch\":0,\"fans\":0,\"firstLogin\":0,\"follow\":false,\"follows\":0,\"frontTask\":0,\"giftEffect\":false,\"gold\":0,\"goldsumption\":0,\"goodnum\":\"\",\"goodnumExpireTime\":\"\",\"guardType\":\"\",\"id\":353551,\"isAccost\":1,\"isAdmin\":\"\",\"isAttention\":0,\"isBind\":0,\"isChat\":\"\",\"isGuess\":\"\",\"isRong\":\"\",\"isagent\":0,\"issuper\":0,\"langue\":\"\",\"level\":\"\",\"levelAnchor\":\"\",\"liang\":{\"name\":\"\"},\"lives\":0,\"location\":\"\",\"maxNobleEndTime\":\"\",\"medalLevel\":\"\",\"medalName\":\"\",\"medalNoDisplaySrc\":\"\",\"mobile\":\"\",\"mountEffect\":false,\"needBind\":0,\"nobleEndTime\":\"\",\"nobleId\":0,\"nobleName\":\"\",\"num\":\"\",\"online\":\"1\",\"province\":\"\",\"sex\":1,\"signature\":\"这家伙很懒,什么都没留下\",\"startColor\":\"\",\"token\":\"\",\"tokenRong\":\"\",\"userAlbum\":[],\"userInfoComplete\":0,\"userNicename\":\"灯灯\",\"userStatus\":0,\"usersType\":\"B\",\"version\":\"\",\"vip\":{\"type\":\"\"},\"votestotal\":0}},\"money\":\"0.0000\",\"mp3Time\":0,\"msg\":\"操作成功\",\"prop\":{\"callback\":\"MateTicket\",\"cnTitle\":\"灵魂速配卡\",\"createTime\":1,\"enTitle\":\"linhuncard\",\"exTime\":0,\"icon\":\"https://downs.yaoulive.com/20231116/37cfa701c548327beaa70631b4aa58d9.png\",\"id\":2,\"num\":10,\"status\":1,\"type\":1,\"updateTime\":1700127674},\"videoTime\":0}";
|
||||
SendConsumeBean bean = JSONObject.parseObject(data, SendConsumeBean.class);
|
||||
if (bean == null) {
|
||||
return;
|
||||
@@ -120,9 +114,6 @@ public class ChatActivity extends AbsOTOActivity {
|
||||
public void onCreateView(View itemView) {
|
||||
super.onCreateView(itemView);
|
||||
ImgLoader.display(ChatActivity.this, bean.getProp().getIcon(), (ImageView) itemView);
|
||||
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(DpUtil.dp2px(80), DpUtil.dp2px(47));
|
||||
params.gravity= Gravity.CENTER;
|
||||
itemView.setLayoutParams(params);
|
||||
}
|
||||
}).showDialog();
|
||||
} else if (bundleInt == CALL_CHAT_TYPE_CHAT_UP) {
|
||||
|
||||
@@ -29,7 +29,6 @@ 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;
|
||||
@@ -97,11 +96,8 @@ public class MsgMoreGreetConfigActivity extends AbsOTOActivity {
|
||||
});
|
||||
cancel.setOnClickListener(v -> clearGreet());
|
||||
recyclerView.setOnClickListener(v -> adapter.notifyDataSetChanged());
|
||||
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.upload_img), new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
imageUtil.getImageByAlumb(true);
|
||||
}
|
||||
findViewById(R.id.upload_img).setOnClickListener(v -> {
|
||||
imageUtil.getImageByAlumb(false);
|
||||
});
|
||||
initData();
|
||||
imageUtil.setImageResultCallback(new ImageResultCallback() {
|
||||
@@ -206,7 +202,7 @@ public class MsgMoreGreetConfigActivity extends AbsOTOActivity {
|
||||
public void onSuccess(List<GreetBean> data) {
|
||||
List<GreetBean> list = new ArrayList<>();
|
||||
for (GreetBean item : data) {
|
||||
if (item.getType() == 1) {
|
||||
if (item.getType() == 0) {
|
||||
list.add(item);
|
||||
} else if (item.getType() == 2) {
|
||||
ImgLoader.display(mContext, item.getContent(), (ImageView) findViewById(R.id.imageView5));
|
||||
|
||||
@@ -1,236 +0,0 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -1,297 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
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 + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ import io.rong.imlib.RongIMClient;
|
||||
/**
|
||||
* 设置
|
||||
*/
|
||||
@Route(path = RouteUtil.PATH_SETTING)
|
||||
@Route(path = RouteManager.PATH_SETTING)
|
||||
public class SettingActivity extends AbsActivity {
|
||||
|
||||
private Handler mHandler;
|
||||
@@ -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(), true);
|
||||
RouteManager.forwardWebViewActivity(null, HtmlUrlUtils.getQAUrl());
|
||||
}
|
||||
});
|
||||
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,7 +18,6 @@ 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;
|
||||
|
||||
@@ -68,21 +67,41 @@ public class EditNameActivity extends AbsActivity {
|
||||
return;
|
||||
}
|
||||
|
||||
OTONetManager.getInstance(EditNameActivity.this).setFiled("user_nicename", content, new HttpCallback<HttpCallbackModel>() {
|
||||
OTONetManager.getInstance(EditNameActivity.this).setFiled("user_nicename", content, new com.yunbao.common.http.base.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,7 +39,6 @@ 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;
|
||||
@@ -111,7 +110,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
}
|
||||
});
|
||||
userInfo = UserManager.getUserBean();
|
||||
OTONetManager.getInstance(mContext).getBaseInfos(false, new com.yunbao.common.http.base.HttpCallback<UserBean>() {
|
||||
OTONetManager.getInstance(mContext).getBaseInfos(true, new com.yunbao.common.http.base.HttpCallback<UserBean>() {
|
||||
@Override
|
||||
public void onSuccess(UserBean data) {
|
||||
showData(data);
|
||||
@@ -222,7 +221,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
|
||||
} else if (i == R.id.btn_sex) {
|
||||
// forwardSex();
|
||||
new XPopup.Builder(mContext).asCustom(new OTOUpdateSexPopup(mContext, (int) userInfo.getUser().getSex(), new OTOUpdateSexPopup.UpdateSexCallBack() {
|
||||
/*new XPopup.Builder(mContext).asCustom(new UpdateSexPopup(mContext, userModel.getSex(), new UpdateSexPopup.UpdateSexCallBack() {
|
||||
@Override
|
||||
public void onSex(int sex) {
|
||||
userSex = sex;
|
||||
@@ -231,32 +230,19 @@ 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
|
||||
@@ -333,8 +319,6 @@ 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() {
|
||||
@@ -441,7 +425,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
|
||||
Calendar startCalendar = Calendar.getInstance();
|
||||
Calendar endCalendar = Calendar.getInstance();
|
||||
startCalendar.set(1900, 0, 1);
|
||||
startCalendar.set(1990, 1, 1);
|
||||
endCalendar.setTime(new Date());
|
||||
|
||||
TimePickerView pvTime = new TimePickerBuilder(EditProfileActivity.this, new OnTimeSelectListener() {
|
||||
@@ -534,7 +518,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
} else if (userInfo.getUser().getSex() == 2) {
|
||||
mSex.setText(R.string.sex_female);
|
||||
}
|
||||
tag.setText(userInfo.getInfo().toCnLabelString());
|
||||
tag.setText(userInfo.getInfo().getCn_label());
|
||||
mCity.setText(userInfo.getInfo().getArea());
|
||||
if (!StringUtil.isEmpty(userInfo.getUser().getMobile())) {
|
||||
mobile = userInfo.getUser().getMobile();
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
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,7 +77,6 @@ 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);
|
||||
@@ -89,7 +88,6 @@ 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) {
|
||||
@@ -108,13 +106,9 @@ public class HomeRankListAdapter extends RecyclerView.Adapter<HomeRankListAdapte
|
||||
follow.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (type == HomeRankFragment.TYPE_CHARM) {
|
||||
level.setText("" + bean.getCharmLevel());
|
||||
ic_level.setImageResource(R.mipmap.icon_yan);
|
||||
linearLayout3.setBackgroundResource(R.mipmap.icon_yan_bg);
|
||||
level.setText("Lv." + bean.getCharmLevel());
|
||||
} else {
|
||||
level.setText("" + bean.getWealthLevel());
|
||||
ic_level.setImageResource(R.mipmap.icon_wealth);
|
||||
linearLayout3.setBackgroundResource(R.mipmap.wealth_bg);
|
||||
level.setText("Lv." + bean.getWealthLevel());
|
||||
}
|
||||
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.isNameAuth()) {
|
||||
if (itemBean.getName_auth() == 2) {
|
||||
auth.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
auth.setVisibility(View.GONE);
|
||||
@@ -134,20 +134,48 @@ public class HomeRecommendListAdapter extends RecyclerView.Adapter<HomeRecommend
|
||||
ConversationUtils.startConversation(mContext, itemBean.getId() + "");
|
||||
return;
|
||||
}
|
||||
ConversationUtils.hitOn(mContext,itemBean.getId()+"",null);
|
||||
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();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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,11 +6,9 @@ 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;
|
||||
@@ -46,12 +44,6 @@ 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,12 +16,10 @@ 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;
|
||||
@@ -104,12 +102,7 @@ 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 = 1;
|
||||
private int type;
|
||||
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 String name_auth;//真人认证 1 未提交 2 已认证 3已提交 4被驳回
|
||||
private int name_auth;//1未认证 2已认证 3审核中 4被拒绝
|
||||
private long name_auth_time;
|
||||
private String auth_front;
|
||||
private String auth_back;
|
||||
private String auth_remark;
|
||||
private String sage_auth;//达人认证 1 未提交 2 已认证 3已提交 4被驳回
|
||||
private int 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 String getName_auth() {
|
||||
public int getName_auth() {
|
||||
return name_auth;
|
||||
}
|
||||
|
||||
public void setName_auth(String name_auth) {
|
||||
public void setName_auth(int name_auth) {
|
||||
this.name_auth = name_auth;
|
||||
}
|
||||
|
||||
@@ -181,11 +181,11 @@ public class HomeItemBean extends BaseModel {
|
||||
this.auth_remark = auth_remark;
|
||||
}
|
||||
|
||||
public String getSage_auth() {
|
||||
public int getSage_auth() {
|
||||
return sage_auth;
|
||||
}
|
||||
|
||||
public void setSage_auth(String sage_auth) {
|
||||
public void setSage_auth(int sage_auth) {
|
||||
this.sage_auth = sage_auth;
|
||||
}
|
||||
|
||||
@@ -327,12 +327,4 @@ 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 String videoPrice;//视频扣费金额
|
||||
private String mp3Price;//音频扣费金额
|
||||
private String price;//消息扣费金额
|
||||
private int videoPrice;//视频扣费金额
|
||||
private int mp3Price;//音频扣费金额
|
||||
private int price;//消息扣费金额
|
||||
private int pingTime;//心跳时间,单位秒
|
||||
private String matePrice;//匹配金額
|
||||
private int matePrice;//匹配金額
|
||||
private int mateTime;//匹配時間
|
||||
|
||||
public MessageConsumeConfigBean() {
|
||||
}
|
||||
|
||||
public String getVideoPrice() {
|
||||
public int getVideoPrice() {
|
||||
return videoPrice;
|
||||
}
|
||||
|
||||
public void setVideoPrice(String videoPrice) {
|
||||
public void setVideoPrice(int videoPrice) {
|
||||
this.videoPrice = videoPrice;
|
||||
}
|
||||
|
||||
public String getMp3Price() {
|
||||
public int getMp3Price() {
|
||||
return mp3Price;
|
||||
}
|
||||
|
||||
public void setMp3Price(String mp3Price) {
|
||||
public void setMp3Price(int mp3Price) {
|
||||
this.mp3Price = mp3Price;
|
||||
}
|
||||
|
||||
public String getPrice() {
|
||||
public int getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(String price) {
|
||||
public void setPrice(int price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
@@ -47,11 +47,11 @@ public class MessageConsumeConfigBean extends BaseModel {
|
||||
this.pingTime = pingTime;
|
||||
}
|
||||
|
||||
public String getMatePrice() {
|
||||
public int getMatePrice() {
|
||||
return matePrice;
|
||||
}
|
||||
|
||||
public void setMatePrice(String matePrice) {
|
||||
public void setMatePrice(int matePrice) {
|
||||
this.matePrice = matePrice;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,10 +4,6 @@ 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;
|
||||
@@ -64,8 +60,8 @@ public class UserBean extends BaseModel {
|
||||
public static class UserInfo {
|
||||
private int id;
|
||||
private String label_id;
|
||||
private List<String> cn_label;
|
||||
private List<String> en_label;
|
||||
private String cn_label;
|
||||
private String en_label;
|
||||
private int first_mate;
|
||||
private long create_time;
|
||||
private long update_time;
|
||||
@@ -73,12 +69,12 @@ public class UserBean extends BaseModel {
|
||||
private int b_y;
|
||||
private int b_ym;
|
||||
private String b_ymd;
|
||||
private String name_auth;//真人认证 1 未提交 2 已认证 3已提交 4被驳回
|
||||
private int name_auth;//1 未提交 2 已认证 3已提交 4被驳回
|
||||
private long name_auth_time;
|
||||
private String auth_front;
|
||||
private String auth_back;
|
||||
private String auth_remark;
|
||||
private String sage_auth;//达人认证 1 未提交 2 已认证 3已提交 4被驳回
|
||||
private int sage_auth;//1 未提交 2 已认证 3已提交 4被驳回
|
||||
private long sage_auth_time;
|
||||
private int is_hot;
|
||||
private String vodie_price;
|
||||
@@ -88,30 +84,9 @@ 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;
|
||||
}
|
||||
@@ -128,31 +103,19 @@ public class UserBean extends BaseModel {
|
||||
this.label_id = label_id;
|
||||
}
|
||||
|
||||
public List<String> getCn_label() {
|
||||
public 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 List<String> getEn_label() {
|
||||
public String getEn_label() {
|
||||
return en_label;
|
||||
}
|
||||
|
||||
public void setEn_label(List<String> en_label) {
|
||||
public void setEn_label(String en_label) {
|
||||
this.en_label = en_label;
|
||||
}
|
||||
|
||||
@@ -212,14 +175,11 @@ public class UserBean extends BaseModel {
|
||||
this.b_ymd = b_ymd;
|
||||
}
|
||||
|
||||
public String getName_auth() {
|
||||
if (StringUtil.isEmpty(name_auth)) {
|
||||
name_auth = "0";
|
||||
}
|
||||
public int getName_auth() {
|
||||
return name_auth;
|
||||
}
|
||||
|
||||
public void setName_auth(String name_auth) {
|
||||
public void setName_auth(int name_auth) {
|
||||
this.name_auth = name_auth;
|
||||
}
|
||||
|
||||
@@ -255,14 +215,11 @@ public class UserBean extends BaseModel {
|
||||
this.auth_remark = auth_remark;
|
||||
}
|
||||
|
||||
public String getSage_auth() {
|
||||
if(StringUtil.isEmpty(sage_auth)){
|
||||
sage_auth = "0";
|
||||
}
|
||||
public int getSage_auth() {
|
||||
return sage_auth;
|
||||
}
|
||||
|
||||
public void setSage_auth(String sage_auth) {
|
||||
public void setSage_auth(int sage_auth) {
|
||||
this.sage_auth = sage_auth;
|
||||
}
|
||||
|
||||
@@ -329,14 +286,6 @@ 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 {
|
||||
|
||||
@@ -1,179 +0,0 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
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.shayu.onetoone.activity.OTOWalletActivity;
|
||||
import com.yunbao.common.activity.MyWalletActivity;
|
||||
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, OTOWalletActivity.class).putExtra("p", 1));
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
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().isAuth()) {
|
||||
if (bean.getInfo().getSage_auth()!=2) {
|
||||
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.shayu.onetoone.activity.OTOWalletActivity;
|
||||
import com.yunbao.common.activity.MyWalletActivity;
|
||||
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, OTOWalletActivity.class).putExtra("p", 1));
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||
}
|
||||
if (onDialogClickListener != null) {
|
||||
onDialogClickListener.onApply(dialog);
|
||||
|
||||
@@ -276,6 +276,9 @@ 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 ? "6" : "8",
|
||||
CommonAppConfig.IS_GOOGLE_PLAY ? "1" : "3",
|
||||
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,30 +1475,6 @@ 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,7 +3,6 @@ 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;
|
||||
|
||||
@@ -25,7 +24,7 @@ public class RouteManager {
|
||||
public static final String ACTIVITY_HOME_SCREEN = "/activity/HomeScreenActivity";
|
||||
public static final String ACTIVITY_CALL_VIDEO = "/activity/CallVideoActivity";
|
||||
public static final String ACTIVITY_CALL_AUDIO = "/activity/CallVAudioActivity";
|
||||
public static final String PATH_EDITPROFILE = "/main/EditProfileActivity";
|
||||
public static final String PATH_EDITPROFILE = "/activity/EditProfileActivity";
|
||||
public static final String ACTIVITY_MATCHING = "/activity/MatchingActivity";
|
||||
public static final String ACTIVITY_MY_FRIEND_LIST = "/activity/MyFriendListActivity";
|
||||
|
||||
@@ -41,12 +40,10 @@ 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";
|
||||
public static final String PATH_SETTING = "/activity/SettingActivity";
|
||||
|
||||
/**
|
||||
* 达人认证入口
|
||||
@@ -74,7 +71,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();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,15 +113,7 @@ public class RouteManager {
|
||||
}
|
||||
|
||||
public static void forwardWebViewActivity(String title, String url) {
|
||||
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();
|
||||
ARouter.getInstance().build(ACTIVITY_WEB_VIEW).withString("title", title).withString("url", url).navigation();
|
||||
}
|
||||
|
||||
public static void forwardActivity(String path) {
|
||||
@@ -132,27 +121,10 @@ public class RouteManager {
|
||||
}
|
||||
|
||||
public static void forwardActivity(String path, Bundle bundle) {
|
||||
ARouter.getInstance().build(path).with(bundle).navigation();
|
||||
ARouter.getInstance().build(path).with( bundle).navigation();
|
||||
}
|
||||
|
||||
public static void forwardActivity(String path, Serializable serializable) {
|
||||
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,
|
||||
0,
|
||||
2,
|
||||
false
|
||||
);
|
||||
send(sendData, listener);
|
||||
@@ -66,7 +66,7 @@ public class SendMessageManager {
|
||||
"not",
|
||||
"音频消息",
|
||||
time,
|
||||
0,
|
||||
2,
|
||||
false
|
||||
);
|
||||
send(sendData, listener);
|
||||
@@ -102,6 +102,10 @@ 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("sage_auth") String name_auth,
|
||||
@Query("name_auth") String name_auth,
|
||||
@Query("sex") String sex,
|
||||
@Query("star") String star,
|
||||
@Query("p") String p
|
||||
@@ -375,12 +375,6 @@ 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,9 +6,6 @@ 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;
|
||||
|
||||
@@ -30,47 +27,25 @@ 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 (sex == -1 || sex == -2) {
|
||||
if (json.getInteger("sex") == -1) {
|
||||
holder.getView(R.id.sex).setVisibility(View.GONE);
|
||||
} else if (sex == 1) {
|
||||
} else if (json.getInteger("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,19 +1,9 @@
|
||||
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;
|
||||
@@ -28,57 +18,11 @@ 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,20 +79,13 @@ public class HtmlUrlUtils {
|
||||
* 用户协议
|
||||
*/
|
||||
public static String getUserAgreement() {
|
||||
return CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=674";
|
||||
return CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=59";
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务协议
|
||||
*/
|
||||
public static String getServerAgreement() {
|
||||
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";
|
||||
return CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=668";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 ? "6" : "8")
|
||||
.params("app_source", CommonAppConfig.IS_GOOGLE_PLAY == true ? "1" : "3")
|
||||
.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 ? "6" : "8")
|
||||
.params("app_source", CommonAppConfig.IS_GOOGLE_PLAY == true ? "1" : "3")
|
||||
.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 ? "6" : "8")
|
||||
.params("app_source", CommonAppConfig.IS_GOOGLE_PLAY == true ? "1" : "3")
|
||||
//增加参数:推广码
|
||||
.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().isNameAuth()) {
|
||||
if (data.getInfo().getName_auth() == 2) {
|
||||
listener.onSuccess("", null);
|
||||
} else if ("3".equals(data.getInfo().getName_auth())) {
|
||||
listener.onError(Integer.parseInt(data.getInfo().getName_auth()), "當前正在審核中,請耐心等待");
|
||||
} else if (data.getInfo().getName_auth() == 3) {
|
||||
listener.onError(data.getInfo().getName_auth(), "當前正在審核中,請耐心等待");
|
||||
} else {
|
||||
listener.onError(Integer.parseInt(data.getInfo().getName_auth()), "");
|
||||
listener.onError(data.getInfo().getName_auth(), "");
|
||||
}
|
||||
if (!data.getInfo().isNameAuth()) {
|
||||
if (data.getInfo().getName_auth() != 2) {
|
||||
AppManager.runDebugCode(() -> {
|
||||
new TipsDialog(mContext)
|
||||
.setTitle("测试模式,是否强行拨打")
|
||||
|
||||
@@ -54,25 +54,6 @@ 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)
|
||||
@@ -139,7 +120,6 @@ public class UserManager {
|
||||
}
|
||||
|
||||
public static void toHomePage(int userId) {
|
||||
toHomePage(userId + "");
|
||||
}
|
||||
public static void toHomePage(String userId,boolean isGoto) {
|
||||
toHomePage(userId+"");
|
||||
|
||||
@@ -5,7 +5,6 @@ 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;
|
||||
@@ -23,8 +22,6 @@ 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;
|
||||
@@ -53,25 +50,13 @@ 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() {
|
||||
if (rootLayout.getVisibility() != View.GONE) {
|
||||
rootLayout.removeAllViews();
|
||||
rootLayout.setVisibility(View.GONE);
|
||||
}
|
||||
if (onShowListener != null) {
|
||||
onShowListener.onItemClick(false, View.GONE);
|
||||
}
|
||||
rootLayout.removeAllViews();
|
||||
rootLayout.setVisibility(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.shayu.onetoone.activity.OTOWalletActivity;
|
||||
import com.yunbao.common.activity.MyWalletActivity;
|
||||
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, OTOWalletActivity.class).putExtra("p", 1));
|
||||
mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 1));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<?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>
|
||||
@@ -1,9 +0,0 @@
|
||||
<?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>
|
||||
@@ -1,132 +0,0 @@
|
||||
<?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,7 +1,6 @@
|
||||
<?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"
|
||||
@@ -330,9 +329,7 @@
|
||||
<RelativeLayout
|
||||
android:id="@+id/btn_person"
|
||||
style="@style/edit_profile_group"
|
||||
android:onClick="editProfileClick"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
android:onClick="editProfileClick">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/rootView"
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<ImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
</LinearLayout>
|
||||
|
||||
</ImageView>
|
||||
@@ -54,6 +54,25 @@
|
||||
android:gravity="center"
|
||||
android:text="@string/home_label_friends" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="26dp"
|
||||
android:scaleType="fitEnd"
|
||||
android:src="@drawable/tab_friends" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="10sp"
|
||||
android:gravity="center"
|
||||
android:text="直播" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recommendList"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
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="5"
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/item_home_hot">
|
||||
|
||||
|
||||
@@ -218,7 +218,6 @@
|
||||
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">
|
||||
@@ -278,7 +277,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
@@ -308,7 +306,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp">
|
||||
|
||||
@@ -456,7 +453,6 @@
|
||||
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"
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
<?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>
|
||||
@@ -1,78 +0,0 @@
|
||||
<?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>
|
||||
@@ -1,135 +0,0 @@
|
||||
<?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>
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="14dp"
|
||||
android:layout_marginTop="9dp"
|
||||
|
||||
@@ -61,30 +61,30 @@
|
||||
android:id="@+id/btn_filter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="42dp"
|
||||
android:layout_marginEnd="14dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/btn_top"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/btn_top"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/ic_tab_dynamic_filter" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_top"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="42dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/dslTabLayout"
|
||||
app:layout_constraintEnd_toStartOf="@+id/btn_filter"
|
||||
app:layout_constraintTop_toTopOf="@+id/dslTabLayout"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@mipmap/ic_tab_dynamic_top" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/matching"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
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" />
|
||||
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" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -450,7 +450,6 @@
|
||||
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,8 +278,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@+id/iconLevel"
|
||||
android:textSize="11sp"
|
||||
tools:text="Lv.999"
|
||||
android:text="Lv.0"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -406,7 +405,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
@@ -547,7 +545,6 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<?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>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?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,7 +5,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="167dp"
|
||||
android:maxHeight="167dp">
|
||||
android:maxHeight="167dp"
|
||||
android:layout_marginTop="16dp">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<?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>
|
||||
@@ -1,30 +0,0 @@
|
||||
<?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>
|
||||
@@ -1,94 +0,0 @@
|
||||
<?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>
|
||||
@@ -1,11 +0,0 @@
|
||||
<?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,19 +99,6 @@
|
||||
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="wrap_content">
|
||||
android:layout_height="135dp">
|
||||
|
||||
<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,7 +64,6 @@
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/view_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="91dp"
|
||||
android:layout_marginTop="14dp"
|
||||
@@ -119,21 +118,18 @@
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
tools:text="TextView"
|
||||
android:textColor="#333333"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="TextView" />
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/status"
|
||||
@@ -141,38 +137,29 @@
|
||||
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:layout_weight="1"
|
||||
android:visibility="gone">
|
||||
android:visibility="gone"
|
||||
android:layout_weight="1">
|
||||
|
||||
<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"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="10sp"
|
||||
android:visibility="gone"
|
||||
tools:text="心动值95%"
|
||||
tools:visibility="gone" />
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -192,14 +179,13 @@
|
||||
android:id="@+id/star"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
tools:text="TextView"
|
||||
android:textColor="#888888"
|
||||
android:textSize="12sp"
|
||||
tools:text="TextView" />
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -216,12 +202,12 @@
|
||||
android:id="@+id/signature"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
tools:text="TextView"
|
||||
android:textColor="#888888"
|
||||
android:textSize="12sp"
|
||||
tools:text="TextView" />
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -241,42 +227,4 @@
|
||||
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>
|
||||
@@ -1,98 +0,0 @@
|
||||
<?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/titleView"
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 58 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user