Commit 0e923ebd authored by Adrien Maglo's avatar Adrien Maglo
Browse files

Audio player: rename the AudioListAdapter

parent cf9c934e
...@@ -86,7 +86,7 @@ public class AudioPlayer extends Fragment implements IAudioPlayer { ...@@ -86,7 +86,7 @@ public class AudioPlayer extends Fragment implements IAudioPlayer {
private AudioServiceController mAudioController; private AudioServiceController mAudioController;
private boolean mShowRemainingTime = false; private boolean mShowRemainingTime = false;
private AudioListAdapter mSongsListAdapter; private AudioPlaylistAdapter mSongsListAdapter;
private boolean mAdvFuncVisible; private boolean mAdvFuncVisible;
private boolean mPlaylistSwitchVisible; private boolean mPlaylistSwitchVisible;
...@@ -100,7 +100,7 @@ public class AudioPlayer extends Fragment implements IAudioPlayer { ...@@ -100,7 +100,7 @@ public class AudioPlayer extends Fragment implements IAudioPlayer {
mAudioController = AudioServiceController.getInstance(); mAudioController = AudioServiceController.getInstance();
mSongsListAdapter = new AudioListAdapter(getActivity()); mSongsListAdapter = new AudioPlaylistAdapter(getActivity());
} }
@Override @Override
......
...@@ -41,12 +41,12 @@ import android.widget.ImageButton; ...@@ -41,12 +41,12 @@ import android.widget.ImageButton;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView; import android.widget.TextView;
public class AudioListAdapter extends ArrayAdapter<Media> { public class AudioPlaylistAdapter extends ArrayAdapter<Media> {
private ArrayList<Media> mMediaList; private ArrayList<Media> mMediaList;
private int mCurrentIndex; private int mCurrentIndex;
public AudioListAdapter(Context context) { public AudioPlaylistAdapter(Context context) {
super(context, 0); super(context, 0);
mMediaList = new ArrayList<Media>(); mMediaList = new ArrayList<Media>();
mCurrentIndex = -1; mCurrentIndex = -1;
......
...@@ -150,7 +150,7 @@ public class AudioPlaylistView extends ListView { ...@@ -150,7 +150,7 @@ public class AudioPlaylistView extends ListView {
Rect rect = new Rect(); Rect rect = new Rect();
for (int i = 0; i < getChildCount(); i++) { for (int i = 0; i < getChildCount(); i++) {
View child = getChildAt(i); View child = getChildAt(i);
AudioListAdapter.ViewHolder holder = (AudioListAdapter.ViewHolder)child.getTag(); AudioPlaylistAdapter.ViewHolder holder = (AudioPlaylistAdapter.ViewHolder)child.getTag();
if (holder.position == mPositionDragStart) { if (holder.position == mPositionDragStart) {
holder.layoutItem.setVisibility(LinearLayout.GONE); holder.layoutItem.setVisibility(LinearLayout.GONE);
...@@ -177,7 +177,7 @@ public class AudioPlaylistView extends ListView { ...@@ -177,7 +177,7 @@ public class AudioPlaylistView extends ListView {
child.getHitRect(rect); child.getHitRect(rect);
if (rect.contains(getWidth() / 2, (int)mTouchY)) { if (rect.contains(getWidth() / 2, (int)mTouchY)) {
// Send back the performed change thanks to the listener. // Send back the performed change thanks to the listener.
AudioListAdapter.ViewHolder holder = (AudioListAdapter.ViewHolder)child.getTag(); AudioPlaylistAdapter.ViewHolder holder = (AudioPlaylistAdapter.ViewHolder)child.getTag();
if (mOnItemDraggedListener != null) if (mOnItemDraggedListener != null)
mOnItemDraggedListener.OnItemDradded(mPositionDragStart, holder.position); mOnItemDraggedListener.OnItemDradded(mPositionDragStart, holder.position);
b_foundHitChild = true; b_foundHitChild = true;
...@@ -193,7 +193,7 @@ public class AudioPlaylistView extends ListView { ...@@ -193,7 +193,7 @@ public class AudioPlaylistView extends ListView {
for (int i = 0; i < getChildCount(); i++) { for (int i = 0; i < getChildCount(); i++) {
View child = getChildAt(i); View child = getChildAt(i);
AudioListAdapter.ViewHolder holder = (AudioListAdapter.ViewHolder)child.getTag(); AudioPlaylistAdapter.ViewHolder holder = (AudioPlaylistAdapter.ViewHolder)child.getTag();
holder.layoutItem.setVisibility(LinearLayout.VISIBLE); holder.layoutItem.setVisibility(LinearLayout.VISIBLE);
holder.layoutFooter.setVisibility(LinearLayout.VISIBLE); holder.layoutFooter.setVisibility(LinearLayout.VISIBLE);
holder.expansion.setVisibility(LinearLayout.GONE); holder.expansion.setVisibility(LinearLayout.GONE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment