Is it possible to remove the panel where the date, notifications are displayed? 
2 answers
In the manifest:
<activity android:name=".ActivityName" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/> Or programmatically:
public class ActivityName extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // remove title requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.main); } } |
Yes you can. It is necessary to set:
actionBar.setStackedBackgroundDrawable(new ColorDrawable(Color.parseColor("#33aaccbb"))); Where color is set in ARGB format ( #33aaccbb ) - the first byte shows transparency, the rest in RGB colors.
PS In the first version, the question was about the transparency of the action bar :)
- throws a mistake. I hid all the action and set the toolbar as his - Jason Statham
- Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.app.ActionBar.setStackedBackgroundDrawable (android.graphics.drawable.Drawable)' on a null object reference - Jason Statham
- Well, if
actionBar==nullthen I’m not guilty - learn how to extract it correctly! - Barmaley - I'll try to figure it out. I guess I was wrong somewhere. - Jason Statham
- wrote so, but the transparency of the ActionBar does not change actionBar = getSupportActionBar (); actionBar.setStackedBackgroundDrawable (new ColorDrawable (Color.parseColor ("# 33aaccbb"))); - Jason Statham
|