fix:toast时长

add:参数配置额外配置到其他文件
This commit is contained in:
Yutousama 2022-06-11 23:42:12 +08:00
parent 6dfaf02422
commit 3ef606b89e
3 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,7 @@ import java.util.List;
*/ */
public class PreviousPlayerList { public class PreviousPlayerList {
private static final int INDEX=10;//记录十条 private static final int INDEX=10;//记录十条
private List<MusicData> list; private final List<MusicData> list;
public PreviousPlayerList(){ public PreviousPlayerList(){
list=new ArrayList<>(); list=new ArrayList<>();
} }

View File

@ -135,7 +135,7 @@ public class AppTools {
AppData.handler.post(new Runnable() { AppData.handler.post(new Runnable() {
@Override @Override
public void run() { public void run() {
Toast.makeText(MyApplication.application, s, Toast.LENGTH_LONG).show(); Toast.makeText(MyApplication.application, s, Toast.LENGTH_SHORT).show();
} }
}); });
} }

View File

@ -10,5 +10,9 @@ public class ConfigTools {
public static SharedPreferences getPreferences(){ public static SharedPreferences getPreferences(){
return MyApplication.application.getSharedPreferences("app_config", Context.MODE_PRIVATE); return MyApplication.application.getSharedPreferences("app_config", Context.MODE_PRIVATE);
} }
public static SharedPreferences getConfigPreferences(){
return MyApplication.application.getSharedPreferences("config", Context.MODE_PRIVATE);
}
} }