I have a list view, in that i am adding image view and audio view like whats-app. When ever i add a item to the list view list adapter GetView is calling and total list is refreshing. While i am playing audio if any item add to the list, list is refreshing and audio view is also refreshing but audio is still playing.
Can any one give a suggestion to solve refreshing List view items...?
Audio is playing, because the background service is still active. To stop the audio, you would need the instance that is currently "playing", and to stop refreshing, you would need to remove the "UpdateList" handlers.
Both of which, I assume, you don't want to do. So, do this. Instead of stopping the update or refreshing of the list. Hold a reference to the "audio view". Either that, or while refreshing the list check which of the audio is currently in playing mode. Then, change the state of that item and leave the others as they should be.
This would require you to have:
Static field, to hold the reference.
Either as a media name, or the instance and so on.
Handler to update the list.
Code to check which media item needs to be in "playing" mode once list is rendered again.
You forgot to share the code, it would still be better to share some code blocks so that we can practically help you out.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
I am self learner of android programming. i am using android fragments with REST API's and WEB Services. every thing is working fine till now. i am facing a issue when user click on back press of HARDWARE. i am getting confused in it.. when i am using back-stack then the issue is it will take me back but the title or fragments activity not changed as i am doing dynamically.
second thing.. some times its take me in correct way but event data of that activity also not loading..
Please help me.. if any sample stuff provide me in this then it would be a great thing for me.