How To Remove The Upper Grey Bar In This App?
Can anybody tell me how to remove that grey bar in app containing the app name..
Solution 1:
You can add this line in your menifest -
android:theme="@android:style/Theme.NoTitleBar"
for full screen use below -
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
If you want to do it programatically use below code -
publicclassActivityNameextendsActivity {
@OverridepublicvoidonCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// remove title
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);
}
}
for full screen -
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
Use according to your feasibility.
Solution 2:
Add in Manifest.xml file
<applicationandroid:theme="@style/AppTheme">
style.xml
<resources> Add below here </resources>
<stylename="AppTheme.NoActionBar"><itemname="windowActionBar">false</item><itemname="windowNoTitle">true</item></style>
MainActivity.Java
public class mainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_splash);
}
}
Follow above steps
hope this may help you
Post a Comment for "How To Remove The Upper Grey Bar In This App?"