Tech Programming Ideas is one of the best places on the programming for programmers. Learn coding with Tech Programming Ideas tutorials. We are covered android programming, php, yii2 framework, javascript, mysql, vb.net etc.
Switch case statements are a substitute for long if statements that compare a variable to several integral values
The switch statement is a multiway branch statement. It provides an easy way to dispatch execution to different parts of code based on the value of the expression.
Switch is a control statement that allows a value to change control of execution.
SYNTAX
switch(index){
case 0:
//Do this and thisbreak;
case 1:
//Do this and thisbreak;
case 2:
//Do this and this:break;
default: //For all other cases, do thisbreak;
}
requestWindowFeature(Window.FEATURE_NO_TITLE);//will hide the title
getSupportActionBar().hide(); //hide the title bar
The setFlags() method of Window class is used to display content in full screen mode. You need to pass theWindowManager.LayoutParams.FLAG_FULLSCREEN constant in the setFlags method.