diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 3c3071e54..d3458c640 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -149,7 +149,11 @@ public class LiveAudienceActivity extends LiveActivity { mLiveBean = intent.getParcelableExtra(Constants.LIVE_BEAN); mLiveUid = mLiveBean.getUid(); mStream = mLiveBean.getStream(); - + if (getIntent().getIntExtra("isry", 0) == 1) { + isRy = true; + } else { + isRy = false; + } setVolumeControlStream(AudioManager.STREAM_MUSIC); manager = new PortraitLiveManager(this, intent); initView(); diff --git a/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java b/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java index ec4a699e1..6385c8aca 100644 --- a/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java +++ b/live/src/main/java/com/yunbao/live/dialog/SidebarLiveAudience.java @@ -1,8 +1,10 @@ package com.yunbao.live.dialog; +import android.os.Build; import android.os.Bundle; import android.view.Display; import android.view.Gravity; +import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.ImageView; @@ -134,7 +136,12 @@ public class SidebarLiveAudience extends AbsDialogFragment { @Override 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); WindowManager.LayoutParams params = window.getAttributes(); params.width = DeviceUtils.getScreenWidth(getActivity()) / 3 * 2; @@ -143,6 +150,8 @@ public class SidebarLiveAudience extends AbsDialogFragment { window.setAttributes(params); } + + /** * 前往直播间 */ diff --git a/live/src/main/res/layout/view_sidebar_live_audience.xml b/live/src/main/res/layout/view_sidebar_live_audience.xml index 779f68da4..ca028ef11 100644 --- a/live/src/main/res/layout/view_sidebar_live_audience.xml +++ b/live/src/main/res/layout/view_sidebar_live_audience.xml @@ -27,7 +27,7 @@ android:layout_height="match_parent" android:orientation="vertical" android:paddingStart="8dp" - android:paddingTop="56dp" + android:paddingTop="10dp" android:paddingEnd="8dp"> diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index aa3a7ae0d..6ff5f2677 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -303,7 +303,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene Log.d(TAG, token); PushManager.getInstance() .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);