修复:

This commit is contained in:
18401019693 2022-08-23 16:25:17 +08:00
parent 5dc6ee197d
commit af396f9fa4
4 changed files with 17 additions and 4 deletions

View File

@ -149,7 +149,11 @@ public class LiveAudienceActivity extends LiveActivity {
mLiveBean = intent.getParcelableExtra(Constants.LIVE_BEAN); mLiveBean = intent.getParcelableExtra(Constants.LIVE_BEAN);
mLiveUid = mLiveBean.getUid(); mLiveUid = mLiveBean.getUid();
mStream = mLiveBean.getStream(); mStream = mLiveBean.getStream();
if (getIntent().getIntExtra("isry", 0) == 1) {
isRy = true;
} else {
isRy = false;
}
setVolumeControlStream(AudioManager.STREAM_MUSIC); setVolumeControlStream(AudioManager.STREAM_MUSIC);
manager = new PortraitLiveManager(this, intent); manager = new PortraitLiveManager(this, intent);
initView(); initView();

View File

@ -1,8 +1,10 @@
package com.yunbao.live.dialog; package com.yunbao.live.dialog;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.view.Display; import android.view.Display;
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;
@ -134,7 +136,12 @@ public class SidebarLiveAudience extends AbsDialogFragment {
@Override @Override
protected void setWindowAttributes(Window window) { protected void setWindowAttributes(Window window) {
getActivity().getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(0);
}
window.setWindowAnimations(com.yunbao.common.R.style.RightLeftToAnim); window.setWindowAnimations(com.yunbao.common.R.style.RightLeftToAnim);
WindowManager.LayoutParams params = window.getAttributes(); WindowManager.LayoutParams params = window.getAttributes();
params.width = DeviceUtils.getScreenWidth(getActivity()) / 3 * 2; params.width = DeviceUtils.getScreenWidth(getActivity()) / 3 * 2;
@ -143,6 +150,8 @@ public class SidebarLiveAudience extends AbsDialogFragment {
window.setAttributes(params); window.setAttributes(params);
} }
/** /**
* 前往直播间 * 前往直播间
*/ */

View File

@ -27,7 +27,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:paddingStart="8dp" android:paddingStart="8dp"
android:paddingTop="56dp" android:paddingTop="10dp"
android:paddingEnd="8dp"> android:paddingEnd="8dp">

View File

@ -303,7 +303,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
Log.d(TAG, token); Log.d(TAG, token);
PushManager.getInstance() PushManager.getInstance()
.onReceiveToken(MainActivity.this, PushType.GOOGLE_FCM, token); .onReceiveToken(MainActivity.this, PushType.GOOGLE_FCM, token);
Toast.makeText(MainActivity.this, token, Toast.LENGTH_SHORT).show(); // Toast.makeText(MainActivity.this, token, Toast.LENGTH_SHORT).show();
} }
}); });
boolean showInvite = getIntent().getBooleanExtra(Constants.SHOW_INVITE, false); boolean showInvite = getIntent().getBooleanExtra(Constants.SHOW_INVITE, false);