update
This commit is contained in:
parent
7364d3500c
commit
614a366351
@ -17,10 +17,9 @@ import com.yutou.nas_music_player.tools.StringUtil;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
@ -384,10 +383,7 @@ public class MusicContainer {
|
||||
}
|
||||
}
|
||||
updateLibsMap();
|
||||
if (initInterface != null) {
|
||||
initInterface.init();
|
||||
initInterface = null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -416,6 +412,9 @@ public class MusicContainer {
|
||||
albumMapList.put(musicData.getAlbum(),album);
|
||||
artistMapList.put(musicData.getArtist(),artist);
|
||||
}
|
||||
if(initInterface!=null)
|
||||
initInterface.init();
|
||||
initInterface=null;
|
||||
}
|
||||
public MusicData findMusic(String md5,List<MusicData> list) {
|
||||
for (MusicData data : list) {
|
||||
|
@ -2,6 +2,7 @@ package com.yutou.nas_music_player.views.Fragments;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.util.ArrayMap;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -25,7 +26,7 @@ public class MusicLibsFragment extends Fragment {
|
||||
private Context context;
|
||||
private View view;
|
||||
private IndexFastScrollRecyclerView recyclerView;
|
||||
private int model=1;
|
||||
private int model=0;
|
||||
public MusicLibsFragment(){
|
||||
|
||||
}
|
||||
@ -43,6 +44,8 @@ public class MusicLibsFragment extends Fragment {
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
view=inflater.inflate(R.layout.fragment_music_libs,null);
|
||||
int id = FragmentPagerItem.getPosition(getArguments());
|
||||
if(map==null)
|
||||
map=new HashMap<>();
|
||||
if (!map.containsKey(id)) {
|
||||
map.put(id, this);
|
||||
}
|
||||
|
@ -190,6 +190,8 @@ public class PlayLibsActivity extends AppCompatActivity {
|
||||
super.onDestroy();
|
||||
browserHelper.onStop();
|
||||
browserHelper = null;
|
||||
MusicLibsFragment.map.clear();
|
||||
MusicLibsFragment.map=null;
|
||||
finish();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user