Android Open Source - audioplayer Current Play Animation Manager From Project Back to project page audioplayer .
License The source code is released under:
GNU General Public License
If you think the Android project audioplayer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code package fr.julien_dumortier.simplemusicplayer.item.itemadapter;
/ * w w w . j a v a 2 s . c o m * /
import fr.julien_dumortier.simplemusicplayer.R;
import fr.julien_dumortier.simplemusicplayer.thememanager.DisplayManager2;
import android.content.Context;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.Animation.AnimationListener;
import android.widget.LinearLayout;
public class CurrentPlayAnimationManager {
private View mCurrentViewAnimated;
private View v, v2, v3;
private int mCurrentPos;
private AnimationListener mList, mList2 ,mList3;
private Context mContext;
public CurrentPlayAnimationManager(Context context) {
mCurrentPos = -1;
mContext = context;
}
public void addViewAndstartAnimation(View v, int pos) {
stopAnimation();
mCurrentPos = pos;
LinearLayout rl = (LinearLayout) v.findViewById(R.id.play_now);
if (rl!=null) {
rl.clearAnimation();
startAnimation(rl);
}
}
private void startAnimation(View vv) {
mCurrentViewAnimated = vv;
mCurrentViewAnimated.setVisibility(View.VISIBLE);
v = mCurrentViewAnimated.findViewById(R.id.image1);
v.setBackgroundColor(DisplayManager2.getCurrentPlayAnimationColor(mContext));
mList = new AnimationListener() {
public void onAnimationStart(Animation animation) {}
public void onAnimationRepeat(Animation animation) {}
public void onAnimationEnd(Animation anim) {
v.clearAnimation();
Animation animation = AnimationUtils.loadAnimation(mContext, R.anim.scale_anim1);
animation.setAnimationListener(mList);
v.startAnimation(animation);
}
};
Animation animation = AnimationUtils.loadAnimation(mContext, R.anim.scale_anim1);
animation.setAnimationListener(mList);
v.startAnimation(animation);
v2 = mCurrentViewAnimated.findViewById(R.id.image2);
v2.setBackgroundColor(DisplayManager2.getCurrentPlayAnimationColor(mContext));
mList2 = new AnimationListener() {
public void onAnimationStart(Animation animation) {}
public void onAnimationRepeat(Animation animation) {}
public void onAnimationEnd(Animation anim) {
v2.clearAnimation();
Animation animation = AnimationUtils.loadAnimation(mContext, R.anim.scale_anim2);
animation.setAnimationListener(mList2);
v2.startAnimation(animation);
}
};
Animation animation2 = AnimationUtils.loadAnimation(mContext, R.anim.scale_anim2);
animation2.setAnimationListener(mList2);
v2.startAnimation(animation2);
v3 = mCurrentViewAnimated.findViewById(R.id.image3);
v3.setBackgroundColor(DisplayManager2.getCurrentPlayAnimationColor(mContext));
mList3 = new AnimationListener() {
public void onAnimationStart(Animation animation) {}
public void onAnimationRepeat(Animation animation) {}
public void onAnimationEnd(Animation anim) {
v3.clearAnimation();
Animation animation = AnimationUtils.loadAnimation(mContext, R.anim.scale_anim3);
animation.setAnimationListener(mList3);
v3.startAnimation(animation);
}
};
Animation animation3 = AnimationUtils.loadAnimation(mContext, R.anim.scale_anim3);
animation3.setAnimationListener(mList3);
v3.startAnimation(animation3);
}
public void stopAnimation() {
if (mCurrentViewAnimated!=null) {
mCurrentViewAnimated.clearAnimation();
v.clearAnimation();
v2.clearAnimation();
v3.clearAnimation();
mCurrentViewAnimated.setVisibility(View.GONE);
mCurrentViewAnimated = null;
}
mCurrentPos = -1;
}
public boolean isCurrentAnimation() {
return mCurrentViewAnimated != null;
}
public int getPos() {
return mCurrentPos;
}
public void resumeAnimation() {
}
public void pauseAnimation() {
}
}
Java Source Code List fr.julien_dumortier.simplemusicplayer.DevInfo.java fr.julien_dumortier.simplemusicplayer.DrawerListAdapter.java fr.julien_dumortier.simplemusicplayer.IMusicMediaControllerGetter.java fr.julien_dumortier.simplemusicplayer.MainActivity.java fr.julien_dumortier.simplemusicplayer.browsemanager.BrowseCover.java fr.julien_dumortier.simplemusicplayer.browsemanager.BrowseManager.java fr.julien_dumortier.simplemusicplayer.coveralbumeditor.CoverAlbumEditor.java fr.julien_dumortier.simplemusicplayer.coveralbumeditor.CoverAlbumGetter.java fr.julien_dumortier.simplemusicplayer.coveralbumeditor.PromptCovers.java fr.julien_dumortier.simplemusicplayer.equalizer.EqualizerActivity.java fr.julien_dumortier.simplemusicplayer.equalizer.EqualizerConfigurationDataBase.java fr.julien_dumortier.simplemusicplayer.equalizer.VerticalSeekBar.java fr.julien_dumortier.simplemusicplayer.equalizer.preset.Preset.java fr.julien_dumortier.simplemusicplayer.item.Album.java fr.julien_dumortier.simplemusicplayer.item.Artist.java fr.julien_dumortier.simplemusicplayer.item.Genre.java fr.julien_dumortier.simplemusicplayer.item.Item.java fr.julien_dumortier.simplemusicplayer.item.Playlist.java fr.julien_dumortier.simplemusicplayer.item.Track.java fr.julien_dumortier.simplemusicplayer.item.itemadapter.AlbumAdapter.java fr.julien_dumortier.simplemusicplayer.item.itemadapter.ArtistAdapter.java fr.julien_dumortier.simplemusicplayer.item.itemadapter.CurrentPlayAnimationManager.java fr.julien_dumortier.simplemusicplayer.item.itemadapter.GenreAdapter.java fr.julien_dumortier.simplemusicplayer.item.itemadapter.ItemAdapter.java fr.julien_dumortier.simplemusicplayer.item.itemadapter.ItemClicManager.java fr.julien_dumortier.simplemusicplayer.item.itemadapter.OrganisableTrackAdapter.java fr.julien_dumortier.simplemusicplayer.item.itemadapter.PlayListAdapter.java fr.julien_dumortier.simplemusicplayer.item.itemadapter.TrackAdapter.java fr.julien_dumortier.simplemusicplayer.notifynews.NotifyNews.java fr.julien_dumortier.simplemusicplayer.playerview.FullScreenPlayerViewController.java fr.julien_dumortier.simplemusicplayer.playerview.IPlayerViewController.java fr.julien_dumortier.simplemusicplayer.playerview.MiniPlayerViewController.java fr.julien_dumortier.simplemusicplayer.playerview.TimeFormater.java fr.julien_dumortier.simplemusicplayer.playlistview.MultiSelectManager.java fr.julien_dumortier.simplemusicplayer.playlistview.PlayListManagerActivity.java fr.julien_dumortier.simplemusicplayer.playlistview.SaveManagerView.java fr.julien_dumortier.simplemusicplayer.playlistview.SavedPlaylistManager.java fr.julien_dumortier.simplemusicplayer.service.BackgroundBinder.java fr.julien_dumortier.simplemusicplayer.service.MusicPlayerService.java fr.julien_dumortier.simplemusicplayer.service.bluetoohactionmanager.BluetoothReceiver.java fr.julien_dumortier.simplemusicplayer.service.notificationplayer.NotificationManagerService.java fr.julien_dumortier.simplemusicplayer.service.notificationplayer.NotificationPlayer.java fr.julien_dumortier.simplemusicplayer.service.phonestatemanager.PhoneCallStateManager.java fr.julien_dumortier.simplemusicplayer.service.playlist.EndOfPlayListException.java fr.julien_dumortier.simplemusicplayer.service.playlist.IMediaPlayerController.java fr.julien_dumortier.simplemusicplayer.service.playlist.MusicMediaPlayer.java fr.julien_dumortier.simplemusicplayer.service.playlist.PlayListManager.java fr.julien_dumortier.simplemusicplayer.thememanager.ColorPreferences.java fr.julien_dumortier.simplemusicplayer.thememanager.DisplayManager2.java fr.julien_dumortier.simplemusicplayer.thememanager.ManageDisplayView.java fr.julien_dumortier.simplemusicplayer.uiprompt.PromptActionByType.java fr.julien_dumortier.simplemusicplayer.uiprompt.PromptActionPlaylist.java fr.julien_dumortier.simplemusicplayer.uiprompt.PromptConfirmAddInNew.java fr.julien_dumortier.simplemusicplayer.uiprompt.PromptConfirmDeletePlaylist.java fr.julien_dumortier.simplemusicplayer.uiprompt.PromptConfirmExit.java fr.julien_dumortier.simplemusicplayer.uiprompt.PromptConfirmReplacePlaylist.java fr.julien_dumortier.simplemusicplayer.uiprompt.PromptDefineCoverAlbum.java fr.julien_dumortier.simplemusicplayer.uiprompt.PromptGetTextName.java fr.julien_dumortier.simplemusicplayer.uiprompt.PromptMoveTrack.java fr.julien_dumortier.simplemusicplayer.uiprompt.PromptPlaylistName.java fr.julien_dumortier.simplemusicplayer.uiprompt.PromptShowText.java fr.julien_dumortier.simplemusicplayer.uiprompt.PromptSuppressConfirm.java fr.julien_dumortier.simplemusicplayer.widget.AudioPlayerApplication.java fr.julien_dumortier.simplemusicplayer.widget.AudioPlayerWidgetProvider.java fr.julien_dumortier.simplemusicplayer.widget.AudioPlayerWidgetViewController.java fr.julien_dumortier.simplemusicplayer.widget.WidgetView.java