Welcome screen when the app starts

//One of the implementation methods
public class WelcomeActivity extends AppCompatActivity {
    Handler handler = new Handler ();
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate (savedInstanceState);
        setContentView(R.layout.welcome_layout);
        handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                Intent intent = new Intent(WelcomeActivity.this,MainActivity.class);
                startActivity(intent);
                finish();
            }
        },3000);
    }
}


To make the content of the AppCompatImageView control fill the screen in the layout page, you can add the following properties:
android:scaleType="fitXY"

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326632475&siteId=291194637