优化下载音乐文件

添加储存清理功能
修改主题颜色为冷色调
This commit is contained in:
muqing 2023-12-08 16:31:48 +08:00
parent b086443ac7
commit 5e3cbe6002
22 changed files with 221 additions and 97 deletions

View File

@ -57,4 +57,6 @@ dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation("androidx.media3:media3-exoplayer:1.2.0") implementation("androidx.media3:media3-exoplayer:1.2.0")
//
implementation 'com.mpatric:mp3agic:0.9.1'
} }

View File

@ -49,6 +49,7 @@
<activity android:name=".login.enroll" /> <activity android:name=".login.enroll" />
<activity android:name=".login.user_logs" /> <activity android:name=".login.user_logs" />
<activity android:name=".login.user_editing" /> <activity android:name=".login.user_editing" />
<activity android:name=".clean.fragment_clean" />
<activity android:name=".activity_search" /> <activity android:name=".activity_search" />
<activity <activity
android:name=".bfq" android:name=".bfq"

View File

@ -2,6 +2,8 @@ package com.muqingbfq.api;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import com.mpatric.mp3agic.ID3v2;
import com.mpatric.mp3agic.Mp3File;
import com.muqingbfq.fragment.gd; import com.muqingbfq.fragment.gd;
import com.muqingbfq.fragment.mp3; import com.muqingbfq.fragment.mp3;
import com.muqingbfq.main; import com.muqingbfq.main;
@ -13,6 +15,7 @@ import com.muqingbfq.xm;
import org.json.JSONArray; import org.json.JSONArray;
import org.json.JSONObject; import org.json.JSONObject;
import java.io.File;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
@ -75,7 +78,6 @@ public class playlist extends Thread {
String picUrl = jsonObject.getString("picUrl"); String picUrl = jsonObject.getString("picUrl");
list.add(new xm(id, name, zz, picUrl)); list.add(new xm(id, name, zz, picUrl));
} }
// main.handler.post(new mp3.lbspq_sx());
return true; return true;
} catch (Exception e) { } catch (Exception e) {
gj.sc("失败的错误 " + e); gj.sc("失败的错误 " + e);
@ -86,15 +88,14 @@ public class playlist extends Thread {
public static boolean hq_xz(List<xm> list) { public static boolean hq_xz(List<xm> list) {
list.clear(); list.clear();
try { try {
JSONArray json = new JSONObject(wj.dqwb(wj.mp3_xz)) File file = new File(wj.filesdri + "mp3");
.getJSONArray("songs"); File[] files = file.listFiles();
int length = json.length(); for (int i = 0; i < files.length; i++) {
for (int i = 0; i < length; i++) { ID3v2 mp3File = new Mp3File(files[i]).getId3v2Tag();
JSONObject jsonObject = json.getJSONObject(i); String id = files[i].getName();
String id = jsonObject.getString("id"); String name = mp3File.getTitle();
String name = jsonObject.getString("name"); String zz = mp3File.getArtist();
String zz = jsonObject.getString("zz"); String picUrl = mp3File.getUrl();
String picUrl = jsonObject.getString("picUrl");
list.add(new xm(id, name, zz, picUrl)); list.add(new xm(id, name, zz, picUrl));
} }
return true; return true;

View File

@ -26,7 +26,7 @@ public class url extends Thread {
} }
try { try {
if (wj.cz(wj.mp3 + x.id)) { if (wj.cz(wj.mp3 + x.id)) {
return wj.mp3 + x.id; return wj.mp3 ;
} }
String level = "standard"; String level = "standard";
boolean wiFiConnected = gj.isWiFiConnected(); boolean wiFiConnected = gj.isWiFiConnected();

View File

@ -55,7 +55,6 @@ public class bfqkz extends Service {
if (TextUtils.isEmpty(id)) { if (TextUtils.isEmpty(id)) {
return; return;
} }
gj.sc(xm.picurl);
if (TextUtils.isEmpty(xm.picurl.toString())) { if (TextUtils.isEmpty(xm.picurl.toString())) {
xm.picurl = url.picurl(xm.id); xm.picurl = url.picurl(xm.id);
} }

View File

@ -0,0 +1,75 @@
package com.muqingbfq.clean;
import android.os.Bundle;
import android.text.format.Formatter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import com.muqingbfq.R;
import com.muqingbfq.databinding.CleanBinding;
import com.muqingbfq.mq.ActivityToolbar;
import com.muqingbfq.mq.gj;
import com.muqingbfq.mq.wj;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class fragment_clean extends ActivityToolbar {
List<String[]> list = new ArrayList<>();
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
list.add(new String[]{"音乐", wj.mp3});
list.add(new String[]{"歌单",wj.gd});
CleanBinding binding = CleanBinding.inflate(getLayoutInflater());
binding.toolbar.setTitle("储存清理");
setContentView(binding.getRoot());
binding.recyclerview.setAdapter(adapter);
}
private final RecyclerView.Adapter<VH> adapter = new RecyclerView.Adapter<VH>() {
@NonNull
@Override
public VH onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View inflate = LayoutInflater.from(fragment_clean.this).
inflate(R.layout.list_clean, parent, false);
return new VH(inflate);
}
@Override
public void onBindViewHolder(@NonNull VH holder, int position) {
String[] s = list.get(position);
File file = new File(s[1]);
long leng = 0;
if (file.isDirectory()) {
gj.sc(file.toString());
for (File a : file.listFiles()) {
leng += a.length();
}
}
String s1 = Formatter.formatFileSize(fragment_clean.this, leng);
holder.checkBox.setText(s[0] + ":" + s1);
}
@Override
public int getItemCount() {
return list.size();
}
};
class VH extends RecyclerView.ViewHolder {
public CheckBox checkBox;
public VH(@NonNull View itemView) {
super(itemView);
checkBox = itemView.findViewById(R.id.box);
}
}
}

View File

@ -53,9 +53,6 @@ public class gd extends Fragment {
GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), k / 120); GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), k / 120);
gridView.setLayoutManager(gridLayoutManager); gridView.setLayoutManager(gridLayoutManager);
gridView.setAdapter(lbspq); gridView.setAdapter(lbspq);
if (gdid == null) {
gdid = main.mp3_csh;
}
TabLayout tabLayout = view.findViewById(R.id.tablayout); TabLayout tabLayout = view.findViewById(R.id.tablayout);
for (String name : new String[]{"推荐", "排行榜", "下载"}) { for (String name : new String[]{"推荐", "排行榜", "下载"}) {
TabLayout.Tab tab = tabLayout.newTab(); TabLayout.Tab tab = tabLayout.newTab();
@ -127,23 +124,18 @@ public class gd extends Fragment {
tx.setImageResource(R.drawable.bf); tx.setImageResource(R.drawable.bf);
main.edit.putString(main.mp3, xm.id); main.edit.putString(main.mp3, xm.id);
main.edit.commit(); main.edit.commit();
main.mp3_csh = gdid = xm.id; gdid = xm.id;
} }
com.muqingbfq.fragment.gd.lbspq.notifyDataSetChanged(); com.muqingbfq.fragment.gd.lbspq.notifyDataSetChanged();
}); });
} }
}.start(); }.start();
}); });
int color = ContextCompat.getColor(context, R.color.text);
Drawable color_kg = ContextCompat.getDrawable(context, R.drawable.zt); Drawable color_kg = ContextCompat.getDrawable(context, R.drawable.zt);
if (xm.id.equals(gdid)) { if (xm.id.equals(gdid)) {
color = ContextCompat.getColor(context, R.color.text_cz);
color_kg = ContextCompat.getDrawable(context, R.drawable.bf); color_kg = ContextCompat.getDrawable(context, R.drawable.bf);
} else if (xm.cz) {
color = ContextCompat.getColor(context, R.color.text_cz_tm);
} }
holder.kg.setImageDrawable(color_kg); holder.kg.setImageDrawable(color_kg);
holder.textView.setTextColor(color);
Glide.with(context).load(xm.picurl).apply(new RequestOptions().placeholder(R.drawable.icon)) Glide.with(context).load(xm.picurl).apply(new RequestOptions().placeholder(R.drawable.icon))
.into(holder.imageView); .into(holder.imageView);
} }

