![]() ![]() Open src//AndroidMediaPlayerExample.java file and paste the code below.ĪndroidMediaPlayerExample.java package com.javacodegeeks. Creating the source code of the main Activity Poweramp Music Player (Trial) build-957-bundle-play latest version XAPK (APK Bundle) Download by Poweramp Software Design (Max MP) for Android free online at. This image is used as a background source of an ImageView in our layout xml file. We have also added an image jpg file, in res/drawable folders of the project. Figure 8: Inserted an mp3 file inside raw folder We have dragged and dropped the sample_song.mp3 file. The onClick attribute describes which method is going to “catch” this event.Īlso, do not forget to insert a sound clip in the res/raw folder of the project. You can notice that we will use the smart android:onClick attribute from the xml, in order to avoid setting onTouch listeners in the main Android Java Code. Open res/layout/activity_main.xml, go to the respective xml tab and paste the following: We are going to make a very simple layout xml for our activity, that only consists of a LinearLayout that contains the graphical elements for our Media Player. You can see the structure of the project: Figure 7. It will also be created a fragment layout xml, that we are not going to use in this project and you can remove it if you want. ![]() ![]() xml file for the layout will automatically be created in the res/layout folder. You have to specify a name for the new Activity and a name for the layout description of your app. Select the “Blank Activity” option and press Next. ![]()
0 Comments
Leave a Reply. |