From bfbbe54308e4952710da238ea421051bebc971fc Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Mon, 17 Apr 2023 16:30:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/shayu/phonelive/AppContext.java | 1 + .../yunbao/common/activity/AbsActivity.java | 2 + .../com/yunbao/common/bean/LiveClassBean.java | 20 + .../yunbao/common/http/CommonHttpUtil.java | 7 +- .../yunbao/common/manager/IMLoginManager.java | 17 +- .../common/manager/LiveClassManager.java | 42 + common/src/main/res/values-en-rUS/string.xml | 1129 +++++++++++++++++ config.gradle | 4 +- .../activity/LanguageSettingActivity.java | 34 +- .../adapter/MainHomeLivesClassAdapter.java | 26 +- .../com/yunbao/main/utils/LanguageUtil.java | 7 +- .../main/views/MainHomeLiveViewHolder.java | 63 +- .../yunbao/main/views/MainHomeViewHolder.java | 6 +- .../res/layout/activity_language_sett.xml | 1 + main/src/main/res/layout/activity_setting.xml | 2 +- 15 files changed, 1302 insertions(+), 59 deletions(-) create mode 100644 common/src/main/java/com/yunbao/common/manager/LiveClassManager.java create mode 100644 common/src/main/res/values-en-rUS/string.xml diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java index 3783dfb0d..9ad90e49c 100644 --- a/app/src/main/java/com/shayu/phonelive/AppContext.java +++ b/app/src/main/java/com/shayu/phonelive/AppContext.java @@ -80,6 +80,7 @@ public class AppContext extends CommonAppContext { public LiveImDeletUtil liveImDeletUtil; private final static List> activities = new ArrayList<>(); + private static final class AdjustLifecycleCallbacks implements ActivityLifecycleCallbacks { @Override public void onActivityResumed(Activity activity) { diff --git a/common/src/main/java/com/yunbao/common/activity/AbsActivity.java b/common/src/main/java/com/yunbao/common/activity/AbsActivity.java index e75bf5ae6..fe5f5c33e 100644 --- a/common/src/main/java/com/yunbao/common/activity/AbsActivity.java +++ b/common/src/main/java/com/yunbao/common/activity/AbsActivity.java @@ -27,6 +27,7 @@ import androidx.appcompat.app.AppCompatActivity; import com.yunbao.common.R; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.interfaces.LifeCycleListener; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.ClickUtil; import java.util.ArrayList; @@ -48,6 +49,7 @@ public abstract class AbsActivity extends AppCompatActivity { Resources res = super.getResources(); Configuration config = new Configuration(); config.setToDefaults(); + config.locale = IMLoginManager.get(this).getLocaleLanguage(); res.updateConfiguration(config, res.getDisplayMetrics()); return res; } diff --git a/common/src/main/java/com/yunbao/common/bean/LiveClassBean.java b/common/src/main/java/com/yunbao/common/bean/LiveClassBean.java index 2f7a593d3..cc05b3bff 100644 --- a/common/src/main/java/com/yunbao/common/bean/LiveClassBean.java +++ b/common/src/main/java/com/yunbao/common/bean/LiveClassBean.java @@ -14,6 +14,26 @@ public class LiveClassBean { private boolean isAll; private String des; private boolean checked; + private String chinese; + private String english; + + public String getChinese() { + return chinese; + } + + public LiveClassBean setChinese(String chinese) { + this.chinese = chinese; + return this; + } + + public String getEnglish() { + return english; + } + + public LiveClassBean setEnglish(String english) { + this.english = english; + return this; + } public int getId() { return id; diff --git a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java index 82d94a308..57a4b75f0 100644 --- a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java +++ b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java @@ -19,6 +19,7 @@ import com.yunbao.common.event.FollowEvent; import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.manager.APKManager; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.manager.LiveClassManager; import com.yunbao.common.manager.NewLevelManager; import com.yunbao.common.utils.L; import com.yunbao.common.utils.MD5Util; @@ -156,7 +157,7 @@ public class CommonHttpUtil { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { locale = context.getResources().getConfiguration().getLocales().get(0); } else { - locale = context.getResources().getConfiguration().locale; + locale = IMLoginManager.get(context).getLocaleLanguage(); } if (locale.getLanguage().equals("zh")) { lang = "chinese"; @@ -202,6 +203,10 @@ public class CommonHttpUtil { JSONArray levelArray = obj.getJSONArray("levelanchor_new"); new NewLevelManager(context).UpAnchorDataLevel(levelArray.toJSONString()); } + if (obj.containsKey("liveclass")) {//缓存直播间分类 + JSONArray levelArray = obj.getJSONArray("liveclass"); + new LiveClassManager(context).UpDataLiveClass(levelArray.toJSONString()); + } if (obj.containsKey("apk_ver")) { APKManager.get().setApkVer(obj.getString("apk_ver")); } diff --git a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java index 305b8108f..6fcdf9af1 100644 --- a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java +++ b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java @@ -23,6 +23,8 @@ import com.yunbao.common.views.floatingview.APPEasyFloat; import org.greenrobot.eventbus.EventBus; +import java.util.Locale; + /** * 登录者信息管理 */ @@ -46,6 +48,20 @@ public class IMLoginManager extends BaseCacheManager { private final String STATUS_ANCHOR_SAY = "anchorSay"; private final String STATUS_ANCHOR_CALL = "anchorCallMe"; + private final String KEY_LANGUAGE = "language"; + + public void setLanguage(boolean isEnglish) { + put(KEY_LANGUAGE, isEnglish); + } + + public Locale getLocaleLanguage() { + if (!getBoolean(KEY_LANGUAGE, false)) { + return Locale.SIMPLIFIED_CHINESE; + } else { + return new Locale("en", "rUS"); + } + } + public void setDefaultBubbleUrl(String defaultBubbleUrl) { put(keyDefaultBubbleUrl, defaultBubbleUrl); } @@ -55,7 +71,6 @@ public class IMLoginManager extends BaseCacheManager { } - public void setXiaJBG(boolean xjbg) { put(xiaJBG, xjbg); } diff --git a/common/src/main/java/com/yunbao/common/manager/LiveClassManager.java b/common/src/main/java/com/yunbao/common/manager/LiveClassManager.java new file mode 100644 index 000000000..9a875ba53 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/manager/LiveClassManager.java @@ -0,0 +1,42 @@ +package com.yunbao.common.manager; + +import android.content.Context; + +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; +import com.yunbao.common.bean.LiveClassBean; +import com.yunbao.common.bean.NewLevelModel; +import com.yunbao.common.manager.base.BaseCacheManager; + +import java.util.ArrayList; +import java.util.List; + +public class LiveClassManager extends BaseCacheManager { + private final String KEY_LIVE_CLASS = "keyLiveClass"; + private List liveClass = new ArrayList<>(); + + public LiveClassManager(Context context) { + super(context); + } + + /** + * 缓存等级图标 + * + * @param json + */ + public void UpDataLiveClass(String json) { + liveClass = new Gson().fromJson(json, new TypeToken>() { + }.getType()); + put(KEY_LIVE_CLASS, liveClass); + } + + /** + * 获取等级数据 + * + * @return + */ + public List getLiveClass() { + return getList(KEY_LIVE_CLASS, new TypeToken>() { + }.getType()); + } +} diff --git a/common/src/main/res/values-en-rUS/string.xml b/common/src/main/res/values-en-rUS/string.xml new file mode 100644 index 000000000..2af8b7a70 --- /dev/null +++ b/common/src/main/res/values-en-rUS/string.xml @@ -0,0 +1,1129 @@ + + + Drop down to refresh + Refreshing + Loading + Release refresh now + Refresh finish + refresh failed + M-d HH:mm + Pull up to load more + Release load now + Loading + Refreshing + Load complete + Failed to load + Are you sure to use the data? + Edit Profile + Are you sure to use the data? + Confirm + The nickname is duplicated, please re-enter it. + This invitation code does not exist, please re-enter it. + Nickname is illegal + + + No more data + Pull black + Relieving blackout + Remarks + Sign in immediately + Continuously signed in + day + Beauty initialization exception, unable to use + Withdrawals account + You have not set up a withdrawal account yet + Add withdrawal account + Account type + Please enter the cardholder\'s name + Please enter the bank card account number + Please enter bank name + Please enter wechat account + Please enter Alipay account number. + Please enter the name of Alipay account. + Alipay + WeChat + Bank card + Do you want to delete this account? + Withdrawals record + Give + Account balance + Alipay + WeChat payment + Recharge success + Failure of recharge + Alipay is not installed. + Wechat is not installed + No QQ installed + Replication link + Replication success + Editing materials + Head portrait + Nickname + ModifyName + Modify remarks + Please enter comments~ + Signature modification + autograph + Binding phone + TASK1 + TASK2 + TASK3 + Give a\nfree gift + Incomplete + Complete + Follow\nanchor + light UP\nRoom + completing mission + + + ApplyMic + Cancel Mic + Close Mic + Quit Mic + Birthday + Gender + Location + My anchor impression + Set the picture successfully + Leave something~ + Please enter a nickname~ + Up to 20 words can be input + Up to 8 words can be input + Please enter a nickname + Please enter signature + Please select the correct date + Warm tip: you can change your nickname once for free, and then 1800 diamonds will be needed + Follow + VIP + Rosy + Skin + Smooth + BigEyes + SlimFace + ThinFace + Chin + Nose + Lips + copy + Today\'s Live WishList + Make a wish, the audience to help you achieve + Generate + Add gifts and quantities + Wishes set on the same day will expire at 24:00 on the same day + BrightEye + Teeth + Light + Cute + Goddess + Glamour + Magnificent + White + White + JP + B&W + Soft + Warmth + Retro + Flower + Easy + Vitality + Warm + Bright + Deep + Sunset + Cure + Filter + Preset + Beauty + + The anchor sends a flying kiss to you + It\'s a great opportunity, reply now! + A bunch of rose + Roses Bouquet + Lollipop + Free for a limited time + Follow and reply + + Following + My concern + My Black List + TA\'s attention + You haven\'t paid attention to anyone yet + Pay attention to the people you are interested in + TA hasn\'t paid attention to anyone yet + Fans + Opps… The anchor did not open the voice link + Fans + Free + My fans + TA fans + You don\'t have fans yet + Improving personal information will make more people pay attention to you~ + TA doesn\'t have any fans yet + Forget password + Retrieve immediately + Choose guard duration + Option privilege + Immediate opening + Open guard + Renewal Guardian + My + Become the guardian of %s + Open a guard for your favorite anchor + The guardian date expires at: %s + GET + Only one can be given away~ + Guard + Contribution this week + anchor are waiting at your guard! + Let\'s open up a guard for our favorite anchor + You are the current anchor\'s monthly guard \ n the guard date expires + You are the current anchor\'s annual guardian \ n the guardian date expires + Special gift for annual guard + You haven\'t guarded + 您為當前主播的月守護\n無法開通周守護 + You are the monthly guard of the current anchor. Opening the annual guard will cover your monthly guard time. Do you want to open it? + You will spend%1$s%2$s to open%3$s for the anchor + + Week Guardian + Month Guardian + Year Guardian + Pack + Guardian list + Guard the anchor + homepage + "%1$s" is also in%2$s, ~ Click to view TA\'s story + TA has%1$s fans. Come and watch! + Hi ~ I\'m the anchor. Come and talk to me. + [picture] + [voice] + [position] + news + Message + Ignore unread + Unread message ignored + Message sending failed + Frequent operation + The other party temporarily refuses to receive your message + You haven\'t heard anything yet + Send message + picture + shot + Speech input + position + Select pictures + No pictures found + Please select a picture + Search location + Location information not obtained + Map not loaded + Address not obtained + Failed to get location + Click follow to see the other party\'s news in time + Hold to talk + Release end + Please speak. + Recording time is too short + System message + No system message yet + Private chat + Anchor impression + Add impression + Add up to three impressions + Please select impression + Unmodified impression + Please choose your impression of the host + The impression you received from the anchor + You haven\'t received the impression of the anchor yet + Cancel photo + Deselected + Cancel clipping + Sign in for consent + Service and privacy terms + Other login methods + More exciting experience after registering! + Please enter your mobile number + Please input a password + Login immediately + Logon + Immediate registration + Forget password + Please enter the correct mobile number + Authorizing login + Login successfully + privilege grant failed + Authorization cancelled + Live broadcast + Login + shopmall + Recomm + CSD + anchor + Live broadcast + Room type + Share to + Live cover + Change cover + Live broadcast title + Write a title for the live broadcast + channel + Select live channel + During the live broadcast, if the operator finds that the selected channel does not match the live content, he / she will adjust your live channel. + Please set room password + Please set the charge amount (the revenue is subject to the end of live broadcast) + Please set room password + Please set the charge amount + Charge amount + Selective charging + Do you want to end the live broadcast? + The anchor has approved your application, do you want to join now? + Exiting the live broadcast room will disconnect the microphone connection. Do you want to exit? + Beauty + Beans + DO + Coins + A maximum of 10 entries can be set + Personalized Dress Up + Flip + Mirroring + Trickster + MultiplayerPK + Voice Link + Start + LeaveTemporarily + ResumeLive + Flash lamp + accompaniment + share + Game + Red envelopes + Lian Mai + SinglePK + WishList + Only the rear camera can turn on the flash + Flash on failed + You\'ve been banned + Live broadcast ended + Back to home page + Duration of live broadcast + Harvest + Number of visitors + Guan Zhong + Let\'s have a chat~ + Open the barrage, + strip + Please enter the room password + Password error + Broadcast failure + Video format not supported + Video address contains Chinese, unable to play + Guard + I light up. + Into the studio + Sending gifts + sent + UnlockVIP + + + I sent one. + Give + Continuous delivery + x + Sending x + Pretty + Send out + income + City not set + Gift contribution list + Kick people + Permanent ban + This field ban + Set as management + Cancel management + managers + Close live broadcast + Forbidden live broadcast + Disable account + Current administrator + Kicked out of the room + Forbidden forever + Forbidden by this scene + Set as Administrator + Cancelled administrator + You\'ve been kicked out of the room + Live content suspected of violation + Rank + data + The anchorman will leave for a while. The highlights will not be interrupted. Don\'t go away + The anchor is back! + Thrust failure + Camera open failed + Microphone on failed + View + Online List + DayRank + WeekRank + Viewers + There is no anchor for the time being + Let\'s start your live broadcast~ + The host you\'re focusing on doesn\'t start + Let\'s go and see the live broadcast of other hosts~ + Go to other channels quickly~ + You haven\'t had a live broadcast recently + Let\'s go to the opening live experience + TA hasn\'t had a live broadcast recently + Please select a channel + Focus on the anchor + Are you sure to report? + Interaction + End Lian Mai + Allowed even wheat + Ban Lian Mai + Initiate a link request + Initiate PK request + Quit even wheat + The current anchor is temporarily unable to connect + No response from the other party + The anchor is busy + The other anchor is busy + The host rejected your request for wheat + The host refused your request + The opposite host rejected your PK request + Opposite host exits Lianmai + The host accepts your request to connect wheat and begins to connect wheat + You have applied, please wait + The host accepts your request to connect wheat + The host accepts your request to connect wheat and begins to connect wheat + The anchor accepted your PK request and started PK + Failed to push the stream of Lianmai, has exited Lianmai + Link request sent~ + PK request sent~ + PK initiated by the other party + You can\'t play background music when you\'re on Wheat + You need to turn off the background music when connecting the wheat + Live recording + No title + People watched the live broadcast + You can\'t connect the wheat in the game state~ + You can\'t play with Mai~ + Please try again later + Connecting wheat is currently in progress~ + You are already in PK + We + Other party + The balance is insufficient. Do you want to recharge it? + Current online anchor + The other anchor is in the game + Invite Lian Mai + Already invited + Please enter the host nickname or ID you want to search + No anchor at present + PK time + Penalty time + No video + Let\'s release our own video + home page + nearby + Ranking + My + Ordinary room + Paying room + Time room + Password room + Income statement + Contribution list + Daily + Week + Honor + Car + No mount yet + Medal + No medal yet + OwningGuild + Monthly list + General list + Maintenance notice + Guard + Temporary lack of time and space + Live broadcast immediately + Release dynamics + Please fill in the invitation code + Press again to exit + Old password + Please enter the old password + New password + Please fill in the new password + Confirm password + Confirm new password + Confirm revision + reset password + QQ + QQ Zone + WeChat + Wechat Moments + Facebook + Twitter + Search songs + No songs to download + Invalid song download address + Lyrics not found + Song not found + Music + volume + No music at all + You haven\'t collected any music yet + No such music + Let\'s take a look at other types of music + You have denied the permission to read and write files. Please modify it in the settings + You have denied the permission to use the camera. Please modify it in the settings + You have denied permission to use microphone. Please modify it in settings + You have denied the permission to use the location. Please modify it in the settings + You have denied the right to read mobile phone information. Please modify it in settings + My income + Receivable amount + Please select a withdrawal account + Enter the number of%1$s to withdraw + Total%1$s number + Number of%1$s withdrawable + Enter the number of%1$s to extract + Immediate withdrawals + register + Please enter your mobile number + Please enter the verification code + Please fill in the password + Please confirm the password + Fill in the invitation code (optional) + Register and log in + Get verification code + Regain + Passwords are inconsistent + In registration + Live room red envelope + Send red envelopes to the audience in the current live studio + Red envelopes + Average red envelope + Congratulations on making a fortune + Hand out red envelopes + Please enter the amount + Please enter quantity + %1$s red packets in total + rob + An instant red envelope was distributed + A delayed red packet was distributed + rob + View claim details + Congratulations! + Grab the%1$s red packet sent by%1$s + %1$s red packets + My%1$s has been saved + Received%1$s of%2$s%3$s + Not snatch + After the countdown + Red envelopes in the studio! Grab it + Single amount + Total sum + skip + Click to enter + Recommended for you + male + female + Personality settings + Logout + Scavenging + Cache cleared + search + Please enter the nickname or ID you want to search + No content found + QQ + QQ Zone + WeChat + Wechat Moments + facebook + twitter + Share success + Sharing failure + Share cancel + Version update + Immediate use + Not updated + It\'s the latest version + Invalid download address + Say something~ + Video download successful + Video download failed + No more videos + comment + I can\'t give myself a compliment + No comment for the moment. Grab the sofa + Reply + Expand more replies + Retract + Flip + Flash lamp + Camera open failed + Microphone on failed + Record failure + Don\'t worry, the picture hasn\'t come out yet + And the recording is not over + The incoming video path is empty + Outdated Version + Tencent cloud authentication failed + Extremely slow + slow + normal + fast + Extremely fast + WishList + Video preprocessing + Video preprocessing failed + Video preprocessing cancel + In processing + Abnormal status, Stop editing + Choose music + Search song name + Popular songs + My collection + Filter + Tailoring + Special effects + Capture the required audio clip + Original voice + Drag the sliders on both sides to select the clipping area + Add video description~ + Confirm release + Video Publishing + Video generation in progress + Video generated successfully + Failed to generate video + Do you want to give up publishing this video + Local video not found + Local video + Video duration does not meet the requirements + Failed to generate video cover image + Please add a video description + In release + Released successfully + Publishing succeeded, please wait for approval + Save only + Release only + Save and publish + Re shooting + Sign out + Long press to add special effects + Publishing failure + You don\'t have a video yet + Go to shoot and upload + TA has no video works yet + My video + Choose a reason to report + For more details, please describe in the description box (optional) + Submission + Please select the reason for reporting + Report success + It\'s at the top + Are you sure you want to delete the previous video? + Exit video editing + Add to + accept + whole + Album + cancel + camera + Picture selection/Preview + Preview + Pictures and videos + Determine + Please enter content + Choice + Select file + Can not pay attention to yourself + Tips + download + delete + End + Popular + Network request failed + Please check the network connection and try again~ + Loading + position + No more data + No data + nearby + ten thousand + One moment please + News + Report + retry + refuse + Preservation + Register + No one is currently in the voice link + Welcome to PDLIVE + Newcomer Bonus + EXP + Complete newcomer tasks for more rewards + ReceiveAwards + One free gift privilege! + + Send out + I am sorry + video + myname.pdlive.shayu.fileprovider + people + individual + + Number + Next step + upload + My studio + My room + Administrators + Black users + Banned users + List of forbidden users + Live room of + Lifting of the ban + Blacklist of users + No banned users + No blacklisted users + You are not an administrator yet + Relieving blackout + Happy mid + Invitation code + Congratulations%1$s get%2$SX%3$s times + Lucky gift description + Current prize pool level + Current bonus pool amount + Lv.%1$s + Send barrage, need to reach level%1$s + Speak, need to reach level%1$s + Open positioning + Resolutely shut down + Close the location, the live broadcast will not be seen by nearby people, and the number of people in the live studio may be reduced. Are you sure to close it? + Mars + Shopping Mall + Detailed + wallet + Personalized signature + Personal information + Please select payment method + expenditure + income + User recharge agreement + Read and agree + Please select the recharge amount + Payment method not selected + My%1$s + Recharge + Receive + News Center + Version + Confirm payment + Confirm payment (¥%1$s) + Payment method + Immediate payment + User level + Anchor level + The connection has been disconnected, please restart the broadcast + Absolutely empty + Chat + Live + Break + + Please, can you pay attention to me? + Follow and exit + Exit + User + + If you don\'t take the initiative,how can we have a story?Tell the anchor say hi~ + + + follow + Enter activity + + in + gave + \'s live studio has been opened + \'s live studio has been renewed + opened the + renewed + + Enter the live broadcast room + Beans + + Encourage the author of this dynamic article + + Confirm encouragement + Dynamic encouragement + Encouraging records + + The author hasn\'t given encouragement yet T_T + + Click to see more + + Customer service + Set up + Every Day 13:00PM-24:00AM + + Withdraw + + Open VIP and enjoy exclusive privileges! + Meet someone you like by chance~ + There is no news yet~~ + + Current VIP : + Expiration time: + + Successfully joined the blacklist + Failed to join blacklist + + Blacklist removed successfully + Failed to remove blacklist + + Reply + Reply to comments + + Click here to enter the reply + + For the time being, it is only open to the anchor + + 2011402032399020 + 959584e054a33614996361f0044e5253 + + ui10vIggex2F043HnztYNuA3g + J8jvBBeJoZbVojbkWUrvsj0K0UUkuV69CqQ7CEobhJn6tvAKpQ + ZWRrZnRUNlBlcHVxMXpsMzVmb2k6MTpjaQ + aq0eV4R1pqMK_AAeKRWnjPr7ErGMGgTPGgZJdm73WeRY-Kluws + + 1527128092082286592-NfYVOcHXy630vYUj4nMlDPh8PsVBHE + U5avdnRMb7yON6sYp4SAb1I99mFD8ch9KHIuFbEbd0IDN + + Complete the new person\'s pre task + Unlock custom features + Unlock the live room speech function + + Predecessors + Sign in with Facebook + Sign in with Twitter + Sign in with Google + + Request timed out, please try again later. + + Receive 1000 free beans + Now mobile number + Confirm to bind mobile number + Modify mobile number + After the mobile phone number is successfully bound, it will be automatically obtained + x1000 + After binding the mobile account, you can log in with the mobile account, + It can also be used to retrieve passwords. + + Bind account + + Trickster initiator + Trickery content + Exempt from this trickery + + Consume + Thanks for saving + + You can only speak after completing the previous task + + Heat addition + Hot & Time + + 熱度可以給主播的房間增加曝光度,熱度越高的直播間,在首頁的排名也越靠前,從而帶來更多的進房用戶,幫助主播在一段時間內迅速提高房間熱度,送出之後立即生效。 + 熱度卡如何獲得? + 1、周星榜主播冠軍的第一名用戶每週可自動獲得; + 2、通過參與官方活動,具體活動可留意官方消息。 + 熱度卡如何使用? + 前往「個人中心」-「我的包裹」中,即可使用熱度卡。 + 熱度卡生效多久? + 對指定主播使用熱度卡後,將會立即生效,效果時長為24小時,不管主播是否在線,熱度時長都將會持續減少 + Rewards coming! + Receive free +Limited ride And limited avatar frame + Looking for you like? + Go contact your personal guide to + get your prize redemption code! + Contact a mentor now! + Withdrawal succeeded + normal barrage + Float barrage + Total speaker + quote + Available times: %s Note: Update times at 4:00 am on the 1st of each month + Content cannot be empty + Noble exclusive site-wide news + Display messages on the whole station and jump to the current live room + Open noble king, emperor, super emperor to get free + back + to the nobles + Use successfully + Go to the live room + search history + you may also like + anchor + More + Live + More + Fun Games + Value-added benefits + Fan Club + Activity + Basic tools + Effect settings + Shield gift effect + Shield car effect + You are in the current live room + has recommended an anchor to you! + has sent you a reward, come and get it! + Pay attention to the channel that suits you. + What do you say to everyone + Settings + No access to the mystery man\'s personal home page。 + The Mystery Man + Notice + Online Service + Hot Ticket + Register and log in + Sign up for PD LIVE + Tell the world! + Tell the world! %s recommends anchor %s to everyone! + Tell the world! %s recommends the anchor %s to everyone, and the splendid glance is amazing! + Failed to load data, please try again later + open + Not enough speakers + order inquiries + No exception to the order + Login failed, please log in again + + onlookers + The live broadcast studio was opened + Baron + Viscount + Marquis + Duke + King + Emperor + Super king + Please wait... + The slide set + Slide up and down to switch the broadcast room + \ @user nickname \t\t hello ~ + oline_list + Search for people who want @ + The online audience + The audience + can not \@ myself + Total star + The number of power + %sStar challenge + Congratulations %s, completed %s %s star challenge, go to meet the host face! + star + Join your favorite host fan club + Small window play Settings + Small window to play + Minimize Play + Continue to guard + Join Fan club + Daemon list + You are the weekly guardian of the current anchor + You are the monthly guardian of the current anchor + You are the annual guardian of the current anchor + Show when exiting the live room + ALL Minimize Play + Anchor is waiting for you to become the guardian of TA, \n escort for TA! + Open a guard for your favorite anchor + Show on other apps and pages \n Need to open the display + Go to open + Don\'t like the small window play?\n You can turn it off in [Personal Center] - [Settings] + Go to Settings + Got it + Open noble, enjoy a lot of privileges! + Personal Settings + Rewards + Change password + Blacklist + Message Settings + Blocking gift effects + Blocking seat effects + If you want to Minimize Play,\nYou can go to set the license. + + + In a batch + Chat + Congratulations %s have won %s in the Lucky Angel! The next lucky angel will be you! + Congratulations on %s winning %s in Luck 100 %%! Go pass on the good luck! + Guardian group %s people + receive + To complete + Already collected + Image quality selection + More Settings + view more + The gift is on the way... + The gift is on the way + Remaining count :%s + Whether to confirm multiple PK (deduct 1 point after confirmation) remaining times on the day: %s + Invite \n anchor + End \nPK + Time %s + + accept + refuse + Persist in refusing + Random PK hint + + Automatic speech robot setup + Robot switch + Robot name setting + The word limit is 2 to 8 word + Automatic greeting setting + Number of configured items + Set automatic message sending + Go to set + Thank you for sending gifts, PK start, PK end automatic robot message, \n does not support customization. + Add content + At regular intervals, the robot automatically says the following sentence at random。 + Fill in the content recommendation, such as: send wish list, add fan group, etc + Automatic speech interval (minutes) + At least once every 5 minutes + When a user enters the studio, the robot will @the user and automatically + The following sentence is random. Set a minimum of 1 to a maximum of 20. + Robot setup + High definition + fluency + Ultra hd + After determining the definition of the broadcast, you need to restart the broadcast to change + Confirmation of broadcast Settings + clarity + Live channel + broadcast + robot + set + Not set + no + yes + Ultra HD hint + In the case of unstable network speed, the selection of ultra HD may lead to the delay of the picture in the broadcast room. Do you confirm the selection? + Stick to choice + Network prompt + The system detects that your network is unstable and insufficient device memory will affect the fluency of your live broadcast. Therefore, it is recommended that you choose fluency and clarity. + check version + Update + Latest Version + updating + There is no choice, the anchor is not turned on FHD live. + There is no choice, the anchor is not turned on HD live. + Sorry, this feature is on hold. + phone + Broadcast + Click To View + Anchor Task + I have read and agreed to the + Please read and agree to the PDLIVE Host Agreement + PDLIVE Host Agreement + The statute of limitations for new anchors expires + coin + gold + Number of gifts + Number of entry + New attention + Follow the conversion rate + New fan group + Fan group conversion rate + loading… + Gift and seat effects have been turned off and can be turned on manually in "Settings". + i \'m sorry! An error occurred. + Congratulations on getting it! + You have accumulated sign-ups this month %s Heaven + Sign in for 1 more day to get extra bonus. + Sign in to the center」 + Go to the「Sign-in Center」to get extra rewards! + Sign-in Center + Back to top + Go to the sign-in center + Confirm pick up + Unable to login? Click here to contact customer service + By logging in, you agree to the Terms of + Service + and + Privacy + Terms and policies + For details, please read the following message to install the application: + Welcome to PD LIVE. For your personal information and privacy, we will adopt the highest standards of treatment and protection. + In order to provide you with one-click sharing service, our product integrates Mob+U-Share SDK, The Mob+SDK needs to collect your device Mac address, unique device identifier (1MEIandroid IDIDFAOPENUDIDGUID, SIM card IMSI information), and public social account information that you need to share in order to complete the one-click sharing service. And through the geographical location calibration report data accuracy, provide basic anti-cheating services. For the sake of your information security, we have made data security and confidentiality agreements with third-party SDK service providers, and these companies will strictly abide by our data privacy and security requirements. We will not share your personally identifiable information with them unless we have your consent. To facilitate you better understand/Mob + data types and USES, and how to protect your personal information, you can log on to https:www.mob.com aboutpolicy understand [Mob +] privacy policy). + Clicking Agree means you have read and agree to all of the above.。 + agreement + Welcome to PD LIVE. + gift + User service agreement + 一 Fan privilege 一 + Gift name + True love ranking + and + Speech memo + Privacy policy + Daily gift pack + To one\'s liking + Opened a pair of + guard + I bought a ride + Purchased a beautiful number + VIP + Random PK + VIP seating + True love ranking + Please enter the number + You are the current anchor whose weekly guardian \n guardian date is up + My %1$s: + Top-up instructions + Registration means consent + One-time gift ≥2000 diamonds), can obtain fan privilege yo + Top up + User level + aristocracy + Fan club + Voice connection is not enabled + Wall of honor + Get a fan badge for giving gifts + Whether to clear unread messages + The application collects location data to support login and registration functions. + Goddess says + Say something... + %s here comes + Daily Wishes + Weekly Wishes + Month Wishes + Seasonal Wishes + Wish%s + aristocrat + sure + Reset Your: Day + Reset Wish: Week + Reset Wish: Month + Reset Wish: Month + Is reset confirmed + Resetting will empty the wish list, \nregardless of whether the wish is completed or not + Confirm Reset + Back to list + Current wish list not saved + Do you keep a current wishlist? + Not saved + + You have a %s, do you want to use it? Use it to open a diamond %s and get %s gold beans back + Not used + Use + wish + Play setting + language setting + Traditional Chinese + Add gifts, nobles, and guardian wishes + GoddessSaid + Contact information + unfollow + Where is the host doing badly~\nBrother, are you sure you want to unfollow? + follow + Heat Add + + diff --git a/config.gradle b/config.gradle index 95a3f25a3..367862767 100644 --- a/config.gradle +++ b/config.gradle @@ -9,9 +9,9 @@ ext { ] manifestPlaceholders = [ //正式、 - serverHost : "https://napi.yaoulive.com", +// serverHost : "https://napi.yaoulive.com", //测试 -// serverHost : "https ://ceshi.yaoulive.com", + serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", diff --git a/main/src/main/java/com/yunbao/main/activity/LanguageSettingActivity.java b/main/src/main/java/com/yunbao/main/activity/LanguageSettingActivity.java index 39275e236..02431ad32 100644 --- a/main/src/main/java/com/yunbao/main/activity/LanguageSettingActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/LanguageSettingActivity.java @@ -1,10 +1,13 @@ package com.yunbao.main.activity; import android.app.Activity; +import android.content.Intent; +import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import com.yunbao.common.activity.AbsActivity; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.AppManager; import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.main.R; @@ -16,6 +19,7 @@ import java.util.Stack; public class LanguageSettingActivity extends AbsActivity { private LinearLayout traditionalChinese, english; private ImageView imgTraditionalChinese, imgEnglish; + private Locale locale; @Override protected int getLayoutId() { @@ -25,6 +29,14 @@ public class LanguageSettingActivity extends AbsActivity { @Override protected void main() { super.main(); + locale = IMLoginManager.get(mContext).getLocaleLanguage(); + if (locale == Locale.SIMPLIFIED_CHINESE) { + findViewById(R.id.img_english).setVisibility(View.GONE); + findViewById(R.id.img_traditional_chinese).setVisibility(View.VISIBLE); + } else { + findViewById(R.id.img_english).setVisibility(View.VISIBLE); + findViewById(R.id.img_traditional_chinese).setVisibility(View.GONE); + } traditionalChinese = findViewById(R.id.traditional_chinese); english = findViewById(R.id.english); imgEnglish = findViewById(R.id.img_english); @@ -33,13 +45,23 @@ public class LanguageSettingActivity extends AbsActivity { ViewClicksAntiShake.clicksAntiShake(traditionalChinese, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - changeAllActivitysLanguage(Locale.SIMPLIFIED_CHINESE); + locale = Locale.SIMPLIFIED_CHINESE; + findViewById(R.id.img_english).setVisibility(View.GONE); + findViewById(R.id.img_traditional_chinese).setVisibility(View.VISIBLE); } }); ViewClicksAntiShake.clicksAntiShake(english, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - changeAllActivitysLanguage(Locale.US); + locale = new Locale("en", "rUS"); + findViewById(R.id.img_english).setVisibility(View.VISIBLE); + findViewById(R.id.img_traditional_chinese).setVisibility(View.GONE); + } + }); + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.complete), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + changeAllActivitysLanguage(locale); } }); } @@ -47,8 +69,12 @@ public class LanguageSettingActivity extends AbsActivity { private void changeAllActivitysLanguage(Locale locale) { Stack allActivityStacks = AppManager.getInstance().getAllActivityStacks(); for (int i = 0; i < allActivityStacks.size(); i++) { - LanguageUtil.shiftLanguage(locale, allActivityStacks.get(i),mContext); + if (!(allActivityStacks.get(i) instanceof LanguageSettingActivity)) { + LanguageUtil.shiftLanguage(locale, allActivityStacks.get(i), mContext); + } } - + IMLoginManager.get(mContext).setLanguage(locale != Locale.SIMPLIFIED_CHINESE); + startActivity(new Intent(mContext, MainActivity.class)); + finish(); } } diff --git a/main/src/main/java/com/yunbao/main/adapter/MainHomeLivesClassAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainHomeLivesClassAdapter.java index 38cc49fae..582bf1b5c 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainHomeLivesClassAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainHomeLivesClassAdapter.java @@ -3,19 +3,21 @@ package com.yunbao.main.adapter; import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Color; - -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; +import android.os.Build; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + import com.yunbao.common.bean.LiveClassBean; import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.main.R; import java.util.List; +import java.util.Locale; public class MainHomeLivesClassAdapter extends RecyclerView.Adapter { @@ -71,6 +73,7 @@ public class MainHomeLivesClassAdapter extends RecyclerView.Adapter= Build.VERSION_CODES.N) { + locale = mContext.getResources().getConfiguration().getLocales().get(0); + } else { + locale = mContext.getResources().getConfiguration().locale; + } + if (locale.getLanguage().equals("zh")) { + mName.setText(bean.getChinese()); + } else { + mName.setText(bean.getEnglish()); + } + + if (position == choice) { mName.setBackgroundResource(R.drawable.button_ffc621); mName.setTextColor(Color.parseColor("#FFC621")); - }else{ + } else { mName.setBackgroundResource(R.drawable.button_cbd5e0); mName.setTextColor(Color.parseColor("#484D68")); } diff --git a/main/src/main/java/com/yunbao/main/utils/LanguageUtil.java b/main/src/main/java/com/yunbao/main/utils/LanguageUtil.java index c18836014..99048a50d 100644 --- a/main/src/main/java/com/yunbao/main/utils/LanguageUtil.java +++ b/main/src/main/java/com/yunbao/main/utils/LanguageUtil.java @@ -7,8 +7,6 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.util.DisplayMetrics; -import com.yunbao.main.activity.MainActivity; - import java.lang.reflect.Method; import java.util.Locale; @@ -42,9 +40,8 @@ public class LanguageUtil { DisplayMetrics dm = resources.getDisplayMetrics(); config.locale = locale; resources.updateConfiguration(config, dm); - if (!(activity instanceof MainActivity)) { - activity.recreate(); - } + activity.finish(); + } diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java index da5733aac..8f9a7e52d 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java @@ -3,10 +3,7 @@ package com.yunbao.main.views; import android.animation.ObjectAnimator; import android.app.Dialog; import android.content.Context; -import android.content.Intent; import android.graphics.Outline; -import android.net.Uri; -import android.os.Environment; import android.text.TextUtils; import android.util.Log; import android.view.View; @@ -14,7 +11,6 @@ import android.view.ViewGroup; import android.view.ViewOutlineProvider; import android.widget.ImageView; -import androidx.core.content.FileProvider; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; @@ -29,7 +25,6 @@ import com.yunbao.common.activity.WebViewActivity; import com.yunbao.common.adapter.RefreshAdapter; import com.yunbao.common.bean.AnchorRecommendModel; import com.yunbao.common.bean.BannerBean; -import com.yunbao.common.bean.ConfigBean; import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.LiveClassBean; import com.yunbao.common.bean.WeekListBean; @@ -37,10 +32,10 @@ import com.yunbao.common.custom.CommonRefreshView; import com.yunbao.common.custom.ItemDecoration; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.interfaces.OnItemClickListener; +import com.yunbao.common.manager.LiveClassManager; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.MicStatusManager; import com.yunbao.common.utils.RouteUtil; -import com.yunbao.common.utils.ShareUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.CustomViewHolder; import com.yunbao.live.event.LiveRoomChangeEvent; @@ -59,7 +54,6 @@ import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; -import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -272,37 +266,34 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement mClassRecyclerViewTop = (RecyclerView) findViewById(R.id.classRecyclerView_top); mClassRecyclerViewTop.setHasFixedSize(true); mClassRecyclerViewTop.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false)); - ConfigBean configBean = CommonAppConfig.getInstance().getConfig(); - if (configBean != null) { - List list = configBean.getLiveClass(); - if (list != null && list.size() > 0) { - List targetList = new ArrayList<>(); - if (list.size() <= 6) { - targetList.addAll(list); - } else { - targetList.addAll(list); - } - final MainHomeLivesClassAdapter topAdapter = new MainHomeLivesClassAdapter(mContext, targetList, false); - topAdapter.setOnItemClickListener(new OnItemClickListener() { - @Override - public void onItemClick(LiveClassBean bean, int position) { - if (!canClick()) { - return; - } - if (position != 0) { - select = bean.getId(); - } else { - select = 0; - } - mRefreshView.initData(); - topAdapter.choice = position; - topAdapter.notifyDataSetChanged(); - + List list = new LiveClassManager(mContext).getLiveClass(); + if (list != null && list.size() > 0) { + List targetList = new ArrayList<>(); + if (list.size() <= 6) { + targetList.addAll(list); + } else { + targetList.addAll(list); + } + final MainHomeLivesClassAdapter topAdapter = new MainHomeLivesClassAdapter(mContext, targetList, false); + topAdapter.setOnItemClickListener(new OnItemClickListener() { + @Override + public void onItemClick(LiveClassBean bean, int position) { + if (!canClick()) { + return; } - }); - if (mClassRecyclerViewTop != null) { - mClassRecyclerViewTop.setAdapter(topAdapter); + if (position != 0) { + select = bean.getId(); + } else { + select = 0; + } + mRefreshView.initData(); + topAdapter.choice = position; + topAdapter.notifyDataSetChanged(); + } + }); + if (mClassRecyclerViewTop != null) { + mClassRecyclerViewTop.setAdapter(topAdapter); } } View headView = mAdapter.getHeadView(); diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java index 7025820a8..7ab3282ec 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java @@ -93,9 +93,9 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder { @Override protected String[] getTitles() { return new String[]{ - WordUtil.getString(R.string.follow), - WordUtil.getString(R.string.hot), - WordUtil.getString(R.string.recomment), + mContext.getString(R.string.follow), + mContext.getString(R.string.hot), + mContext.getString(R.string.recomment), }; } diff --git a/main/src/main/res/layout/activity_language_sett.xml b/main/src/main/res/layout/activity_language_sett.xml index 725f459a7..c8f128d89 100644 --- a/main/src/main/res/layout/activity_language_sett.xml +++ b/main/src/main/res/layout/activity_language_sett.xml @@ -32,6 +32,7 @@ android:textStyle="bold" />