SlideShare a Scribd company logo
1. LAYOUT CHANGE:
First change the Layout. LINEAR TO / RELATIVE LAYOUT.
2. GO TO VALUES FOLDER IN ANDROID STUDIO:
AND THEN FIRST CHOOSE THE OPTION OF (styles.xml).
3. (styles.xml):
INstyles.xmlCHANGE THIS LINE.
4. AND THEN CHOOSE (colors.xml):
INcolors.xmlCHANGECOLORS.
5. CIRCULAR IMAGE VIEW WORKING:
FIRST ADD PICTURE LINK ON DRWABLE ( icon.png). Copy image link from (Pics) folder then
paste it on drawable.
THEN, GO TO GRADLE SCRIPT. CHOOSE A SECOND OPTION (BUILD GRADLE (MODULE APP)).
OPEN A DEPENDENCIES. AND THEN ADD LIBRARY OF CICULAR IMAGE VIEW (implementation
'com.mikhaellopez:circularimageview:4.2.0' ).
SYNC NOW, AFTER SYNC NOW LIBRARY OF CIRCULAR IMAGE VIEW ADD.
THEN, ACTIVITY MAIN.XML
6. WRITE <CIRCULAR IMAGE CODE> ON MUSIC ICON:
7. PLAY BUTTON WORKING:
8. PAUSE BUTTON:
9. STOP BUTTON:
10. AFTER UI DESIGNING GO TO MAIN ACTIVITY.JAVA:
FIRST CREATE A FOLDER IN (res). IN res CREATE A FOLDER NAME (raw) WHERE WE ADD
MUSIC.
IN raw FOLDER ADD PICTURE.
11. WORKING ON MAIN ACTIVITY.JAVA:
First we use 3Buttons.
AND Then casting a Buttons.
ADD ACTION LISTENER ON 3BUTTONS.
ADD SWITCH CASE. WHICH HELPS TO ACTION DISPLAY ON EVERY BUTTON.
 Android project working
