1. Initialization
Context mcontext = sdmusicplaybackactivity. This;
Layoutinflater mlayoutinflater = (layoutinflater) mcontext
. Getsystemservice (layout_inflater_service );
Mseekview = mlayoutinflater. Inflate (R. layout. pop_seek, null );
Mseekpopupwindow = new popupwindow (mseekview, 800, 50 );
// Create the timer
Timer timer = new timer ();
Timer. Schedule (New initpopupwindow (), 1000 );
2. Private class initpopupwindow extends timertask {
@ Override
Public void run (){
Message message = new message ();
Message. What = 30;
Mhandler. sendmessage (Message );
}
}
Public void showpopupwindow (){
Mseekpopupwindow. showatlocation (findviewbyid (R. Id. id_sd_mediaplay), gravity. Bottom, 0,100 );
}
3. Pay attention to adjust the display time according to the specific time when the message is sent to popupwindow. If the time is less than the overwrite time, the time will be enough after the 3D display is complete. Use the timer to solve the pop-up popupwindow phenomenon.