View File

@ -22,6 +22,7 @@ import com.muqingbfq.api.playlist;
import com.muqingbfq.api.url; import com.muqingbfq.api.url;
import com.muqingbfq.bfq; import com.muqingbfq.bfq;
import com.muqingbfq.bfqkz; import com.muqingbfq.bfqkz;
import com.muqingbfq.databinding.FragmentMp3Binding;
import com.muqingbfq.home; import com.muqingbfq.home;
import com.muqingbfq.list.MyViewHoder; import com.muqingbfq.list.MyViewHoder;
import com.muqingbfq.main; import com.muqingbfq.main;
@ -37,10 +38,10 @@ public class mp3 extends com.muqingbfq.mq.ActivityToolbar {
@Override @Override
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.fragment_mp3); FragmentMp3Binding inflate = FragmentMp3Binding.inflate(getLayoutInflater());
Intent intent = getIntent(); Intent intent = getIntent();
Toolbar toolbar = findViewById(R.id.toolbar); inflate.toolbar.setTitle(intent.getStringExtra("name"));
toolbar.setTitle(intent.getStringExtra("name")); setContentView(inflate.getRoot());
lbspq = new spq(); lbspq = new spq();
RecyclerView lb = findViewById(R.id.lb); RecyclerView lb = findViewById(R.id.lb);
LinearLayoutManager layoutManager = new LinearLayoutManager(this); LinearLayoutManager layoutManager = new LinearLayoutManager(this);
@ -84,7 +85,6 @@ public class mp3 extends com.muqingbfq.mq.ActivityToolbar {
} }
class spq extends RecyclerView.Adapter<MyViewHoder> { class spq extends RecyclerView.Adapter<MyViewHoder> {
@NonNull @NonNull
@Override @Override
public MyViewHoder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { public MyViewHoder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
@ -121,14 +121,6 @@ public class mp3 extends com.muqingbfq.mq.ActivityToolbar {
} }
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
if (item.getItemId() == android.R.id.home) {
finish();
}
return super.onOptionsItemSelected(item);
}
public static void startactivity(Context context, String id) { public static void startactivity(Context context, String id) {
context.startActivity(new Intent(context, mp3.class).putExtra("id", id)); context.startActivity(new Intent(context, mp3.class).putExtra("id", id));
} }

View File

@ -42,6 +42,7 @@ public class search extends Fragment {
public FragmentSearchBinding inflate; public FragmentSearchBinding inflate;
public int i = 0; public int i = 0;
@Nullable @Nullable
@Override @Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
@ -87,6 +88,7 @@ public class search extends Fragment {
} }
public int k; public int k;
public void setStart(String name) { public void setStart(String name) {
if (i == 0) { if (i == 0) {
new spq(); new spq();
@ -207,15 +209,11 @@ public class search extends Fragment {
bfqkz.xm = x; bfqkz.xm = x;
new url(x); new url(x);
} }
if (!com.muqingbfq.fragment.gd.gdid.equals(bflb_db.gdid)) { // if (!com.muqingbfq.fragment.gd.gdid.equals(bflb_db.gdid)) {
gd.gdid = null;
bfqkz.list.clear(); bfqkz.list.clear();
int size = list.size(); bfqkz.list.addAll(list);
for (int i = 0; i < size; i++) { bfq.start(search.this.getContext());
bfqkz.list.add(list.get(i));
}
}
bfqkz.mt.start();
bfq.start(getContext());
}); });
} }

