Use MediaPlayer to do simple music player, more content please go to Baidu experience view http://jingyan.baidu.com/article/60ccbceb63452364cab197f1.html"http://schemas.android.com/apk/res/android"Xmlns:tools="Http://schemas.android.com/tools"Android:layout_width="match_parent"Android:layout_height="match_parent"android:paddingleft="@dimen/activity_horizontal_margin"Android:paddingright="@dimen/activity_hor
call, also need to note that I write here is LinearLayout Layoutparams, so our custom view of the parent space if linearlayout, of course, you can also modify.
4, the use of the control
We just need to get space to call the Start method and then call Setfullscreen and Setnormalscreen in the Onconfigurationchanged method,
Layout
Activity Code
public class Mainactivity extends Appcompatactivity {
Commonvideoview videoview;
@Override
protected void onCreate (Bundle savedin
With two days of free time, research has written a class Win8-style Android music player that implements most of the basic functions. Here's a look at the specific description:Basic implementation Features:Note: Android system version must be above 2.2, to ensure that the phone installed SD card (some icons to QQ music and Baidu Music)Interface composition:Welcom
Self-developed Win8-style Android music player application source code (standalone version), win8android
I spent two days in my spare time studying and writing a Win8-style android music player, which implements most of the basic functions. The specific description is as follows:
Basic functions:Note: The
;}}The above class to encapsulate music media information, some variables to see the name can also see what is, for example, said title,duration This class, is nothing more than song name, time-length and other information, some variable name word, but do not know what to use, In fact, I do not know what information, although printed out, but do not know exactly where to use, anyway, a brain is read out first, after the printout to see what is. Second, a way to read the media Audio:public class
Recently in an Android video player, there is a problem: when you switch to the next video, the middle will stay in the last video of the remnants of the screen.What's going on?I find a lot of information on the Internet, and finally found the reason: I use a custom Surfaceview to display the screen, switch video is not the Surfaceview display content to do processing.How to solve?Knowing the reason, that w
I would like to ask, how to write in their own program to call the system's music player it.I search on Google, mainly there are two ways, but not what I want.The first is to use the URI of the MP3 music file, and intent, to make the call, but this is used for playback of a song./** * Play Songs of the specified name * @param audiopath Specify the music to play by default * /public static void Playaudio (String audiopath) { Inten
Tag:androidstylejava Issues amp sizeonsp in order to find the buffer playback mode on the Android platform, it took a lot of effort, in this exploration process, Decisively negated the way native media, and a nuplayer was attempted before the steaming Source player was found. We put the android inside the Nuplayer alone can be used to run the NDK compiler load
In the previous section, the embedded flash animation in the android program is roughly described. This time I made an extension based on the previous content and made a simple Flash Player.
The prerequisites are described in the previous section. You need to install the Android platform and the flash plug-in.
First look at the engineering drawing and:
Pro
Recently, when I was working on a project, I encountered a small problem. I needed to write a View to control the playing behavior of the system music player and obtain information about the music being played, maybe I just wanted to save some time at the beginning, so I didn't go directly to the source code, but searched the internet, but I was surprised that I didn't actually have this online. Why can't I say I have done this without my shoes? Hey,
Learning Android for two months, feel now into a bottleneck-the basic knowledge, but not flexible use . I think this is what all beginners will encounter when they learn Android.Problem, so it is intended to be a small project for a simple music player, which is also a practical program that is particularly suitable for beginners. Although small, but also can examine a lot of things. A few days ago, I
Playing video and audio in the win computer often uses the WindowsMediaPlayer player in the computer, while in Android, the audio and video are also played using the MediaPlayer player.is the life cycle of MediaPlayer. dle State: When a MediaPlayer object is instantiated with the keyword new or the Reset () method in the calling class is entered into this state; End State: when the release () method is call
The full version of the application source code of the client for Android player is V1.2. The first time you enter the SDK, if you are prompted to fail to obtain the data, please exit and try again. Ensure that the mobile phone has a network and the simulator cannot play the video. sdk2.3 or above is required. Test environment: 2.3sdk, resolution: 480*800Application Introduction:All video formats are suppor
-fading woundsAR (artist) artist name, Ti (title) song Name, Al (album) album Name, by () editor (refers to the person who edited the LRC lyrics)The offset () time compensation value, in milliseconds, with positive values indicating overall advance, negative opposite.The time format in the lyrics is more agreeable: [00:00.20] etc., 00: minutes, 00: seconds,. 50 for the number of milliseconds,It is more convenient to turn them into milliseconds at the end of the process.Ext.: http://www.cr173.com
function, just add a line of code to complete. Private void Play(intCurrentTime) {Try{Mediaplayer.reset ();//Restore the parameters to their original stateMediaplayer.setdatasource (path); Mediaplayer.prepare ();//BufferingMediaplayer.setonpreparedlistener (NewPreparedlistener (currenttime));//Register a listenerINITLRC ();//Update playback statusIntent Intent =NewIntent (Play_statue);//Send the completed signal, update the playback statusIntent.putextra ("Playstatue",true); Sendbroa
This article is a custom video player that can be switched on screen (the computer is separated due to changes in size when changing the screen), such as:--------------Play Video Summary:2 Ways of Surfaceview+mediaplayer and VideoviewThere is a surfaceholder in the Surfaceview, which is obtained through the Surfaceview.getholder () method, plus settype if a compatible 2.3 system is required (surfaceholder.surface_type_ Push_buffers); otherwise only th
Cover Chart:
Brief introduction
The Wave music is an open source Android online music player.
Play local music and online music
Online music charts, such as hot songs, new songs, etc.
Gao Music's vinyl album cover
Lyrics Show, automatically search lyrics
Night mode
Timed shutdown
Update descriptionv 1.0I release
Todo
Online music can be downloaded and added to my music lis
In the search local video section of Android local video player development, we can search for a local video and display the image, title, and duration of each video, of course, if you need to add other methods such as the video length and width, you can use the method in the video class. Since we have obtained the video, the next step is to decode the video. I use FFMPEG to decode the video, so this is the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.