修改問題

This commit is contained in:
18401019693 2022-09-20 14:55:32 +08:00
parent 1cdf065839
commit 567e403151
6 changed files with 50 additions and 4 deletions

View File

@ -478,6 +478,11 @@ public class LiveAudienceActivity extends LiveActivity {
L.e("LiveAudienceActivity-------onDestroy------->");
}
@Override
protected void onPause() {
super.onPause();
manager.onPause();
}
/**
* 点亮
*/
@ -599,6 +604,7 @@ public class LiveAudienceActivity extends LiveActivity {
@Override
protected void onResume() {
super.onResume();
manager.onResume();
}

View File

@ -20,6 +20,7 @@ import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.annotation.RequiresApi;
@ -57,6 +58,7 @@ public class ZhuangBanActivity extends AbsActivity {
private ValueCallback<Uri[]> mValueCallback2;
private SVGAImageView svga;
private FrameLayout title;
private TextView titleView;
@Override
protected int getLayoutId() {
@ -66,14 +68,22 @@ public class ZhuangBanActivity extends AbsActivity {
@Override
protected void main() {
String url = getIntent().getStringExtra(Constants.URL);
String titleString = getIntent().getStringExtra("title");
L.e("H5---2s>" + url);
LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView);
mProgressBar = (ProgressBar) findViewById(R.id.progressbar);
svga = (SVGAImageView) findViewById(R.id.svga);
titleView = (TextView) findViewById(R.id.titleView);
title = findViewById(R.id.ft_title);
if (isFullWindow) {
title.setVisibility(View.GONE);
}
if (getIntent().hasExtra("title") && TextUtils.isEmpty(titleString)) {
title.setVisibility(View.GONE);
} else {
title.setVisibility(View.VISIBLE);
titleView.setText(titleString);
}
mWebView = new WebView(mContext);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
params.topMargin = DpUtil.dp2px(1);
@ -231,6 +241,26 @@ public class ZhuangBanActivity extends AbsActivity {
mContext.startActivity(intent);
}
/**
* 新跳转
*
* @param url 跳转的url
* @param title 有标题的展示标题
*/
@JavascriptInterface
public void androidClickToNewH5PageView(String url, String title) {
url = CommonAppConfig.HOST + url;
url += "?uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ CommonAppConfig.getInstance().getToken();
Log.i("tag", url);
Intent intent = new Intent(mContext, ZhuangBanActivity.class);
intent.putExtra("url", url);
intent.putExtra("isFull", false);
intent.putExtra("title", title);
mContext.startActivity(intent);
}
}
// //js调用原生
@ -339,6 +369,9 @@ public class ZhuangBanActivity extends AbsActivity {
Intent intent = new Intent(context, ZhuangBanActivity.class);
Log.i("tag", url);
intent.putExtra(Constants.URL, url);
if (url.contains("Noble/index.html")){
intent.putExtra("title", "");
}
context.startActivity(intent);
}

View File

@ -214,6 +214,7 @@ public class SocketRyClient {
break;
case Constants.SOCKET_SEND_MSG://文字消息点亮用户进房间这种混乱的设计是因为服务器端逻辑就是这样设计的,客户端无法自行修改
wordLightEnterRoom(map, received);
L.e("收到socket---> 文字消息" + socketMsg);
break;
case Constants.SOCKET_LIGHT://飘心
mListener.onLight();

View File

@ -376,6 +376,9 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
// mVideoView.start();
}
mPaused = false;
if (mPlayer.isPlaying()==0){
mPlayer.resumeVideo();
}
}
@Override
@ -384,6 +387,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
// mVideoView.runInBackground(false);
// }
// mPaused = true;
mPlayer.pauseVideo();
}
@Override

View File

@ -364,12 +364,14 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
@Override
public void onResume() {
if (mLivePlayViewHolder != null)
mLivePlayViewHolder.onResume();
}
@Override
public void onPause() {
if (mLivePlayViewHolder != null)
mLivePlayViewHolder.onPause();
}
@Override
@ -566,7 +568,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
@Override
public void onChat(LiveChatBean bean, int index) {
Log.e("LiveChatBean", GsonUtils.toJson(bean));
Log.e("LiveChatBean", GsonUtils.toJson(bean));
if (bean.getType() == 1) {
if (!bean.getContent().contains(mLiveBean.getUserNiceName())) {
return;

View File

@ -8,7 +8,7 @@
android:id="@+id/ft_title"
android:layout_width="match_parent"
android:layout_height="65dp"
android:visibility="gone"
android:visibility="visible"
android:background="@color/white"
android:paddingTop="19dp">