View File

@ -11,6 +11,8 @@ import android.widget.Toast;
import com.muqingbfq.R; import com.muqingbfq.R;
import com.muqingbfq.activity_about_software; import com.muqingbfq.activity_about_software;
import com.muqingbfq.clean.fragment_clean;
import com.muqingbfq.login.cookie;
import com.muqingbfq.login.user_editing; import com.muqingbfq.login.user_editing;
import com.muqingbfq.login.user_logs; import com.muqingbfq.login.user_logs;
import com.muqingbfq.login.user_message; import com.muqingbfq.login.user_message;
@ -60,6 +62,7 @@ public class sz {
context.startActivity(new Intent(context, com.muqingbfq.sz.class)); context.startActivity(new Intent(context, com.muqingbfq.sz.class));
// 设置中心 // 设置中心
} else if (id == R.id.c) { } else if (id == R.id.c) {
context.startActivity(new Intent(context, fragment_clean.class));
// 储存清理 // 储存清理
} else if (id == R.id.d) { } else if (id == R.id.d) {
try { try {
@ -86,10 +89,8 @@ public class sz {
context.startActivity(new Intent(context, activity_about_software.class)); context.startActivity(new Intent(context, activity_about_software.class));
// 关于软件 // 关于软件
} else if (id == R.id.g) { } else if (id == R.id.g) {
main.settoken(null, null); context.startActivity(new Intent(context, cookie.class));
setname("未登录"); //绑定网易云
setqianming(null);
imageView.setImageResource(R.drawable.icon);
} }
} }
} }

