| | |
| | | import android.os.Environment; |
| | | import android.text.TextUtils; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | | import android.view.Window; |
| | | import android.view.WindowManager; |
| | | import android.widget.LinearLayout; |
| | |
| | | } |
| | | //设置状态栏文字颜色及图标为深色 |
| | | mActivity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); |
| | | RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, result); |
| | | mActivity.findViewById(R.id.v_status_bar).setLayoutParams(params); |
| | | ViewGroup.LayoutParams params=mActivity.findViewById(R.id.v_status_bar).getLayoutParams(); |
| | | params.width=ViewGroup.LayoutParams.MATCH_PARENT; |
| | | params.height=result; |
| | | // RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, result); |
| | | // if( mActivity.findViewById(R.id.v_status_bar).getLayoutParams() instanceof RelativeLayout.LayoutParams) { |
| | | // mActivity.findViewById(R.id.v_status_bar).setLayoutParams(params); |
| | | // } |
| | | try { |
| | | Class decorViewClazz = Class.forName("com.android.internal.policy.DecorView"); |
| | | Field field = decorViewClazz.getDeclaredField("mSemiTransparentStatusBarColor"); |