I\'ve created one splash screen with android studio 0.1, but when I test it on my phone(nexus s) in debugging mode with usb the image isn\'t show.. why?
this is the
Try this code
MainActivity
public class MainActivity extends Activity {
String EmpID;
int requestCode;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.splash);
Thread timer = new Thread() {
public void run() {
try {
sleep(2500);
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
startActivity(new Intent(getApplication(), Main.class));
MainActivity.this.finish();
}
}
};
timer.start();
}
}
Splash.xml Remember splash image should be png