View File

@ -24,6 +24,7 @@ import androidx.core.content.ContextCompat;
import com.bumptech.glide.Glide; import com.bumptech.glide.Glide;
import com.muqingbfq.R; import com.muqingbfq.R;
import com.muqingbfq.databinding.ActivityUserEditingBinding; import com.muqingbfq.databinding.ActivityUserEditingBinding;
import com.muqingbfq.fragment.sz;
import com.muqingbfq.main; import com.muqingbfq.main;
import com.muqingbfq.mq.ActivityToolbar; import com.muqingbfq.mq.ActivityToolbar;
import com.muqingbfq.mq.gj; import com.muqingbfq.mq.gj;
@ -149,7 +150,13 @@ public class user_editing extends ActivityToolbar {
}; };
imageViewa.setOnClickListener(onClickListener); imageViewa.setOnClickListener(onClickListener);
imageViewb.setOnClickListener(onClickListener); imageViewb.setOnClickListener(onClickListener);
findViewById(R.id.button2).setOnClickListener(view -> startActivity(new Intent(user_editing.this, cookie.class))); binding.userEnd.setOnClickListener(view ->{
finish();
main.settoken(null, null);
sz.setname("未登录");
sz.setqianming(null);
sz.imageView.setImageResource(R.drawable.icon);
});
findViewById(R.id.button1).setOnClickListener(view -> { findViewById(R.id.button1).setOnClickListener(view -> {
// 创建OkHttpClient实例 // 创建OkHttpClient实例
OkHttpClient client = new OkHttpClient(); OkHttpClient client = new OkHttpClient();

View File

@ -22,7 +22,7 @@ public class main extends Application {
public static SharedPreferences sp; public static SharedPreferences sp;
public static SharedPreferences.Editor edit; public static SharedPreferences.Editor edit;
public static String mp3 = "mp3", mp3_csh, public static String mp3 = "mp3",
Cookie = "Cookie"; Cookie = "Cookie";
public static String account,token; public static String account,token;
@ -36,13 +36,6 @@ public class main extends Application {
sp = getSharedPreferences("Set_up", MODE_PRIVATE); sp = getSharedPreferences("Set_up", MODE_PRIVATE);
edit = sp.edit(); edit = sp.edit();
boolean bj = false; boolean bj = false;
try {
mp3_csh = sp.getString(mp3, "");
} catch (Exception e) {
edit.putString(mp3, "");
edit.commit();
mp3_csh = "";
}
try { try {
com.muqingbfq.bfqkz.ms = sp.getInt("ms", 1); com.muqingbfq.bfqkz.ms = sp.getInt("ms", 1);
} catch (Exception e) { } catch (Exception e) {

View File

@ -49,7 +49,7 @@ public class wj {
//如果文件不存在创建文件 //如果文件不存在创建文件
try { try {
File parentFile = file.getParentFile(); File parentFile = file.getParentFile();
if (!parentFile.exists()) { if (!parentFile.isDirectory()) {
parentFile.mkdirs(); parentFile.mkdirs();
} }
if (!file.exists()) if (!file.exists())

View File

@ -1,10 +1,23 @@
package com.muqingbfq.mq; package com.muqingbfq.mq;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.media.MediaMetadataRetriever;
import android.media.MediaScannerConnection;
import android.net.Uri;
import android.nfc.Tag;
import android.provider.MediaStore;
import com.mpatric.mp3agic.ID3v2;
import com.mpatric.mp3agic.InvalidDataException;
import com.mpatric.mp3agic.Mp3File;
import com.mpatric.mp3agic.UnsupportedTagException;
import com.muqingbfq.home;
import com.muqingbfq.main; import com.muqingbfq.main;
import com.muqingbfq.xm; import com.muqingbfq.xm;
import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
@ -105,6 +118,12 @@ public class wl {
public void run() { public void run() {
super.run(); super.run();
try { try {
if (new File(wj.mp3).isDirectory()) {
File[] aa = new File(wj.mp3).listFiles();
if (aa.length >= 30) {
aa[0].delete();
}
}
OkHttpClient client = new OkHttpClient(); OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() Request request = new Request.Builder()
//访问路径 //访问路径
@ -115,10 +134,14 @@ public class wl {
if (response.isSuccessful()) { if (response.isSuccessful()) {
ResponseBody body = response.body(); ResponseBody body = response.body();
if (body != null) { if (body != null) {
File file = new File(wj.mp3, String.valueOf(x.id)); File file = new File(wj.mp3, x.id+".mp3");
if (!file.getParentFile().exists()) { if (!file.getParentFile().exists()) {
file.getParentFile().mkdirs(); file.getParentFile().mkdirs();
} }
File parentFile = file.getParentFile();
if (!parentFile.isDirectory()) {
parentFile.mkdirs();
}
InputStream inputStream = body.byteStream(); InputStream inputStream = body.byteStream();
FileOutputStream fileOutputStream = FileOutputStream fileOutputStream =
new FileOutputStream(file); new FileOutputStream(file);
@ -130,27 +153,20 @@ public class wl {
} }
fileOutputStream.close(); fileOutputStream.close();
inputStream.close(); inputStream.close();
Mp3File mp3file = new Mp3File(file);
if (mp3file.hasId3v2Tag()) {
ID3v2 id3v2Tag = mp3file.getId3v2Tag();
// 设置新的ID值
id3v2Tag.setTitle(x.name);
id3v2Tag.setArtist(x.zz);
id3v2Tag.setAlbum(x.zz);
id3v2Tag.setUrl(x.picurl.toString());
mp3file.save(wj.mp3 + x.id);
file.delete();
// 保存修改后的音乐文件删除原来的文件
} }
} }
JSONObject jsonObject = new JSONObject();
if (wj.cz(wj.mp3_xz)) {
jsonObject = new JSONObject(wj.dqwb(wj.mp3_xz));
} else {
jsonObject.put("songs", new JSONArray());
} }
JSONArray songs = jsonObject.getJSONArray("songs");
if (songs.length() > 30) {
songs.remove(0);
String id = songs.getJSONObject(0).getString("id");
new File(wj.mp3+id).delete();
}
JSONObject json = new JSONObject();
json.put("id", x.id);
json.put("name", x.name);
json.put("zz", x.zz);
json.put("picUrl", x.picurl);
songs.put(json);
wj.xrwb(wj.mp3_xz, jsonObject.toString());
} catch (Exception e) { } catch (Exception e) {
gj.sc("wl xz " + e); gj.sc("wl xz " + e);
} }

View File

@ -66,14 +66,13 @@
android:id="@+id/button1" android:id="@+id/button1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/jianchagegnxin" style="@style/Button"
android:textColor="@color/bj" /> android:text="@string/jianchagegnxin" />
<Button <Button
android:id="@+id/button2" android:id="@+id/button2"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/juanzeng" style="@style/Button"
android:textColor="@color/bj" /> android:text="@string/juanzeng" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@ -9,7 +9,8 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:title="绑定网易云音乐"/> app:title="绑定网易云音乐"
app:subtitle="(Cookie保存在本地)"/>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"

View File

@ -131,13 +131,14 @@
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
</LinearLayout> </LinearLayout>
<Button <Button
android:id="@+id/button2" android:id="@+id/user_end"
style="?android:attr/buttonBarButtonStyle" style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="end" android:layout_gravity="end"
android:layout_marginTop="6dp" android:layout_marginTop="6dp"
android:text="绑定网易云(Cookie储在本地)" /> app:icon="@drawable/user_end"
android:text="@string/tuichudenglu" />
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
</LinearLayout>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<CheckBox
android:id="@+id/box"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/app_name" />
</LinearLayout>

View File

@ -31,6 +31,6 @@
<item <item
android:id="@+id/g" android:id="@+id/g"
android:icon="@drawable/user_end" android:icon="@drawable/icon"
android:title="@string/tuichudenglu" /> android:title="绑定网易云" />
</menu> </menu>

View File

@ -10,14 +10,10 @@
<color name="text_cz">#03A9F4</color> <color name="text_cz">#03A9F4</color>
<color name="text_cz_tm">#9903A9F4</color> <color name="text_cz_tm">#9903A9F4</color>
<color name="text">@color/black</color> <color name="text">#000000</color>
<color name="text_tm">#80000000</color> <color name="text_tm">#80000000</color>
<color name="tm">#00FFFFFF</color> <color name="tm">#00FFFFFF</color>
<color name="bj">@color/white</color> <color name="bj">@color/white</color>
<color name="lrc_normal_text_color">#A2A2A2</color> <color name="button_bj">#B3E5FC</color>
<color name="lrc_current_text_color">#000000</color>
<color name="lrc_timeline_text_color">#343434</color>
<color name="lrc_timeline_color">#809E9E9E</color>
<color name="lrc_time_text_color">#809E9E9E</color>
</resources> </resources>

View File

@ -10,11 +10,26 @@
<style name="Theme.start" parent="Theme.Material3.DayNight"> <style name="Theme.start" parent="Theme.Material3.DayNight">
<item name="windowActionBar">false</item> <item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
<!-- <item name="android:textColorTertiary">@color/text</item>-->
<!-- <item name="android:textColorPrimary">@color/text</item>-->
<item name="android:statusBarColor">@color/tm</item> <item name="android:statusBarColor">@color/tm</item>
<!-- 控件选中时的颜色,默认使用colorAccent -->
<!-- <item name="android:colorControlActivated">#FF7F50</item>-->
<!-- 设置文本颜色 -->
<item name="android:textColorPrimary">@color/text</item>
<item name="android:colorPrimary">#00BCD4</item>
<item name="colorPrimaryDark">#8000BCD4</item>
<item name="tabStyle">@style/Widget.App.TabLayout</item>
</style> </style>
<style name="Widget.App.TabLayout" parent="Widget.Material3.TabLayout">
<item name="materialThemeOverlay">@style/ThemeOverlay.App.TabLayout</item>
<!-- <item name="tabTextAppearance">@style/TextAppearance.App.LabelLarge</item>-->
</style>
<style name="ThemeOverlay.App.TabLayout" parent="">
<item name="colorPrimary">#00BCD4</item>
<item name="colorOnSurface">#ADD8E6</item>
</style>
<style name="fragment_dialog" parent="Theme.muqing"> <style name="fragment_dialog" parent="Theme.muqing">
<item name="android:windowIsTranslucent">true</item> <item name="android:windowIsTranslucent">true</item>
@ -32,4 +47,10 @@
<item name="android:windowTranslucentNavigation">true</item> <item name="android:windowTranslucentNavigation">true</item>
<item name="android:windowBackground">@drawable/start</item> <item name="android:windowBackground">@drawable/start</item>
</style> </style>
<!-- 按钮主题-->
<style name="Button">
<item name="android:backgroundTint">#1C71A9</item>
</style>
</resources> </resources>