欢迎启动效果:
1、
public class WelComeActivity extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.welcome);
start();
}
public void start(){
new Thread(){
@Override
public void run() {
try {
Thread.sleep(2500);
} catch (InterruptedException e) {
e.printStackTrace();
}
Intent intent = new Intent(WelComeActivity.this, LoginActivity.class);
startActivity(intent);
finish();
}
}.start();
}
}
2、布局
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=" http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/welcome" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="250px"
android:paddingLeft="70px"
style="@style/content"
android:text="房达客正在登录中....."
/>
</LinearLayout>
1、
public class WelComeActivity extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.welcome);
start();
}
public void start(){
new Thread(){
@Override
public void run() {
try {
Thread.sleep(2500);
} catch (InterruptedException e) {
e.printStackTrace();
}
Intent intent = new Intent(WelComeActivity.this, LoginActivity.class);
startActivity(intent);
finish();
}
}.start();
}
}
2、布局
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=" http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/welcome" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="250px"
android:paddingLeft="70px"
style="@style/content"
android:text="房达客正在登录中....."
/>
</LinearLayout>