12. NEXT STEP IS MUSIC/SONGS PLAY ON ANDROID APPLICATION:
CREATE OBJECT OF MEDIA PLAYER.
MediaPlayer mediaPlayer;
THAN, MOVE ON PLAY BUTTON AND WRITE A CODE.
mediaPlayer=MediaPlayer.create (getApplicationContext(),R.raw.lyrics);
USE MUSIC DIRECTORY R.RAW.LYRICS. (SELECT MUSIC DIRECTORY NAME FROM RAW FOLDER).
//MEDIA PLAYER OBJECT IS COMPLETED.
Than, we start media/Music player.
mediaPlayer.start();
13. NEXT STEP IS ADD CONDITION ON MEDIA PLAYER BUTTONS PLAY, PAUSE, STOP:
TO PROTECT FROM THIS ERROR ADD CONDITION.
PLAY_BTN:
//case R.id.play_btn:
if (mediaPlayer==null){
//mediaPlayer=MediaPlayer.create(getApplicationContext(),R.raw.lyrics);
mediaPlayer.start();
}
STOP_BTN:
//case R.id.stop_btn:
if (mediaPlayer!=null){
mediaPlayer.stop();
mediaPlayer=null;
}
break;
PAUSE_BTN:
//case R.id.paus_btn:
if (mediaPlayer!=null){
mediaPlayer.pause();
ADD CONDITION ON THIS LINE:
BECAUSE WHEN WE PAUSE THE SONG. (SONG) SHOULD RUN ON THAT POSTION WHERE FROM PAUSE
SONG.WHEN CLICK ON PLAY BUTTON, START SONG FROM PAUSE CURRENT POSITION NOT FROM
START.
pauseCurrentPosition=mediaPlayer.getCurrentPosition();
}
break;
//public class MainActivity extends AppCompatActivity implements
View.OnClickListener {
//Button play,pause,stop;
// MediaPlayer mediaPlayer;
int pauseCurrentPosition;
else if (!mediaPlayer.isPlaying()){
mediaPlayer.seekTo(pauseCurrentPosition);
mediaPlayer.start();
}
break;
 Android project working
 Android project working

More Related Content

PDF
Tat learning applications en
PDF
I have adream
PDF
I have adream
PPT
Android User Interface: Basic Form Widgets
PPTX
Notes Unit4.pptx
PPT
Day 4: Android: UI Widgets
PPT
Day 5: Android User Interface [View Widgets]
DOCX
In the beginningAfter playing some songs and playing a cu.docx
Tat learning applications en
I have adream
I have adream
Android User Interface: Basic Form Widgets
Notes Unit4.pptx
Day 4: Android: UI Widgets
Day 5: Android User Interface [View Widgets]
In the beginningAfter playing some songs and playing a cu.docx

Similar to Android project working (20)

PPTX
Android animations
ODP
Android tutorials7 calculator
PDF
Using android's action bar
PDF
Android app development guide for freshers by ace web academy
PDF
IMPLEMENTING VOICE CONTROL WITH THE ANDROID MEDIA SESSION API ON AMAZON FIRE ...
PDF
Top Tips for Android UIs - Getting the Magic on Tablets
PPTX
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
PPT
Photostory
PPTX
[Pro forma] - production log
PPT
Iphone ipad-application
PPTX
Mobile Application Development-Components and Layouts
DOCX
Android action bar and notifications-chapter16
PDF
First steps with Scilab
PDF
The sounds of Android (Android Makers 2018)
PDF
Logical Triggers.pdf
PDF
Volley lab btc_bbit
PPTX
Android UI
DOCX
Mobile Audio Synthesiser - Final Year Thesis
PPTX
Keynote + Next Gen UIs.pptx
PDF
Android 8 behavior changes
Android animations
Android tutorials7 calculator
Using android's action bar
Android app development guide for freshers by ace web academy
IMPLEMENTING VOICE CONTROL WITH THE ANDROID MEDIA SESSION API ON AMAZON FIRE ...
Top Tips for Android UIs - Getting the Magic on Tablets
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
Photostory
[Pro forma] - production log
Iphone ipad-application
Mobile Application Development-Components and Layouts
Android action bar and notifications-chapter16
First steps with Scilab
The sounds of Android (Android Makers 2018)
Logical Triggers.pdf
Volley lab btc_bbit
Android UI
Mobile Audio Synthesiser - Final Year Thesis
Keynote + Next Gen UIs.pptx
Android 8 behavior changes
Ad

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PPTX
Spectroscopy.pptx food analysis technology
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
1. Introduction to Computer Programming.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Machine Learning_overview_presentation.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPT
Teaching material agriculture food technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
A Presentation on Artificial Intelligence
Spectroscopy.pptx food analysis technology
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Unlocking AI with Model Context Protocol (MCP)
Network Security Unit 5.pdf for BCA BBA.
SOPHOS-XG Firewall Administrator PPT.pptx
Machine learning based COVID-19 study performance prediction
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
1. Introduction to Computer Programming.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Machine Learning_overview_presentation.pptx
Encapsulation theory and applications.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Teaching material agriculture food technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Mobile App Security Testing_ A Comprehensive Guide.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Ad

Android project working

  • 1. 1. LAYOUT CHANGE: First change the Layout. LINEAR TO / RELATIVE LAYOUT. 2. GO TO VALUES FOLDER IN ANDROID STUDIO: AND THEN FIRST CHOOSE THE OPTION OF (styles.xml). 3. (styles.xml): INstyles.xmlCHANGE THIS LINE. 4. AND THEN CHOOSE (colors.xml):
  • 2. INcolors.xmlCHANGECOLORS. 5. CIRCULAR IMAGE VIEW WORKING: FIRST ADD PICTURE LINK ON DRWABLE ( icon.png). Copy image link from (Pics) folder then paste it on drawable. THEN, GO TO GRADLE SCRIPT. CHOOSE A SECOND OPTION (BUILD GRADLE (MODULE APP)). OPEN A DEPENDENCIES. AND THEN ADD LIBRARY OF CICULAR IMAGE VIEW (implementation 'com.mikhaellopez:circularimageview:4.2.0' ).
  • 3. SYNC NOW, AFTER SYNC NOW LIBRARY OF CIRCULAR IMAGE VIEW ADD. THEN, ACTIVITY MAIN.XML 6. WRITE <CIRCULAR IMAGE CODE> ON MUSIC ICON: 7. PLAY BUTTON WORKING:
  • 4. 8. PAUSE BUTTON: 9. STOP BUTTON: 10. AFTER UI DESIGNING GO TO MAIN ACTIVITY.JAVA: FIRST CREATE A FOLDER IN (res). IN res CREATE A FOLDER NAME (raw) WHERE WE ADD MUSIC. IN raw FOLDER ADD PICTURE.
  • 5. 11. WORKING ON MAIN ACTIVITY.JAVA: First we use 3Buttons. AND Then casting a Buttons. ADD ACTION LISTENER ON 3BUTTONS. ADD SWITCH CASE. WHICH HELPS TO ACTION DISPLAY ON EVERY BUTTON.
  • 7. 12. NEXT STEP IS MUSIC/SONGS PLAY ON ANDROID APPLICATION: CREATE OBJECT OF MEDIA PLAYER. MediaPlayer mediaPlayer; THAN, MOVE ON PLAY BUTTON AND WRITE A CODE. mediaPlayer=MediaPlayer.create (getApplicationContext(),R.raw.lyrics); USE MUSIC DIRECTORY R.RAW.LYRICS. (SELECT MUSIC DIRECTORY NAME FROM RAW FOLDER). //MEDIA PLAYER OBJECT IS COMPLETED. Than, we start media/Music player. mediaPlayer.start(); 13. NEXT STEP IS ADD CONDITION ON MEDIA PLAYER BUTTONS PLAY, PAUSE, STOP: TO PROTECT FROM THIS ERROR ADD CONDITION. PLAY_BTN: //case R.id.play_btn: if (mediaPlayer==null){ //mediaPlayer=MediaPlayer.create(getApplicationContext(),R.raw.lyrics); mediaPlayer.start(); } STOP_BTN: //case R.id.stop_btn: if (mediaPlayer!=null){ mediaPlayer.stop(); mediaPlayer=null; } break; PAUSE_BTN: //case R.id.paus_btn: if (mediaPlayer!=null){ mediaPlayer.pause(); ADD CONDITION ON THIS LINE: BECAUSE WHEN WE PAUSE THE SONG. (SONG) SHOULD RUN ON THAT POSTION WHERE FROM PAUSE SONG.WHEN CLICK ON PLAY BUTTON, START SONG FROM PAUSE CURRENT POSITION NOT FROM START.
  • 8. pauseCurrentPosition=mediaPlayer.getCurrentPosition(); } break; //public class MainActivity extends AppCompatActivity implements View.OnClickListener { //Button play,pause,stop; // MediaPlayer mediaPlayer; int pauseCurrentPosition; else if (!mediaPlayer.isPlaying()){ mediaPlayer.seekTo(pauseCurrentPosition); mediaPlayer.start(); } break;