Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
3c6b4d13a9
@ -1,10 +1,19 @@
|
|||||||
package com.yunbao.common.dialog;
|
package com.yunbao.common.dialog;
|
||||||
|
|
||||||
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.Spannable;
|
||||||
|
import android.text.SpannableStringBuilder;
|
||||||
|
import android.text.style.ClickableSpan;
|
||||||
|
import android.text.style.ForegroundColorSpan;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
|
import android.view.View;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import com.lzf.easyfloat.interfaces.OnPermissionResult;
|
import com.lzf.easyfloat.interfaces.OnPermissionResult;
|
||||||
import com.lzf.easyfloat.permission.PermissionUtils;
|
import com.lzf.easyfloat.permission.PermissionUtils;
|
||||||
@ -18,6 +27,7 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
|||||||
*/
|
*/
|
||||||
public class FloatSettingsDialog extends AbsDialogFragment {
|
public class FloatSettingsDialog extends AbsDialogFragment {
|
||||||
private ImageView specialSwitch, specialMountSwitch;
|
private ImageView specialSwitch, specialMountSwitch;
|
||||||
|
private TextView hint;
|
||||||
private boolean isFloat;
|
private boolean isFloat;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -40,6 +50,16 @@ public class FloatSettingsDialog extends AbsDialogFragment {
|
|||||||
super.onActivityCreated(savedInstanceState);
|
super.onActivityCreated(savedInstanceState);
|
||||||
specialSwitch = (ImageView) findViewById(R.id.special_switch);
|
specialSwitch = (ImageView) findViewById(R.id.special_switch);
|
||||||
specialMountSwitch = (ImageView) findViewById(R.id.special_mount_switch);
|
specialMountSwitch = (ImageView) findViewById(R.id.special_mount_switch);
|
||||||
|
hint = (TextView) findViewById(R.id.hint);
|
||||||
|
SpannableStringBuilder builder = new SpannableStringBuilder(getString(R.string.system_window_hint));
|
||||||
|
String goTo = getString(R.string.to_open_the);
|
||||||
|
int star = builder.length();
|
||||||
|
int end = star + goTo.length();
|
||||||
|
builder.append(goTo);
|
||||||
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor("#ffaf08")),
|
||||||
|
star, end, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
|
||||||
|
hint.setText(builder);
|
||||||
isFloat = IMLoginManager.get(getActivity()).isFloat();
|
isFloat = IMLoginManager.get(getActivity()).isFloat();
|
||||||
if (!isFloat) {
|
if (!isFloat) {
|
||||||
ImgLoader.display(getContext(), R.mipmap.special_icon_off, specialSwitch);
|
ImgLoader.display(getContext(), R.mipmap.special_icon_off, specialSwitch);
|
||||||
@ -80,6 +100,21 @@ public class FloatSettingsDialog extends AbsDialogFragment {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
//坐骑特效开关
|
||||||
|
ViewClicksAntiShake.clicksAntiShake(hint, () -> {
|
||||||
|
dismiss();
|
||||||
|
PermissionUtils.requestPermission(getActivity(), new OnPermissionResult() {
|
||||||
|
@Override
|
||||||
|
public void permissionResult(boolean isFloat) {
|
||||||
|
if (!isFloat) {
|
||||||
|
ImgLoader.display(getContext(), R.mipmap.special_icon_off, specialSwitch);
|
||||||
|
} else {
|
||||||
|
ImgLoader.display(getContext(), R.mipmap.special_icon_on, specialSwitch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -26,7 +26,6 @@ import io.rong.imkit.config.RongConfigCenter;
|
|||||||
import io.rong.imlib.RongIMClient;
|
import io.rong.imlib.RongIMClient;
|
||||||
import io.rong.imlib.model.Conversation;
|
import io.rong.imlib.model.Conversation;
|
||||||
import io.rong.imlib.model.Message;
|
import io.rong.imlib.model.Message;
|
||||||
import io.rong.recognizer.Recognizer;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 会话列表
|
* 会话列表
|
||||||
@ -61,7 +60,7 @@ public class RongcloudIMManager {
|
|||||||
Log.e(CLASSNAME, "initRongIM:");
|
Log.e(CLASSNAME, "initRongIM:");
|
||||||
initPhotoGlide();
|
initPhotoGlide();
|
||||||
//初始化科大讯飞语音转文字
|
//初始化科大讯飞语音转文字
|
||||||
Recognizer.setAppId("af2efca9");
|
// Recognizer.setAppId("af2efca9");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static RongIMClient.OnReceiveMessageWrapperListener mListener;
|
private static RongIMClient.OnReceiveMessageWrapperListener mListener;
|
||||||
|
@ -76,12 +76,15 @@
|
|||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/hint"
|
||||||
|
android:clickable="true"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:text="@string/system_window_hint"
|
android:text="@string/system_window_hint"
|
||||||
android:textColor="#FF9A9A9A"
|
android:textColor="#FF9A9A9A"
|
||||||
android:textSize="13.5sp" />
|
android:textSize="13.5sp"
|
||||||
|
android:focusable="true" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
@ -892,32 +892,33 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="login_invalid">Login failed, please log in again</string>
|
<string name="login_invalid">Login failed, please log in again</string>
|
||||||
|
|
||||||
<string name="onlookers">onlookers</string>
|
<string name="onlookers">onlookers</string>
|
||||||
<string name="open_noble">的直播間開通了</string>
|
<string name="open_noble">The live broadcast studio was opened</string>
|
||||||
<string name="baron">baron</string>
|
<string name="baron">baron</string>
|
||||||
<string name="viscount">子爵</string>
|
<string name="viscount">viscount</string>
|
||||||
<string name="marquis">侯爵</string>
|
<string name="marquis">The marquis DE</string>
|
||||||
<string name="duke">公爵</string>
|
<string name="duke">The duke</string>
|
||||||
<string name="king">国王</string>
|
<string name="king">The king</string>
|
||||||
<string name="emperor">皇帝</string>
|
<string name="emperor">The emperor</string>
|
||||||
<string name="better_emperor">超皇</string>
|
<string name="better_emperor">Super huang</string>
|
||||||
<string name="login_wait">Please wait...</string>
|
<string name="login_wait">Please wait...</string>
|
||||||
<string name="slide_settings">滑動設置</string>
|
<string name="slide_settings">The slide set</string>
|
||||||
<string name="up_slide_settings">上下滑動切換直播間</string>
|
<string name="up_slide_settings">Slide up and down to switch the broadcast room</string>
|
||||||
<string name="live_say_something_a">\@用户昵称\t\t你好啊~</string>
|
<string name="live_say_something_a">\ @user nickname \t\t hello ~</string>
|
||||||
<string name="oline_list">在线列表</string>
|
<string name="oline_list">oline_list</string>
|
||||||
<string name="search_want">搜索想要@的人</string>
|
<string name="search_want">Search for people who want @</string>
|
||||||
<string name="online_audience">在線觀眾</string>
|
<string name="online_audience">The online audience</string>
|
||||||
<string name="audience">觀眾</string>
|
<string name="audience">The audience</string>
|
||||||
<string name="cannot_yourself">無法@自己</string>
|
<string name="cannot_yourself">can not \@ myself</string>
|
||||||
<string name="total_star_value">總星值</string>
|
<string name="total_star_value">Total star</string>
|
||||||
<string name="number_of_people_assisted">助力人數</string>
|
<string name="number_of_people_assisted">The number of power</string>
|
||||||
<string name="star_change">%s星挑战</string>
|
<string name="star_change">%sStar challenge</string>
|
||||||
<string name="star_success">恭喜 %s,完成了%s %s星 挑戰,快去一睹主播芳容吧!</string>
|
<string name="star_success">Congratulations %s, completed %s %s star challenge, go to meet the host face!</string>
|
||||||
<string name="star">星</string>
|
<string name="star">star</string>
|
||||||
<string name="small_window_settings">小窗播放設置</string>
|
<string name="small_window_settings">Small window play Settings</string>
|
||||||
<string name="small_window">小窗播放</string>
|
<string name="small_window">Small window to play</string>
|
||||||
<string name="app_window">Minimize Play</string>
|
<string name="app_window">Minimize Play</string>
|
||||||
<string name="app_window_hint">Show when exiting the live room</string>
|
<string name="app_window_hint">Show when exiting the live room</string>
|
||||||
<string name="system_window">ALL Minimize Play</string>
|
<string name="system_window">ALL Minimize Play</string>
|
||||||
<string name="system_window_hint">Show on other apps and pages</string>
|
<string name="system_window_hint">Show on other apps and pages \n Need to open the display</string>
|
||||||
|
<string name="to_open_the">Go to open</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -929,7 +929,8 @@
|
|||||||
<string name="small_window_settings">小窗播放設置</string>
|
<string name="small_window_settings">小窗播放設置</string>
|
||||||
<string name="small_window">小窗播放</string>
|
<string name="small_window">小窗播放</string>
|
||||||
<string name="app_window">APP內小窗播放</string>
|
<string name="app_window">APP內小窗播放</string>
|
||||||
<string name="app_window_hint">讓直播間內容在本APP主頁面中小窗播放</string>
|
<string name="app_window_hint">退出直播間時在主界面顯示小窗</string>
|
||||||
<string name="system_window">APP全應用小窗播放</string>
|
<string name="system_window">APP全應用小窗播放</string>
|
||||||
<string name="system_window_hint">讓直播間內容在所有APP及頁面中小窗播放</string>
|
<string name="system_window_hint">在其他應用上及所有界面显示小窗\n需打開懸浮窗權限。</string>
|
||||||
|
<string name="to_open_the">前往打開</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -518,6 +518,12 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
GiftCacheUtil.getInstance().pause();
|
GiftCacheUtil.getInstance().pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
manager.onStop();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点亮
|
* 点亮
|
||||||
*/
|
*/
|
||||||
@ -812,6 +818,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
intent.putExtra("url", url);
|
intent.putExtra("url", url);
|
||||||
intent.putExtra("isFull", true);
|
intent.putExtra("isFull", true);
|
||||||
mContext.startActivity(intent);
|
mContext.startActivity(intent);
|
||||||
|
manager.setQuitF(true);
|
||||||
break;
|
break;
|
||||||
case LIVE_ROOM_EXCEPTION:
|
case LIVE_ROOM_EXCEPTION:
|
||||||
//主播未直播时自动下滑至下一个直播间
|
//主播未直播时自动下滑至下一个直播间
|
||||||
@ -824,6 +831,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
break;
|
break;
|
||||||
case REPORT:
|
case REPORT:
|
||||||
LiveReportActivity.forward(mContext, event.getBean().getUid());
|
LiveReportActivity.forward(mContext, event.getBean().getUid());
|
||||||
|
manager.setQuitF(true);
|
||||||
break;
|
break;
|
||||||
case POPULAR:
|
case POPULAR:
|
||||||
url = CommonAppConfig.HOST + "/h5/activity/PopularityTask/index.html";
|
url = CommonAppConfig.HOST + "/h5/activity/PopularityTask/index.html";
|
||||||
@ -888,6 +896,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
* @param type 1、官方通知 2、互动信息 3、在线客服
|
* @param type 1、官方通知 2、互动信息 3、在线客服
|
||||||
*/
|
*/
|
||||||
private void toSysMsgWeb(String type) {
|
private void toSysMsgWeb(String type) {
|
||||||
|
manager.setQuitF(true);
|
||||||
ImHttpUtil.getImUserInfo("", new HttpCallback() {
|
ImHttpUtil.getImUserInfo("", new HttpCallback() {
|
||||||
|
|
||||||
@SuppressLint("MissingPermission")
|
@SuppressLint("MissingPermission")
|
||||||
@ -917,6 +926,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
.putExtra("uid", "")
|
.putExtra("uid", "")
|
||||||
.putExtra("title", "")
|
.putExtra("title", "")
|
||||||
.putExtra("headImg", ""));
|
.putExtra("headImg", ""));
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ import com.blankj.utilcode.util.GsonUtils;
|
|||||||
import com.facebook.appevents.AppEventsLogger;
|
import com.facebook.appevents.AppEventsLogger;
|
||||||
import com.lzf.easyfloat.EasyFloat;
|
import com.lzf.easyfloat.EasyFloat;
|
||||||
import com.lzf.easyfloat.permission.PermissionUtils;
|
import com.lzf.easyfloat.permission.PermissionUtils;
|
||||||
|
import com.lzf.easyfloat.utils.LifecycleUtils;
|
||||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||||
import com.tencent.imsdk.v2.V2TIMManager;
|
import com.tencent.imsdk.v2.V2TIMManager;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
@ -400,9 +401,13 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPause() {
|
public void onPause() {
|
||||||
// if (mLivePlayViewHolder != null)
|
|
||||||
// mLivePlayViewHolder.onPause();
|
}
|
||||||
if (mLiveBean != null && !isQuitF) {
|
|
||||||
|
@Override
|
||||||
|
public void onStop() {
|
||||||
|
boolean isForeground = LifecycleUtils.INSTANCE.isForeground();
|
||||||
|
if (mLiveBean != null && !isQuitF && !isForeground) {
|
||||||
LiveFloatView.getInstance()
|
LiveFloatView.getInstance()
|
||||||
.cacheLiveData(mLiveBean, mLiveType, mLiveSDK, mLiveTypeVal)
|
.cacheLiveData(mLiveBean, mLiveType, mLiveSDK, mLiveTypeVal)
|
||||||
.builderSystemFloat(mContext, mLiveBean.getPull());
|
.builderSystemFloat(mContext, mLiveBean.getPull());
|
||||||
@ -411,11 +416,6 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
isQuitF = false;
|
isQuitF = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onStop() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
|
|
||||||
|
@ -369,8 +369,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_centerInParent="true"
|
android:layout_centerInParent="true"
|
||||||
android:visibility="invisible"
|
android:src="@mipmap/live_icon_newpeople_en"
|
||||||
android:src="@mipmap/live_icon_newpeople_en" />
|
android:visibility="invisible" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/live_new_people_red_dot"
|
android:id="@+id/live_new_people_red_dot"
|
||||||
|
Loading…
Reference in New Issue
Block a user