Compare commits
643 Commits
6.4.4_fix_
...
dev_6.4.9_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f072a31fc | ||
|
|
420118b652 | ||
|
|
076008ce89 | ||
|
|
8455d1253c | ||
| 07f8f46f1f | |||
|
|
8b46c57482 | ||
|
|
db834caf00 | ||
| 5c1eef1419 | |||
| fe29d307a9 | |||
|
|
b8fea6366c | ||
| 06dddb5273 | |||
| d774296db9 | |||
|
|
077cc7fd80 | ||
|
|
fdf9d0aea2 | ||
| 92c38dc0dc | |||
|
|
d8c4b9dd04 | ||
|
|
342b2e9139 | ||
| 88ea48b6ca | |||
|
|
0726c5dc1c | ||
|
|
046adc9340 | ||
|
|
46fa2419d3 | ||
|
|
5c5114f808 | ||
|
|
7f2f7ea4d8 | ||
| a89c441555 | |||
| a1762bc791 | |||
| 34432e5ccf | |||
|
|
46f20c9663 | ||
|
|
e0753ebb29 | ||
|
|
d7d24904bf | ||
|
|
abbc2fc4ee | ||
| 07f0f39978 | |||
| 8d932a09e1 | |||
|
|
34c855fc8f | ||
|
|
824d431a63 | ||
| af63c4c8ac | |||
|
|
16ba71493e | ||
| 94f8ee7f3b | |||
| e7c97f2b55 | |||
|
|
a7e6efa0dc | ||
|
|
ea9807dcdc | ||
| fdd30aa52a | |||
|
|
ba23f720eb | ||
| 05ede89cba | |||
| d6eddeb130 | |||
| bf4710470f | |||
| 5d2a246916 | |||
| cca8f43f61 | |||
|
|
1d66a9b7fb | ||
|
|
c1c4a7a38b | ||
|
|
b8a91a85e4 | ||
|
|
7cb7258210 | ||
|
|
8d823f7a07 | ||
| 6d458d0c7f | |||
| eaed7e448b | |||
| b2f779f58a | |||
| 79ded6bff4 | |||
|
|
d86e16c9f5 | ||
| f2cff3b93f | |||
|
|
e97a4e607c | ||
| 4d86317ec8 | |||
| d36ece4c54 | |||
| 11cf971514 | |||
|
|
3d5ac05d36 | ||
|
|
d3268e57bc | ||
|
|
3549c25cca | ||
|
|
859f54b1e1 | ||
| a808cd13c0 | |||
|
|
cd0067d77b | ||
|
|
894e264fb3 | ||
| 5dd5b2e0ea | |||
|
|
8f58c485c8 | ||
|
|
11e809a978 | ||
|
|
20aa6002f8 | ||
|
|
ffcb0e8790 | ||
|
|
3de7160538 | ||
|
|
1e595ec526 | ||
| 344bbcdfc8 | |||
| c1aeaa0e1b | |||
| e108494bd5 | |||
| bc0e698a77 | |||
| b82c87d5d6 | |||
| 80fe5271f6 | |||
| 944d703e36 | |||
| 911869ed9f | |||
| 543336af99 | |||
| 5d7cff6707 | |||
| 1bbab7ac9e | |||
|
|
16592aaecb | ||
|
|
3de9ff57c3 | ||
| e932238fc2 | |||
|
|
df436bbe1e | ||
|
|
49bd97f646 | ||
| 731f941298 | |||
|
|
c21df55c06 | ||
| 9acbc60db2 | |||
| 5f2dda021a | |||
| 1244010c3d | |||
| 7226d54277 | |||
| eaafcdd444 | |||
| 9f9c02b7e7 | |||
|
|
7bffdda6b9 | ||
| 50d01ccd92 | |||
|
|
420573736d | ||
|
|
aca98cb7e6 | ||
|
|
f26fb83fec | ||
| 1ad9effe91 | |||
| 418d306d72 | |||
| 3606815a41 | |||
| 518e57ee44 | |||
| 872245c9c9 | |||
| 749f756d58 | |||
|
|
a22dfb6214 | ||
|
|
652e569e2b | ||
| d480986485 | |||
| 2e6efc69e8 | |||
| e2761049e5 | |||
| ee6a4288b0 | |||
| 7070f5c1b4 | |||
| cc4cc2f746 | |||
| 93e2a8af02 | |||
| 207811c41d | |||
|
|
8730a6396f | ||
| 05ff51bd48 | |||
| 1904eeb3ba | |||
|
|
70126171c6 | ||
|
|
ee084d6f33 | ||
| bacf4fd32f | |||
|
|
eaae58db31 | ||
|
|
13146595bf | ||
| b3083cdd18 | |||
| cf85870810 | |||
| 182e46799a | |||
| 27bd65d3da | |||
|
|
9fcc04cef2 | ||
| a1f07b8c20 | |||
|
|
65efa88d4a | ||
| 01a2d66585 | |||
| 098e9bf6ba | |||
| ddf56963bb | |||
|
|
eadcaf826b | ||
|
|
36248eaeef | ||
| 04496c3888 | |||
| 494aa6b52d | |||
|
|
4bb51506e3 | ||
|
|
112bec58df | ||
| 0b7a3cc50e | |||
| 9f517199fe | |||
| 2393a53466 | |||
| 80993c7d2d | |||
| 8c0a23d39a | |||
| a0949f0903 | |||
|
|
42052b7465 | ||
| a37a92e211 | |||
|
|
c3ddc62b95 | ||
|
|
0a3409f98a | ||
|
|
d26a687385 | ||
| 2f413e260e | |||
| 6fcb194995 | |||
| 7cea6b4f8d | |||
| 16d02c6936 | |||
| 289c93d824 | |||
| 8f99d68b6f | |||
| e0d7137727 | |||
|
|
7a9ed22ec9 | ||
|
|
af58ec755d | ||
| 4ad2020b57 | |||
| 1db24dae4b | |||
| 76055543c3 | |||
| a1d95d6a94 | |||
| 2143e3eb77 | |||
|
|
4a0901ea93 | ||
|
|
488bee514d | ||
|
|
bafea09e44 | ||
|
|
54923304dc | ||
|
|
8b357233c2 | ||
| 06b5f99930 | |||
| 0b5598346e | |||
|
|
d81e6b9f04 | ||
| 87e3dddac5 | |||
| 55f3ac577b | |||
| 0c053a028e | |||
| df36529619 | |||
| 7555510d94 | |||
|
|
2e986db686 | ||
| 660853d5be | |||
| 956bef4b90 | |||
|
|
43c22fca7c | ||
| 5db84c1e61 | |||
| 00c3e0cb77 | |||
| f4b6c46075 | |||
| 181bb5b445 | |||
|
|
90f58054fa | ||
| 137dbc72d8 | |||
|
|
a7cef3c6f8 | ||
| 339d460c0f | |||
| c8ba78f39b | |||
|
|
d31af73479 | ||
|
|
874800c19d | ||
|
|
404d45893f | ||
| ed6e95f380 | |||
| c4cfa0becd | |||
|
|
a069562bbe | ||
|
|
9158424a25 | ||
| 7488143037 | |||
| 99938f6ed6 | |||
|
|
1bde99f6c9 | ||
|
|
e3a9a037ba | ||
| b1d342f791 | |||
| 7639a70887 | |||
| f690cf0b62 | |||
| 4dcb12eb4f | |||
|
|
af5d8dbf19 | ||
| 9cd1638d55 | |||
| dd1570c10e | |||
| 3af7ca5d94 | |||
| 2d2cc21e15 | |||
| f872029c9d | |||
| 6198489dd4 | |||
| cce8e43c24 | |||
| cae0599307 | |||
|
|
2c6e88500a | ||
| efc20c644a | |||
| bdc43baaa8 | |||
| dc529b6640 | |||
|
|
488cc192b2 | ||
|
|
269f6c64a9 | ||
|
|
51186169ca | ||
|
|
325e57d1d5 | ||
| 862ec98fa3 | |||
| b827f7bfa6 | |||
|
|
786dfb54a3 | ||
|
|
a373738d70 | ||
| 6929276512 | |||
| 64c33f5709 | |||
| 7330e1ae2b | |||
| f359c9994d | |||
| d49b60a1e1 | |||
|
|
ee2cebdc41 | ||
| 1407ecc2f2 | |||
|
|
606fc64262 | ||
| a5516ebfb3 | |||
| dd7214a945 | |||
| a20571e050 | |||
| 8f7adb3079 | |||
| adcf005e62 | |||
|
|
8cff0195ad | ||
| 98940d7554 | |||
| 4a8c29365c | |||
| b641a65117 | |||
|
|
d747407d6b | ||
| f302155912 | |||
|
|
3d60814538 | ||
| 1293368d59 | |||
|
|
d1e1f5f4e8 | ||
|
|
b804c20ba0 | ||
| e030db04b9 | |||
| 0fcadde670 | |||
| e522d04ead | |||
|
|
ce0061e86e | ||
| 7ed4043a1f | |||
|
|
0b97d7bbaf | ||
| 5317f6d88f | |||
| 092b2ac519 | |||
| c9725875b3 | |||
| 6c33ac15f8 | |||
| af91783b9f | |||
| 5755aa5232 | |||
| ddc246e11c | |||
|
|
869ad9adf7 | ||
| 5356d91fef | |||
|
|
f024283e80 | ||
| 49167f332d | |||
| ea69f4bcb7 | |||
|
|
eaf973b927 | ||
| fdbf5aee04 | |||
| e4c490577d | |||
|
|
b5247df69b | ||
| d39ee17cc4 | |||
| 07da7acacd | |||
|
|
28add09f32 | ||
|
|
9d69610713 | ||
|
|
32969a58db | ||
| b188613035 | |||
| 308d5acc21 | |||
|
|
284b9784d6 | ||
| 26f02065df | |||
| eef852c283 | |||
| e0287899f8 | |||
| ae020b105a | |||
| 62c3cdcb30 | |||
| 01c657fdcb | |||
| 3a75e24601 | |||
| e28c393f88 | |||
| bfe8034b24 | |||
| c056dfe246 | |||
| a7cf09de1e | |||
| 7c4c22d69e | |||
| 3747f214b1 | |||
|
|
503fb0d7f1 | ||
|
|
6b0500b5ff | ||
| ae8c6cc23d | |||
| ad028c69d0 | |||
| 03b3398bce | |||
| 4a84283000 | |||
| c49c560e8d | |||
| 8d3ac7761f | |||
| a1d9b1f75b | |||
|
|
afed0c8833 | ||
| 415ed2fc9b | |||
| 8e45e17768 | |||
|
|
576a30d1be | ||
|
|
e380c8dcbc | ||
| 5e9f23286e | |||
| 1bbc78fb32 | |||
| b56368412c | |||
| 4ad75a11a8 | |||
| 3fa259c5b9 | |||
|
|
4cd4939c58 | ||
| b20141de02 | |||
| 9eff246f06 | |||
| 285a33ff9a | |||
|
|
7ebd935eba | ||
| f62a093092 | |||
| 28b4a36800 | |||
| ec59fce097 | |||
| e134ef8d54 | |||
| 29ddc68870 | |||
| 9ead9a6fb8 | |||
| 2a2672587c | |||
| 98122c25d8 | |||
| 84c89d7530 | |||
| 4268816539 | |||
| 721172d48a | |||
| 3e7942dbd4 | |||
| 17d18eff98 | |||
| 0d422177ac | |||
| 6336eab32a | |||
| f91a3f3fc1 | |||
| a489a6d00d | |||
| 8d8cff8d1b | |||
|
|
5f487f74bd | ||
| 857206e3da | |||
|
|
4ebe56913a | ||
|
|
efcc2591c2 | ||
|
|
455b330b7d | ||
|
|
ed2879e263 | ||
| 3b1c5ac1ec | |||
|
|
d243ffb380 | ||
| 6bdd81038b | |||
| 1eff58aca1 | |||
|
|
fa6eda5936 | ||
|
|
72f7e00dd5 | ||
| 707e083684 | |||
| 8b4f88c766 | |||
|
|
ae3ac93248 | ||
|
|
f43ccea32a | ||
|
|
73684b9962 | ||
|
|
80a1508dfc | ||
| 0b1393615c | |||
|
|
4481b102ef | ||
| cab59a5f4a | |||
| 9f6cd3fd6f | |||
|
|
4c5730d3bf | ||
|
|
1222aa9819 | ||
|
|
e58915edb6 | ||
|
|
4d4c251ebd | ||
|
|
6a416aaba1 | ||
| bbb25cde50 | |||
| 210749ebd3 | |||
| 637fedcbe6 | |||
|
|
70b05b85d7 | ||
| 9a1cefdb70 | |||
| 6ca8fb0c29 | |||
|
|
8e7de87c6b | ||
| cb55c09624 | |||
|
|
a41a58dc26 | ||
| f257c2b5a9 | |||
|
|
f5bd17f832 | ||
| 1b7296c13b | |||
| a965a83653 | |||
|
|
5cc521d93c | ||
| 6f2a893a4e | |||
| 1548b6f252 | |||
|
|
0c6b62ed1a | ||
|
|
1fcb3d312c | ||
| 35b24c261e | |||
| e5c5a2e5f5 | |||
| 9934d53390 | |||
| 030fdb6ad0 | |||
|
|
cf4948a3e2 | ||
| afd4cb6e41 | |||
| 596c9f9962 | |||
| 020bbf322d | |||
| 05b1a9bc74 | |||
| 7f001ba887 | |||
|
|
744de267dd | ||
|
|
af26dc24c7 | ||
|
|
e9fa533e5a | ||
| 3bd4301cda | |||
| 23be58c4e8 | |||
| 718d4a5d2f | |||
| 733678532a | |||
| 6fb29bbf60 | |||
| ecbfa57276 | |||
| fc59a6f182 | |||
| 83039d7b29 | |||
|
|
e405965298 | ||
|
|
e6766dc5eb | ||
| fe027e53db | |||
|
|
546d9b5728 | ||
| 7008ccc505 | |||
| 1fc8977f99 | |||
| 4acba02c6a | |||
|
|
491427feba | ||
|
|
249d251708 | ||
|
|
96eee88c82 | ||
|
|
7005895d90 | ||
|
|
3bdee09402 | ||
| 2843131151 | |||
| a8d4d64174 | |||
| 1853acd5eb | |||
|
|
03a4054ee5 | ||
| fe66792935 | |||
|
|
082c9d7d12 | ||
| e35eb5ac7f | |||
|
|
5e631652a9 | ||
| 4eb9adad78 | |||
| 4a9a8c3ec3 | |||
|
|
450047aae2 | ||
| eb65c0e101 | |||
| 6bd29ec63e | |||
| f0231be306 | |||
| b12547cd88 | |||
| ed6b531b8d | |||
| 47b9487e13 | |||
| ec40f8fa0d | |||
| 86a0a19fec | |||
| e0b69be2d4 | |||
| a2ad006a7e | |||
| 9b17c1225a | |||
|
|
32881d3f35 | ||
| e8367b8f1a | |||
| fc1bada607 | |||
| 1eca5b0309 | |||
| 08906e028a | |||
|
|
6e36e15ef3 | ||
| d71fe7d92e | |||
| 72ca2b7b04 | |||
| 5768ff5518 | |||
| 8a03b194b2 | |||
| 0d18a135ec | |||
| 91fdef55c7 | |||
|
|
4d437be248 | ||
| d42835231e | |||
| 3d117dbcb4 | |||
| 202aedbcf3 | |||
|
|
14a4bc4343 | ||
|
|
011322dd8e | ||
|
|
0d219e4b6d | ||
|
|
1972144384 | ||
|
|
08e7e6b461 | ||
| dbba33f085 | |||
| 4a637d0a69 | |||
|
|
a9d323354b | ||
|
|
4cd1c22d01 | ||
|
|
55ff7a1649 | ||
|
|
3deb3693b3 | ||
| 009efc2c86 | |||
| 40b37b49f9 | |||
| a3ad9a17c7 | |||
|
|
2c13c3dce1 | ||
|
|
859d884941 | ||
| 4a28abf5b7 | |||
| 527bb0f1d9 | |||
| 0429e7ca36 | |||
|
|
e8f13d7590 | ||
| 7eb3e567f6 | |||
| 17ec4753b6 | |||
| 2371ef1dee | |||
| c99d139940 | |||
| e0a2f7c798 | |||
| a12524dc9c | |||
|
|
c08cf6ea57 | ||
| 20746185e0 | |||
| 54cf0e213f | |||
|
|
6654fe0434 | ||
| 324917672c | |||
| d0a373123a | |||
| 86b7ad6d92 | |||
| c949667b94 | |||
| a61a41a068 | |||
| 06d241c66c | |||
| 62ed0ae78e | |||
| 1ee335abf2 | |||
|
|
05ee59618b | ||
|
|
fffa7cdabd | ||
| b8ec25c94e | |||
| 38029f7268 | |||
| d2fdccadf2 | |||
|
|
b1d06a4f1a | ||
|
|
ecf3a94b64 | ||
|
|
99b9af2980 | ||
|
|
267d07f3a5 | ||
| 977bfa910c | |||
| fe3c9c1563 | |||
|
|
8c11818b49 | ||
| ee0d8dd1a0 | |||
|
|
1d50f8e4f5 | ||
| e8f9884365 | |||
| 38f6f2f451 | |||
| a664ff7464 | |||
| a4ab6df974 | |||
| dc8f32062c | |||
| 0a090301df | |||
| d53d250e6f | |||
|
|
897a47bee7 | ||
| 0f457efce6 | |||
| 7842c1b838 | |||
| 02a5ceaacc | |||
| 6b1c223acd | |||
|
|
09a9e023d3 | ||
| 9b37374066 | |||
| 45257e8fe1 | |||
|
|
85971339d4 | ||
|
|
383e8c0859 | ||
| 749ac197de | |||
| d20210f291 | |||
|
|
da3398f1f9 | ||
| 81763110d7 | |||
| 6ac610e1aa | |||
|
|
362cc3814e | ||
| 37dfa05a25 | |||
|
|
2df205218c | ||
|
|
cceb697739 | ||
| 7d63869d44 | |||
| 3b1cecf8a3 | |||
| e52ec4a2b8 | |||
|
|
ed300eec30 | ||
| 8455c360fc | |||
| 059bfaf1d9 | |||
|
|
9f0b6897f1 | ||
| 2119d75e5b | |||
| af39c4bac0 | |||
| 93ac837148 | |||
| c4f3d10419 | |||
| 3f9cf21b8f | |||
| e9a8a4dc02 | |||
|
|
84f352a7fb | ||
| 834170e272 | |||
| 042f53e134 | |||
| 0b041bad7b | |||
| fe124dad0c | |||
|
|
7fe7178b27 | ||
|
|
9dcc23960e | ||
|
|
140e5740e6 | ||
|
|
752fae680c | ||
| e2f8e52583 | |||
| 4d573767f7 | |||
| 56475e729c | |||
| 8f0a1a09a6 | |||
|
|
c6b8b61b1e | ||
| 862295ff03 | |||
|
|
d13e42e33d | ||
| 134cdf2e2a | |||
| 44a05ea0d5 | |||
| 7f34c50b71 | |||
|
|
77682d310a | ||
| 2b0846f939 | |||
|
|
0b6c188e0a | ||
| f51f440b43 | |||
|
|
f74a01efc0 | ||
| 6dafa64e0b | |||
|
|
60453c756c | ||
|
|
350f17915a | ||
| ffcb847b02 | |||
| 8eae2c29ae | |||
|
|
5e55a5b94c | ||
| 1eee54fef1 | |||
| 24f691d4b8 | |||
| 1fc417ec25 | |||
| 71713e5b37 | |||
|
|
ef4c377990 | ||
| 88e27df986 | |||
| 628d9c7a1b | |||
|
|
7836c57479 | ||
|
|
939675fe58 | ||
| 5ed5b15737 | |||
| 783685942c | |||
| 30c09b0e26 | |||
| 96f21643b4 | |||
| 977067eda5 | |||
| 3e7279b4de | |||
| 34dd3ca883 | |||
|
|
d0d36ef207 | ||
| a66a32038c | |||
| 80d5bf3007 | |||
| cb39253785 | |||
| 3ec3350c97 | |||
| 7a01f62490 | |||
| 4a6bb9fd56 | |||
| 40532a0972 | |||
|
|
e059d9bbb2 | ||
| ab953b4785 | |||
|
|
6e38ef2962 | ||
|
|
6656aebff9 | ||
| 50b598d8a1 | |||
| cf08f8197b | |||
| 62f1912a7a | |||
| eae7f3d1a0 | |||
| b3e9836d7c | |||
| c3c91ba9a2 | |||
|
|
1075f7252a | ||
| 302435c068 | |||
| 41fb743bda | |||
|
|
823075c0ad | ||
|
|
c57486b69c | ||
| 8b3b0ce2ea | |||
| e3f9f21287 | |||
| b10d9ada46 | |||
| b48ceea571 | |||
|
|
0f2fbeb114 | ||
| 1623743b26 | |||
| 703f542abf | |||
| a2de293e10 | |||
|
|
a50abb5b2c | ||
|
|
2102acd9e5 | ||
|
|
b8ee197e52 | ||
|
|
ba81a46e2f | ||
|
|
6841f47ac3 | ||
| a2fef0990a | |||
| 8d14c06284 | |||
| 8b3f8d783e | |||
| b5ebc085b4 | |||
| 7e169e882d | |||
| 50f83939cc | |||
| f856188a68 | |||
| 7e9b794c7f | |||
|
|
e70a5e09f6 | ||
| 3e8db9ec7e | |||
| 34f70bb4cd | |||
|
|
12f78dc3b8 | ||
| 89a54276b3 | |||
| 73fb523ddc |
@@ -71,7 +71,7 @@ public class FaceManager implements SensorEventListener {
|
|||||||
* 配置美颜SDK
|
* 配置美颜SDK
|
||||||
*/
|
*/
|
||||||
public void initFURender(Context context) {
|
public void initFURender(Context context) {
|
||||||
|
initFaceUnity(context);
|
||||||
mFURenderer = FURenderer.getInstance();
|
mFURenderer = FURenderer.getInstance();
|
||||||
mFURenderer.setInputTextureType(FUInputTextureEnum.FU_ADM_FLAG_COMMON_TEXTURE);
|
mFURenderer.setInputTextureType(FUInputTextureEnum.FU_ADM_FLAG_COMMON_TEXTURE);
|
||||||
mFURenderer.setCameraFacing(CameraFacingEnum.CAMERA_FRONT);
|
mFURenderer.setCameraFacing(CameraFacingEnum.CAMERA_FRONT);
|
||||||
@@ -105,9 +105,11 @@ public class FaceManager implements SensorEventListener {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
public void loadConfig(){
|
|
||||||
|
public void loadConfig() {
|
||||||
initFaceBeauty();
|
initFaceBeauty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void initFaceBeauty() {
|
public void initFaceBeauty() {
|
||||||
FaceBeautyDataFactory faceBeautyDataFactory;
|
FaceBeautyDataFactory faceBeautyDataFactory;
|
||||||
faceBeautyDataFactory = new FaceBeautyDataFactory();
|
faceBeautyDataFactory = new FaceBeautyDataFactory();
|
||||||
@@ -115,9 +117,13 @@ public class FaceManager implements SensorEventListener {
|
|||||||
for (String key : configMap.keySet()) {
|
for (String key : configMap.keySet()) {
|
||||||
if ("FilterViewHolder_".equals(key)) {
|
if ("FilterViewHolder_".equals(key)) {
|
||||||
for (FaceBeautyFilterBean filter : faceBeautyDataFactory.getBeautyFilters()) {
|
for (FaceBeautyFilterBean filter : faceBeautyDataFactory.getBeautyFilters()) {
|
||||||
if (filter.getKey().equals(configMap.get(key))&&!"origin".equals(configMap.get(key))) {
|
if (filter.getKey().equals(configMap.get(key)) && !"origin".equals(configMap.get(key))) {
|
||||||
faceBeautyDataFactory.onFilterSelected(filter.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get("FilterViewHolder_" + configMap.get(key) + "_val")))/100, filter.getDesRes());
|
try {
|
||||||
Log.i(TAG, "test: 设置滤镜 ="+filter.getKey()+" val = "+configMap.get("FilterViewHolder_" + configMap.get(key) + "_val"));
|
faceBeautyDataFactory.onFilterSelected(filter.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get("FilterViewHolder_" + configMap.get(key) + "_val"))) / 100, filter.getDesRes());
|
||||||
|
Log.i(TAG, "test: 设置滤镜 =" + filter.getKey() + " val = " + configMap.get("FilterViewHolder_" + configMap.get(key) + "_val"));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -125,17 +131,25 @@ public class FaceManager implements SensorEventListener {
|
|||||||
String name = key.replace("BeautySkinViewHolder_", "");
|
String name = key.replace("BeautySkinViewHolder_", "");
|
||||||
for (FaceBeautyBean bean : faceBeautyDataFactory.getShapeBeauty()) {
|
for (FaceBeautyBean bean : faceBeautyDataFactory.getShapeBeauty()) {
|
||||||
if (bean.getKey().equals(name)) {
|
if (bean.getKey().equals(name)) {
|
||||||
faceBeautyDataFactory.updateParamIntensity(bean.getKey(),Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
try {
|
||||||
Log.i(TAG, "test: 设置美颜 = "+bean.getKey()+" val = "+configMap.get(key));
|
faceBeautyDataFactory.updateParamIntensity(bean.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
||||||
|
Log.i(TAG, "test: 设置美颜 = " + bean.getKey() + " val = " + configMap.get(key));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else if(key.startsWith("BeautyShapeViewHolder")){
|
} else if (key.startsWith("BeautyShapeViewHolder")) {
|
||||||
String name = key.replace("BeautyShapeViewHolder_", "");
|
String name = key.replace("BeautyShapeViewHolder_", "");
|
||||||
for (FaceBeautyBean bean : faceBeautyDataFactory.getShapeBeauty()) {
|
for (FaceBeautyBean bean : faceBeautyDataFactory.getShapeBeauty()) {
|
||||||
if (bean.getKey().equals(name)) {
|
if (bean.getKey().equals(name)) {
|
||||||
faceBeautyDataFactory.updateParamIntensity(bean.getKey(),Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
try {
|
||||||
Log.i(TAG, "test: 设置美肤 = "+bean.getKey()+" val = "+configMap.get(key));
|
faceBeautyDataFactory.updateParamIntensity(bean.getKey(), Double.parseDouble((String) Objects.requireNonNull(configMap.get(key))));
|
||||||
|
Log.i(TAG, "test: 设置美肤 = " + bean.getKey() + " val = " + configMap.get(key));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -277,6 +291,7 @@ public class FaceManager implements SensorEventListener {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
isInit = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,11 +80,11 @@ public class ContainerRecyclerAdapter extends RecyclerView.Adapter<BaseViewHolde
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void hideSeekBar() {
|
public void hideSeekBar() {
|
||||||
if (seekBar.getVisibility() == View.GONE) {
|
if (seekBar.getVisibility() == View.INVISIBLE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
seekBar.setOnProgressChangeListener(null);
|
seekBar.setOnProgressChangeListener(null);
|
||||||
seekBar.setVisibility(View.GONE);
|
seekBar.setVisibility(View.INVISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="colorPrimary">#3F51B5</color>
|
<color name="colorPrimary">#FF8D41</color>
|
||||||
<color name="colorPrimaryDark">#303F9F</color>
|
<color name="colorPrimaryDark">#FF8D41</color>
|
||||||
<color name="colorAccent">#FF4081</color>
|
<color name="colorAccent">#FF8D41</color>
|
||||||
|
|
||||||
<!--fulive demo 主配色-->
|
<!--fulive demo 主配色-->
|
||||||
<color name="primary_background">#050F14</color>
|
<color name="primary_background">#050F14</color>
|
||||||
|
|||||||
@@ -299,7 +299,7 @@
|
|||||||
<string name="beautify_hip_slim">Hip</string>
|
<string name="beautify_hip_slim">Hip</string>
|
||||||
<string name="beautify_head_slim">Head shrink</string>
|
<string name="beautify_head_slim">Head shrink</string>
|
||||||
<string name="beautify_leg_thin_slim">Thin leg</string>
|
<string name="beautify_leg_thin_slim">Thin leg</string>
|
||||||
<string name="toast_not_detect_body">No body tracking</string>
|
<string name="toast_not_detect_body">No message tracking</string>
|
||||||
<string name="pta_human_full_body">Body driver</string>
|
<string name="pta_human_full_body">Body driver</string>
|
||||||
<string name="pta_human_half_body">Bust driver</string>
|
<string name="pta_human_half_body">Bust driver</string>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply plugin: 'img-optimizer'
|
apply plugin: 'img-optimizer'
|
||||||
apply plugin: 'com.google.gms.google-services'
|
apply plugin: 'com.google.gms.google-services'
|
||||||
apply plugin: 'com.google.firebase.crashlytics'
|
apply plugin: 'com.google.firebase.crashlytics'
|
||||||
|
apply plugin: 'com.alibaba.arouter'
|
||||||
android {
|
android {
|
||||||
dexOptions {
|
dexOptions {
|
||||||
jumboMode = true
|
jumboMode = true
|
||||||
@@ -230,6 +230,7 @@ dependencies {
|
|||||||
annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
|
annotationProcessor rootProject.ext.dependencies["arouter-compiler"]
|
||||||
|
|
||||||
// implementation rootProject.ext.dependencies["leakcanary"]
|
// implementation rootProject.ext.dependencies["leakcanary"]
|
||||||
|
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10'
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,10 +78,14 @@
|
|||||||
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
|
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
|
||||||
<uses-permission android:name="com.android.vending.BILLING" />
|
<uses-permission android:name="com.android.vending.BILLING" />
|
||||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||||
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
|
|
||||||
<!-- Android11新增 -->
|
<!-- Android11新增 -->
|
||||||
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
||||||
|
<!-- <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />-->
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
|
||||||
|
<queries>
|
||||||
|
<package android:name="com.twitter.android"/>
|
||||||
|
|
||||||
|
</queries>
|
||||||
<application
|
<application
|
||||||
android:name="com.shayu.phonelive.AppContext"
|
android:name="com.shayu.phonelive.AppContext"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
|||||||
@@ -17,10 +17,6 @@ import android.util.Log;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.adjust.sdk.Adjust;
|
|
||||||
import com.adjust.sdk.AdjustConfig;
|
|
||||||
import com.adjust.sdk.AdjustEvent;
|
|
||||||
import com.adjust.sdk.LogLevel;
|
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.blankj.utilcode.util.Utils;
|
import com.blankj.utilcode.util.Utils;
|
||||||
import com.facebook.appevents.AppEventsLogger;
|
import com.facebook.appevents.AppEventsLogger;
|
||||||
@@ -28,6 +24,7 @@ import com.fm.openinstall.OpenInstall;
|
|||||||
import com.google.firebase.FirebaseApp;
|
import com.google.firebase.FirebaseApp;
|
||||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||||
|
import com.shayu.phonelive.utils.LogUtils;
|
||||||
import com.tencent.imsdk.v2.V2TIMGroupMemberInfo;
|
import com.tencent.imsdk.v2.V2TIMGroupMemberInfo;
|
||||||
import com.tencent.imsdk.v2.V2TIMManager;
|
import com.tencent.imsdk.v2.V2TIMManager;
|
||||||
import com.tencent.imsdk.v2.V2TIMSimpleMsgListener;
|
import com.tencent.imsdk.v2.V2TIMSimpleMsgListener;
|
||||||
@@ -37,8 +34,6 @@ import com.yunbao.common.CommonAppConfig;
|
|||||||
import com.yunbao.common.CommonAppContext;
|
import com.yunbao.common.CommonAppContext;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.bean.CrashSaveBean;
|
import com.yunbao.common.bean.CrashSaveBean;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
|
||||||
import com.yunbao.common.http.HttpCallback;
|
|
||||||
import com.yunbao.common.manager.imrongcloud.InstructorSendReward;
|
import com.yunbao.common.manager.imrongcloud.InstructorSendReward;
|
||||||
import com.yunbao.common.manager.imrongcloud.InstructorSendRewardProvider;
|
import com.yunbao.common.manager.imrongcloud.InstructorSendRewardProvider;
|
||||||
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
import com.yunbao.common.manager.imrongcloud.MessageIMManager;
|
||||||
@@ -46,7 +41,6 @@ import com.yunbao.common.manager.imrongcloud.RecommendLiveRoom;
|
|||||||
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
import com.yunbao.common.manager.imrongcloud.RongcloudIMManager;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.SpUtil;
|
import com.yunbao.common.utils.SpUtil;
|
||||||
import com.yunbao.faceunity.FaceManager;
|
|
||||||
import com.yunbao.live.socket.SocketRyClient;
|
import com.yunbao.live.socket.SocketRyClient;
|
||||||
import com.yunbao.live.utils.LiveImDeletUtil;
|
import com.yunbao.live.utils.LiveImDeletUtil;
|
||||||
import com.yunbao.live.views.PortraitLiveManager;
|
import com.yunbao.live.views.PortraitLiveManager;
|
||||||
@@ -86,12 +80,10 @@ public class AppContext extends CommonAppContext {
|
|||||||
private static final class AdjustLifecycleCallbacks implements ActivityLifecycleCallbacks {
|
private static final class AdjustLifecycleCallbacks implements ActivityLifecycleCallbacks {
|
||||||
@Override
|
@Override
|
||||||
public void onActivityResumed(Activity activity) {
|
public void onActivityResumed(Activity activity) {
|
||||||
Adjust.onResume();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onActivityPaused(Activity activity) {
|
public void onActivityPaused(Activity activity) {
|
||||||
Adjust.onPause();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -130,13 +122,14 @@ public class AppContext extends CommonAppContext {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
//注册全局异常捕获
|
|
||||||
if (!isMainProcess()) {
|
if (!isMainProcess()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CrashSaveBean.getInstance().setStartTime(System.currentTimeMillis());
|
CrashSaveBean.getInstance().setStartTime(System.currentTimeMillis());
|
||||||
|
//注册全局异常捕获
|
||||||
registerError();
|
registerError();
|
||||||
registerFirebaseCrash();
|
registerFirebaseCrash();
|
||||||
|
LogUtils.start(this);
|
||||||
sInstance = this;
|
sInstance = this;
|
||||||
L.setDeBug(BuildConfig.DEBUG);
|
L.setDeBug(BuildConfig.DEBUG);
|
||||||
AppEventsLogger.activateApp(this);
|
AppEventsLogger.activateApp(this);
|
||||||
@@ -161,38 +154,8 @@ public class AppContext extends CommonAppContext {
|
|||||||
OpenInstall.init(this);
|
OpenInstall.init(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
String environment = AdjustConfig.ENVIRONMENT_PRODUCTION;
|
|
||||||
AdjustConfig config = new AdjustConfig(this, "3om5fbglyqdc", environment);
|
|
||||||
if (CommonAppConfig.IS_GOOGLE_PLAY == false) {
|
|
||||||
config.setDefaultTracker("xa7k5ut");
|
|
||||||
}
|
|
||||||
Adjust.onCreate(config);
|
|
||||||
registerActivityLifecycleCallbacks(new AdjustLifecycleCallbacks());
|
registerActivityLifecycleCallbacks(new AdjustLifecycleCallbacks());
|
||||||
config.setLogLevel(LogLevel.WARN);
|
|
||||||
//激活操作记录
|
|
||||||
AdjustEvent adjustEvent = new AdjustEvent("m7wk0c");
|
|
||||||
Adjust.trackEvent(adjustEvent);
|
|
||||||
|
|
||||||
//谷歌激活
|
|
||||||
mFirebaseAnalytics.logEvent("FS_activation", null);
|
|
||||||
|
|
||||||
//FB激活
|
|
||||||
logger.logEvent("FB_activation");
|
|
||||||
|
|
||||||
AdjustEvent adjustEvent2 = new AdjustEvent("p7igfz");
|
|
||||||
Adjust.trackEvent(adjustEvent2);
|
|
||||||
CommonHttpUtil.setAdvertisingChannels("p7igfz", new HttpCallback() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
|
||||||
if (code == 0) {
|
|
||||||
//谷歌激活
|
|
||||||
mFirebaseAnalytics.logEvent("FS_complete_1st_loading", null);
|
|
||||||
//FB激活
|
|
||||||
logger.logEvent("FB_complete_1st_loading");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//初始化 AndroidUtilCode
|
//初始化 AndroidUtilCode
|
||||||
Utils.init(this);
|
Utils.init(this);
|
||||||
liveImDeletUtil = new LiveImDeletUtil();
|
liveImDeletUtil = new LiveImDeletUtil();
|
||||||
@@ -268,10 +231,11 @@ public class AppContext extends CommonAppContext {
|
|||||||
mSocketHandler.sendMessage(msg);
|
mSocketHandler.sendMessage(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
configSPApp();
|
configSPApp();
|
||||||
//初始化美颜SDK
|
//初始化美颜SDK
|
||||||
FaceManager.initFaceUnity(this);
|
// FaceManager.initFaceUnity(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -314,17 +278,17 @@ public class AppContext extends CommonAppContext {
|
|||||||
Log.e("ApplicationError", "主线程异常");//此处log只是展示,当debug为true时,主类内部log会打印异常信息
|
Log.e("ApplicationError", "主线程异常");//此处log只是展示,当debug为true时,主类内部log会打印异常信息
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
//闪退后finish所有Activity并且杀死进程
|
//闪退后finish所有Activity并且杀死进程
|
||||||
for (WeakReference<Activity> activity : activities) {
|
/* for (WeakReference<Activity> activity : activities) {
|
||||||
if (activity != null && activity.get() != null) {
|
if (activity != null && activity.get() != null) {
|
||||||
activity.get().finish();
|
activity.get().finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Process.killProcess(Process.myPid());
|
*//* Process.killProcess(Process.myPid());
|
||||||
System.exit(0);*/
|
System.exit(0);*//*
|
||||||
setFirebaseCrashData();
|
setFirebaseCrashData();
|
||||||
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}, 100);
|
}, 100);*/
|
||||||
})
|
})
|
||||||
.setUncaughtCrashHandler((t, e) -> {
|
.setUncaughtCrashHandler((t, e) -> {
|
||||||
Log.e("ApplicationError", "子线程异常");//此处log只是展示,当debug为true时,主类内部log会打印异常信息
|
Log.e("ApplicationError", "子线程异常");//此处log只是展示,当debug为true时,主类内部log会打印异常信息
|
||||||
|
|||||||
@@ -101,10 +101,10 @@ public class NeverCrashUtils {
|
|||||||
Log.e(TAG, "未捕获的主线程异常行为", e);
|
Log.e(TAG, "未捕获的主线程异常行为", e);
|
||||||
}
|
}
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Toast.makeText(application, "发生闪退", Toast.LENGTH_SHORT).show();
|
//Toast.makeText(application, "发生闪退:"+e.getMessage(), Toast.LENGTH_SHORT).show();
|
||||||
FileUtil.saveStringToFile(new File(application.getDir("files", Context.MODE_PRIVATE).getAbsolutePath()), throwableToString(e), "error.log");
|
FileUtil.saveStringToFile(new File(application.getDir("files", Context.MODE_PRIVATE).getAbsolutePath()), throwableToString(e), "error.log");
|
||||||
getMainCrashHandler().mainException(Looper.getMainLooper().getThread(), e);
|
getMainCrashHandler().mainException(Looper.getMainLooper().getThread(), e);
|
||||||
return;
|
// return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package com.shayu.phonelive.activity;
|
package com.shayu.phonelive.activity;
|
||||||
|
|
||||||
import static com.yunbao.common.CommonAppContext.logger;
|
|
||||||
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
|
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@@ -21,9 +19,8 @@ import android.widget.ImageView;
|
|||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.app.NotificationManagerCompat;
|
||||||
|
|
||||||
import com.adjust.sdk.Adjust;
|
|
||||||
import com.adjust.sdk.AdjustEvent;
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@@ -107,14 +104,6 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
|||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
setStatusBar();
|
setStatusBar();
|
||||||
setContentView(R.layout.activity_launcher);
|
setContentView(R.layout.activity_launcher);
|
||||||
//开屏
|
|
||||||
AdjustEvent adjustEvent = new AdjustEvent("vjqk8g");
|
|
||||||
Adjust.trackEvent(adjustEvent);
|
|
||||||
|
|
||||||
//谷歌激活
|
|
||||||
mFirebaseAnalytics.logEvent("FS_screen", null);
|
|
||||||
//FB激活
|
|
||||||
logger.logEvent("FB_screen");
|
|
||||||
mContext = this;
|
mContext = this;
|
||||||
mRoot = findViewById(R.id.root);
|
mRoot = findViewById(R.id.root);
|
||||||
mCover = findViewById(R.id.cover);
|
mCover = findViewById(R.id.cover);
|
||||||
@@ -140,6 +129,7 @@ public class LauncherActivity extends AppCompatActivity implements View.OnClickL
|
|||||||
};
|
};
|
||||||
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
|
mHandler.sendEmptyMessageDelayed(WHAT_GET_CONFIG, 1000);
|
||||||
LogUtil.uploadErrorLog(AppContext.sInstance);
|
LogUtil.uploadErrorLog(AppContext.sInstance);
|
||||||
|
SpUtil.getInstance().setBooleanValue("NOTIFICATION", NotificationManagerCompat.from(this).areNotificationsEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,10 @@ package com.shayu.phonelive.utils;
|
|||||||
|
|
||||||
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
|
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
|
||||||
|
|
||||||
|
import android.Manifest;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.Dialog;
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
import android.app.NotificationChannel;
|
import android.app.NotificationChannel;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
@@ -17,6 +20,7 @@ import android.graphics.PorterDuffXfermode;
|
|||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.graphics.RectF;
|
import android.graphics.RectF;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
@@ -31,9 +35,12 @@ import com.bumptech.glide.request.target.SimpleTarget;
|
|||||||
import com.bumptech.glide.request.target.Target;
|
import com.bumptech.glide.request.target.Target;
|
||||||
import com.bumptech.glide.request.transition.Transition;
|
import com.bumptech.glide.request.transition.Transition;
|
||||||
import com.makeramen.roundedimageview.RoundedImageView;
|
import com.makeramen.roundedimageview.RoundedImageView;
|
||||||
|
import com.shayu.phonelive.AppContext;
|
||||||
import com.shayu.phonelive.activity.LauncherActivity;
|
import com.shayu.phonelive.activity.LauncherActivity;
|
||||||
import com.yunbao.common.bean.NotificationMsgBean;
|
import com.yunbao.common.bean.NotificationMsgBean;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
|
import com.yunbao.common.utils.SpUtil;
|
||||||
import com.yunbao.main.activity.MainActivity;
|
import com.yunbao.main.activity.MainActivity;
|
||||||
|
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
@@ -52,7 +59,7 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
|||||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||||
NotificationManager manager = (NotificationManager) context.getSystemService(context.NOTIFICATION_SERVICE);
|
NotificationManager manager = (NotificationManager) context.getSystemService(context.NOTIFICATION_SERVICE);
|
||||||
NotificationChannel channel = new NotificationChannel(channelID, channelNAME, level);
|
NotificationChannel channel = new NotificationChannel(channelID, channelNAME, level);
|
||||||
channel.setSound(Uri.parse("android.resource://" + context.getPackageName() + "/raw/pdlive_sound"),null);
|
channel.setSound(Uri.parse("android.resource://" + context.getPackageName() + "/raw/pdlive_sound"), null);
|
||||||
manager.createNotificationChannel(channel);
|
manager.createNotificationChannel(channel);
|
||||||
return channelID;
|
return channelID;
|
||||||
} else {
|
} else {
|
||||||
@@ -81,6 +88,26 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onNotificationMessageArrived(Context context, PushType pushType, PushNotificationMessage notificationMessage) {
|
public boolean onNotificationMessageArrived(Context context, PushType pushType, PushNotificationMessage notificationMessage) {
|
||||||
Log.i("gmc", notificationMessage.getPushContent() + "VVV" + notificationMessage.getPushTitle() + "gmc11112222" + notificationMessage.getExtra());
|
Log.i("gmc", notificationMessage.getPushContent() + "VVV" + notificationMessage.getPushTitle() + "gmc11112222" + notificationMessage.getExtra());
|
||||||
|
if (!SpUtil.getInstance().getBooleanValue("NOTIFICATION")) {
|
||||||
|
if (AppContext.activityWeakReference != null) {
|
||||||
|
Activity activity = AppContext.activityWeakReference.get();
|
||||||
|
if (activity != null) {
|
||||||
|
DialogUitl.showSimpleDialog(activity, "应用需要通知权限", new DialogUitl.SimpleCallback() {
|
||||||
|
@Override
|
||||||
|
public void onConfirmClick(Dialog dialog, String content) {
|
||||||
|
Intent intent = new Intent();
|
||||||
|
intent.setAction("android.settings.APP_NOTIFICATION_SETTINGS");
|
||||||
|
intent.putExtra("app_package", context.getPackageName());
|
||||||
|
intent.putExtra("app_uid", context.getApplicationInfo().uid);
|
||||||
|
// for Android 8 and above
|
||||||
|
intent.putExtra("android.provider.extra.APP_PACKAGE", context.getPackageName());
|
||||||
|
activity.startActivity(intent);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (notificationMessage.getExtra() == null) {
|
if (notificationMessage.getExtra() == null) {
|
||||||
msg.setImg("" + notificationMessage.getSenderPortrait());
|
msg.setImg("" + notificationMessage.getSenderPortrait());
|
||||||
msg.setTitle(notificationMessage.getPushTitle());
|
msg.setTitle(notificationMessage.getPushTitle());
|
||||||
@@ -199,7 +226,7 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
|||||||
PendingIntent pendingIntent;
|
PendingIntent pendingIntent;
|
||||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
|
||||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
||||||
}else {
|
} else {
|
||||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
}
|
}
|
||||||
String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH);
|
String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH);
|
||||||
@@ -233,7 +260,7 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
|||||||
PendingIntent pendingIntent;
|
PendingIntent pendingIntent;
|
||||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
|
||||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
||||||
}else {
|
} else {
|
||||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
}
|
}
|
||||||
String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH);
|
String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH);
|
||||||
@@ -276,7 +303,7 @@ public class CustomMessageReceiver extends PushMessageReceiver {
|
|||||||
PendingIntent pendingIntent;
|
PendingIntent pendingIntent;
|
||||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) {
|
||||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
||||||
}else {
|
} else {
|
||||||
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
}
|
}
|
||||||
String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH);
|
String channelId = createNotificationChannel(context, "my_channel_ID", "my_channel_NAME", NotificationManager.IMPORTANCE_HIGH);
|
||||||
|
|||||||
90
app/src/main/java/com/shayu/phonelive/utils/LogUtils.java
Normal file
90
app/src/main/java/com/shayu/phonelive/utils/LogUtils.java
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
package com.shayu.phonelive.utils;
|
||||||
|
|
||||||
|
import static java.text.DateFormat.DEFAULT;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.yunbao.common.CommonAppConfig;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class LogUtils {
|
||||||
|
/**
|
||||||
|
* 采集所有日志
|
||||||
|
*/
|
||||||
|
public static void start(Context context) {
|
||||||
|
new Thread(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
|
||||||
|
String[] exec = new String[]{"logcat", "-c"};
|
||||||
|
Runtime.getRuntime().exec(exec).waitFor();
|
||||||
|
|
||||||
|
exec = new String[]{"logcat", "-v", "color", "UTC-8"};
|
||||||
|
|
||||||
|
Process process = Runtime.getRuntime().exec(exec);
|
||||||
|
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||||
|
String line;
|
||||||
|
PrintWriter writer = null;
|
||||||
|
String title = "[PDLIVE]" + CommonAppConfig.getInstance().getUid() + "_";
|
||||||
|
String today = title + SimpleDateFormat.getDateInstance(DEFAULT, Locale.CHINA).format(new Date());
|
||||||
|
File dir = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator);
|
||||||
|
if (dir.listFiles() != null) {
|
||||||
|
for (File file : dir.listFiles()) {
|
||||||
|
if (file.getName().endsWith(".log") && !"error.log".equals(file.getName())) {
|
||||||
|
String fileName = file.getName().replace(".log", "").split("_")[1];
|
||||||
|
if (isDelLog(fileName)) {
|
||||||
|
file.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
File saveFile = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator + today + ".log");
|
||||||
|
FileOutputStream os = new FileOutputStream(saveFile, true);
|
||||||
|
writer = new PrintWriter(os);
|
||||||
|
while ((line = bufferedReader.readLine()) != null) {
|
||||||
|
writer.append(line).write("\n");
|
||||||
|
writer.flush();
|
||||||
|
}
|
||||||
|
writer.flush();
|
||||||
|
writer.close();
|
||||||
|
exec = new String[]{"logcat", "-c"};
|
||||||
|
Runtime.getRuntime().exec(exec).waitFor();
|
||||||
|
bufferedReader.close();
|
||||||
|
start(context);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否是要删除的日志
|
||||||
|
**/
|
||||||
|
private static boolean isDelLog(String time) {
|
||||||
|
try {
|
||||||
|
Calendar timeCal = Calendar.getInstance(Locale.CHINA);
|
||||||
|
timeCal.setTime(Objects.requireNonNull(SimpleDateFormat.getDateInstance(DEFAULT, Locale.CHINA).parse(time)));
|
||||||
|
Calendar calendar = Calendar.getInstance(Locale.CHINA);
|
||||||
|
calendar.setTime(new Date());
|
||||||
|
calendar.add(Calendar.DATE, -3);
|
||||||
|
return calendar.after(timeCal);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">PDLIVE</string>
|
<string name="app_name">PDLIVE</string>
|
||||||
|
<string name="leak_canary_test_class_name">assertk.Assert</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -22,6 +22,7 @@ buildscript {
|
|||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20"
|
||||||
classpath 'com.google.gms:google-services:4.3.3'
|
classpath 'com.google.gms:google-services:4.3.3'
|
||||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
|
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
|
||||||
|
classpath "com.alibaba:arouter-register:1.0.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -147,7 +147,6 @@ dependencies {
|
|||||||
//谷歌支付
|
//谷歌支付
|
||||||
//谷歌内购
|
//谷歌内购
|
||||||
api 'com.android.billingclient:billing:5.0.0'
|
api 'com.android.billingclient:billing:5.0.0'
|
||||||
implementation 'com.teprinciple:updateapputils:2.3.0'
|
|
||||||
api 'com.squareup.picasso:picasso:2.5.2'
|
api 'com.squareup.picasso:picasso:2.5.2'
|
||||||
api "com.immomo.cosmos.mediax:beautyutils:2.2.1_01071700"
|
api "com.immomo.cosmos.mediax:beautyutils:2.2.1_01071700"
|
||||||
api files('libs/liteavsdk.jar')
|
api files('libs/liteavsdk.jar')
|
||||||
@@ -155,9 +154,11 @@ dependencies {
|
|||||||
//腾讯im
|
//腾讯im
|
||||||
api 'com.tencent.imsdk:imsdk-plus:5.4.666'
|
api 'com.tencent.imsdk:imsdk-plus:5.4.666'
|
||||||
api 'com.google.code.gson:gson:2.8.8'
|
api 'com.google.code.gson:gson:2.8.8'
|
||||||
api 'cn.rongcloud.sdk:rtc_lib:5.2.5.8' // 音视频通话基础能力库
|
api 'cn.rongcloud.sdk:rtc_lib:5.2.0' // 音视频通话基础能力库
|
||||||
|
//此处以集成 5.1.2 版本为例
|
||||||
|
api 'cn.rongcloud.sdk:im_lib:5.2.0.2'
|
||||||
|
|
||||||
//此处以集成 5.1.2 版本为例
|
//此处以集成 5.1.2 版本为例
|
||||||
api 'cn.rongcloud.sdk:im_lib:5.2.5.4' // 即时通讯基础能力库
|
|
||||||
api 'cn.rongcloud.sdk:im_kit:5.2.5.4' // 即时通讯 UI 基础组件
|
api 'cn.rongcloud.sdk:im_kit:5.2.5.4' // 即时通讯 UI 基础组件
|
||||||
//融云小视频模块
|
//融云小视频模块
|
||||||
api 'cn.rongcloud.sdk:sight:5.2.5.4'
|
api 'cn.rongcloud.sdk:sight:5.2.5.4'
|
||||||
@@ -168,7 +169,6 @@ dependencies {
|
|||||||
transitive = true
|
transitive = true
|
||||||
}
|
}
|
||||||
api 'com.linecorp:linesdk:5.0.1'
|
api 'com.linecorp:linesdk:5.0.1'
|
||||||
api 'com.adjust.sdk:adjust-android:4.30.1'
|
|
||||||
api 'com.android.installreferrer:installreferrer:2.2'
|
api 'com.android.installreferrer:installreferrer:2.2'
|
||||||
//Retrofit2库
|
//Retrofit2库
|
||||||
api 'com.squareup.retrofit2:retrofit:2.3.0'
|
api 'com.squareup.retrofit2:retrofit:2.3.0'
|
||||||
@@ -188,4 +188,6 @@ dependencies {
|
|||||||
api 'com.github.princekin-f:EasyFloat:2.0.4'
|
api 'com.github.princekin-f:EasyFloat:2.0.4'
|
||||||
api files('libs/Msc.jar')
|
api files('libs/Msc.jar')
|
||||||
|
|
||||||
|
api 'com.github.li-xiaojun:XPopup:2.9.1'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,8 +32,9 @@
|
|||||||
android:resource="@xml/file_paths" />
|
android:resource="@xml/file_paths" />
|
||||||
</provider>
|
</provider>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
<!--支付宝-->
|
支付宝
|
||||||
<activity
|
<activity
|
||||||
android:name="com.alipay.sdk.app.H5PayActivity"
|
android:name="com.alipay.sdk.app.H5PayActivity"
|
||||||
android:configChanges="orientation|keyboardHidden|navigation|screenSize"
|
android:configChanges="orientation|keyboardHidden|navigation|screenSize"
|
||||||
@@ -46,7 +47,8 @@
|
|||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="adjustResize|stateHidden"></activity>
|
android:windowSoftInputMode="adjustResize|stateHidden"></activity>
|
||||||
<!--支付宝 end-->
|
支付宝 end
|
||||||
|
-->
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name="com.yunbao.common.activity.ErrorActivity"
|
android:name="com.yunbao.common.activity.ErrorActivity"
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,22 +1,22 @@
|
|||||||
package com.yunbao.common;
|
package com.yunbao.common;
|
||||||
|
|
||||||
|
import static com.facebook.FacebookSdk.setAdvertiserIDCollectionEnabled;
|
||||||
|
import static com.facebook.FacebookSdk.setAutoLogAppEventsEnabled;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import androidx.multidex.MultiDex;
|
import androidx.multidex.MultiDex;
|
||||||
import androidx.multidex.MultiDexApplication;
|
import androidx.multidex.MultiDexApplication;
|
||||||
|
|
||||||
import android.text.TextUtils;
|
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import com.facebook.FacebookSdk;
|
import com.facebook.FacebookSdk;
|
||||||
import com.facebook.appevents.AppEventsLogger;
|
|
||||||
import com.google.android.gms.common.api.ApiException;
|
|
||||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
import com.yunbao.common.http.CommonHttpUtil;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
|
|
||||||
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import io.rong.imlib.RongIMClient;
|
import io.rong.imlib.RongIMClient;
|
||||||
@@ -24,9 +24,6 @@ import io.rong.push.RongPushClient;
|
|||||||
import io.rong.push.pushconfig.PushConfig;
|
import io.rong.push.pushconfig.PushConfig;
|
||||||
import me.leolin.shortcutbadger.ShortcutBadger;
|
import me.leolin.shortcutbadger.ShortcutBadger;
|
||||||
|
|
||||||
import static com.facebook.FacebookSdk.setAdvertiserIDCollectionEnabled;
|
|
||||||
import static com.facebook.FacebookSdk.setAutoLogAppEventsEnabled;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2017/8/3.
|
* Created by cxf on 2017/8/3.
|
||||||
@@ -35,13 +32,12 @@ import static com.facebook.FacebookSdk.setAutoLogAppEventsEnabled;
|
|||||||
public class CommonAppContext extends MultiDexApplication {
|
public class CommonAppContext extends MultiDexApplication {
|
||||||
|
|
||||||
public static CommonAppContext sInstance;
|
public static CommonAppContext sInstance;
|
||||||
|
public static WeakReference<Activity> activityWeakReference;
|
||||||
private int mCount;
|
private int mCount;
|
||||||
private boolean mFront;//是否前台
|
private boolean mFront;//是否前台
|
||||||
public static int jpushMsgNum;
|
public static int jpushMsgNum;
|
||||||
public static int Ingroup = 0;
|
public static int Ingroup = 0;
|
||||||
public static String lang = "chinese";
|
public static String lang = "chinese";
|
||||||
public static FirebaseAnalytics mFirebaseAnalytics;
|
|
||||||
public static AppEventsLogger logger;
|
|
||||||
public static boolean isReady = false;
|
public static boolean isReady = false;
|
||||||
public static String home_zdy_img_us = "";
|
public static String home_zdy_img_us = "";
|
||||||
public static String home_zdy_img_cn = "";
|
public static String home_zdy_img_cn = "";
|
||||||
@@ -67,33 +63,29 @@ public class CommonAppContext extends MultiDexApplication {
|
|||||||
//初始化友盟统计
|
//初始化友盟统计
|
||||||
// UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, null);
|
// UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, null);
|
||||||
FacebookSdk.sdkInitialize(getApplicationContext());
|
FacebookSdk.sdkInitialize(getApplicationContext());
|
||||||
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
|
|
||||||
mFirebaseAnalytics.setAnalyticsCollectionEnabled(true);
|
|
||||||
mFirebaseAnalytics.setUserProperty("ALLOW_AD_PERSONALIZATION_SIGNALS", "true" );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
logger = AppEventsLogger.newLogger(this);
|
|
||||||
setAutoLogAppEventsEnabled(true);
|
setAutoLogAppEventsEnabled(true);
|
||||||
FacebookSdk.fullyInitialize();
|
FacebookSdk.fullyInitialize();
|
||||||
setAdvertiserIDCollectionEnabled(true);
|
setAdvertiserIDCollectionEnabled(true);
|
||||||
registerActivityLifecycleCallbacks();
|
registerActivityLifecycleCallbacks();
|
||||||
|
|
||||||
Locale locale;
|
Locale locale;
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
locale = getResources().getConfiguration().getLocales().get(0);
|
locale = getResources().getConfiguration().getLocales().get(0);
|
||||||
} else {
|
} else {
|
||||||
locale = getResources().getConfiguration().locale;
|
locale = getResources().getConfiguration().locale;
|
||||||
}
|
}
|
||||||
if(locale.getLanguage().equals("en")){
|
if (locale.getLanguage().equals("en")) {
|
||||||
lang = "english";
|
lang = "english";
|
||||||
}else{
|
} else {
|
||||||
lang = "chinese";
|
lang = "chinese";
|
||||||
}
|
}
|
||||||
Log.i("lang",lang);
|
Log.i("lang", lang);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Activity getTopActivity() {
|
||||||
|
return activityWeakReference.get();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void attachBaseContext(Context base) {
|
protected void attachBaseContext(Context base) {
|
||||||
@@ -111,11 +103,12 @@ public class CommonAppContext extends MultiDexApplication {
|
|||||||
@Override
|
@Override
|
||||||
public void onActivityStarted(Activity activity) {
|
public void onActivityStarted(Activity activity) {
|
||||||
mCount++;
|
mCount++;
|
||||||
|
activityWeakReference = new WeakReference<>(activity);
|
||||||
if (!mFront) {
|
if (!mFront) {
|
||||||
mFront = true;
|
mFront = true;
|
||||||
L.e("AppContext------->处于前台");
|
L.e("AppContext------->处于前台");
|
||||||
ShortcutBadger.applyCount(activity,0);
|
ShortcutBadger.applyCount(activity, 0);
|
||||||
jpushMsgNum=0;
|
jpushMsgNum = 0;
|
||||||
CommonAppConfig.getInstance().setFrontGround(true);
|
CommonAppConfig.getInstance().setFrontGround(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
public class Constants {
|
public class Constants {
|
||||||
|
public static final String NEW_ENTER_ROOM = "enterRoom";
|
||||||
|
|
||||||
public static final String URL = "url";
|
public static final String URL = "url";
|
||||||
public static final String PAYLOAD = "payload";
|
public static final String PAYLOAD = "payload";
|
||||||
public static final String SEX = "sex";
|
public static final String SEX = "sex";
|
||||||
@@ -74,7 +76,7 @@ public class Constants {
|
|||||||
public static final String PAY_BUY_COIN_ALI = "Charge.getAliOrder";
|
public static final String PAY_BUY_COIN_ALI = "Charge.getAliOrder";
|
||||||
public static final String PAY_BUY_COIN_WX = "Charge.getWxOrder";
|
public static final String PAY_BUY_COIN_WX = "Charge.getWxOrder";
|
||||||
|
|
||||||
public static final String PACKAGE_NAME_ALI = "com.eg.android.AlipayGphone";//支付宝的包名
|
// public static final String PACKAGE_NAME_ALI = "com.eg.android.AlipayGphone";//支付宝的包名
|
||||||
public static final String PACKAGE_NAME_WX = "com.tencent.mm";//微信的包名
|
public static final String PACKAGE_NAME_WX = "com.tencent.mm";//微信的包名
|
||||||
public static final String PACKAGE_NAME_QQ = "com.tencent.mobileqq";//QQ的包名
|
public static final String PACKAGE_NAME_QQ = "com.tencent.mobileqq";//QQ的包名
|
||||||
public static final String LAT = "lat";
|
public static final String LAT = "lat";
|
||||||
@@ -130,6 +132,8 @@ public class Constants {
|
|||||||
public static final int LIVE_FUNC_MIC = 2013;//語音
|
public static final int LIVE_FUNC_MIC = 2013;//語音
|
||||||
public static final int LIVE_FUNC_WKS = 2014;//語音
|
public static final int LIVE_FUNC_WKS = 2014;//語音
|
||||||
public static final int LIVE_FUNC_ZSLK = 2015;//語音
|
public static final int LIVE_FUNC_ZSLK = 2015;//語音
|
||||||
|
public static final int LIVE_FUNC_RANDOM_PK = 2016;//随机PK
|
||||||
|
public static final int LIVE_ROBOT= 2017;//机器人
|
||||||
|
|
||||||
//socket
|
//socket
|
||||||
public static final String SOCKET_CONN = "conn";
|
public static final String SOCKET_CONN = "conn";
|
||||||
@@ -143,6 +147,7 @@ public class Constants {
|
|||||||
public static final String SOCKET_ALL_SERVER_NOTIFY = "AllServerNotify";//全服通知
|
public static final String SOCKET_ALL_SERVER_NOTIFY = "AllServerNotify";//全服通知
|
||||||
public static final String SOCKET_SEND_BARRAGE = "SendBarrage";//发弹幕
|
public static final String SOCKET_SEND_BARRAGE = "SendBarrage";//发弹幕
|
||||||
public static final String SOCKET_LIVE_DRPK = "LiveDRPK";//多人PK
|
public static final String SOCKET_LIVE_DRPK = "LiveDRPK";//多人PK
|
||||||
|
public static final String SOCKET_LIVE_DRPK_RANDOM = "LiveRandomPK";//随机PK
|
||||||
public static final String SOCKET_LEAVE_ROOM = "disconnect";//用户离开房间
|
public static final String SOCKET_LEAVE_ROOM = "disconnect";//用户离开房间
|
||||||
public static final String SOCKET_LIVE_END = "StartEndLive";//主播关闭直播
|
public static final String SOCKET_LIVE_END = "StartEndLive";//主播关闭直播
|
||||||
public static final String SOCKET_SYSTEM = "SystemNot";//系统消息
|
public static final String SOCKET_SYSTEM = "SystemNot";//系统消息
|
||||||
@@ -167,7 +172,11 @@ public class Constants {
|
|||||||
public static final String RECOMMEND_CARD_NOTIFY = "recommendCardNotify";//推荐卡通知消息
|
public static final String RECOMMEND_CARD_NOTIFY = "recommendCardNotify";//推荐卡通知消息
|
||||||
public static final String STAR_CHALLENGE_UPDATE = "starChallengeUpdate";//星级助力
|
public static final String STAR_CHALLENGE_UPDATE = "starChallengeUpdate";//星级助力
|
||||||
public static final String AI_AUTOMATIC_SPEECH = "aiAutomaticSpeech";//机器人助手
|
public static final String AI_AUTOMATIC_SPEECH = "aiAutomaticSpeech";//机器人助手
|
||||||
|
public static final String AI_AUTOMATIC_SPEECH_LIVE = "aiAutomaticSpeechNew";//机器人助手
|
||||||
public static final String STAR_CHALLENGE_UPGRADE_NOTIFY = "starChallengeUpgradeNotify";//星级挑战成功
|
public static final String STAR_CHALLENGE_UPGRADE_NOTIFY = "starChallengeUpgradeNotify";//星级挑战成功
|
||||||
|
public static final String SUPER_VISION = "supervision";//超级发言警告
|
||||||
|
public static final String PK_RANK_UPDATE = "RankingRankUpdate";//PK排位赛更新数据
|
||||||
|
public static final String CUSTOM_FULL_SERVICE_NOTIFY = "customFullServiceNotify";//全服通知
|
||||||
|
|
||||||
//游戏socket
|
//游戏socket
|
||||||
public static final String SOCKET_GAME_ZJH = "startGame";//炸金花
|
public static final String SOCKET_GAME_ZJH = "startGame";//炸金花
|
||||||
@@ -182,6 +191,7 @@ public class Constants {
|
|||||||
public static final String LOVE_CHECK = "LoveCheck";//热度卡消息
|
public static final String LOVE_CHECK = "LoveCheck";//热度卡消息
|
||||||
public static final String TRUMPET_NOTIFY = "TrumpetNotify";//全栈喇叭
|
public static final String TRUMPET_NOTIFY = "TrumpetNotify";//全栈喇叭
|
||||||
public static final String LuckyAngel = "LuckyCheck";//幸运天使
|
public static final String LuckyAngel = "LuckyCheck";//幸运天使
|
||||||
|
public static final String Lucky100Check = "Lucky100Check";//幸运天使
|
||||||
|
|
||||||
public static final int SOCKET_WHAT_CONN = 0;
|
public static final int SOCKET_WHAT_CONN = 0;
|
||||||
public static final int SOCKET_WHAT_DISCONN = 2;
|
public static final int SOCKET_WHAT_DISCONN = 2;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import android.os.Build;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.KeyCharacterMap;
|
import android.view.KeyCharacterMap;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -54,8 +55,8 @@ public abstract class AbsActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
Intent intent=getIntent();
|
Intent intent = getIntent();
|
||||||
if(intent!=null) {
|
if (intent != null) {
|
||||||
isFullWindow = getIntent().getBooleanExtra("isFull", false);
|
isFullWindow = getIntent().getBooleanExtra("isFull", false);
|
||||||
if (isFullWindow) {
|
if (isFullWindow) {
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||||
@@ -358,4 +359,15 @@ public abstract class AbsActivity extends AppCompatActivity {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTrimMemory(int level) {
|
||||||
|
super.onTrimMemory(level);
|
||||||
|
Log.i("memory", "onTrimMemory: " + level);
|
||||||
|
switch (level) {
|
||||||
|
case TRIM_MEMORY_RUNNING_CRITICAL://内存低值危险值
|
||||||
|
break;
|
||||||
|
case TRIM_MEMORY_RUNNING_LOW://内存过低
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,12 +7,9 @@ import android.content.Intent;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
import androidx.annotation.RequiresApi;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.webkit.JavascriptInterface;
|
|
||||||
import android.webkit.ValueCallback;
|
import android.webkit.ValueCallback;
|
||||||
import android.webkit.WebChromeClient;
|
import android.webkit.WebChromeClient;
|
||||||
import android.webkit.WebSettings;
|
import android.webkit.WebSettings;
|
||||||
@@ -23,16 +20,23 @@ import android.widget.ImageView;
|
|||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
|
|
||||||
|
import androidx.annotation.RequiresApi;
|
||||||
|
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||||
import com.yunbao.common.utils.AndroidBug5497Workaround;
|
import com.yunbao.common.utils.AndroidBug5497Workaround;
|
||||||
|
import com.yunbao.common.utils.DeviceUtils;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
|
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.utils.WordUtil;
|
import com.yunbao.common.utils.WordUtil;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/9/25.
|
* Created by cxf on 2018/9/25.
|
||||||
*/
|
*/
|
||||||
@@ -64,14 +68,13 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
btnEdit = (ImageView) findViewById(R.id.btn_edit);
|
btnEdit = (ImageView) findViewById(R.id.btn_edit);
|
||||||
ft_title = (FrameLayout) findViewById(R.id.ft_title);
|
ft_title = (FrameLayout) findViewById(R.id.ft_title);
|
||||||
v_spacing = (View) findViewById(R.id.v_spacing);
|
v_spacing = (View) findViewById(R.id.v_spacing);
|
||||||
|
mWebView = findViewById(R.id.webView);
|
||||||
AndroidBug5497Workaround.assistActivity(this);
|
AndroidBug5497Workaround.assistActivity(this);
|
||||||
|
|
||||||
mWebView = new WebView(mContext);
|
|
||||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||||
params.topMargin = DpUtil.dp2px(1);
|
params.topMargin = DpUtil.dp2px(1);
|
||||||
mWebView.setLayoutParams(params);
|
// mWebView.setLayoutParams(params);
|
||||||
mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER);
|
//mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER);
|
||||||
rootView.addView(mWebView);
|
|
||||||
mWebView.setWebViewClient(new WebViewClient() {
|
mWebView.setWebViewClient(new WebViewClient() {
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||||
@@ -93,6 +96,11 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
if (url.contains("for")) {
|
if (url.contains("for")) {
|
||||||
mWebView.loadUrl("javascript:goAnchorTab()");
|
mWebView.loadUrl("javascript:goAnchorTab()");
|
||||||
}
|
}
|
||||||
|
//真实屏幕高度-(ft_title的高度+导航栏高度)
|
||||||
|
int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext);
|
||||||
|
if (!navigationGestureEnabled(mContext)) {
|
||||||
|
view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -136,7 +144,7 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
mWebView.addJavascriptInterface(new JsInteration(), "androidObject");
|
mWebView.addJavascriptInterface(JavascriptInterfaceUtils.getInstance().setmContext(mContext, mWebView).setPageClose(true).setLiveZhuangBana(false), "androidObject");
|
||||||
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); // 是否允许JS打开新窗口
|
mWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); // 是否允许JS打开新窗口
|
||||||
mWebView.getSettings().setJavaScriptEnabled(true);
|
mWebView.getSettings().setJavaScriptEnabled(true);
|
||||||
mWebView.getSettings().setDomStorageEnabled(true);
|
mWebView.getSettings().setDomStorageEnabled(true);
|
||||||
@@ -165,58 +173,6 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//js调用原生
|
|
||||||
public class JsInteration {
|
|
||||||
@JavascriptInterface
|
|
||||||
public void onBack() {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
|
|
||||||
@JavascriptInterface
|
|
||||||
public void modifyMydata() {
|
|
||||||
indexInto = 1;
|
|
||||||
RouteUtil.forwardEditProfileActivity();
|
|
||||||
}
|
|
||||||
|
|
||||||
@JavascriptInterface
|
|
||||||
public void reportUser(String touid) {
|
|
||||||
RouteUtil.forwardLiveReportActivity(touid);
|
|
||||||
}
|
|
||||||
|
|
||||||
@JavascriptInterface
|
|
||||||
public void gotoHomePage(String indexStr) {
|
|
||||||
Log.e("tgasss","indexStr4"+indexStr);
|
|
||||||
|
|
||||||
if (!"".equals(indexStr) && indexStr != null) {
|
|
||||||
int index = -1;
|
|
||||||
if ("0".equals(indexStr)) {
|
|
||||||
index = 0;
|
|
||||||
} else if ("1".equals(indexStr)) {
|
|
||||||
index = 1;
|
|
||||||
} else if ("2".equals(indexStr)) {
|
|
||||||
index = 2;
|
|
||||||
} else if ("3".equals(indexStr)) {
|
|
||||||
index = 3;
|
|
||||||
}
|
|
||||||
if (index != -1) {
|
|
||||||
finish();
|
|
||||||
Constants.isShowPage = index;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@JavascriptInterface
|
|
||||||
public void openWebView(String url) {
|
|
||||||
Constants.isTitle = false;
|
|
||||||
RouteUtil.forwardZhuangBanActivity(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
@JavascriptInterface
|
|
||||||
public void openWebViewTitle(String url) {
|
|
||||||
Constants.isTitle = true;
|
|
||||||
RouteUtil.forwardZhuangBanActivity(url);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void openImageChooserActivity(ValueCallback<Uri> valueCallback) {
|
private void openImageChooserActivity(ValueCallback<Uri> valueCallback) {
|
||||||
mValueCallback = valueCallback;
|
mValueCallback = valueCallback;
|
||||||
@@ -348,11 +304,10 @@ public class WebViewActivity extends AbsActivity {
|
|||||||
if (Constants.isShowPage != -1) {
|
if (Constants.isShowPage != -1) {
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
// new Handler().postDelayed(new Runnable() {
|
}
|
||||||
// @Override
|
|
||||||
// public void run() {
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
// mWebView.reload();
|
public void onJavascriptInterfaceEvent(JavascriptInterfaceEvent event) {
|
||||||
// }
|
indexInto = event.getIndexInto();
|
||||||
// }, 100);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,181 @@
|
|||||||
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||||
|
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||||
|
import com.yunbao.common.bean.CustomSidebarInfoModel;
|
||||||
|
import com.yunbao.common.http.main.MainNetManager;
|
||||||
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
|
import com.yunbao.common.views.DrawerRecommendViewHolder;
|
||||||
|
import com.yunbao.common.views.DrawerTaskViewHolder;
|
||||||
|
import com.yunbao.common.views.FunGamesViewHolder;
|
||||||
|
import com.yunbao.common.views.RecommendViewHolder;
|
||||||
|
import com.yunbao.common.views.RigtsInterestsViewHolder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新侧边栏适配器
|
||||||
|
*/
|
||||||
|
public class CustomDrawerPopupAdapter extends RecyclerView.Adapter {
|
||||||
|
private Context mContext;
|
||||||
|
// "type": 1,//模块类型 1 充值送好礼类型2 任务中心类型 3趣味游戏类4 权益 ,5为你推荐
|
||||||
|
private final int GOOD_GIFTS = 1;
|
||||||
|
private final int TASK_CENTER = 2;
|
||||||
|
private final int FUN_GAMES = 3;
|
||||||
|
private final int RIGHTS_INTERESTS = 4;
|
||||||
|
private final int RECOMMEND = 5;
|
||||||
|
private String liveId;
|
||||||
|
private List<AnchorRecommendItemModel> list = new ArrayList<>();
|
||||||
|
|
||||||
|
private List<CustomSidebarInfoModel> infoModels = new ArrayList<>();
|
||||||
|
|
||||||
|
public CustomDrawerPopupAdapter(Context mContext) {
|
||||||
|
this.mContext = mContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public CustomDrawerPopupAdapter setLiveId(String liveId) {
|
||||||
|
this.liveId = liveId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDrawerPopupAdapter setList(List<AnchorRecommendItemModel> list) {
|
||||||
|
this.list = list;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
switch (viewType) {
|
||||||
|
case GOOD_GIFTS:
|
||||||
|
View goodGiftsView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_good_gifts, parent, false);
|
||||||
|
return new DrawerRecommendViewHolder(goodGiftsView);
|
||||||
|
case TASK_CENTER:
|
||||||
|
View taskCenterView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_tsak_center, parent, false);
|
||||||
|
return new DrawerTaskViewHolder(taskCenterView);
|
||||||
|
case FUN_GAMES:
|
||||||
|
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_fun_games_view, parent, false);
|
||||||
|
return new FunGamesViewHolder(runGamesView);
|
||||||
|
case RIGHTS_INTERESTS:
|
||||||
|
View rightsInterestsView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_rights_interests, parent, false);
|
||||||
|
return new RigtsInterestsViewHolder(rightsInterestsView);
|
||||||
|
default:
|
||||||
|
View recommendView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_recommend, parent, false);
|
||||||
|
return new RecommendViewHolder(recommendView);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
|
if (holder instanceof DrawerRecommendViewHolder) {
|
||||||
|
DrawerRecommendViewHolder recommendViewHolder = (DrawerRecommendViewHolder) holder;
|
||||||
|
recommendViewHolder.setData(infoModels.get(position));
|
||||||
|
} else if (holder instanceof DrawerTaskViewHolder) {
|
||||||
|
DrawerTaskViewHolder taskViewHolder = (DrawerTaskViewHolder) holder;
|
||||||
|
taskViewHolder.setData(infoModels.get(position));
|
||||||
|
} else if (holder instanceof FunGamesViewHolder) {
|
||||||
|
FunGamesViewHolder funGamesViewHolder = (FunGamesViewHolder) holder;
|
||||||
|
funGamesViewHolder.setData(infoModels.get(position));
|
||||||
|
} else if (holder instanceof RigtsInterestsViewHolder) {
|
||||||
|
RigtsInterestsViewHolder rigtsInterestsViewHolder = (RigtsInterestsViewHolder) holder;
|
||||||
|
rigtsInterestsViewHolder.setData(infoModels.get(position));
|
||||||
|
} else if (holder instanceof RecommendViewHolder) {
|
||||||
|
|
||||||
|
RecommendViewHolder recommendViewHolder = (RecommendViewHolder) holder;
|
||||||
|
recommendViewHolder.setData(infoModels.get(position));
|
||||||
|
recommendViewHolder.updateData(list);
|
||||||
|
|
||||||
|
recommendViewHolder.setListener(new RecommendViewHolder.RecommendViewListener() {
|
||||||
|
@Override
|
||||||
|
public void changeOneBatch() {
|
||||||
|
//推荐位
|
||||||
|
MainNetManager.get((Activity) mContext)
|
||||||
|
.anchorRecommend("9", new com.yunbao.common.http.base.HttpCallback<AnchorRecommendModel>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(AnchorRecommendModel anchorRecommendModel) {
|
||||||
|
|
||||||
|
List<AnchorRecommendItemModel> models = anchorRecommendModel.getList();
|
||||||
|
int userIndex = -1;
|
||||||
|
for (int i = 0; i < models.size(); i++) {
|
||||||
|
if (TextUtils.equals(models.get(i).getUid(), liveId)) {
|
||||||
|
userIndex = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (userIndex != -1) {
|
||||||
|
models.remove(userIndex);
|
||||||
|
}
|
||||||
|
recommendViewHolder.updateData(models);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(String error) {
|
||||||
|
ToastUtil.show(R.string.net_error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void goToLive(AnchorRecommendItemModel model) {
|
||||||
|
if (listener != null) {
|
||||||
|
listener.goToLive(model);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return infoModels.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemViewType(int position) {
|
||||||
|
CustomSidebarInfoModel model = infoModels.get(position);
|
||||||
|
switch (model.getType()) {
|
||||||
|
case "1":
|
||||||
|
return GOOD_GIFTS;
|
||||||
|
case "2":
|
||||||
|
return TASK_CENTER;
|
||||||
|
case "3":
|
||||||
|
return FUN_GAMES;
|
||||||
|
case "4":
|
||||||
|
return RIGHTS_INTERESTS;
|
||||||
|
case "5":
|
||||||
|
return RECOMMEND;
|
||||||
|
}
|
||||||
|
return super.getItemViewType(position);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateData(List<CustomSidebarInfoModel> mInfoModels) {
|
||||||
|
infoModels.clear();
|
||||||
|
infoModels.addAll(mInfoModels);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private CustomDrawerListener listener;
|
||||||
|
|
||||||
|
public CustomDrawerPopupAdapter setListener(CustomDrawerListener listener) {
|
||||||
|
this.listener = listener;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface CustomDrawerListener {
|
||||||
|
void goToLive(AnchorRecommendItemModel model);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||||
|
import com.yunbao.common.views.DrawerRecommendChildViewHolder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DrawerRecommendAdapter extends RecyclerView.Adapter {
|
||||||
|
private Context mContext;
|
||||||
|
private List<CustomSidebarChildModel> child = new ArrayList<>();
|
||||||
|
|
||||||
|
public DrawerRecommendAdapter(Context mContext) {
|
||||||
|
this.mContext = mContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View goodGiftsView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_drawer_recommend_child, parent, false);
|
||||||
|
return new DrawerRecommendChildViewHolder(goodGiftsView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
|
DrawerRecommendChildViewHolder childViewHolder = (DrawerRecommendChildViewHolder) holder;
|
||||||
|
childViewHolder.setData(child.get(position));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return child.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateData(List<CustomSidebarChildModel> mChild) {
|
||||||
|
child.clear();
|
||||||
|
child.addAll(mChild);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||||
|
import com.yunbao.common.event.CustomDrawerPopupEvent;
|
||||||
|
import com.yunbao.common.utils.Bus;
|
||||||
|
import com.yunbao.common.views.DrawerTaskChildViewHolder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DrawerTaskAdapter extends RecyclerView.Adapter {
|
||||||
|
private Context mContext;
|
||||||
|
private List<CustomSidebarChildModel> child = new ArrayList<>();
|
||||||
|
|
||||||
|
public DrawerTaskAdapter(Context mContext) {
|
||||||
|
this.mContext = mContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View taskCenterView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_tsak_center_child, parent, false);
|
||||||
|
return new DrawerTaskChildViewHolder(taskCenterView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
|
DrawerTaskChildViewHolder taskChildViewHolder = (DrawerTaskChildViewHolder) holder;
|
||||||
|
taskChildViewHolder.setData(child.get(position), position);
|
||||||
|
taskChildViewHolder.setListener(new DrawerTaskChildViewHolder.DrawerTaskChildListener() {
|
||||||
|
@Override
|
||||||
|
public void giftSuccess(CustomSidebarChildModel model, int index) {
|
||||||
|
//将领取的任务移动至任务列表尾部
|
||||||
|
Bus.get().post(new CustomDrawerPopupEvent()
|
||||||
|
.setDisMiss(false).setRefresh(true));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateData(List<CustomSidebarChildModel> mChild) {
|
||||||
|
child.clear();
|
||||||
|
child.addAll(mChild);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.CustomSidebarChildModel;
|
||||||
|
import com.yunbao.common.views.FunGamesChildViewHolder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class FunGamesAdapter extends RecyclerView.Adapter {
|
||||||
|
private Context mContext;
|
||||||
|
private boolean rigts;
|
||||||
|
private List<CustomSidebarChildModel> child = new ArrayList<>();
|
||||||
|
|
||||||
|
public FunGamesAdapter(Context mContext, boolean rigts) {
|
||||||
|
this.mContext = mContext;
|
||||||
|
this.rigts = rigts;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View runGamesView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_fun_games_child_view, parent, false);
|
||||||
|
return new FunGamesChildViewHolder(runGamesView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
|
FunGamesChildViewHolder childViewHolder = (FunGamesChildViewHolder) holder;
|
||||||
|
childViewHolder.setData(child.get(position), rigts);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return child.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateData(List<CustomSidebarChildModel> mChild) {
|
||||||
|
child.clear();
|
||||||
|
if (mChild.size() > 8) {
|
||||||
|
for (int i = 0; i < 8; i++) {
|
||||||
|
child.add(mChild.get(i));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
child.addAll(mChild);
|
||||||
|
}
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void selectAll(List<CustomSidebarChildModel> mChild){
|
||||||
|
child.clear();
|
||||||
|
child.addAll(mChild);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.ListInfoMessageModel;
|
||||||
|
import com.yunbao.common.views.LiveSystemMessageViewHolder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主播消息中心适配器
|
||||||
|
*/
|
||||||
|
public class LiveSystemMessageAdapter extends RecyclerView.Adapter {
|
||||||
|
private Context mContext;
|
||||||
|
private LayoutInflater mInflater;
|
||||||
|
private List<ListInfoMessageModel> listInfoMessageModels = new ArrayList<>();
|
||||||
|
|
||||||
|
public LiveSystemMessageAdapter(Context mContext) {
|
||||||
|
this.mContext = mContext;
|
||||||
|
mInflater = LayoutInflater.from(mContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
return new LiveSystemMessageViewHolder(mInflater.inflate(R.layout.view_live_system_message, parent, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
|
LiveSystemMessageViewHolder messageViewHolder = (LiveSystemMessageViewHolder) holder;
|
||||||
|
messageViewHolder.setViewData(listInfoMessageModels.get(position));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return listInfoMessageModels.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addData(List<ListInfoMessageModel> list) {
|
||||||
|
listInfoMessageModels.addAll(list);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.AnchorRecommendItemModel;
|
||||||
|
import com.yunbao.common.views.RecommendChildViewHolder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RecommendAdapter extends RecyclerView.Adapter {
|
||||||
|
private List<AnchorRecommendItemModel> list = new ArrayList<>();
|
||||||
|
private Context mContext;
|
||||||
|
|
||||||
|
public RecommendAdapter(Context mContext) {
|
||||||
|
this.mContext = mContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
return new RecommendChildViewHolder(LayoutInflater.from(mContext).inflate(R.layout.item_sidebar_lives_new, parent, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
|
|
||||||
|
RecommendChildViewHolder itemViewHolder = (RecommendChildViewHolder) holder;
|
||||||
|
itemViewHolder.setData(list.get(position));
|
||||||
|
itemViewHolder.setListener(new RecommendChildViewHolder.RecommendChildListener() {
|
||||||
|
@Override
|
||||||
|
public void goToLive(AnchorRecommendItemModel model) {
|
||||||
|
if (callback != null) {
|
||||||
|
callback.goToLive(model);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return list.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateData(List<AnchorRecommendItemModel> mList) {
|
||||||
|
list.clear();
|
||||||
|
list.addAll(mList);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private RecommendCallback callback;
|
||||||
|
|
||||||
|
public RecommendAdapter setCallback(RecommendCallback callback) {
|
||||||
|
this.callback = callback;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface RecommendCallback {
|
||||||
|
void goToLive(AnchorRecommendItemModel model);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -95,7 +95,7 @@ public abstract class RefreshAdapter<T> extends RecyclerView.Adapter {
|
|||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean canClick() {
|
protected static boolean canClick() {
|
||||||
return ClickUtil.canClick();
|
return ClickUtil.canClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||||
|
import com.yunbao.common.views.RobotMessageViewHolder;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RobotMessageAdapter extends RecyclerView.Adapter {
|
||||||
|
private List<LiveAiRobotBean.Message> messageList = new ArrayList<>();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View robotMessageView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_robot_message, parent, false);
|
||||||
|
return new RobotMessageViewHolder(robotMessageView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
|
RobotMessageViewHolder messageViewHolder = (RobotMessageViewHolder) holder;
|
||||||
|
messageViewHolder.setData(messageList.get(position), position + 1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return messageList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setDataAll(List<LiveAiRobotBean.Message> messages) {
|
||||||
|
messageList.clear();
|
||||||
|
messageList.addAll(messages);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除数据
|
||||||
|
public void removeData(int position) {
|
||||||
|
messageList.remove(position);
|
||||||
|
//删除动画
|
||||||
|
notifyItemRemoved(position);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.yunbao.common.adapter;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.bean.LiveAiRobotBean;
|
||||||
|
import com.yunbao.common.views.RobotSayHelloViewHoler;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RobotSayHelloAdapter extends RecyclerView.Adapter {
|
||||||
|
private List<LiveAiRobotBean.Message> messageList = new ArrayList<>();
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View robotSayHelloView = LayoutInflater.from(parent.getContext()).inflate(R.layout.view_robot_message, parent, false);
|
||||||
|
return new RobotSayHelloViewHoler(robotSayHelloView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||||
|
RobotSayHelloViewHoler robotSayHelloViewHoler = (RobotSayHelloViewHoler) holder;
|
||||||
|
robotSayHelloViewHoler.setData(messageList.get(position), position + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return messageList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setDataAll(List<LiveAiRobotBean.Message> messages) {
|
||||||
|
messageList.clear();
|
||||||
|
messageList.addAll(messages);
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除数据
|
||||||
|
public void removeData(int position) {
|
||||||
|
messageList.remove(position);
|
||||||
|
//删除动画
|
||||||
|
notifyItemRemoved(position);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -75,7 +75,7 @@ public class AnchorRecommendItemModel extends BaseModel {
|
|||||||
private String avatarThumb = "";
|
private String avatarThumb = "";
|
||||||
@SerializedName("avatar2")
|
@SerializedName("avatar2")
|
||||||
private String avatar2 = "";
|
private String avatar2 = "";
|
||||||
@SerializedName("user_nicename")
|
@SerializedName(value = "user_nicename", alternate = "userNiceName")
|
||||||
private String userNicename = "";
|
private String userNicename = "";
|
||||||
@SerializedName("level")
|
@SerializedName("level")
|
||||||
private String level = "";
|
private String level = "";
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class CheckLiveModel extends BaseModel {
|
||||||
|
|
||||||
|
@SerializedName("type")
|
||||||
|
private int type;
|
||||||
|
@SerializedName("type_val")
|
||||||
|
private String typeVal;
|
||||||
|
@SerializedName("type_msg")
|
||||||
|
private String typeMsg;
|
||||||
|
@SerializedName("live_sdk")
|
||||||
|
private String liveSdk;
|
||||||
|
|
||||||
|
public static CheckLiveModel objectFromData(String str) {
|
||||||
|
|
||||||
|
return new Gson().fromJson(str, CheckLiveModel.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeVal() {
|
||||||
|
return typeVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypeVal(String typeVal) {
|
||||||
|
this.typeVal = typeVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeMsg() {
|
||||||
|
return typeMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTypeMsg(String typeMsg) {
|
||||||
|
this.typeMsg = typeMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLiveSdk() {
|
||||||
|
return liveSdk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLiveSdk(String liveSdk) {
|
||||||
|
this.liveSdk = liveSdk;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ package com.yunbao.common.bean;
|
|||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -14,7 +15,7 @@ public class CrashSaveBean {
|
|||||||
private long enterRoom;//进入房间次数
|
private long enterRoom;//进入房间次数
|
||||||
private long slidingRoom;//滑动直播间次数
|
private long slidingRoom;//滑动直播间次数
|
||||||
private long playSvga;//加载播放svga次数
|
private long playSvga;//加载播放svga次数
|
||||||
private List<WeakReference<Activity>> activities;//Activity数量
|
private List<WeakReference<Activity>> activities = new ArrayList<>();//Activity数量
|
||||||
|
|
||||||
private CrashSaveBean() {
|
private CrashSaveBean() {
|
||||||
|
|
||||||
@@ -60,10 +61,14 @@ public class CrashSaveBean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getActivitySize() {
|
public String getActivitySize() {
|
||||||
StringBuilder builder=new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
for (WeakReference<Activity> activity : activities) {
|
for (WeakReference<Activity> activity : activities) {
|
||||||
if(activity.get()!=null){
|
try {
|
||||||
builder.append(activity.get()).append(",");
|
if (activity.get() != null) {
|
||||||
|
builder.append(activity.get().getClass().getSimpleName()).append(",");
|
||||||
|
}
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
|
|||||||
@@ -0,0 +1,172 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class CustomSidebarChildModel extends BaseModel {
|
||||||
|
@SerializedName("id")
|
||||||
|
private String id;
|
||||||
|
@SerializedName("parent_id")
|
||||||
|
private String parentId;
|
||||||
|
@SerializedName("title")
|
||||||
|
private String title;
|
||||||
|
@SerializedName("subtitle")
|
||||||
|
private String subtitle;
|
||||||
|
@SerializedName("icon")
|
||||||
|
private String icon;
|
||||||
|
@SerializedName("src")
|
||||||
|
private String src;
|
||||||
|
@SerializedName("show_type")
|
||||||
|
private String showType;
|
||||||
|
@SerializedName("sort")
|
||||||
|
private String sort;
|
||||||
|
@SerializedName("english")
|
||||||
|
private String english;
|
||||||
|
//奖励领取状态 0未达到领取要求 1已领取 2未领取
|
||||||
|
@SerializedName("status")
|
||||||
|
private String status;
|
||||||
|
@SerializedName("need_num")
|
||||||
|
private String needNum;
|
||||||
|
@SerializedName("now_num")
|
||||||
|
private String nowNum;
|
||||||
|
@SerializedName("activity_id")
|
||||||
|
private String activityId;
|
||||||
|
@SerializedName("flag")
|
||||||
|
private String flag;
|
||||||
|
|
||||||
|
public String getFlag() {
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setFlag(String flag) {
|
||||||
|
this.flag = flag;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getActivityId() {
|
||||||
|
return activityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setActivityId(String activityId) {
|
||||||
|
this.activityId = activityId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int resIcon;
|
||||||
|
|
||||||
|
public int getResIcon() {
|
||||||
|
return resIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setResIcon(int resIcon) {
|
||||||
|
this.resIcon = resIcon;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getParentId() {
|
||||||
|
return parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setParentId(String parentId) {
|
||||||
|
this.parentId = parentId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSubtitle() {
|
||||||
|
return subtitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setSubtitle(String subtitle) {
|
||||||
|
this.subtitle = subtitle;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIcon() {
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setIcon(String icon) {
|
||||||
|
this.icon = icon;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSrc() {
|
||||||
|
return src;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setSrc(String src) {
|
||||||
|
this.src = src;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShowType() {
|
||||||
|
return showType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setShowType(String showType) {
|
||||||
|
this.showType = showType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSort() {
|
||||||
|
return sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setSort(String sort) {
|
||||||
|
this.sort = sort;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnglish() {
|
||||||
|
return english;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setEnglish(String english) {
|
||||||
|
this.english = english;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNeedNum() {
|
||||||
|
return needNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setNeedNum(String needNum) {
|
||||||
|
this.needNum = needNum;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNowNum() {
|
||||||
|
return nowNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarChildModel setNowNum(String nowNum) {
|
||||||
|
this.nowNum = nowNum;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新版自定义侧边栏
|
||||||
|
*/
|
||||||
|
public class CustomSidebarInfoModel extends BaseModel {
|
||||||
|
@SerializedName("id")
|
||||||
|
private String id;
|
||||||
|
//一级标题
|
||||||
|
@SerializedName("title")
|
||||||
|
private String title;
|
||||||
|
//二级标题
|
||||||
|
@SerializedName("subtitle")
|
||||||
|
private String subtitle;
|
||||||
|
@SerializedName("sort")
|
||||||
|
private String sort;
|
||||||
|
//1全屏 2半屏
|
||||||
|
@SerializedName("show_type")
|
||||||
|
private String showType;
|
||||||
|
//跳转链接
|
||||||
|
@SerializedName("src")
|
||||||
|
private String src;
|
||||||
|
@SerializedName("type")
|
||||||
|
private String type;
|
||||||
|
@SerializedName("child")
|
||||||
|
private List<CustomSidebarChildModel> child;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarInfoModel setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarInfoModel setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSubtitle() {
|
||||||
|
return subtitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarInfoModel setSubtitle(String subtitle) {
|
||||||
|
this.subtitle = subtitle;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSort() {
|
||||||
|
return sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarInfoModel setSort(String sort) {
|
||||||
|
this.sort = sort;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShowType() {
|
||||||
|
return showType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarInfoModel setShowType(String showType) {
|
||||||
|
this.showType = showType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSrc() {
|
||||||
|
return src;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarInfoModel setSrc(String src) {
|
||||||
|
this.src = src;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarInfoModel setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CustomSidebarChildModel> getChild() {
|
||||||
|
return child;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomSidebarInfoModel setChild(List<CustomSidebarChildModel> child) {
|
||||||
|
this.child = child;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,554 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.yunbao.common.utils.StringUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class EnterRoomInfoModel extends BaseModel {
|
||||||
|
@SerializedName("votestotal")
|
||||||
|
private String votestotal;
|
||||||
|
@SerializedName("medalRankNum")
|
||||||
|
private String medalRankNum;
|
||||||
|
@SerializedName("barrage_fee")
|
||||||
|
private String barrageFee;
|
||||||
|
@SerializedName("userlist_time")
|
||||||
|
private String userlistTime;
|
||||||
|
@SerializedName("chatserver")
|
||||||
|
private String chatserver;
|
||||||
|
@SerializedName("linkmic_uid")
|
||||||
|
private String linkmicUid;
|
||||||
|
@SerializedName("linkmic_pull")
|
||||||
|
private String linkmicPull;
|
||||||
|
@SerializedName("nums")
|
||||||
|
private String nums;
|
||||||
|
@SerializedName("game")
|
||||||
|
private List<?> game;
|
||||||
|
@SerializedName("gamebet")
|
||||||
|
private List<String> gamebet;
|
||||||
|
@SerializedName("gametime")
|
||||||
|
private String gametime;
|
||||||
|
@SerializedName("gameid")
|
||||||
|
private String gameid;
|
||||||
|
@SerializedName("gameaction")
|
||||||
|
private String gameaction;
|
||||||
|
@SerializedName("game_bankerid")
|
||||||
|
private String gameBankerid;
|
||||||
|
@SerializedName("game_banker_name")
|
||||||
|
private String gameBankerName;
|
||||||
|
@SerializedName("game_banker_avatar")
|
||||||
|
private String gameBankerAvatar;
|
||||||
|
@SerializedName("game_banker_coin")
|
||||||
|
private String gameBankerCoin;
|
||||||
|
@SerializedName("game_banker_limit")
|
||||||
|
private String gameBankerLimit;
|
||||||
|
@SerializedName("shut_time")
|
||||||
|
private String shutTime;
|
||||||
|
@SerializedName("kick_time")
|
||||||
|
private String kickTime;
|
||||||
|
@SerializedName("speak_limit")
|
||||||
|
private String speakLimit;
|
||||||
|
@SerializedName("barrage_limit")
|
||||||
|
private String barrageLimit;
|
||||||
|
@SerializedName("coin")
|
||||||
|
private String coin;
|
||||||
|
@SerializedName("vip")
|
||||||
|
private VipModel vip;
|
||||||
|
@SerializedName("liang")
|
||||||
|
private LiangModel liang;
|
||||||
|
@SerializedName("medal_level")
|
||||||
|
private String medalLevel;
|
||||||
|
@SerializedName("medal_name")
|
||||||
|
private String medalName;
|
||||||
|
@SerializedName("issuper")
|
||||||
|
private String issuper;
|
||||||
|
@SerializedName("usertype")
|
||||||
|
private String usertype;
|
||||||
|
@SerializedName("front_task")
|
||||||
|
private String frontTask;
|
||||||
|
@SerializedName("ismic")
|
||||||
|
private String ismic;
|
||||||
|
@SerializedName("isattention")
|
||||||
|
private String isattention;
|
||||||
|
@SerializedName("userlists")
|
||||||
|
private List<LiveUserGiftBean> userlists;
|
||||||
|
@SerializedName("guard")
|
||||||
|
private GuardModel guard;
|
||||||
|
@SerializedName("guard_nums")
|
||||||
|
private String guardNums;
|
||||||
|
@SerializedName("pkinfo")
|
||||||
|
private PkinfoModel pkinfo;
|
||||||
|
@SerializedName("lminfo")
|
||||||
|
private LminfoModel lminfo;
|
||||||
|
@SerializedName("isred")
|
||||||
|
private String isred;
|
||||||
|
@SerializedName("is_fans")
|
||||||
|
private String isFans;
|
||||||
|
@SerializedName("count_fans")
|
||||||
|
private String countFans;
|
||||||
|
@SerializedName("isconnection")
|
||||||
|
private String isconnection;
|
||||||
|
@SerializedName("isleave")
|
||||||
|
private String isleave;
|
||||||
|
@SerializedName("landscape")
|
||||||
|
private String landscape;
|
||||||
|
@SerializedName("un_charge")
|
||||||
|
private String unCharge;
|
||||||
|
@SerializedName("see_time")
|
||||||
|
private String seeTime;
|
||||||
|
@SerializedName("greetings")
|
||||||
|
private List<String> greetings;
|
||||||
|
@SerializedName("live_bg")
|
||||||
|
private String liveBg;
|
||||||
|
@SerializedName("anchor_goodnum")
|
||||||
|
private String anchorGoodnum;
|
||||||
|
@SerializedName("jackpot_level")
|
||||||
|
private String jackpotLevel="-1";
|
||||||
|
|
||||||
|
public String getJackpotLevel() {
|
||||||
|
|
||||||
|
return jackpotLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setJackpotLevel(String jackpotLevel) {
|
||||||
|
this.jackpotLevel = jackpotLevel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVotestotal() {
|
||||||
|
return votestotal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setVotestotal(String votestotal) {
|
||||||
|
this.votestotal = votestotal;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMedalRankNum() {
|
||||||
|
return medalRankNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setMedalRankNum(String medalRankNum) {
|
||||||
|
this.medalRankNum = medalRankNum;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBarrageFee() {
|
||||||
|
return barrageFee;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setBarrageFee(String barrageFee) {
|
||||||
|
this.barrageFee = barrageFee;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserlistTime() {
|
||||||
|
return userlistTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setUserlistTime(String userlistTime) {
|
||||||
|
this.userlistTime = userlistTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChatserver() {
|
||||||
|
return chatserver;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setChatserver(String chatserver) {
|
||||||
|
this.chatserver = chatserver;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLinkmicUid() {
|
||||||
|
return linkmicUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setLinkmicUid(String linkmicUid) {
|
||||||
|
this.linkmicUid = linkmicUid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLinkmicPull() {
|
||||||
|
return linkmicPull;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setLinkmicPull(String linkmicPull) {
|
||||||
|
this.linkmicPull = linkmicPull;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNums() {
|
||||||
|
return nums;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setNums(String nums) {
|
||||||
|
this.nums = nums;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<?> getGame() {
|
||||||
|
return game;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setGame(List<?> game) {
|
||||||
|
this.game = game;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getGamebet() {
|
||||||
|
return gamebet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setGamebet(List<String> gamebet) {
|
||||||
|
this.gamebet = gamebet;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGametime() {
|
||||||
|
return gametime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setGametime(String gametime) {
|
||||||
|
this.gametime = gametime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGameid() {
|
||||||
|
return gameid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setGameid(String gameid) {
|
||||||
|
this.gameid = gameid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGameaction() {
|
||||||
|
return gameaction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setGameaction(String gameaction) {
|
||||||
|
this.gameaction = gameaction;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGameBankerid() {
|
||||||
|
return gameBankerid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setGameBankerid(String gameBankerid) {
|
||||||
|
this.gameBankerid = gameBankerid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGameBankerName() {
|
||||||
|
return gameBankerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setGameBankerName(String gameBankerName) {
|
||||||
|
this.gameBankerName = gameBankerName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGameBankerAvatar() {
|
||||||
|
return gameBankerAvatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setGameBankerAvatar(String gameBankerAvatar) {
|
||||||
|
this.gameBankerAvatar = gameBankerAvatar;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGameBankerCoin() {
|
||||||
|
return gameBankerCoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setGameBankerCoin(String gameBankerCoin) {
|
||||||
|
this.gameBankerCoin = gameBankerCoin;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGameBankerLimit() {
|
||||||
|
return gameBankerLimit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setGameBankerLimit(String gameBankerLimit) {
|
||||||
|
this.gameBankerLimit = gameBankerLimit;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShutTime() {
|
||||||
|
return shutTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setShutTime(String shutTime) {
|
||||||
|
this.shutTime = shutTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKickTime() {
|
||||||
|
return kickTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setKickTime(String kickTime) {
|
||||||
|
this.kickTime = kickTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSpeakLimit() {
|
||||||
|
return speakLimit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setSpeakLimit(String speakLimit) {
|
||||||
|
this.speakLimit = speakLimit;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBarrageLimit() {
|
||||||
|
return barrageLimit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setBarrageLimit(String barrageLimit) {
|
||||||
|
this.barrageLimit = barrageLimit;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCoin() {
|
||||||
|
return coin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setCoin(String coin) {
|
||||||
|
this.coin = coin;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VipModel getVip() {
|
||||||
|
return vip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setVip(VipModel vip) {
|
||||||
|
this.vip = vip;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiangModel getLiang() {
|
||||||
|
return liang;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setLiang(LiangModel liang) {
|
||||||
|
this.liang = liang;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMedalLevel() {
|
||||||
|
return medalLevel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setMedalLevel(String medalLevel) {
|
||||||
|
this.medalLevel = medalLevel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMedalName() {
|
||||||
|
return medalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setMedalName(String medalName) {
|
||||||
|
this.medalName = medalName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIssuper() {
|
||||||
|
return issuper;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setIssuper(String issuper) {
|
||||||
|
this.issuper = issuper;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUsertype() {
|
||||||
|
return usertype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setUsertype(String usertype) {
|
||||||
|
this.usertype = usertype;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFrontTask() {
|
||||||
|
return frontTask;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setFrontTask(String frontTask) {
|
||||||
|
this.frontTask = frontTask;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsmic() {
|
||||||
|
return ismic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setIsmic(String ismic) {
|
||||||
|
this.ismic = ismic;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsattention() {
|
||||||
|
return isattention;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setIsattention(String isattention) {
|
||||||
|
this.isattention = isattention;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<LiveUserGiftBean> getUserlists() {
|
||||||
|
return userlists;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setUserlists(List<LiveUserGiftBean> userlists) {
|
||||||
|
this.userlists = userlists;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GuardModel getGuard() {
|
||||||
|
return guard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setGuard(GuardModel guard) {
|
||||||
|
this.guard = guard;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGuardNums() {
|
||||||
|
return guardNums;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setGuardNums(String guardNums) {
|
||||||
|
this.guardNums = guardNums;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel getPkinfo() {
|
||||||
|
return pkinfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setPkinfo(PkinfoModel pkinfo) {
|
||||||
|
this.pkinfo = pkinfo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LminfoModel getLminfo() {
|
||||||
|
return lminfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setLminfo(LminfoModel lminfo) {
|
||||||
|
this.lminfo = lminfo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsred() {
|
||||||
|
return isred;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setIsred(String isred) {
|
||||||
|
this.isred = isred;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsFans() {
|
||||||
|
return isFans;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setIsFans(String isFans) {
|
||||||
|
this.isFans = isFans;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCountFans() {
|
||||||
|
return countFans;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setCountFans(String countFans) {
|
||||||
|
this.countFans = countFans;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsconnection() {
|
||||||
|
if(StringUtil.isEmpty(isconnection)){
|
||||||
|
isconnection="0";
|
||||||
|
}
|
||||||
|
return isconnection;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setIsconnection(String isconnection) {
|
||||||
|
this.isconnection = isconnection;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsleave() {
|
||||||
|
return isleave;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setIsleave(String isleave) {
|
||||||
|
this.isleave = isleave;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLandscape() {
|
||||||
|
return landscape;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setLandscape(String landscape) {
|
||||||
|
this.landscape = landscape;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnCharge() {
|
||||||
|
return unCharge;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setUnCharge(String unCharge) {
|
||||||
|
this.unCharge = unCharge;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSeeTime() {
|
||||||
|
return seeTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setSeeTime(String seeTime) {
|
||||||
|
this.seeTime = seeTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getGreetings() {
|
||||||
|
return greetings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setGreetings(List<String> greetings) {
|
||||||
|
this.greetings = greetings;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLiveBg() {
|
||||||
|
return liveBg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setLiveBg(String liveBg) {
|
||||||
|
this.liveBg = liveBg;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAnchorGoodnum() {
|
||||||
|
return anchorGoodnum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel setAnchorGoodnum(String anchorGoodnum) {
|
||||||
|
this.anchorGoodnum = anchorGoodnum;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整合进入直播间接口
|
||||||
|
*/
|
||||||
|
public class EnterRoomNewModel extends BaseModel {
|
||||||
|
|
||||||
|
@SerializedName("liveInfo")
|
||||||
|
private LiveInfoModel liveInfo = new LiveInfoModel();//直播间信息
|
||||||
|
@SerializedName("enterRoomInfo")
|
||||||
|
private EnterRoomInfoModel enterRoomInfo = new EnterRoomInfoModel();//原接口进入直播间数据返回
|
||||||
|
@SerializedName("rankHour")
|
||||||
|
private RankHourModel rankHour = new RankHourModel();//.热度卡
|
||||||
|
@SerializedName("newPeopleTask")
|
||||||
|
private NewPeopleTaskModel newPeopleTask = new NewPeopleTaskModel();//新人任务
|
||||||
|
@SerializedName("wishList")
|
||||||
|
private WishListModel wishList = new WishListModel();//心愿单
|
||||||
|
@SerializedName("guardUser")
|
||||||
|
private GuardUserModel guardUserAvatar = new GuardUserModel();//守护
|
||||||
|
@SerializedName("activeList")
|
||||||
|
private List<ActiveModel> activeList = new ArrayList<>();//活动列表
|
||||||
|
@SerializedName("isUseHotCard")
|
||||||
|
private String isUseHotCard = "";//是否使用热度卡
|
||||||
|
@SerializedName("liveRoomActivity")
|
||||||
|
private List<LiveRoomActivityModel> liveRoomActivityModels = new ArrayList<>();//活动列表
|
||||||
|
@SerializedName("clarityType")
|
||||||
|
private int clarityType;
|
||||||
|
|
||||||
|
public List<LiveRoomActivityModel> getLiveRoomActivityModels() {
|
||||||
|
return liveRoomActivityModels;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomNewModel setLiveRoomActivityModels(List<LiveRoomActivityModel> liveRoomActivityModels) {
|
||||||
|
this.liveRoomActivityModels = liveRoomActivityModels;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveInfoModel getLiveInfo() {
|
||||||
|
return liveInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomNewModel setLiveInfo(LiveInfoModel liveInfo) {
|
||||||
|
this.liveInfo = liveInfo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomInfoModel getEnterRoomInfo() {
|
||||||
|
return enterRoomInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomNewModel setEnterRoomInfo(EnterRoomInfoModel enterRoomInfo) {
|
||||||
|
this.enterRoomInfo = enterRoomInfo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RankHourModel getRankHour() {
|
||||||
|
return rankHour;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomNewModel setRankHour(RankHourModel rankHour) {
|
||||||
|
this.rankHour = rankHour;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewPeopleTaskModel getNewPeopleTask() {
|
||||||
|
return newPeopleTask;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomNewModel setNewPeopleTask(NewPeopleTaskModel newPeopleTask) {
|
||||||
|
this.newPeopleTask = newPeopleTask;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WishListModel getWishList() {
|
||||||
|
return wishList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomNewModel setWishList(WishListModel wishList) {
|
||||||
|
this.wishList = wishList;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GuardUserModel getGuardUserAvatar() {
|
||||||
|
return guardUserAvatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomNewModel setGuardUserAvatar(GuardUserModel guardUserAvatar) {
|
||||||
|
this.guardUserAvatar = guardUserAvatar;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ActiveModel> getActiveList() {
|
||||||
|
return activeList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomNewModel setActiveList(List<ActiveModel> activeList) {
|
||||||
|
this.activeList = activeList;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsUseHotCard() {
|
||||||
|
return isUseHotCard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnterRoomNewModel setIsUseHotCard(String isUseHotCard) {
|
||||||
|
this.isUseHotCard = isUseHotCard;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getClarityType() {
|
||||||
|
return clarityType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClarityType(int clarityType) {
|
||||||
|
this.clarityType = clarityType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "EnterRoomNewModel{" +
|
||||||
|
"liveInfo=" + liveInfo +
|
||||||
|
", enterRoomInfo=" + enterRoomInfo +
|
||||||
|
", rankHour=" + rankHour +
|
||||||
|
", newPeopleTask=" + newPeopleTask +
|
||||||
|
", wishList=" + wishList +
|
||||||
|
", guardUserAvatar=" + guardUserAvatar +
|
||||||
|
", activeList=" + activeList +
|
||||||
|
", isUseHotCard='" + isUseHotCard + '\'' +
|
||||||
|
", liveRoomActivityModels=" + liveRoomActivityModels +
|
||||||
|
", clarityType=" + clarityType +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
105
common/src/main/java/com/yunbao/common/bean/GiftModel.java
Normal file
105
common/src/main/java/com/yunbao/common/bean/GiftModel.java
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class GiftModel extends BaseModel{
|
||||||
|
@SerializedName("id")
|
||||||
|
private String id;
|
||||||
|
@SerializedName("sendtype")
|
||||||
|
private String sendtype;
|
||||||
|
@SerializedName("type")
|
||||||
|
private String type;
|
||||||
|
@SerializedName("mark")
|
||||||
|
private String mark;
|
||||||
|
@SerializedName("giftname")
|
||||||
|
private String giftname;
|
||||||
|
@SerializedName("needcoin")
|
||||||
|
private String needcoin;
|
||||||
|
@SerializedName("gifticon")
|
||||||
|
private String gifticon;
|
||||||
|
@SerializedName("swf")
|
||||||
|
private String swf;
|
||||||
|
@SerializedName("gift_uid")
|
||||||
|
private String giftUid;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSendtype() {
|
||||||
|
return sendtype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setSendtype(String sendtype) {
|
||||||
|
this.sendtype = sendtype;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMark() {
|
||||||
|
return mark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setMark(String mark) {
|
||||||
|
this.mark = mark;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftname() {
|
||||||
|
return giftname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setGiftname(String giftname) {
|
||||||
|
this.giftname = giftname;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNeedcoin() {
|
||||||
|
return needcoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setNeedcoin(String needcoin) {
|
||||||
|
this.needcoin = needcoin;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGifticon() {
|
||||||
|
return gifticon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setGifticon(String gifticon) {
|
||||||
|
this.gifticon = gifticon;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSwf() {
|
||||||
|
return swf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setSwf(String swf) {
|
||||||
|
this.swf = swf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftUid() {
|
||||||
|
return giftUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setGiftUid(String giftUid) {
|
||||||
|
this.giftUid = giftUid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
29
common/src/main/java/com/yunbao/common/bean/GuardModel.java
Normal file
29
common/src/main/java/com/yunbao/common/bean/GuardModel.java
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class GuardModel extends BaseModel {
|
||||||
|
|
||||||
|
@SerializedName("type")
|
||||||
|
private String type;
|
||||||
|
@SerializedName("endtime")
|
||||||
|
private String endtime;
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GuardModel setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndtime() {
|
||||||
|
return endtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GuardModel setEndtime(String endtime) {
|
||||||
|
this.endtime = endtime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class GuardUserModel extends BaseModel{
|
||||||
|
|
||||||
|
@SerializedName("guardUserAvatar")
|
||||||
|
private String guardUserAvatar;
|
||||||
|
@SerializedName("guardType")
|
||||||
|
private String guardType;
|
||||||
|
|
||||||
|
public static GuardUserModel objectFromData(String str) {
|
||||||
|
|
||||||
|
return new Gson().fromJson(str, GuardUserModel.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGuardUserAvatar() {
|
||||||
|
return guardUserAvatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGuardUserAvatar(String guardUserAvatar) {
|
||||||
|
this.guardUserAvatar = guardUserAvatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGuardType() {
|
||||||
|
return guardType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGuardType(String guardType) {
|
||||||
|
this.guardType = guardType;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
|
||||||
|
public class HttpCallbackModel extends BaseModel {
|
||||||
|
private int code;
|
||||||
|
private String msg;
|
||||||
|
|
||||||
|
public HttpCallbackModel() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public HttpCallbackModel(int code, String msg) {
|
||||||
|
this.code = code;
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(int code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMsg() {
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMsg(String msg) {
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.yunbao.common.bean;
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -64,6 +66,7 @@ public class IMLoginModel extends BaseModel {
|
|||||||
* noble_name : 贵族
|
* noble_name : 贵族
|
||||||
* sex : 1
|
* sex : 1
|
||||||
* slide : [{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"首充特惠大禮包","slide_id":91,"slide_name":"首充特惠大禮包","slide_pic":"https://qny.shayucm.com/20220531/90f6942fb928c3034baeb380b9c4003d.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/activity/firstTopUp/newUp.html"},{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"充值反饋活動","slide_id":88,"slide_name":"充值反饋活動","slide_pic":"https://qny.shayucm.com/20220511/faacb51d5a45f7ff24a6f0314df133fb.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/GuildTournament/202204/Tournament.html"}]
|
* slide : [{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"首充特惠大禮包","slide_id":91,"slide_name":"首充特惠大禮包","slide_pic":"https://qny.shayucm.com/20220531/90f6942fb928c3034baeb380b9c4003d.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/activity/firstTopUp/newUp.html"},{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"充值反饋活動","slide_id":88,"slide_name":"充值反饋活動","slide_pic":"https://qny.shayucm.com/20220511/faacb51d5a45f7ff24a6f0314df133fb.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/GuildTournament/202204/Tournament.html"}]
|
||||||
|
* slide : [{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"首充特惠大禮包","slide_id":91,"slide_name":"首充特惠大禮包","slide_pic":"https://qny.shayucm.com/20220531/90f6942fb928c3034baeb380b9c4003d.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/activity/firstTopUp/newUp.html"},{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"充值反饋活動","slide_id":88,"slide_name":"充值反饋活動","slide_pic":"https://qny.shayucm.com/20220511/faacb51d5a45f7ff24a6f0314df133fb.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/GuildTournament/202204/Tournament.html"}]
|
||||||
* users_type : A
|
* users_type : A
|
||||||
* votes : 0.00
|
* votes : 0.00
|
||||||
* votestotal : 0
|
* votestotal : 0
|
||||||
@@ -222,6 +225,126 @@ public class IMLoginModel extends BaseModel {
|
|||||||
//超皇字体颜色
|
//超皇字体颜色
|
||||||
@SerializedName("contentColor")
|
@SerializedName("contentColor")
|
||||||
private String contentColor = "";
|
private String contentColor = "";
|
||||||
|
//创建时间
|
||||||
|
@SerializedName("create_time")
|
||||||
|
private String createTime = "";
|
||||||
|
|
||||||
|
@SerializedName("is_guess")
|
||||||
|
private String isGuess = "";
|
||||||
|
|
||||||
|
@SerializedName("goodnum_expire_time")
|
||||||
|
private String goodnumExpireTime = "";
|
||||||
|
|
||||||
|
@SerializedName("version")
|
||||||
|
private String version = "";
|
||||||
|
|
||||||
|
@SerializedName("max_noble_end_time")
|
||||||
|
private String maxNobleEndTime = "";
|
||||||
|
|
||||||
|
@SerializedName("custom_color_id")
|
||||||
|
private String customColorId = "";
|
||||||
|
|
||||||
|
@SerializedName("is_chat")
|
||||||
|
private String isChat = "";
|
||||||
|
|
||||||
|
@SerializedName("is_rong")
|
||||||
|
private String isRong = "";
|
||||||
|
|
||||||
|
@SerializedName("contribution")
|
||||||
|
private String contribution = "";
|
||||||
|
|
||||||
|
@SerializedName("guard_type")
|
||||||
|
private String guardType = "";
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IMLoginModel setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsGuess() {
|
||||||
|
return isGuess;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IMLoginModel setIsGuess(String isGuess) {
|
||||||
|
this.isGuess = isGuess;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGoodnumExpireTime() {
|
||||||
|
return goodnumExpireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IMLoginModel setGoodnumExpireTime(String goodnumExpireTime) {
|
||||||
|
this.goodnumExpireTime = goodnumExpireTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVersion() {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IMLoginModel setVersion(String version) {
|
||||||
|
this.version = version;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaxNobleEndTime() {
|
||||||
|
return maxNobleEndTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IMLoginModel setMaxNobleEndTime(String maxNobleEndTime) {
|
||||||
|
this.maxNobleEndTime = maxNobleEndTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCustomColorId() {
|
||||||
|
return customColorId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IMLoginModel setCustomColorId(String customColorId) {
|
||||||
|
this.customColorId = customColorId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsChat() {
|
||||||
|
return isChat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IMLoginModel setIsChat(String isChat) {
|
||||||
|
this.isChat = isChat;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsRong() {
|
||||||
|
return isRong;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IMLoginModel setIsRong(String isRong) {
|
||||||
|
this.isRong = isRong;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContribution() {
|
||||||
|
return contribution;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IMLoginModel setContribution(String contribution) {
|
||||||
|
this.contribution = contribution;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGuardType() {
|
||||||
|
return guardType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IMLoginModel setGuardType(String guardType) {
|
||||||
|
this.guardType = guardType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getNobleEndTime() {
|
public String getNobleEndTime() {
|
||||||
return nobleEndTime;
|
return nobleEndTime;
|
||||||
@@ -679,6 +802,15 @@ public class IMLoginModel extends BaseModel {
|
|||||||
return usersType;
|
return usersType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* usersType ==C 是主播身份
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean anchorUserType() {
|
||||||
|
return TextUtils.equals("C", usersType);
|
||||||
|
}
|
||||||
|
|
||||||
public IMLoginModel setUsersType(String usersType) {
|
public IMLoginModel setUsersType(String usersType) {
|
||||||
this.usersType = usersType;
|
this.usersType = usersType;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -0,0 +1,98 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class LinkMicUserBean extends BaseModel {
|
||||||
|
@SerializedName("user_nicename")
|
||||||
|
private String uname;
|
||||||
|
@SerializedName("avatar")
|
||||||
|
private String avatar;
|
||||||
|
@SerializedName("dress_avatar")
|
||||||
|
private String dress_avatar;
|
||||||
|
private String uid = "";
|
||||||
|
private String action;
|
||||||
|
@SerializedName("id")
|
||||||
|
private String id;//连麦显示右侧头像时要用
|
||||||
|
@SerializedName("level")
|
||||||
|
private int level;
|
||||||
|
@SerializedName("sex")
|
||||||
|
private int sex;
|
||||||
|
|
||||||
|
public String getUname() {
|
||||||
|
return uname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUname(String uname) {
|
||||||
|
this.uname = uname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAvatar() {
|
||||||
|
return avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAvatar(String avatar) {
|
||||||
|
this.avatar = avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUid() {
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUid(String uid) {
|
||||||
|
this.uid = uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAction() {
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAction(String action) {
|
||||||
|
this.action = action;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDress_avatar() {
|
||||||
|
return dress_avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDress_avatar(String dress_avatar) {
|
||||||
|
this.dress_avatar = dress_avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel(int level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSex() {
|
||||||
|
return sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSex(int sex) {
|
||||||
|
this.sex = sex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "LinkMicUserBean{" +
|
||||||
|
"uname='" + uname + '\'' +
|
||||||
|
", avatar='" + avatar + '\'' +
|
||||||
|
", dress_avatar='" + dress_avatar + '\'' +
|
||||||
|
", uid='" + uid + '\'' +
|
||||||
|
", action='" + action + '\'' +
|
||||||
|
", id='" + id + '\'' +
|
||||||
|
", level=" + level +
|
||||||
|
", sex=" + sex +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class LinkMicUserBeanV2 extends BaseModel {
|
||||||
|
private String roomuserid;
|
||||||
|
private int status;
|
||||||
|
private List<LinkMicUserBean> userlist;
|
||||||
|
|
||||||
|
public String getRoomuserid() {
|
||||||
|
return roomuserid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoomuserid(String roomuserid) {
|
||||||
|
this.roomuserid = roomuserid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<LinkMicUserBean> getUserlist() {
|
||||||
|
return userlist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserlist(List<LinkMicUserBean> userlist) {
|
||||||
|
this.userlist = userlist;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class ListInfoMessageModel extends BaseModel {
|
||||||
|
@SerializedName("id")
|
||||||
|
private int id;
|
||||||
|
@SerializedName("title")
|
||||||
|
private String title;
|
||||||
|
@SerializedName("banner")
|
||||||
|
private String banner;
|
||||||
|
@SerializedName("content")
|
||||||
|
private String content;
|
||||||
|
@SerializedName("link")
|
||||||
|
private String link;
|
||||||
|
@SerializedName("addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBanner() {
|
||||||
|
return banner;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setBanner(String banner) {
|
||||||
|
this.banner = banner;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLink() {
|
||||||
|
return link;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setLink(String link) {
|
||||||
|
this.link = link;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ListInfoMessageModel setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会话列表展示时间
|
||||||
|
*/
|
||||||
|
public String getLastDate(String type) {
|
||||||
|
if (!TextUtils.isEmpty(addtime) && !TextUtils.equals(addtime, "0")) {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||||
|
Date currenTimeZone;
|
||||||
|
if (TextUtils.equals(type, "-1")) {
|
||||||
|
currenTimeZone = new Date(Long.parseLong(addtime));
|
||||||
|
} else {
|
||||||
|
currenTimeZone = new Date(Long.parseLong(addtime + "000"));
|
||||||
|
}
|
||||||
|
return sdf.format(currenTimeZone);
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
138
common/src/main/java/com/yunbao/common/bean/LiveAiRobotBean.java
Normal file
138
common/src/main/java/com/yunbao/common/bean/LiveAiRobotBean.java
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机器人bean
|
||||||
|
*/
|
||||||
|
public class LiveAiRobotBean extends BaseModel {
|
||||||
|
@SerializedName("ai_name")
|
||||||
|
private String name;
|
||||||
|
@SerializedName("ai_state")
|
||||||
|
private int status;//1=开 0=关
|
||||||
|
@SerializedName("ai_time")
|
||||||
|
private int time;
|
||||||
|
@SerializedName("ai_sayhi")
|
||||||
|
private int autoSeyHiNumber;// 自动打招呼已配置数量
|
||||||
|
@SerializedName("ai_gz")
|
||||||
|
private int autoRequestFollowNumber;//自动求关注已配置数量
|
||||||
|
|
||||||
|
public LiveAiRobotBean() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTime() {
|
||||||
|
return time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTime(int time) {
|
||||||
|
this.time = time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAutoSeyHiNumber() {
|
||||||
|
return autoSeyHiNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAutoSeyHiNumber(int autoSeyHiNumber) {
|
||||||
|
this.autoSeyHiNumber = autoSeyHiNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAutoRequestFollowNumber() {
|
||||||
|
return autoRequestFollowNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAutoRequestFollowNumber(int autoRequestFollowNumber) {
|
||||||
|
this.autoRequestFollowNumber = autoRequestFollowNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "LiveAiRobotBean{" +
|
||||||
|
"name='" + name + '\'' +
|
||||||
|
", status=" + status +
|
||||||
|
", time=" + time +
|
||||||
|
", autoSeyHiNumber=" + autoSeyHiNumber +
|
||||||
|
", autoRequestFollowNumber=" + autoRequestFollowNumber +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机器人消息
|
||||||
|
*/
|
||||||
|
public static class Message {
|
||||||
|
public static final int TYPE_SAY_HI=1;//自动打招呼
|
||||||
|
public static final int TYPE_FOLLOW=3;//自动求关注
|
||||||
|
@SerializedName("id")
|
||||||
|
private int id;
|
||||||
|
@SerializedName("uid")
|
||||||
|
private int uid;
|
||||||
|
@SerializedName("type")
|
||||||
|
private int type;
|
||||||
|
@SerializedName("content")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
public Message() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getUid() {
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUid(int uid) {
|
||||||
|
this.uid = uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Message{" +
|
||||||
|
"id=" + id +
|
||||||
|
", uid=" + uid +
|
||||||
|
", type=" + type +
|
||||||
|
", content='" + content + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,11 +5,10 @@ import android.os.Parcelable;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import com.yunbao.common.R;
|
|
||||||
import com.yunbao.common.utils.WordUtil;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2017/8/9.
|
* Created by cxf on 2017/8/9.
|
||||||
@@ -53,6 +52,8 @@ public class LiveBean implements Parcelable {
|
|||||||
private String recommendCardIconSizeTwo = "";
|
private String recommendCardIconSizeTwo = "";
|
||||||
private String recommendCardIconSizeThree = "";
|
private String recommendCardIconSizeThree = "";
|
||||||
|
|
||||||
|
private Map<String,String> params;//用于跳转Activity时扩展参数,例:从首页Banner跳转到直播间时需要根据携带参数判断是否弹出新人特惠对话框
|
||||||
|
|
||||||
public String getRecommendCardIconSizeTwo() {
|
public String getRecommendCardIconSizeTwo() {
|
||||||
return recommendCardIconSizeTwo;
|
return recommendCardIconSizeTwo;
|
||||||
}
|
}
|
||||||
@@ -83,6 +84,14 @@ public class LiveBean implements Parcelable {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String, String> getParams() {
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParams(Map<String, String> params) {
|
||||||
|
this.params = params;
|
||||||
|
}
|
||||||
|
|
||||||
public String getRecommendcardtype() {
|
public String getRecommendcardtype() {
|
||||||
return recommendCardtype;
|
return recommendCardtype;
|
||||||
}
|
}
|
||||||
@@ -378,27 +387,28 @@ public class LiveBean implements Parcelable {
|
|||||||
*/
|
*/
|
||||||
public String getLiangNameTip() {
|
public String getLiangNameTip() {
|
||||||
if (!TextUtils.isEmpty(this.goodNum) && !"0".equals(this.goodNum)) {
|
if (!TextUtils.isEmpty(this.goodNum) && !"0".equals(this.goodNum)) {
|
||||||
return WordUtil.getString(R.string.live_liang) + ":" + this.goodNum;
|
return this.goodNum;
|
||||||
}
|
}
|
||||||
return "ID:" + this.uid;
|
return this.uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveBean() {
|
public LiveBean() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private LiveBean(Parcel in) {
|
private LiveBean(Parcel in) {
|
||||||
this.uid = in.readString();
|
this.uid = in.readString();
|
||||||
this.avatar = in.readString();
|
this.avatar = in.readString();
|
||||||
this.avatarThumb = in.readString();
|
this.avatarThumb = in.readString();
|
||||||
this.userNiceName = in.readString();
|
this.userNiceName = in.readString();
|
||||||
this.sex = in.readInt();
|
|
||||||
this.title = in.readString();
|
this.title = in.readString();
|
||||||
this.city = in.readString();
|
this.city = in.readString();
|
||||||
this.stream = in.readString();
|
this.stream = in.readString();
|
||||||
this.pull = in.readString();
|
this.pull = in.readString();
|
||||||
this.thumb = in.readString();
|
this.thumb = in.readString();
|
||||||
this.nums = in.readString();
|
this.nums = in.readString();
|
||||||
|
this.sex = in.readInt();
|
||||||
this.distance = in.readString();
|
this.distance = in.readString();
|
||||||
this.levelAnchor = in.readInt();
|
this.levelAnchor = in.readInt();
|
||||||
this.type = in.readInt();
|
this.type = in.readInt();
|
||||||
@@ -406,6 +416,23 @@ public class LiveBean implements Parcelable {
|
|||||||
this.goodNum = in.readString();
|
this.goodNum = in.readString();
|
||||||
this.gameAction = in.readInt();
|
this.gameAction = in.readInt();
|
||||||
this.game = in.readString();
|
this.game = in.readString();
|
||||||
|
this.islive = in.readString();
|
||||||
|
this.isTop = in.readString();
|
||||||
|
this.pk_avatar_thumb = in.readString();
|
||||||
|
this.landscape = in.readInt();
|
||||||
|
this.hot_num = in.readString();
|
||||||
|
this.content_pic_size_one = in.readString();
|
||||||
|
this.content_pic_size_two = in.readString();
|
||||||
|
this.content_pic_size_three = in.readString();
|
||||||
|
this.is_week = in.readString();
|
||||||
|
this.img = in.readString();
|
||||||
|
this.url = in.readString();
|
||||||
|
this.drpk_status = in.readString();
|
||||||
|
this.is_rong = in.readInt();
|
||||||
|
this.isattention = in.readString();
|
||||||
|
this.recommendCardtype = in.readString();
|
||||||
|
this.recommendCardIconSizeTwo = in.readString();
|
||||||
|
this.recommendCardIconSizeThree = in.readString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -419,13 +446,13 @@ public class LiveBean implements Parcelable {
|
|||||||
dest.writeString(this.avatar);
|
dest.writeString(this.avatar);
|
||||||
dest.writeString(this.avatarThumb);
|
dest.writeString(this.avatarThumb);
|
||||||
dest.writeString(this.userNiceName);
|
dest.writeString(this.userNiceName);
|
||||||
dest.writeInt(this.sex);
|
|
||||||
dest.writeString(this.title);
|
dest.writeString(this.title);
|
||||||
dest.writeString(this.city);
|
dest.writeString(this.city);
|
||||||
dest.writeString(this.stream);
|
dest.writeString(this.stream);
|
||||||
dest.writeString(this.pull);
|
dest.writeString(this.pull);
|
||||||
dest.writeString(this.thumb);
|
dest.writeString(this.thumb);
|
||||||
dest.writeString(this.nums);
|
dest.writeString(this.nums);
|
||||||
|
dest.writeInt(this.sex);
|
||||||
dest.writeString(this.distance);
|
dest.writeString(this.distance);
|
||||||
dest.writeInt(this.levelAnchor);
|
dest.writeInt(this.levelAnchor);
|
||||||
dest.writeInt(this.type);
|
dest.writeInt(this.type);
|
||||||
@@ -433,6 +460,23 @@ public class LiveBean implements Parcelable {
|
|||||||
dest.writeString(this.goodNum);
|
dest.writeString(this.goodNum);
|
||||||
dest.writeInt(this.gameAction);
|
dest.writeInt(this.gameAction);
|
||||||
dest.writeString(this.game);
|
dest.writeString(this.game);
|
||||||
|
dest.writeString(this.islive);
|
||||||
|
dest.writeString(this.isTop);
|
||||||
|
dest.writeString(this.pk_avatar_thumb);
|
||||||
|
dest.writeInt(this.landscape);
|
||||||
|
dest.writeString(this.hot_num);
|
||||||
|
dest.writeString(this.content_pic_size_one);
|
||||||
|
dest.writeString(this.content_pic_size_two);
|
||||||
|
dest.writeString(this.content_pic_size_three);
|
||||||
|
dest.writeString(this.is_week);
|
||||||
|
dest.writeString(this.img);
|
||||||
|
dest.writeString(this.url);
|
||||||
|
dest.writeString(this.drpk_status);
|
||||||
|
dest.writeInt(this.is_rong);
|
||||||
|
dest.writeString(this.isattention);
|
||||||
|
dest.writeString(this.recommendCardtype);
|
||||||
|
dest.writeString(this.recommendCardIconSizeTwo);
|
||||||
|
dest.writeString(this.recommendCardIconSizeThree);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Creator<LiveBean> CREATOR = new Creator<LiveBean>() {
|
public static final Creator<LiveBean> CREATOR = new Creator<LiveBean>() {
|
||||||
@@ -449,6 +493,44 @@ public class LiveBean implements Parcelable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "uid: " + uid + " , userNiceName: " + userNiceName + " ,playUrl: " + pull;
|
return "LiveBean{" +
|
||||||
|
"uid='" + uid + '\'' +
|
||||||
|
", avatar='" + avatar + '\'' +
|
||||||
|
", avatarThumb='" + avatarThumb + '\'' +
|
||||||
|
", userNiceName='" + userNiceName + '\'' +
|
||||||
|
", title='" + title + '\'' +
|
||||||
|
", city='" + city + '\'' +
|
||||||
|
", stream='" + stream + '\'' +
|
||||||
|
", pull='" + pull + '\'' +
|
||||||
|
", thumb='" + thumb + '\'' +
|
||||||
|
", nums='" + nums + '\'' +
|
||||||
|
", sex=" + sex +
|
||||||
|
", distance='" + distance + '\'' +
|
||||||
|
", levelAnchor=" + levelAnchor +
|
||||||
|
", type=" + type +
|
||||||
|
", typeVal='" + typeVal + '\'' +
|
||||||
|
", goodNum='" + goodNum + '\'' +
|
||||||
|
", gameAction=" + gameAction +
|
||||||
|
", game='" + game + '\'' +
|
||||||
|
", islive='" + islive + '\'' +
|
||||||
|
", isTop='" + isTop + '\'' +
|
||||||
|
", pk_avatar_thumb='" + pk_avatar_thumb + '\'' +
|
||||||
|
", landscape=" + landscape +
|
||||||
|
", hot_num='" + hot_num + '\'' +
|
||||||
|
", content_pic_size_one='" + content_pic_size_one + '\'' +
|
||||||
|
", content_pic_size_two='" + content_pic_size_two + '\'' +
|
||||||
|
", content_pic_size_three='" + content_pic_size_three + '\'' +
|
||||||
|
", is_week='" + is_week + '\'' +
|
||||||
|
", img='" + img + '\'' +
|
||||||
|
", url='" + url + '\'' +
|
||||||
|
", drpk_status='" + drpk_status + '\'' +
|
||||||
|
", is_rong=" + is_rong +
|
||||||
|
", isattention='" + isattention + '\'' +
|
||||||
|
", recommendCardtype='" + recommendCardtype + '\'' +
|
||||||
|
", recommendCardIconSizeTwo='" + recommendCardIconSizeTwo + '\'' +
|
||||||
|
", recommendCardIconSizeThree='" + recommendCardIconSizeThree + '\'' +
|
||||||
|
", params=" + params +
|
||||||
|
", mWeekList=" + mWeekList +
|
||||||
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直播数据
|
||||||
|
*/
|
||||||
|
public class LiveDataInfoModel extends BaseModel{
|
||||||
|
@SerializedName("totalCoin")
|
||||||
|
private long totalCoin;//钻石数量
|
||||||
|
@SerializedName("totalGold")
|
||||||
|
private long totalGold;//金币数量
|
||||||
|
@SerializedName("acceptNum")
|
||||||
|
private long acceptNum;//送礼人数
|
||||||
|
@SerializedName("enterNum")
|
||||||
|
private long enterNum;//进场人数
|
||||||
|
@SerializedName("attentionNum")
|
||||||
|
private long attentionNum;//关注人数
|
||||||
|
@SerializedName("fanGroupNum")
|
||||||
|
private long fanGroupNum;//粉丝团人数
|
||||||
|
@SerializedName("attentionNumRate")
|
||||||
|
private double attentionNumRate;//关注转化率
|
||||||
|
@SerializedName("fanGroupNumRate")
|
||||||
|
private double fanGroupNumRate;//粉丝团转化率
|
||||||
|
|
||||||
|
public LiveDataInfoModel() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getTotalCoin() {
|
||||||
|
return totalCoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalCoin(long totalCoin) {
|
||||||
|
this.totalCoin = totalCoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getTotalGold() {
|
||||||
|
return totalGold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalGold(long totalGold) {
|
||||||
|
this.totalGold = totalGold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getAcceptNum() {
|
||||||
|
return acceptNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAcceptNum(long acceptNum) {
|
||||||
|
this.acceptNum = acceptNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getEnterNum() {
|
||||||
|
return enterNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnterNum(long enterNum) {
|
||||||
|
this.enterNum = enterNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getAttentionNum() {
|
||||||
|
return attentionNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttentionNum(long attentionNum) {
|
||||||
|
this.attentionNum = attentionNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getFanGroupNum() {
|
||||||
|
return fanGroupNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFanGroupNum(long fanGroupNum) {
|
||||||
|
this.fanGroupNum = fanGroupNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getAttentionNumRate() {
|
||||||
|
return attentionNumRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttentionNumRate(double attentionNumRate) {
|
||||||
|
this.attentionNumRate = attentionNumRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getFanGroupNumRate() {
|
||||||
|
return fanGroupNumRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFanGroupNumRate(double fanGroupNumRate) {
|
||||||
|
this.fanGroupNumRate = fanGroupNumRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "LiveDataInfoModel{" +
|
||||||
|
"totalCoin=" + totalCoin +
|
||||||
|
", totalGold=" + totalGold +
|
||||||
|
", acceptNum=" + acceptNum +
|
||||||
|
", enterNum=" + enterNum +
|
||||||
|
", attentionNum=" + attentionNum +
|
||||||
|
", fanGroupNum=" + fanGroupNum +
|
||||||
|
", attentionNumRate=" + attentionNumRate +
|
||||||
|
", fanGroupNumRate=" + fanGroupNumRate +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -62,7 +62,7 @@ public class LiveInfoModel extends BaseModel {
|
|||||||
@SerializedName("islive")
|
@SerializedName("islive")
|
||||||
private long islive;
|
private long islive;
|
||||||
@SerializedName("landscape")
|
@SerializedName("landscape")
|
||||||
private long landscape = 0;
|
private int landscape = 0;
|
||||||
@SerializedName("is_rong")
|
@SerializedName("is_rong")
|
||||||
private long isRong = 0;
|
private long isRong = 0;
|
||||||
@SerializedName("nums")
|
@SerializedName("nums")
|
||||||
@@ -208,11 +208,11 @@ public class LiveInfoModel extends BaseModel {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getLandscape() {
|
public int getLandscape() {
|
||||||
return landscape;
|
return landscape;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LiveInfoModel setLandscape(long landscape) {
|
public LiveInfoModel setLandscape(int landscape) {
|
||||||
this.landscape = landscape;
|
this.landscape = landscape;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动列表
|
||||||
|
*/
|
||||||
|
public class LiveRoomActivityModel extends BaseModel {
|
||||||
|
|
||||||
|
@SerializedName("name")
|
||||||
|
private String name;
|
||||||
|
@SerializedName("img")
|
||||||
|
private String img;
|
||||||
|
@SerializedName("link")
|
||||||
|
private String link;
|
||||||
|
@SerializedName("is_hidden")
|
||||||
|
private String isHidden;
|
||||||
|
@SerializedName("show_type")
|
||||||
|
private String showType;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveRoomActivityModel setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveRoomActivityModel setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLink() {
|
||||||
|
return link;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveRoomActivityModel setLink(String link) {
|
||||||
|
this.link = link;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsHidden() {
|
||||||
|
return isHidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveRoomActivityModel setIsHidden(String isHidden) {
|
||||||
|
this.isHidden = isHidden;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShowType() {
|
||||||
|
return showType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveRoomActivityModel setShowType(String showType) {
|
||||||
|
this.showType = showType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.yunbao.live.bean;
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.common.R;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class LiveStetUpStatusModel extends BaseModel {
|
||||||
|
|
||||||
|
@SerializedName("wishList")
|
||||||
|
private String wishList;
|
||||||
|
@SerializedName("ai_state")
|
||||||
|
private String aiState;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wishList 1设置 0 未设置
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean getWishListState() {
|
||||||
|
return TextUtils.equals(wishList, "1");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* aiState 1打开机器人 0 未设置
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean getAiStateState() {
|
||||||
|
return TextUtils.equals(aiState, "1");
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWishList() {
|
||||||
|
return wishList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveStetUpStatusModel setWishList(String wishList) {
|
||||||
|
this.wishList = wishList;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAiState() {
|
||||||
|
return aiState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveStetUpStatusModel setAiState(String aiState) {
|
||||||
|
this.aiState = aiState;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
259
common/src/main/java/com/yunbao/common/bean/LiveTaskModel.java
Normal file
259
common/src/main/java/com/yunbao/common/bean/LiveTaskModel.java
Normal file
@@ -0,0 +1,259 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.utils.StringUtil;
|
||||||
|
import com.yunbao.common.utils.WordUtil;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直播任务
|
||||||
|
*/
|
||||||
|
public class LiveTaskModel extends BaseModel {
|
||||||
|
public static final int TASK_TYPE_TIP = 0;
|
||||||
|
public static final int TASK_TYPE_ITEM = 1;
|
||||||
|
|
||||||
|
int type;
|
||||||
|
@SerializedName("new")
|
||||||
|
NewUser user;
|
||||||
|
@SerializedName("list")
|
||||||
|
List<List<Task>> list;
|
||||||
|
|
||||||
|
public LiveTaskModel() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewUser getUser() {
|
||||||
|
return user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUser(NewUser user) {
|
||||||
|
this.user = user;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<List<Task>> getList() {
|
||||||
|
if (user != null && user.isNew()) {
|
||||||
|
for (List<Task> tasks : list) {
|
||||||
|
for (Task task : tasks) {
|
||||||
|
task.isNewUser = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setList(List<List<Task>> list) {
|
||||||
|
this.list = list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "LiveTaskModel{" +
|
||||||
|
"type=" + type +
|
||||||
|
", user=" + user +
|
||||||
|
", list=" + list +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class NewUser {
|
||||||
|
@SerializedName("isNew")
|
||||||
|
private int isNew;
|
||||||
|
@SerializedName("endTime")
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
public NewUser() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNew() {
|
||||||
|
return isNew == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNew(int aNew) {
|
||||||
|
isNew = aNew;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndTime() {
|
||||||
|
if (!StringUtil.isEmpty(endTime)) {
|
||||||
|
endTime = WordUtil.getString(R.string.live_task_new_user_timer) + new SimpleDateFormat("yyyy/MM/dd HH:mm", Locale.getDefault()).format(new Date(Long.parseLong(endTime) * 1000));
|
||||||
|
}
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndTime(String endTime) {
|
||||||
|
this.endTime = endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "NewUser{" +
|
||||||
|
"isNew=" + isNew +
|
||||||
|
", endTime='" + endTime + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Task implements Serializable {
|
||||||
|
@SerializedName("id")
|
||||||
|
private int id;
|
||||||
|
@SerializedName("type")
|
||||||
|
private int type;
|
||||||
|
@SerializedName("task_type")
|
||||||
|
private int taskType;
|
||||||
|
@SerializedName("task_name")
|
||||||
|
private String taskName;
|
||||||
|
@SerializedName("task_num")
|
||||||
|
private int taskNum;
|
||||||
|
@SerializedName("hot")
|
||||||
|
private long hot;
|
||||||
|
@SerializedName("exp")
|
||||||
|
private long exp;
|
||||||
|
@SerializedName("new_hot")
|
||||||
|
private long newUserHot;
|
||||||
|
@SerializedName("new_exp")
|
||||||
|
private long newUserExp;
|
||||||
|
@SerializedName("sort")
|
||||||
|
private int sort;
|
||||||
|
@SerializedName("status")
|
||||||
|
private int status;
|
||||||
|
|
||||||
|
@SerializedName("now_num")
|
||||||
|
private int nowValue;
|
||||||
|
|
||||||
|
private boolean isNewUser = false;
|
||||||
|
|
||||||
|
public Task() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTaskType() {
|
||||||
|
return taskType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskType(int taskType) {
|
||||||
|
this.taskType = taskType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskName() {
|
||||||
|
return taskName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskName(String taskName) {
|
||||||
|
this.taskName = taskName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTaskNum() {
|
||||||
|
return taskNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskNum(int taskNum) {
|
||||||
|
this.taskNum = taskNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getHot() {
|
||||||
|
if (isNewUser) {
|
||||||
|
hot = newUserHot;
|
||||||
|
}
|
||||||
|
return hot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHot(long hot) {
|
||||||
|
this.hot = hot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getExp() {
|
||||||
|
if (isNewUser) {
|
||||||
|
exp = newUserExp;
|
||||||
|
}
|
||||||
|
return exp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExp(long exp) {
|
||||||
|
this.exp = exp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getNewUserHot() {
|
||||||
|
return newUserHot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewUserHot(long newUserHot) {
|
||||||
|
this.newUserHot = newUserHot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getNewUserExp() {
|
||||||
|
return newUserExp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNewUserExp(long newUserExp) {
|
||||||
|
this.newUserExp = newUserExp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSort() {
|
||||||
|
return sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSort(int sort) {
|
||||||
|
this.sort = sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getStatus() {
|
||||||
|
return status == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNowValue() {
|
||||||
|
return nowValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNowValue(int nowValue) {
|
||||||
|
this.nowValue = nowValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Task{" +
|
||||||
|
"id=" + id +
|
||||||
|
", type=" + type +
|
||||||
|
", taskType=" + taskType +
|
||||||
|
", taskName='" + taskName + '\'' +
|
||||||
|
", taskNum=" + taskNum +
|
||||||
|
", hot=" + hot +
|
||||||
|
", exp=" + exp +
|
||||||
|
", newUserHot=" + newUserHot +
|
||||||
|
", newUserExp=" + newUserExp +
|
||||||
|
", sort=" + sort +
|
||||||
|
", status=" + status +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import android.os.Parcel;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import com.yunbao.common.bean.UserBean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by cxf on 2018/10/27.
|
||||||
|
* 直播间用户列表实体类
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class LiveUserGiftBean extends UserBean {
|
||||||
|
|
||||||
|
private String contribution;
|
||||||
|
private int guardType;
|
||||||
|
private int nub;
|
||||||
|
|
||||||
|
public LiveUserGiftBean() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNub() {
|
||||||
|
return nub;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNub(int nub) {
|
||||||
|
this.nub = nub;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContribution() {
|
||||||
|
return contribution;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContribution(String contribution) {
|
||||||
|
this.contribution = contribution;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否送过礼物
|
||||||
|
*/
|
||||||
|
public boolean hasContribution() {
|
||||||
|
return !TextUtils.isEmpty(this.contribution) && !"0".equals(this.contribution);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JSONField(name = "guard_type")
|
||||||
|
public int getGuardType() {
|
||||||
|
return guardType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JSONField(name = "guard_type")
|
||||||
|
public void setGuardType(int guardType) {
|
||||||
|
this.guardType = guardType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveUserGiftBean(Parcel in) {
|
||||||
|
super(in);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToParcel(Parcel dest, int flags) {
|
||||||
|
super.writeToParcel(dest, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "LiveUserGiftBean{" +
|
||||||
|
"contribution='" + contribution + '\'' +
|
||||||
|
", guardType=" + guardType +
|
||||||
|
", nub=" + nub +
|
||||||
|
", id='" + id + '\'' +
|
||||||
|
", userNiceName='" + userNiceName + '\'' +
|
||||||
|
", avatar='" + avatar + '\'' +
|
||||||
|
", avatarThumb='" + avatarThumb + '\'' +
|
||||||
|
", sex=" + sex +
|
||||||
|
", signature='" + signature + '\'' +
|
||||||
|
", coin='" + coin + '\'' +
|
||||||
|
", gold='" + gold + '\'' +
|
||||||
|
", votes='" + votes + '\'' +
|
||||||
|
", consumption='" + consumption + '\'' +
|
||||||
|
", votestotal='" + votestotal + '\'' +
|
||||||
|
", province='" + province + '\'' +
|
||||||
|
", city='" + city + '\'' +
|
||||||
|
", location='" + location + '\'' +
|
||||||
|
", birthday='" + birthday + '\'' +
|
||||||
|
", level=" + level +
|
||||||
|
", levelAnchor=" + levelAnchor +
|
||||||
|
", lives=" + lives +
|
||||||
|
", follows=" + follows +
|
||||||
|
", fans=" + fans +
|
||||||
|
", vip=" + vip +
|
||||||
|
", liang=" + liang +
|
||||||
|
", car=" + car +
|
||||||
|
", medal_level=" + medal_level +
|
||||||
|
", medal_name='" + medal_name + '\'' +
|
||||||
|
", Dress=" + Dress +
|
||||||
|
", noble_id='" + noble_id + '\'' +
|
||||||
|
", yuanbao='" + yuanbao + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
23
common/src/main/java/com/yunbao/common/bean/LminfoModel.java
Normal file
23
common/src/main/java/com/yunbao/common/bean/LminfoModel.java
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class LminfoModel extends BaseModel{
|
||||||
|
|
||||||
|
@SerializedName("status")
|
||||||
|
private int status;
|
||||||
|
|
||||||
|
public static LminfoModel objectFromData(String str) {
|
||||||
|
|
||||||
|
return new Gson().fromJson(str, LminfoModel.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
package com.yunbao.live.bean;
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
|
||||||
public class MicUserBean {
|
public class MicUserBean extends BaseModel{
|
||||||
protected String id;
|
protected String id;
|
||||||
protected String userNiceName;
|
protected String userNiceName;
|
||||||
protected String avatar;
|
protected String avatar;
|
||||||
protected int level;
|
protected int level;
|
||||||
protected int sex;
|
protected int sex;
|
||||||
protected String dress_avatar;
|
protected String dress_avatar;
|
||||||
|
protected int type;
|
||||||
|
|
||||||
@JSONField(name = "dress_avatar")
|
@JSONField(name = "dress_avatar")
|
||||||
public String getDress_avatar() {
|
public String getDress_avatar() {
|
||||||
@@ -65,4 +66,12 @@ public class MicUserBean {
|
|||||||
public void setAvatar(String avatar) {
|
public void setAvatar(String avatar) {
|
||||||
this.avatar = avatar;
|
this.avatar = avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,17 @@ public class MsgModel extends BaseModel {
|
|||||||
private String taskName1;
|
private String taskName1;
|
||||||
@SerializedName("taskName2")
|
@SerializedName("taskName2")
|
||||||
private String taskName2;
|
private String taskName2;
|
||||||
|
@SerializedName("activityUrl")
|
||||||
|
private String activityUrl;
|
||||||
|
|
||||||
|
public String getActivityUrl() {
|
||||||
|
return activityUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MsgModel setActivityUrl(String activityUrl) {
|
||||||
|
this.activityUrl = activityUrl;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 星级挑战成功IM消息
|
* 星级挑战成功IM消息
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.yunbao.video.bean;
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新用户等级牌
|
||||||
|
*/
|
||||||
|
public class NewLevelModel extends BaseModel {
|
||||||
|
|
||||||
|
@SerializedName("id")
|
||||||
|
private String id;
|
||||||
|
@SerializedName("levelmin")
|
||||||
|
private String levemin;
|
||||||
|
@SerializedName("levelmax")
|
||||||
|
private String levemax;
|
||||||
|
@SerializedName("thumb")
|
||||||
|
private String thumb;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewLevelModel setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLevemin() {
|
||||||
|
return levemin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLeveMin() {
|
||||||
|
if (TextUtils.isEmpty(levemin)) {
|
||||||
|
levemin = "0";
|
||||||
|
}
|
||||||
|
return Integer.parseInt(levemin);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLeveMax() {
|
||||||
|
if (TextUtils.isEmpty(levemax)) {
|
||||||
|
levemax = "0";
|
||||||
|
}
|
||||||
|
return Integer.parseInt(levemax);
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewLevelModel setLevemin(String levemin) {
|
||||||
|
this.levemin = levemin;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLevemax() {
|
||||||
|
return levemax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewLevelModel setLevemax(String levemax) {
|
||||||
|
this.levemax = levemax;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getThumb() {
|
||||||
|
return thumb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewLevelModel setThumb(String thumb) {
|
||||||
|
this.thumb = thumb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class NewPeopleTaskModel extends BaseModel {
|
||||||
|
|
||||||
|
@SerializedName("task")
|
||||||
|
private TaskModel task = new TaskModel();
|
||||||
|
@SerializedName("gift")
|
||||||
|
private GiftModel gift = new GiftModel();
|
||||||
|
@SerializedName("reward_all")
|
||||||
|
private RewardAllModel rewardAll = new RewardAllModel();
|
||||||
|
@SerializedName("reward_one")
|
||||||
|
private RewardAllModel rewardOne = new RewardAllModel();
|
||||||
|
|
||||||
|
public TaskModel getTask() {
|
||||||
|
return task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewPeopleTaskModel setTask(TaskModel task) {
|
||||||
|
this.task = task;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel getGift() {
|
||||||
|
return gift;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewPeopleTaskModel setGift(GiftModel gift) {
|
||||||
|
this.gift = gift;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RewardAllModel getRewardAll() {
|
||||||
|
return rewardAll;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewPeopleTaskModel setRewardAll(RewardAllModel rewardAll) {
|
||||||
|
this.rewardAll = rewardAll;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RewardAllModel getRewardOne() {
|
||||||
|
return rewardOne;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewPeopleTaskModel setRewardOne(RewardAllModel rewardOne) {
|
||||||
|
this.rewardOne = rewardOne;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class PKTopThreeModel extends BaseModel {
|
||||||
|
@SerializedName("uid")
|
||||||
|
private String uid;
|
||||||
|
@SerializedName("img")
|
||||||
|
private String img;
|
||||||
|
@SerializedName("liveuid")
|
||||||
|
private String liveuid;
|
||||||
|
|
||||||
|
public String getUid() {
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PKTopThreeModel setUid(String uid) {
|
||||||
|
this.uid = uid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PKTopThreeModel setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLiveuid() {
|
||||||
|
return liveuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PKTopThreeModel setLiveuid(String liveuid) {
|
||||||
|
this.liveuid = liveuid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
110
common/src/main/java/com/yunbao/common/bean/PkRankBean.java
Normal file
110
common/src/main/java/com/yunbao/common/bean/PkRankBean.java
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.yunbao.common.utils.StringUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直播间PK排位赛
|
||||||
|
*/
|
||||||
|
public class PkRankBean extends BaseModel {
|
||||||
|
@SerializedName("anchor_id")
|
||||||
|
public int id;
|
||||||
|
@SerializedName("rank_name")
|
||||||
|
public String name;
|
||||||
|
@SerializedName("rank_img")
|
||||||
|
public String img;
|
||||||
|
@SerializedName("win_continuity1")
|
||||||
|
public String redVal;
|
||||||
|
@SerializedName("win_continuity2")
|
||||||
|
public String blueVal;
|
||||||
|
@SerializedName("pktt_img")
|
||||||
|
public String pkTopImgUrl;
|
||||||
|
@SerializedName("link")
|
||||||
|
public String clickUrl;
|
||||||
|
@SerializedName("vs_img")
|
||||||
|
public String vsImgUrl;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRedVal() {
|
||||||
|
if (StringUtil.isEmpty(redVal)) {
|
||||||
|
redVal = "0";
|
||||||
|
}
|
||||||
|
return redVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRedVal(String redVal) {
|
||||||
|
this.redVal = redVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBlueVal() {
|
||||||
|
if (StringUtil.isEmpty(blueVal)) {
|
||||||
|
blueVal = "0";
|
||||||
|
}
|
||||||
|
return blueVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBlueVal(String blueVal) {
|
||||||
|
this.blueVal = blueVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkTopImgUrl() {
|
||||||
|
return pkTopImgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPkTopImgUrl(String pkTopImgUrl) {
|
||||||
|
this.pkTopImgUrl = pkTopImgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClickUrl() {
|
||||||
|
return clickUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClickUrl(String clickUrl) {
|
||||||
|
this.clickUrl = clickUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVsImgUrl() {
|
||||||
|
return vsImgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVsImgUrl(String vsImgUrl) {
|
||||||
|
this.vsImgUrl = vsImgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "PkRankBean{" +
|
||||||
|
"id=" + id +
|
||||||
|
", name='" + name + '\'' +
|
||||||
|
", img='" + img + '\'' +
|
||||||
|
", redVal='" + redVal + '\'' +
|
||||||
|
", blueVal='" + blueVal + '\'' +
|
||||||
|
", pkTopImgUrl='" + pkTopImgUrl + '\'' +
|
||||||
|
", clickUrl='" + clickUrl + '\'' +
|
||||||
|
", vsImgUrl='" + vsImgUrl + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class PkTopUsersModel extends BaseModel {
|
||||||
|
@SerializedName("red_one")
|
||||||
|
private PKTopThreeModel redOne;
|
||||||
|
@SerializedName("red_two")
|
||||||
|
private PKTopThreeModel redTwo;
|
||||||
|
@SerializedName("red_three")
|
||||||
|
private PKTopThreeModel redThree;
|
||||||
|
@SerializedName("blue_one")
|
||||||
|
private PKTopThreeModel blueOne;
|
||||||
|
@SerializedName("blue_two")
|
||||||
|
private PKTopThreeModel blueTwo;
|
||||||
|
@SerializedName("blue_three")
|
||||||
|
private PKTopThreeModel blueThree;
|
||||||
|
}
|
||||||
172
common/src/main/java/com/yunbao/common/bean/PkinfoModel.java
Normal file
172
common/src/main/java/com/yunbao/common/bean/PkinfoModel.java
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.JsonArray;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class PkinfoModel extends BaseModel {
|
||||||
|
|
||||||
|
@SerializedName("pkuid")
|
||||||
|
private String pkuid;
|
||||||
|
@SerializedName("pkuname")
|
||||||
|
private String pkuname;
|
||||||
|
@SerializedName("pkuimg")
|
||||||
|
private String pkuimg;
|
||||||
|
@SerializedName("pkpull")
|
||||||
|
private String pkpull;
|
||||||
|
@SerializedName("ifpk")
|
||||||
|
private String ifpk;
|
||||||
|
@SerializedName("pk_time")
|
||||||
|
private String pkTime;
|
||||||
|
@SerializedName("end_pk_time")
|
||||||
|
private String endPkTime;
|
||||||
|
@SerializedName("pk_gift_liveuid")
|
||||||
|
private String pkGiftLiveuid;
|
||||||
|
@SerializedName("pk_gift_pkuid")
|
||||||
|
private String pkGiftPkuid;
|
||||||
|
@SerializedName("anyway")
|
||||||
|
private String anyway;
|
||||||
|
@SerializedName("drpk_status")
|
||||||
|
private String drpkStatus;
|
||||||
|
@SerializedName("drpk_roomid")
|
||||||
|
private String drpkRoomid;
|
||||||
|
@SerializedName("drpk_time")
|
||||||
|
private String drpkTime;
|
||||||
|
@SerializedName("pk_top_users")
|
||||||
|
private PkTopUsersModel pkTopUsers;
|
||||||
|
@SerializedName("userlist")
|
||||||
|
private JsonArray userlist;
|
||||||
|
|
||||||
|
public JsonArray getUserlist() {
|
||||||
|
return userlist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserlist(JsonArray userlist) {
|
||||||
|
this.userlist = userlist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkuid() {
|
||||||
|
return pkuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel setPkuid(String pkuid) {
|
||||||
|
this.pkuid = pkuid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkuname() {
|
||||||
|
return pkuname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel setPkuname(String pkuname) {
|
||||||
|
this.pkuname = pkuname;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkuimg() {
|
||||||
|
return pkuimg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel setPkuimg(String pkuimg) {
|
||||||
|
this.pkuimg = pkuimg;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkpull() {
|
||||||
|
return pkpull;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel setPkpull(String pkpull) {
|
||||||
|
this.pkpull = pkpull;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIfpk() {
|
||||||
|
return ifpk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel setIfpk(String ifpk) {
|
||||||
|
this.ifpk = ifpk;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkTime() {
|
||||||
|
return pkTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel setPkTime(String pkTime) {
|
||||||
|
this.pkTime = pkTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndPkTime() {
|
||||||
|
return endPkTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel setEndPkTime(String endPkTime) {
|
||||||
|
this.endPkTime = endPkTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkGiftLiveuid() {
|
||||||
|
return pkGiftLiveuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel setPkGiftLiveuid(String pkGiftLiveuid) {
|
||||||
|
this.pkGiftLiveuid = pkGiftLiveuid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkGiftPkuid() {
|
||||||
|
return pkGiftPkuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel setPkGiftPkuid(String pkGiftPkuid) {
|
||||||
|
this.pkGiftPkuid = pkGiftPkuid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAnyway() {
|
||||||
|
return anyway;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel setAnyway(String anyway) {
|
||||||
|
this.anyway = anyway;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDrpkStatus() {
|
||||||
|
return drpkStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel setDrpkStatus(String drpkStatus) {
|
||||||
|
this.drpkStatus = drpkStatus;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDrpkRoomid() {
|
||||||
|
return drpkRoomid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel setDrpkRoomid(String drpkRoomid) {
|
||||||
|
this.drpkRoomid = drpkRoomid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDrpkTime() {
|
||||||
|
return drpkTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel setDrpkTime(String drpkTime) {
|
||||||
|
this.drpkTime = drpkTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkTopUsersModel getPkTopUsers() {
|
||||||
|
return pkTopUsers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PkinfoModel setPkTopUsers(PkTopUsersModel pkTopUsers) {
|
||||||
|
this.pkTopUsers = pkTopUsers;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class PrankGiftBean extends BaseModel{
|
||||||
|
@SerializedName("prank_content")
|
||||||
|
private String title;
|
||||||
|
@SerializedName("gift_name")
|
||||||
|
private String name;
|
||||||
|
@SerializedName("gift_icon")
|
||||||
|
private String icon;
|
||||||
|
@SerializedName("gift_num")
|
||||||
|
private int num;
|
||||||
|
@SerializedName("gift_id")
|
||||||
|
private String giftId;
|
||||||
|
|
||||||
|
public PrankGiftBean() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getNum() {
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNum(int num) {
|
||||||
|
this.num = num;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIcon() {
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIcon(String icon) {
|
||||||
|
this.icon = icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftId() {
|
||||||
|
return giftId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGiftId(String giftId) {
|
||||||
|
this.giftId = giftId;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
import com.yunbao.common.utils.StringUtil;
|
||||||
|
|
||||||
|
public class PrankHttpTurntableBean extends BaseModel {
|
||||||
|
@SerializedName("id")
|
||||||
|
private int id;
|
||||||
|
@SerializedName("anchor_id")
|
||||||
|
private String anchor_id;
|
||||||
|
@SerializedName("coin")
|
||||||
|
private long coin = 1000;
|
||||||
|
@SerializedName("hope_coin")
|
||||||
|
private long hopeCoin = 1000;
|
||||||
|
@SerializedName("turntable_one")
|
||||||
|
private String turntable1;
|
||||||
|
@SerializedName("turntable_two")
|
||||||
|
private String turntable2;
|
||||||
|
@SerializedName("turntable_three")
|
||||||
|
private String turntable3;
|
||||||
|
@SerializedName("turntable_four")
|
||||||
|
private String turntable4;
|
||||||
|
@SerializedName("turntable_five")
|
||||||
|
private String turntable5;
|
||||||
|
@SerializedName("turntable_six")
|
||||||
|
private String turntable6;
|
||||||
|
@SerializedName("status")
|
||||||
|
private int status;
|
||||||
|
|
||||||
|
public PrankHttpTurntableBean() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAnchor_id() {
|
||||||
|
return anchor_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnchor_id(String anchor_id) {
|
||||||
|
this.anchor_id = anchor_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getCoin() {
|
||||||
|
return coin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCoin(long coin) {
|
||||||
|
this.coin = coin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getHopeCoin() {
|
||||||
|
return hopeCoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHopeCoin(long hopeCoin) {
|
||||||
|
this.hopeCoin = hopeCoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTurntable1() {
|
||||||
|
return turntable1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTurntable1(String turntable1) {
|
||||||
|
this.turntable1 = turntable1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTurntable2() {
|
||||||
|
return turntable2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTurntable2(String turntable2) {
|
||||||
|
this.turntable2 = turntable2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTurntable3() {
|
||||||
|
return turntable3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTurntable3(String turntable3) {
|
||||||
|
this.turntable3 = turntable3;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTurntable4() {
|
||||||
|
return turntable4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTurntable4(String turntable4) {
|
||||||
|
this.turntable4 = turntable4;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTurntable5() {
|
||||||
|
return turntable5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTurntable5(String turntable5) {
|
||||||
|
this.turntable5 = turntable5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTurntable6() {
|
||||||
|
return turntable6;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTurntable6(String turntable6) {
|
||||||
|
this.turntable6 = turntable6;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
|
||||||
|
public class PrankTurntableBean extends BaseModel {
|
||||||
|
private int id;
|
||||||
|
private String context;
|
||||||
|
|
||||||
|
public PrankTurntableBean() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContext() {
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContext(String context) {
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 随机PK UserBean
|
||||||
|
*/
|
||||||
|
public class RandomPkUserBean extends UserBean {
|
||||||
|
@SerializedName("is_pk")
|
||||||
|
private int pk;
|
||||||
|
@SerializedName("isattention")
|
||||||
|
private String attention;
|
||||||
|
@SerializedName("user_nicename")
|
||||||
|
private String userNiceName;
|
||||||
|
|
||||||
|
public RandomPkUserBean() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPk() {
|
||||||
|
return pk==1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAttention() {
|
||||||
|
return attention.equals("1");
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAttention() {
|
||||||
|
return attention;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAttention(String attention) {
|
||||||
|
this.attention = attention;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPk() {
|
||||||
|
return pk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPk(int pk) {
|
||||||
|
this.pk = pk;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUserNiceName() {
|
||||||
|
return userNiceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setUserNiceName(String userNiceName) {
|
||||||
|
this.userNiceName = userNiceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "RandomPkUserBean{" +
|
||||||
|
"pk=" + pk +
|
||||||
|
", attention='" + attention + '\'' +
|
||||||
|
", userNiceName='" + userNiceName + '\'' +
|
||||||
|
", id='" + id + '\'' +
|
||||||
|
", userNiceName='" + userNiceName + '\'' +
|
||||||
|
", avatar='" + avatar + '\'' +
|
||||||
|
", avatarThumb='" + avatarThumb + '\'' +
|
||||||
|
", sex=" + sex +
|
||||||
|
", signature='" + signature + '\'' +
|
||||||
|
", coin='" + coin + '\'' +
|
||||||
|
", gold='" + gold + '\'' +
|
||||||
|
", votes='" + votes + '\'' +
|
||||||
|
", consumption='" + consumption + '\'' +
|
||||||
|
", votestotal='" + votestotal + '\'' +
|
||||||
|
", province='" + province + '\'' +
|
||||||
|
", city='" + city + '\'' +
|
||||||
|
", location='" + location + '\'' +
|
||||||
|
", birthday='" + birthday + '\'' +
|
||||||
|
", level=" + level +
|
||||||
|
", levelAnchor=" + levelAnchor +
|
||||||
|
", lives=" + lives +
|
||||||
|
", follows=" + follows +
|
||||||
|
", fans=" + fans +
|
||||||
|
", vip=" + vip +
|
||||||
|
", liang=" + liang +
|
||||||
|
", car=" + car +
|
||||||
|
", medal_level=" + medal_level +
|
||||||
|
", medal_name='" + medal_name + '\'' +
|
||||||
|
", Dress=" + Dress +
|
||||||
|
", noble_id='" + noble_id + '\'' +
|
||||||
|
", yuanbao='" + yuanbao + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class RankHourModel extends BaseModel {
|
||||||
|
@SerializedName("liveuid")
|
||||||
|
private String liveuid;
|
||||||
|
@SerializedName("hourchart_h5_url")
|
||||||
|
private String hourchartH5Url;
|
||||||
|
@SerializedName("rank")
|
||||||
|
private String rank;
|
||||||
|
@SerializedName("starlightVal")
|
||||||
|
private String starlightVal;
|
||||||
|
@SerializedName("isshow")
|
||||||
|
private String isshow;
|
||||||
|
|
||||||
|
public String getLiveuid() {
|
||||||
|
return liveuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RankHourModel setLiveuid(String liveuid) {
|
||||||
|
this.liveuid = liveuid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHourchartH5Url() {
|
||||||
|
return hourchartH5Url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RankHourModel setHourchartH5Url(String hourchartH5Url) {
|
||||||
|
this.hourchartH5Url = hourchartH5Url;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRank() {
|
||||||
|
return rank;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RankHourModel setRank(String rank) {
|
||||||
|
this.rank = rank;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStarlightVal() {
|
||||||
|
return starlightVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RankHourModel setStarlightVal(String starlightVal) {
|
||||||
|
this.starlightVal = starlightVal;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsshow() {
|
||||||
|
return isshow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RankHourModel setIsshow(String isshow) {
|
||||||
|
this.isshow = isshow;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
128
common/src/main/java/com/yunbao/common/bean/RankPkInfoBean.java
Normal file
128
common/src/main/java/com/yunbao/common/bean/RankPkInfoBean.java
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
public class RankPkInfoBean extends BaseModel {
|
||||||
|
private int id;
|
||||||
|
@SerializedName("start_time")
|
||||||
|
private String startTime;
|
||||||
|
@SerializedName("end_time")
|
||||||
|
private String endTime;
|
||||||
|
@SerializedName("pk_start_hour1")
|
||||||
|
private String pkStartHour1;
|
||||||
|
@SerializedName("pk_end_hour1")
|
||||||
|
private String pkEndHour1;
|
||||||
|
@SerializedName("pk_start_hour2")
|
||||||
|
private String pkStartHour2;
|
||||||
|
@SerializedName("pk_end_hour2")
|
||||||
|
private String pkEndHour2;
|
||||||
|
|
||||||
|
public RankPkInfoBean() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStartTime() {
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartTime(String startTime) {
|
||||||
|
this.startTime = startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndTime() {
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndTime(String endTime) {
|
||||||
|
this.endTime = endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkStartHour1() {
|
||||||
|
return pkStartHour1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPkStartHour1(String pkStartHour1) {
|
||||||
|
this.pkStartHour1 = pkStartHour1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkEndHour1() {
|
||||||
|
return pkEndHour1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPkEndHour1(String pkEndHour1) {
|
||||||
|
this.pkEndHour1 = pkEndHour1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkStartHour2() {
|
||||||
|
return pkStartHour2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPkStartHour2(String pkStartHour2) {
|
||||||
|
this.pkStartHour2 = pkStartHour2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPkEndHour2() {
|
||||||
|
return pkEndHour2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPkEndHour2(String pkEndHour2) {
|
||||||
|
this.pkEndHour2 = pkEndHour2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否在排位赛时间范围内
|
||||||
|
*/
|
||||||
|
public boolean isRankPKTime() {
|
||||||
|
try {
|
||||||
|
Date now =new Date();
|
||||||
|
Date startDate = simpleDateToDate(startTime, "yyyy-MM-dd HH:mm:ss");
|
||||||
|
Date endDate = simpleDateToDate(endTime, "yyyy-MM-dd HH:mm:ss");
|
||||||
|
if (startDate == null || endDate == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Calendar calendarStart = Calendar.getInstance(Locale.CHINA);
|
||||||
|
Calendar calendarEnd = Calendar.getInstance(Locale.CHINA);
|
||||||
|
Calendar calendarNow = Calendar.getInstance(Locale.CHINA);
|
||||||
|
calendarNow.setTime(now);
|
||||||
|
calendarStart.setTime(startDate);
|
||||||
|
calendarEnd.setTime(endDate);
|
||||||
|
if (calendarStart.before(calendarNow) && calendarEnd.after(calendarNow)) {
|
||||||
|
calendarNow.setTime(simpleDateToDate(dateToSimpleDate(now,"HH:mm:ss"),"HH:mm:ss"));
|
||||||
|
calendarStart.setTime(simpleDateToDate(pkStartHour1, "HH:mm:ss"));
|
||||||
|
calendarEnd.setTime(simpleDateToDate(pkEndHour1, "HH:mm:ss"));
|
||||||
|
if (calendarStart.before(calendarNow) && calendarEnd.after(calendarNow)) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
calendarNow.setTime(simpleDateToDate(dateToSimpleDate(now,"HH:mm:ss"),"HH:mm:ss"));
|
||||||
|
calendarStart.setTime(simpleDateToDate(pkStartHour2, "HH:mm:ss"));
|
||||||
|
calendarEnd.setTime(simpleDateToDate(pkEndHour2, "HH:mm:ss"));
|
||||||
|
return calendarStart.before(calendarNow) && calendarEnd.after(calendarNow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private Date simpleDateToDate(String time, String pattern) throws ParseException {
|
||||||
|
return new SimpleDateFormat(pattern, Locale.CHINA).parse(time);
|
||||||
|
}
|
||||||
|
private String dateToSimpleDate(Date date,String pattern){
|
||||||
|
return new SimpleDateFormat(pattern,Locale.CHINA).format(date);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.yunbao.live.bean;
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
public class ReportCommunityBean {
|
public class ReportCommunityBean {
|
||||||
String dynamic_id;
|
String dynamic_id;
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class RewardAllModel extends BaseModel{
|
||||||
|
@SerializedName("gold")
|
||||||
|
private String gold;
|
||||||
|
@SerializedName("experience")
|
||||||
|
private String experience;
|
||||||
|
|
||||||
|
public String getGold() {
|
||||||
|
return gold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RewardAllModel setGold(String gold) {
|
||||||
|
this.gold = gold;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExperience() {
|
||||||
|
return experience;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RewardAllModel setExperience(String experience) {
|
||||||
|
this.experience = experience;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
50
common/src/main/java/com/yunbao/common/bean/TaskModel.java
Normal file
50
common/src/main/java/com/yunbao/common/bean/TaskModel.java
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class TaskModel extends BaseModel{
|
||||||
|
@SerializedName("uid")
|
||||||
|
private String uid;
|
||||||
|
@SerializedName("attent")
|
||||||
|
private String attent;
|
||||||
|
@SerializedName("illumine")
|
||||||
|
private String illumine;
|
||||||
|
@SerializedName("sendgift")
|
||||||
|
private String sendgift;
|
||||||
|
|
||||||
|
public String getUid() {
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TaskModel setUid(String uid) {
|
||||||
|
this.uid = uid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAttent() {
|
||||||
|
return attent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TaskModel setAttent(String attent) {
|
||||||
|
this.attent = attent;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIllumine() {
|
||||||
|
return illumine;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TaskModel setIllumine(String illumine) {
|
||||||
|
this.illumine = illumine;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSendgift() {
|
||||||
|
return sendgift;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TaskModel setSendgift(String sendgift) {
|
||||||
|
this.sendgift = sendgift;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,6 +5,8 @@ import android.os.Parcelable;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.yunbao.common.utils.StringUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2017/8/14.
|
* Created by cxf on 2017/8/14.
|
||||||
@@ -56,8 +58,30 @@ public class UserBean implements Parcelable {
|
|||||||
private String mobile;
|
private String mobile;
|
||||||
private String front_task;
|
private String front_task;
|
||||||
private String is_admin;
|
private String is_admin;
|
||||||
|
@SerializedName("user_love_num")
|
||||||
|
private int praise;
|
||||||
//是否隐藏
|
//是否隐藏
|
||||||
private boolean isHide = false;
|
private boolean isHide = false;
|
||||||
|
//是否为随机PK,仅在主播PK时使用
|
||||||
|
private boolean randomPk;
|
||||||
|
//随机天梯排位赛PK img,仅在主播PK时使用
|
||||||
|
private String mRankPkImgUrl;
|
||||||
|
|
||||||
|
public boolean isRandomPk() {
|
||||||
|
return randomPk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRandomPk(boolean randomPk) {
|
||||||
|
this.randomPk = randomPk;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRankPkImgUrl() {
|
||||||
|
return mRankPkImgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRankPkImgUrl(String mRankPkImgUrl) {
|
||||||
|
this.mRankPkImgUrl = mRankPkImgUrl;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isHide() {
|
public boolean isHide() {
|
||||||
return isHide;
|
return isHide;
|
||||||
@@ -93,6 +117,9 @@ public class UserBean implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getIs_bind() {
|
public String getIs_bind() {
|
||||||
|
if(StringUtil.isEmpty(is_bind)){
|
||||||
|
is_bind="0";
|
||||||
|
}
|
||||||
return is_bind;
|
return is_bind;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,6 +390,14 @@ public class UserBean implements Parcelable {
|
|||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getPraise() {
|
||||||
|
return praise;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPraise(int praise) {
|
||||||
|
this.praise = praise;
|
||||||
|
}
|
||||||
|
|
||||||
public void setLevel(int level) {
|
public void setLevel(int level) {
|
||||||
this.level = level;
|
this.level = level;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
package com.yunbao.video.bean;
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import com.yunbao.common.bean.UserBean;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2017/10/25.
|
* Created by cxf on 2017/10/25.
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class WishListModel extends BaseModel {
|
||||||
|
@SerializedName("wishList")
|
||||||
|
private List<WishModel> wishList;
|
||||||
|
@SerializedName("img")
|
||||||
|
private String img;
|
||||||
|
|
||||||
|
public List<WishModel> getWishList() {
|
||||||
|
return wishList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WishListModel setWishList(List<WishModel> wishList) {
|
||||||
|
this.wishList = wishList;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WishListModel setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
106
common/src/main/java/com/yunbao/common/bean/WishModel.java
Normal file
106
common/src/main/java/com/yunbao/common/bean/WishModel.java
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class WishModel extends BaseModel {
|
||||||
|
|
||||||
|
@SerializedName("id")
|
||||||
|
private String id;
|
||||||
|
@SerializedName("dtime")
|
||||||
|
private String dtime;
|
||||||
|
@SerializedName("luid")
|
||||||
|
private String luid;
|
||||||
|
@SerializedName("lid")
|
||||||
|
private String lid;
|
||||||
|
@SerializedName("wishlist_icon")
|
||||||
|
private String wishlistIcon;
|
||||||
|
@SerializedName("wishlist_num")
|
||||||
|
private String wishlistNum;
|
||||||
|
@SerializedName("wishlist_progress")
|
||||||
|
private String wishlistProgress;
|
||||||
|
@SerializedName("wishlist_name")
|
||||||
|
private String wishlistName;
|
||||||
|
@SerializedName("create_time")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WishModel setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDtime() {
|
||||||
|
return dtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WishModel setDtime(String dtime) {
|
||||||
|
this.dtime = dtime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLuid() {
|
||||||
|
return luid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WishModel setLuid(String luid) {
|
||||||
|
this.luid = luid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLid() {
|
||||||
|
return lid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WishModel setLid(String lid) {
|
||||||
|
this.lid = lid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWishlistIcon() {
|
||||||
|
return wishlistIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WishModel setWishlistIcon(String wishlistIcon) {
|
||||||
|
this.wishlistIcon = wishlistIcon;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWishlistNum() {
|
||||||
|
return wishlistNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WishModel setWishlistNum(String wishlistNum) {
|
||||||
|
this.wishlistNum = wishlistNum;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWishlistProgress() {
|
||||||
|
return wishlistProgress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WishModel setWishlistProgress(String wishlistProgress) {
|
||||||
|
this.wishlistProgress = wishlistProgress;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWishlistName() {
|
||||||
|
return wishlistName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WishModel setWishlistName(String wishlistName) {
|
||||||
|
this.wishlistName = wishlistName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WishModel setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -75,6 +75,9 @@ public class TabButtonGroup extends LinearLayout implements View.OnClickListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getCurPosition() {
|
||||||
|
return mCurPosition;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
|||||||
@@ -4,13 +4,16 @@ import android.app.Dialog;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
import androidx.fragment.app.DialogFragment;
|
import androidx.fragment.app.DialogFragment;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
|
||||||
import com.yunbao.common.utils.ClickUtil;
|
import com.yunbao.common.utils.ClickUtil;
|
||||||
|
|
||||||
@@ -34,7 +37,7 @@ public abstract class AbsDialogFragment extends DialogFragment {
|
|||||||
} else {
|
} else {
|
||||||
mRootView = LayoutInflater.from(mContext).inflate(getLayoutId(), null);
|
mRootView = LayoutInflater.from(mContext).inflate(getLayoutId(), null);
|
||||||
}
|
}
|
||||||
final Dialog dialog = new Dialog(mContext, getDialogStyle());
|
Dialog dialog = new Dialog(mContext, getDialogStyle());
|
||||||
dialog.setContentView(mRootView);
|
dialog.setContentView(mRootView);
|
||||||
dialog.setCancelable(canCancel());
|
dialog.setCancelable(canCancel());
|
||||||
dialog.setCanceledOnTouchOutside(canCancel());
|
dialog.setCanceledOnTouchOutside(canCancel());
|
||||||
@@ -74,4 +77,12 @@ public abstract class AbsDialogFragment extends DialogFragment {
|
|||||||
return ClickUtil.canClick();
|
return ClickUtil.canClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
|
||||||
|
try {
|
||||||
|
super.show(manager, tag);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.lxj.xpopup.XPopup;
|
||||||
|
import com.lxj.xpopup.core.BottomPopupView;
|
||||||
|
|
||||||
|
|
||||||
|
public abstract class AbsDialogPopupWindow extends BottomPopupView {
|
||||||
|
private final Context mContext;
|
||||||
|
|
||||||
|
public AbsDialogPopupWindow(@NonNull Context context) {
|
||||||
|
super(context);
|
||||||
|
this.mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract void buildDialog(XPopup.Builder builder);
|
||||||
|
public abstract int bindLayoutId();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getImplLayoutId() {
|
||||||
|
return bindLayoutId();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void showDialog() {
|
||||||
|
XPopup.Builder builder = new XPopup.Builder(mContext);
|
||||||
|
builder.isDestroyOnDismiss(true);
|
||||||
|
buildDialog(builder);
|
||||||
|
builder.asCustom(this).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,6 +7,11 @@ import android.view.Window;
|
|||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
|
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
@@ -77,6 +82,15 @@ public class HintDialog extends AbsDialogFragment {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
|
||||||
|
try {
|
||||||
|
super.show(manager, tag);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private HintListener listener;
|
private HintListener listener;
|
||||||
|
|
||||||
public HintDialog setListener(HintListener listener) {
|
public HintDialog setListener(HintListener listener) {
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
package com.yunbao.common.dialog;
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
|
import static com.yunbao.common.CommonAppContext.home_zdy_img_cn;
|
||||||
|
import static com.yunbao.common.CommonAppContext.home_zdy_img_us;
|
||||||
|
import static com.yunbao.common.CommonAppContext.lang;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -12,30 +16,14 @@ import androidx.fragment.app.DialogFragment;
|
|||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.fragment.app.FragmentTransaction;
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
|
|
||||||
import com.adjust.sdk.Adjust;
|
|
||||||
import com.adjust.sdk.AdjustEvent;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.facebook.appevents.AppEventsLogger;
|
|
||||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
|
||||||
import com.yunbao.common.CommonAppConfig;
|
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.event.InstructorOperationEvent;
|
import com.yunbao.common.event.InstructorOperationEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.CommonHttpUtil;
|
|
||||||
import com.yunbao.common.http.HttpCallback;
|
|
||||||
import com.yunbao.common.http.HttpClient;
|
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
|
||||||
import com.yunbao.common.manager.NoviceInstructorManager;
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_cn;
|
|
||||||
import static com.yunbao.common.CommonAppContext.home_zdy_img_us;
|
|
||||||
import static com.yunbao.common.CommonAppContext.lang;
|
|
||||||
|
|
||||||
public class InstructorOperationDialog extends AbsDialogFragment {
|
public class InstructorOperationDialog extends AbsDialogFragment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -96,40 +84,16 @@ public class InstructorOperationDialog extends AbsDialogFragment {
|
|||||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
ImageView to_msg = mRootView.findViewById(R.id.to_msg);
|
ImageView to_msg = mRootView.findViewById(R.id.to_msg);
|
||||||
if(lang.equals("english")){
|
if (lang.equals("english")) {
|
||||||
ImgLoader.display(mContext,home_zdy_img_us, to_msg);
|
ImgLoader.display(mContext, home_zdy_img_us, to_msg);
|
||||||
}else{
|
} else {
|
||||||
ImgLoader.display(mContext,home_zdy_img_cn, to_msg);
|
ImgLoader.display(mContext, home_zdy_img_cn, to_msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mRootView.findViewById(R.id.to_msg).setOnClickListener(new View.OnClickListener() {
|
mRootView.findViewById(R.id.to_msg).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
AdjustEvent adjustEvent1 = new AdjustEvent("82nzkz");
|
|
||||||
Adjust.trackEvent(adjustEvent1);
|
|
||||||
CommonHttpUtil.setAdvertisingChannels("82nzkz", new HttpCallback() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
|
||||||
if (code == 0) {
|
|
||||||
FirebaseAnalytics.getInstance(mContext).logEvent("FS_director_enter", null);
|
|
||||||
AppEventsLogger.newLogger(mContext).logEvent("FB_director_enter");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
AdjustEvent adjustEvent2 = new AdjustEvent("ykpmj8");
|
|
||||||
Adjust.trackEvent(adjustEvent2);
|
|
||||||
CommonHttpUtil.setAdvertisingChannels("ykpmj8", new HttpCallback() {
|
|
||||||
@Override
|
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
|
||||||
if (code == 0) {
|
|
||||||
FirebaseAnalytics.getInstance(mContext).logEvent("FS_director_message_box", null);
|
|
||||||
AppEventsLogger.newLogger(mContext).logEvent("FB_director_message_box");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
EventBus.getDefault().post(new InstructorOperationEvent());
|
EventBus.getDefault().post(new InstructorOperationEvent());
|
||||||
dismiss();
|
dismiss();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.Gravity;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.view.WindowManager;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
|
||||||
|
import com.yunbao.common.R;
|
||||||
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
import com.yunbao.common.utils.DpUtil;
|
||||||
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
|
public class YoursystemisolderDialog extends AbsDialogFragment {
|
||||||
|
@Override
|
||||||
|
protected int getLayoutId() {
|
||||||
|
return R.layout.view_yoursystemisolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected int getDialogStyle() {
|
||||||
|
return R.style.dialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean canCancel() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void setWindowAttributes(Window window) {
|
||||||
|
window.setWindowAnimations(R.style.bottomToTopAnim);
|
||||||
|
WindowManager.LayoutParams params = window.getAttributes();
|
||||||
|
params.width = DpUtil.dp2px(277);
|
||||||
|
params.height = DpUtil.dp2px(134);
|
||||||
|
params.gravity = Gravity.CENTER;
|
||||||
|
window.setAttributes(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onActivityCreated(Bundle savedInstanceState) {
|
||||||
|
super.onActivityCreated(savedInstanceState);
|
||||||
|
TextView hint = (TextView) findViewById(R.id.hint);
|
||||||
|
TextView toSetUp = (TextView) findViewById(R.id.to_set_up);
|
||||||
|
TextView knowThe = (TextView) findViewById(R.id.know_the);
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.know_the), () -> dismiss());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void show(@NonNull FragmentManager manager, @Nullable String tag) {
|
||||||
|
try {
|
||||||
|
super.show(manager, tag);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private YoursystemisolderDialog.HintListener listener;
|
||||||
|
|
||||||
|
public YoursystemisolderDialog setListener(YoursystemisolderDialog.HintListener listener) {
|
||||||
|
this.listener = listener;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HintListener {
|
||||||
|
void requestPermission();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
public class AnchorInfoEvent {
|
||||||
|
protected boolean clear;
|
||||||
|
protected String id;
|
||||||
|
protected String userNiceName;
|
||||||
|
protected String avatar;
|
||||||
|
|
||||||
|
public AnchorInfoEvent(boolean clears,String ids, String userNiceNames,String avatars) {
|
||||||
|
clear = clears;
|
||||||
|
id = ids;
|
||||||
|
userNiceName = userNiceNames;
|
||||||
|
avatar = avatars;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserNiceName() {
|
||||||
|
return userNiceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserNiceName(String userNiceName) {
|
||||||
|
this.userNiceName = userNiceName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAvatar() {
|
||||||
|
return avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAvatar(String avatar) {
|
||||||
|
this.avatar = avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isClear() {
|
||||||
|
return clear;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClear(boolean clear) {
|
||||||
|
this.clear = clear;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "AnchorInfoEvent{" +
|
||||||
|
"clear=" + clear +
|
||||||
|
", id='" + id + '\'' +
|
||||||
|
", userNiceName='" + userNiceName + '\'' +
|
||||||
|
", avatar='" + avatar + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ public class CoinChangeEvent {
|
|||||||
private String goldCoinNum;
|
private String goldCoinNum;
|
||||||
private boolean chargeSuccess;
|
private boolean chargeSuccess;
|
||||||
|
|
||||||
|
|
||||||
public CoinChangeEvent(String coin) {
|
public CoinChangeEvent(String coin) {
|
||||||
this.coin = coin;
|
this.coin = coin;
|
||||||
}
|
}
|
||||||
@@ -19,7 +20,8 @@ public class CoinChangeEvent {
|
|||||||
this.coin = coin;
|
this.coin = coin;
|
||||||
this.chargeSuccess = chargeSuccess;
|
this.chargeSuccess = chargeSuccess;
|
||||||
}
|
}
|
||||||
public CoinChangeEvent(String coin,String goldCoinNum, boolean chargeSuccess) {
|
|
||||||
|
public CoinChangeEvent(String coin, String goldCoinNum, boolean chargeSuccess) {
|
||||||
this.coin = coin;
|
this.coin = coin;
|
||||||
this.goldCoinNum = goldCoinNum;
|
this.goldCoinNum = goldCoinNum;
|
||||||
this.chargeSuccess = chargeSuccess;
|
this.chargeSuccess = chargeSuccess;
|
||||||
|
|||||||
@@ -0,0 +1,105 @@
|
|||||||
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
|
public class CustomDrawerPopupEvent extends BaseModel {
|
||||||
|
//是否关闭弹窗
|
||||||
|
private boolean isDisMiss = false;
|
||||||
|
//权益的名字
|
||||||
|
private String rightsInterests = "";
|
||||||
|
//活动的id
|
||||||
|
private int activityId = 0;
|
||||||
|
//跳转网页地址
|
||||||
|
private String htmlUrl;
|
||||||
|
//是否半屏展示
|
||||||
|
private boolean screen = false;
|
||||||
|
//系统消息
|
||||||
|
private boolean systemNotice = false;
|
||||||
|
//在线客服
|
||||||
|
private boolean online = false;
|
||||||
|
//举报
|
||||||
|
private boolean reportLayout = false;
|
||||||
|
//刷新
|
||||||
|
private boolean refresh = false;
|
||||||
|
|
||||||
|
public boolean isRefresh() {
|
||||||
|
return refresh;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDrawerPopupEvent setRefresh(boolean refresh) {
|
||||||
|
this.refresh = refresh;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSystemNotice() {
|
||||||
|
return systemNotice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDrawerPopupEvent setSystemNotice(boolean systemNotice) {
|
||||||
|
this.systemNotice = systemNotice;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isOnline() {
|
||||||
|
return online;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDrawerPopupEvent setOnline(boolean online) {
|
||||||
|
this.online = online;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isReportLayout() {
|
||||||
|
return reportLayout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDrawerPopupEvent setReportLayout(boolean reportLayout) {
|
||||||
|
this.reportLayout = reportLayout;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHtmlUrl() {
|
||||||
|
return htmlUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDrawerPopupEvent setHtmlUrl(String htmlUrl) {
|
||||||
|
this.htmlUrl = htmlUrl;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isScreen() {
|
||||||
|
return screen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDrawerPopupEvent setScreen(boolean screen) {
|
||||||
|
this.screen = screen;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getActivityId() {
|
||||||
|
return activityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDrawerPopupEvent setActivityId(int activityId) {
|
||||||
|
this.activityId = activityId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRightsInterests() {
|
||||||
|
return rightsInterests;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDrawerPopupEvent setRightsInterests(String rightsInterests) {
|
||||||
|
this.rightsInterests = rightsInterests;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDisMiss() {
|
||||||
|
return isDisMiss;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomDrawerPopupEvent setDisMiss(boolean disMiss) {
|
||||||
|
isDisMiss = disMiss;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全服通知
|
||||||
|
*/
|
||||||
|
public class CustomFullServiceNotifyEvent extends BaseModel {
|
||||||
|
|
||||||
|
@SerializedName("_method_")
|
||||||
|
private String method;
|
||||||
|
@SerializedName("action")
|
||||||
|
private String action;
|
||||||
|
@SerializedName("content")//内容
|
||||||
|
private String content;
|
||||||
|
@SerializedName("duration")//展示时长 单位秒
|
||||||
|
private int duration;
|
||||||
|
@SerializedName("img")//图片路径
|
||||||
|
private String img;
|
||||||
|
@SerializedName("msgtype")
|
||||||
|
private String msgtype;
|
||||||
|
@SerializedName("type")//通知类型 1 图片通知 2文字通知
|
||||||
|
private int type;
|
||||||
|
|
||||||
|
public String getMethod() {
|
||||||
|
return method;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent setMethod(String method) {
|
||||||
|
this.method = method;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAction() {
|
||||||
|
return action;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent setAction(String action) {
|
||||||
|
this.action = action;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDuration() {
|
||||||
|
return duration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent setDuration(int duration) {
|
||||||
|
this.duration = duration;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImg() {
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent setImg(String img) {
|
||||||
|
this.img = img;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMsgtype() {
|
||||||
|
return msgtype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent setMsgtype(String msgtype) {
|
||||||
|
this.msgtype = msgtype;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomFullServiceNotifyEvent setType(int type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,170 @@
|
|||||||
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
import com.yunbao.common.bean.VideoBean;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class JavascriptInterfaceEvent extends BaseModel {
|
||||||
|
private String method = "";
|
||||||
|
private String svg = "";
|
||||||
|
private String postsId = "";
|
||||||
|
private String isClose;
|
||||||
|
private List<VideoBean> videoBeanList = new ArrayList<>();
|
||||||
|
private int position;
|
||||||
|
private String liveId;
|
||||||
|
private String userId;
|
||||||
|
private int indexInto;
|
||||||
|
private String productId;
|
||||||
|
private String orderNumber;
|
||||||
|
private String moneyUsd;
|
||||||
|
private boolean isUpdataUser;
|
||||||
|
private String data;
|
||||||
|
private String name;
|
||||||
|
private String image;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage() {
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setImage(String image) {
|
||||||
|
this.image = image;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setUserId(String userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setData(String data) {
|
||||||
|
this.data = data;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isUpdataUser() {
|
||||||
|
return isUpdataUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setUpdataUser(boolean updataUser) {
|
||||||
|
isUpdataUser = updataUser;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProductId() {
|
||||||
|
return productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setProductId(String productId) {
|
||||||
|
this.productId = productId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderNumber() {
|
||||||
|
return orderNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setOrderNumber(String orderNumber) {
|
||||||
|
this.orderNumber = orderNumber;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMoneyUsd() {
|
||||||
|
return moneyUsd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setMoneyUsd(String moneyUsd) {
|
||||||
|
this.moneyUsd = moneyUsd;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getIndexInto() {
|
||||||
|
return indexInto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setIndexInto(int indexInto) {
|
||||||
|
this.indexInto = indexInto;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLiveId() {
|
||||||
|
return liveId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setLiveId(String liveId) {
|
||||||
|
this.liveId = liveId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<VideoBean> getVideoBeanList() {
|
||||||
|
return videoBeanList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setVideoBeanList(List<VideoBean> videoBeanList) {
|
||||||
|
this.videoBeanList = videoBeanList;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPosition() {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setPosition(int position) {
|
||||||
|
this.position = position;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIsClose() {
|
||||||
|
return isClose;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setIsClose(String isClose) {
|
||||||
|
this.isClose = isClose;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPostsId() {
|
||||||
|
return postsId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setPostsId(String postsId) {
|
||||||
|
this.postsId = postsId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSvg() {
|
||||||
|
return svg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setSvg(String svg) {
|
||||||
|
this.svg = svg;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMethod() {
|
||||||
|
return method;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JavascriptInterfaceEvent setMethod(String method) {
|
||||||
|
this.method = method;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
|
public class LivePushRyEvent extends BaseModel {
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
|
public class LiveRobotMessageEvent extends BaseModel {
|
||||||
|
private int index = -1;
|
||||||
|
|
||||||
|
public int getIndex() {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveRobotMessageEvent setIndex(int index) {
|
||||||
|
this.index = index;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
|
public class LiveRobotSayHelloEvent extends BaseModel {
|
||||||
|
private int index = -1;
|
||||||
|
|
||||||
|
public int getIndex() {
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LiveRobotSayHelloEvent setIndex(int index) {
|
||||||
|
this.index = index;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.yunbao.main.event;
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
import com.yunbao.common.bean.BaseModel;
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ public class ImgLoader {
|
|||||||
private static final boolean SKIP_MEMORY_CACHE = true;
|
private static final boolean SKIP_MEMORY_CACHE = true;
|
||||||
|
|
||||||
private static BlurTransformation sBlurTransformation;
|
private static BlurTransformation sBlurTransformation;
|
||||||
private final static float thumbnail = 0.1f;
|
private final static float thumbnail = 1.0f;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
sBlurTransformation = new BlurTransformation(25);
|
sBlurTransformation = new BlurTransformation(25);
|
||||||
@@ -70,9 +70,8 @@ public class ImgLoader {
|
|||||||
}
|
}
|
||||||
RequestBuilder<Drawable> builder = Glide.with(context)
|
RequestBuilder<Drawable> builder = Glide.with(context)
|
||||||
.load(url)
|
.load(url)
|
||||||
|
|
||||||
.thumbnail(thumbnail)
|
.thumbnail(thumbnail)
|
||||||
.dontAnimate()
|
|
||||||
.placeholder(imageView.getDrawable());
|
.placeholder(imageView.getDrawable());
|
||||||
if (width != -1 && height != -1) {
|
if (width != -1 && height != -1) {
|
||||||
builder = builder.override(width, height);
|
builder = builder.override(width, height);
|
||||||
@@ -87,7 +86,21 @@ public class ImgLoader {
|
|||||||
Glide.with(context)
|
Glide.with(context)
|
||||||
.asDrawable()
|
.asDrawable()
|
||||||
.load(url)
|
.load(url)
|
||||||
|
|
||||||
|
.thumbnail(thumbnail)
|
||||||
|
.placeholder(imageView.getDrawable())
|
||||||
|
.dontAnimate()
|
||||||
|
.skipMemoryCache(SKIP_MEMORY_CACHE)
|
||||||
|
.into(imageView);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void display2(Context context, Drawable drawable, ImageView imageView) {
|
||||||
|
if (!contextIsExist(context)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Glide.with(context)
|
||||||
|
.asDrawable()
|
||||||
|
.load(drawable)
|
||||||
.thumbnail(thumbnail)
|
.thumbnail(thumbnail)
|
||||||
.placeholder(imageView.getDrawable())
|
.placeholder(imageView.getDrawable())
|
||||||
.dontAnimate()
|
.dontAnimate()
|
||||||
@@ -142,7 +155,7 @@ public class ImgLoader {
|
|||||||
RequestBuilder<Drawable> builder = Glide.with(context)
|
RequestBuilder<Drawable> builder = Glide.with(context)
|
||||||
.load(url)
|
.load(url)
|
||||||
.thumbnail(thumbnail)
|
.thumbnail(thumbnail)
|
||||||
|
|
||||||
.error(R.mipmap.icon_avatar_placeholder);
|
.error(R.mipmap.icon_avatar_placeholder);
|
||||||
if (width != -1 && height != -1) {
|
if (width != -1 && height != -1) {
|
||||||
builder = builder.override(width, height);
|
builder = builder.override(width, height);
|
||||||
@@ -165,7 +178,7 @@ public class ImgLoader {
|
|||||||
Glide.with(context)
|
Glide.with(context)
|
||||||
.asDrawable()
|
.asDrawable()
|
||||||
.load(file)
|
.load(file)
|
||||||
|
|
||||||
.thumbnail(thumbnail)
|
.thumbnail(thumbnail)
|
||||||
.skipMemoryCache(SKIP_MEMORY_CACHE)
|
.skipMemoryCache(SKIP_MEMORY_CACHE)
|
||||||
.into(imageView);
|
.into(imageView);
|
||||||
@@ -178,7 +191,7 @@ public class ImgLoader {
|
|||||||
Glide.with(context)
|
Glide.with(context)
|
||||||
.asDrawable()
|
.asDrawable()
|
||||||
.load(res)
|
.load(res)
|
||||||
|
|
||||||
.thumbnail(thumbnail)
|
.thumbnail(thumbnail)
|
||||||
.skipMemoryCache(SKIP_MEMORY_CACHE)
|
.skipMemoryCache(SKIP_MEMORY_CACHE)
|
||||||
.into(imageView);
|
.into(imageView);
|
||||||
@@ -226,6 +239,7 @@ public class ImgLoader {
|
|||||||
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? super Drawable> transition) {
|
public void onResourceReady(@NonNull Drawable resource, @Nullable Transition<? super Drawable> transition) {
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
callback.onLoadSuccess(resource);
|
callback.onLoadSuccess(resource);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,9 +63,9 @@ public class API extends BaseApi {
|
|||||||
loggingInterceptor.setPrintLevel(HttpLoggingInterceptor.Level.BODY);
|
loggingInterceptor.setPrintLevel(HttpLoggingInterceptor.Level.BODY);
|
||||||
OkHttpClient.Builder builder = new OkHttpClient()
|
OkHttpClient.Builder builder = new OkHttpClient()
|
||||||
.newBuilder()
|
.newBuilder()
|
||||||
|
|
||||||
.addInterceptor(initQuery(isNeedUid,CommonAppContext.sInstance.getApplicationContext()))
|
.addInterceptor(initQuery(isNeedUid,CommonAppContext.sInstance.getApplicationContext()))
|
||||||
.addInterceptor(loggingInterceptor);
|
.addInterceptor(loggingInterceptor);
|
||||||
|
|
||||||
return create(builder.build(),
|
return create(builder.build(),
|
||||||
GsonConverterFactory.create(gson), RxJava2CallAdapterFactory.create(), CommonAppConfig.HOST, PDLiveApi.class);
|
GsonConverterFactory.create(gson), RxJava2CallAdapterFactory.create(), CommonAppConfig.HOST, PDLiveApi.class);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import android.content.Context;
|
|||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.adjust.sdk.Adjust;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.lzy.okgo.OkGo;
|
import com.lzy.okgo.OkGo;
|
||||||
import com.lzy.okgo.callback.StringCallback;
|
import com.lzy.okgo.callback.StringCallback;
|
||||||
@@ -17,7 +17,9 @@ import com.yunbao.common.activity.ErrorActivity;
|
|||||||
import com.yunbao.common.bean.ConfigBean;
|
import com.yunbao.common.bean.ConfigBean;
|
||||||
import com.yunbao.common.event.FollowEvent;
|
import com.yunbao.common.event.FollowEvent;
|
||||||
import com.yunbao.common.interfaces.CommonCallback;
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
|
import com.yunbao.common.manager.APKManager;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
import com.yunbao.common.manager.NewLevelManager;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
import com.yunbao.common.utils.MD5Util;
|
import com.yunbao.common.utils.MD5Util;
|
||||||
import com.yunbao.common.utils.SpUtil;
|
import com.yunbao.common.utils.SpUtil;
|
||||||
@@ -190,6 +192,32 @@ public class CommonHttpUtil {
|
|||||||
if (obj.containsKey("is_chat")) {
|
if (obj.containsKey("is_chat")) {
|
||||||
IMLoginManager.get(context).initChat(String.valueOf(obj.getInteger("is_chat")));
|
IMLoginManager.get(context).initChat(String.valueOf(obj.getInteger("is_chat")));
|
||||||
}
|
}
|
||||||
|
if (obj.containsKey("level_new")) {//缓存等级数据
|
||||||
|
JSONArray levelArray = obj.getJSONArray("level_new");
|
||||||
|
new NewLevelManager(context).UpDataLevel(levelArray.toJSONString());
|
||||||
|
}
|
||||||
|
if (obj.containsKey("levelanchor_new")) {//缓存等级数据
|
||||||
|
JSONArray levelArray = obj.getJSONArray("levelanchor_new");
|
||||||
|
new NewLevelManager(context).UpAnchorDataLevel(levelArray.toJSONString());
|
||||||
|
}
|
||||||
|
if (obj.containsKey("apk_ver")) {
|
||||||
|
APKManager.get().setApkVer(obj.getString("apk_ver"));
|
||||||
|
}
|
||||||
|
if (obj.containsKey("apk_url")) {
|
||||||
|
APKManager.get().setAPKUrl(obj.getString("apk_url"));
|
||||||
|
}
|
||||||
|
if (obj.containsKey("apk_des")) {
|
||||||
|
APKManager.get().setAPKDes(obj.getString("apk_des"));
|
||||||
|
}
|
||||||
|
if (obj.containsKey("google_isup")) {
|
||||||
|
APKManager.get().setAPKGoogleIsUp(obj.getInteger("google_isup"));
|
||||||
|
}
|
||||||
|
if (obj.containsKey("isup")) {
|
||||||
|
APKManager.get().setAPKIsUp(obj.getInteger("isup"));
|
||||||
|
}
|
||||||
|
if (obj.containsKey("clarity")) {
|
||||||
|
IMLoginManager.get(context).setClarity(obj.getString("clarity"));
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
|
String error = "info[0]:" + info[0] + "\n\n\n" + "Exception:" + e.getClass() + "---message--->" + e.getMessage();
|
||||||
ErrorActivity.forward("GetConfig接口返回数据异常", error);
|
ErrorActivity.forward("GetConfig接口返回数据异常", error);
|
||||||
@@ -411,14 +439,14 @@ public class CommonHttpUtil {
|
|||||||
.params("touid", touid)
|
.params("touid", touid)
|
||||||
.execute(callback);
|
.execute(callback);
|
||||||
}
|
}
|
||||||
|
//
|
||||||
//埋点唯一性
|
// //埋点唯一性
|
||||||
public static void setAdvertisingChannels(String operation, HttpCallback callback) {
|
// public static void setAdvertisingChannels(String operation, HttpCallback callback) {
|
||||||
HttpClient.getInstance().get("Tx.setAdvertisingChannels", CommonHttpConsts.GET_USER_BASEINFO)
|
// HttpClient.getInstance().get("Tx.setAdvertisingChannels", CommonHttpConsts.GET_USER_BASEINFO)
|
||||||
.params("operation", operation)
|
// .params("operation", operation)
|
||||||
.params("marking", Adjust.getAdid())
|
// .params("marking", Adjust.getAdid())
|
||||||
.execute(callback);
|
// .execute(callback);
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user