How can you manually reorder a ListView in Android? - android

I have a ListView in Android that needs to have the ability to be manually reordered. An example would be within Android's Music Player application, when you can change the order of tracks in a playlist. I know how to programmatically change the order of a ListView, but not how to do it in regards to a touch and slide approach that can be found in the Music Player application.
Thanks in advance,
groomsy.

There's nothing in the framework for this at the moment, you'll need to look at the Music source code to get an idea of how to implement this. You can also, of course, copy over parts of the relevant implementation as you see fit.

Related

How to create UI and Controls like Apple Music App in Android?

Video Link
I want to create view and animation like Apple Music App available in iOS. But, I want to do it in Android similar to above video link.
Is it possible to create such views in Android? How can I achieve this? How to proceed in this?
Please share any links and references.
This question is already asked but has no answer.
I want to implement something like Apple's new Music app which is synced with iTunes. Bubbles on the move, according to mood we can select a music, genre etc.
I want this type of gesture with moving bubbles in Android. Can anyone help me out, how to figure out and play with Gestures or Motion Controls of that bubbles anywhere in screen. Also is there any support library if available would be very helpful to implement and move further. The bubbles are to be created randomly by a web service call.
Any suggestion in this will be helpful.
i have used box2d with libGdx to configure the gradle in android studio...
u can refer my project on github which has selectable bubbles in random motion, and u can ask if any doubts...
https://github.com/mohitKejriwal/Bubble-UI-Android

Android - Control Music Player with Phonegap/SteroidsJS/Cordova

I'm currently using Appgyvers SteroidsJS (which is forks of Phonegap and Cordova), and would like to control the default music player from within the app on my Android (5.0.1). Simple things like play, stop, pause, next, and back.
I can't seem to find any direct way to accomplish this, or even a way to pop in to the Android API from Steroids/Phonegap. Does anyone have a solid method to do so or is it not possible? Thanks!
Nothing simple existed, so in the end I learnt how to write something myself. :)
https://github.com/dustinblackman/cordova-MusicControl/

How do I put a listView inside a regular Activity?

I want to create an audio app to promote music. I want to have a regular Activity that has a listView and then a container or two to display standard information about the Artist. Music files will be inside the ListVIew with a button to play and stop the selected song. So to sum this up how should go about putting a list with buttons inside an Activity with other container? Hopefully this makes sense.
Thanks.
You should really check out this great Notepad tutorial. You create a basic Notepad, which uses a listview, and a database. If you just starting out I can tell you from experience, these tutorials are the best way to learn. There are tons of them out there :).
EDIT: While I could just give you the code to do what you want, you would learn nothing in the process :).

Is there any predefined sound on android?

I'm wondering, if there is any predefined sounds in Android that I can use in my application.
I was trying to use a class called SoundManager which is build specifically for sound playing in an efficient way.
I realized that what I need is much much smaller than this class. I need a click sound when the button is clicked and a navigation sound when the user navigate through a menu or a set of buttons.
I guess there is something in the android API fit to my purpose but I could not find it.
any help please in finding it and hoe to use it?
You could look into the View.playSoundEffect api. This method accepts a SoundEffectConstants value where, among others, a CLICK constant is available.
Using the MediaPlayer it's really simple, see for instance this SO thread:
Android - play sound on button click - Null pointer exception

Android App - mediaplayer always available

this is my first post on stack overflow so hoping you can help.
We are developing an Android App, that requires an audio player to always be available, no matter what activity you are on. Ideally, we want this to be a "pop up" style player that is accessible when you tap the screen or tab an always visible button (e.g. on the action bar). However, the player needs to overlay the activity you are on, and continue playing the audio as you move between activities and (ideally) multi task within your device.
I have looked into various options for this, and wonder if a service is the best way to go. The other option I am considering is a transarent activity. But I am open to suggestions!
Can anyone offer any guidance? Thanks in advance.
I think that service, playing the tracks is the best way to go.
For the player visual interface, you should have one view, which will be included wherever you need it.
When you open this view, you will get the information from the service (what track are you on, where exactly in the track) and initialize with those results.
At least this is my suggestion approach to the task. Good luck!
Have tried considering making it an android widget? It remains on the home screen and user can play music and get back to other tasks.
But not sure if it will meet your overlay criteria(Which I quite didn't understand.. :))
Check out Androids MediaPlayer-Class. This should prevent you with all nessesary playback functions. On how to create your player-controll-interface on Androids Action-Bar, check Googles Tutorial. But note that the ActionBar is available since Android 3.0, not in previous version!

Categories

Resources