Android music player (1) startup animation

This is a simple music player project I made in my sophomore year last year: it was written as much as possible to imitate Kugou Music, and the specific functions are as follows:

1: Startup animation: Click to run the program and a two-second video will appear, similar to the startup animation of Kugou Music, very impressive!

2: Login registration interface: Enter the account number and password to check the information to log in!

3: Carousel: Exactly the same as Kugou Music, there is an automatic cycle carousel above the main interface, click on each picture information of the carousel to enter the corresponding specific service, very extra points!

4: The turntable of the music record, the progress bar of the song synchronization, and the pause/play/continue/switching of the music!

5: Music search is realized!

6: Play the video column!

7; The layout of the personal information interface is realized, such as feedback, rating, more, gender age nickname, collection, etc.!

The start animation code is as follows:

package com.ypc.xiaoxiongmusic;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.widget.VideoView;
public class MainActivity extends AppCompatActivity {
    private final long SPLASH_LENGTH = 2000;
    Handler handler = new Handler();
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        //Video playback processing
        VideoView vv = this.findViewById(R.id.videoView1);
        String x = "android.resource://" + getPackageName() + "/" + R.raw.xrbt;
        vv.setVideoURI(Uri.parse(x));
        vv.start();
        //Time control processing
        handler.postDelayed(new Runnable() { //Use handler's postDelayed to achieve delayed jump
            public void run() {
                Intent intent = new Intent(MainActivity.this, LoginActivity.class);
                startActivity(intent);
                finish();
            }
        }, SPLASH_LENGTH);//After 3 seconds, jump to the next interface of the application
    }
}

The screenshot of the effect is as follows:

 

Guess you like

Origin blog.csdn.net/Abtxr/article/details/126817775