android


When I click the listview button to play the sound on Android [closed]


I want to do the following;
When you click on the pictures, you want to play audio files. I looked at examples from the internet but could not find an answer. How can I do this?
here is the code
playButton = (ImageButton)findViewById(R.id.imageButton1);
MediaPlayer mysong = MediaPlayer.create(this, R.raw.song);
playbutton.setOnClickListener(new OnClickListener() {
#Override
public void onClick(View arg0) {
mysong.start();
}
});
Use a MediaPlayer (refer this). Inside the onClick of ImageView, call the start() function for your requirement.

Related Links

barteksc/AndroidPdfViewer massive APK Size
How to listen for Facebook permissions in order to launch next activity
FirebaseRecyclerAdapter with nested elements
Insert img from folder into sqlite to show in Android app
Android Studio / Eclipse import error
Group member access restriction in WifiDirect Group
How to replace MultipartEntity with MultipartEntityBuilder on Android?
Anko ignoring layout_margin defined in style
is it async task is compulsory to implement whenever wanted to post data to server from android c to perform login
How to Authenticate user on Android using Rails Devise as backend?
Android directory creation on SD card
org.json.JSONException: End of input at character 0 of
Android Device Monitor not showing content of data/user where my database is stored
Android different swipe directions using ViewPager
Reverse layouts inside RelativeLayout programmatically
Glide pre loaded image

Categories

HOME
phantom-dsl
kentico
microsoftgraph
linkedin
formal-languages
pyqt
spring-data-mongodb
iis-6
jtextpane
trac
flume
32bit-64bit
heap
redis-sentinel
ycsb
tput
enterprise-architect
cumulocity
screen-readers
package.json
template-engine
xmonad
enterprise-miner
breadth-first-search
poedit
systemtime
postscript
joptionpane
displaytag
strongname
jboss6.x
licensing
jackson-modules
fragment-backstack
jasmine-node
genexus-sd
handler
ntp
alm
panoramas
r-grid
mailkit
android-gridview
installshield-le
joomla2.5
searchkit
swagger-php
reason
openalpr
mcustomscrollbar
stringtokenizer
escpos
claims
openresty
term
automapper-5
facebook-pixel
posixct
podscms
boo
otp
bootstrap-tags-input
restore
rmongo
data-protection
cycle2
rasterize
rewrite
django-urls
binomial-theorem
coda
sql-server-data-tools
snoop
telepat
entity-framework-4.3
zxspectrum
broadband
grouping-sets
theos
structuremap3
device-tree
genymotion-call
lnk
dsym
sbcl
xmltodict
gwt-openlayers
spring-3
tlf
ui-select2
facebook-timeline
dolby-audio-api
web-notifications
dopostback
vfs
web-farm
listitem
predicatebuilder
creole
clrstoredprocedure
jqueryform
aspmenu
windows-identity
xpsdocument
todos
movieplayer
image-capture

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App