Use AndroidStudio to develop a simple music player

1. Software product display:
1. Log in to the home page interface

ç»å½çé¢

2. Online music interface

å¨çº¿é³ä¹çé ¢

3. Play interface

æ­æ¾çé¢

4. System prompt and jump interface

ç³ »ç» æ示ä¸è · ³è½¬çé ¢

4. Exit the prompt interface

éåºæ示çé ¢

2. Summary of the writing process
1. Write the login homepage interface, complete the reading of the music files that have been downloaded in the mobile phone, and obtain the album name, album picture, and singer of each music file and display them.
2. Writing an online music interface. Originally, I wanted to complete the function of reading music files online, but temporarily the ability is limited, and I can only fill in the data directly with text.
3. Write the playback interface, complete the settings of the music pause, next song, previous song, progress bar, playback mode, etc. The code here is relatively complicated.
4. Write the system prompt and jump interface to complete the prompt and jump of the selected file.
5. Write the system exit prompt interface and complete the exit program.
3. Refining the writing process
Write and log in to the homepage interface, complete the reading of the downloaded music files in the mobile phone, and obtain the album name, album picture, and singer of each music file and display them.
1. Create a module and name it app02

è¿éåå¾çæè¿ °

2. Create a package named fragment

è¿éåå¾çæè¿ °

3. Create a fragment file in the fragment package and name it LogicFragment, pay attention to remove the two default tick

è¿éåå¾çæè¿ °

4. Make the login interface in the layout file fragment_logic corresponding to LogicFragment
1. Preparations The
default login interface is as follows:

è¿éåå¾çæè¿ °

Now we need to remove the prompt box of MyApplication for more direct viewing effect in the future.
Step 1: Open the AndroidManifest.xml file

è¿éåå¾çæè¿ °

Step 2: Hold down the Ctrl key and click on the circled position in the picture below

è¿éåå¾çæè¿ °

Part 3: Modify the sentence in the circled position in the picture below:

è¿éåå¾çæè¿ °

è¿éåå¾çæè¿ °
Then you will see the prompt box disappeared

è¿éåå¾çæè¿ °

**Sorry, I suddenly feel that the blog is used to explain a certain knowledge point, not to explain a project, so, this is the source code of the Baidu cloud website, the running program must be run on the phone, because it is read on the emulator SD card, there will be problems (recommendation is to download the file on github):
Baidu cloud link
has put the project on my Github, this is the warehouse address: the music player source code Github address
How to download:


The source code is the file of the app package, don’t run it wrong. The
source code is the file of the app package, don’t run it wrong. The
source code is the file of the app package. Don’t run it wrong
.—————————————— -
Disclaimer: this article is the original article CSDN bloggers "intoSunshine", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https://blog.csdn.net/shaochen2015821426/article/details/79059099

Guess you like

Origin blog.csdn.net/qq_26280383/article/details/114373422