修复BUG,更新UI

This commit is contained in:
muqing 2024-02-08 20:40:14 +08:00
parent 6ae6c6ba81
commit 4f113c934c
45 changed files with 278 additions and 426 deletions

View File

@ -27,7 +27,8 @@ android {
}
buildTypes {
release {
minifyEnabled false
// shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@ -84,13 +84,13 @@ public class MyButtonClickReceiver extends BroadcastReceiver {
break;
case "lrc":
if (FloatingLyricsService.lei == null) {
if (!Settings.canDrawOverlays(home.appCompatActivity)) {
if (!Settings.canDrawOverlays(main.application)) {
// 无权限需要申请权限
home.appCompatActivity.startActivity(new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
Uri.parse("package:" + home.appCompatActivity.getPackageName())));
main.application.startActivity(new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
Uri.parse("package:" + main.application.getPackageName())));
} else {
home.appCompatActivity.startService(
new Intent(home.appCompatActivity, FloatingLyricsService.class));
main.application.startService(
new Intent(main.application, FloatingLyricsService.class));
}
return;
}
@ -100,8 +100,8 @@ public class MyButtonClickReceiver extends BroadcastReceiver {
} else {
lei.setup.i = 0;
lei.baocun();
home.appCompatActivity.stopService(
new Intent(home.appCompatActivity, FloatingLyricsService.class));
main.application.stopService(
new Intent(main.application, FloatingLyricsService.class));
}
break;
case "like":

View File

@ -110,7 +110,7 @@ public class activity_about_software extends AppCompatActivity {
holder.zz.setText(objects[2].toString());
Glide.with(getContext())
.load(objects[0])
.error(R.drawable.icon)
.error(R.drawable.ic_launcher_foreground)
.into(holder.imageView);
}

View File

@ -4,6 +4,9 @@ import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ActivityOptions;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
@ -19,6 +22,7 @@ import android.widget.ListView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.core.app.ActivityCompat;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.RecyclerView;
@ -49,6 +53,12 @@ public class activity_search extends FragmentActivity<ActivitySearchBinding> {
private final List<String> list = new ArrayList<>();
ListView listPopupWindow;
public static void start(Activity context, View view) {
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(context,
view, "view");
context.startActivity(new Intent(context, activity_search.class), options.toBundle());
}
@SuppressLint("NotifyDataSetChanged")
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -190,7 +200,8 @@ public class activity_search extends FragmentActivity<ActivitySearchBinding> {
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
int itemId = item.getItemId();
if (itemId == android.R.id.home) {
finish();
ActivityCompat.finishAfterTransition(this);
return false;
} else if (itemId == 0) {
start(binding.editview.getText().toString());
}
@ -222,7 +233,7 @@ public class activity_search extends FragmentActivity<ActivitySearchBinding> {
if (json_list.isEmpty()) {
binding.xxbj1.setVisibility(View.INVISIBLE);
}
RecyclerView.ItemAnimator animator = new DefaultItemAnimator(){
RecyclerView.ItemAnimator animator = new DefaultItemAnimator() {
@Override
public boolean animateRemove(RecyclerView.ViewHolder holder) {
ObjectAnimator fadeAnimator = ObjectAnimator.ofFloat(holder.itemView, "alpha", 1f, 0f);
@ -296,10 +307,10 @@ public class activity_search extends FragmentActivity<ActivitySearchBinding> {
binding.searchRecycler.setVisibility(View.GONE);
return;
}
if (binding.searchFragment.getVisibility()==View.VISIBLE) {
if (binding.searchFragment.getVisibility() == View.VISIBLE) {
binding.searchFragment.setVisibility(View.GONE);
} else {
finish();
ActivityCompat.finishAfterTransition(this);
}
}

View File

@ -1,6 +1,6 @@
package com.muqingbfq.api;
import android.content.Context;
import android.app.Activity;
import android.os.Environment;
import com.google.gson.Gson;
@ -42,12 +42,11 @@ public class playlist extends Thread {
}
list.clear();
try {
String hq;
if (wj.cz(wj.gd + uid)) {
hq = wj.dqwb(wj.gd + uid);
} else {
String hq = wj.dqwb(wj.gd + uid);
if (hq == null || hq.isEmpty()) {
hq = gethq(uid);
}
list.clear();
JSONObject json = new JSONObject(hq);
JSONArray songs = json.getJSONArray("songs");
int length = songs.length();
@ -61,7 +60,7 @@ public class playlist extends Thread {
tns = tns.replace("\"]", ")");
name += tns;
} catch (Exception e) {
gj.sc(e);
e.printStackTrace();
}
JSONObject al = jsonObject.getJSONObject("al");
JSONArray ar = jsonObject.getJSONArray("ar");
@ -83,7 +82,6 @@ public class playlist extends Thread {
}
public static boolean hq_like(List<MP3> list) {
list.clear();
try {
String dqwb = wj.dqwb(wj.gd + "mp3_like.json");
if (dqwb == null) {
@ -92,6 +90,7 @@ public class playlist extends Thread {
Type type = new TypeToken<List<MP3>>() {
}.getType();
Gson gson = new Gson();
list.clear();
list.addAll(gson.fromJson(dqwb, type));
return true;
} catch (Exception e) {
@ -101,10 +100,10 @@ public class playlist extends Thread {
}
public static boolean hq_xz(List<MP3> list) {
list.clear();
try {
File file = new File(wj.filesdri + "mp3");
File[] files = file.listFiles();
list.clear();
for (File value : files) {
ID3v2 mp3File = new Mp3File(value).getId3v2Tag();
String id = value.getName();
@ -120,7 +119,6 @@ public class playlist extends Thread {
}
public static boolean hq_hc(List<MP3> list) {
list.clear();
try {
String dqwb = wj.dqwb(wj.gd + "mp3_hc.json");
if (dqwb == null) {
@ -129,6 +127,7 @@ public class playlist extends Thread {
Type type = new TypeToken<List<MP3>>() {
}.getType();
Gson gson = new Gson();
list.clear();
list.addAll(gson.fromJson(dqwb, type));
return true;
} catch (Exception e) {
@ -139,7 +138,7 @@ public class playlist extends Thread {
}
public static void hq_cd(Context context, List<MP3> list) {
public static void hq_cd(Activity context, List<MP3> list) {
boolean cd = wj.isCD(context);
if (!cd) {
return;

View File

@ -6,13 +6,11 @@ import com.mpatric.mp3agic.ID3v2;
import com.mpatric.mp3agic.Mp3File;
import com.muqingbfq.MP3;
import com.muqingbfq.fragment.Media;
import com.muqingbfq.home;
import com.muqingbfq.login.user_logs;
import com.muqingbfq.main;
import com.muqingbfq.mq.gj;
import com.muqingbfq.mq.wj;
import com.muqingbfq.mq.wl;
import com.muqingbfq.yc;
import org.json.JSONArray;
import org.json.JSONException;
@ -57,8 +55,8 @@ public class url extends Thread {
if (json.getInt("code") == -460) {
String message = json.getString("message");
main.handler.post(() -> {
gj.ts(home.appCompatActivity, message);
home.appCompatActivity.startActivity(new Intent(home.appCompatActivity
gj.ts(main.application, message);
main.application.startActivity(new Intent(main.application
, user_logs.class));
});
return null;
@ -69,7 +67,7 @@ public class url extends Thread {
x.url = jsonObject.getString("url");
return x;
} catch (JSONException e) {
yc.start("url hq :" + e);
gj.sc("url hq :" + e);
}
return null;
}
@ -98,7 +96,7 @@ public class url extends Thread {
com.muqingbfq.bfqkz.lrc = wl.hq("/lyric?id=" + id);
}
} catch (Exception e) {
gj.sc(e);
gj.sc("url getlrc:" + e);
}
} else {
com.muqingbfq.bfqkz.lrc = wl.hq("/lyric?id=" + id);
@ -115,7 +113,7 @@ public class url extends Thread {
return new JSONObject(hq).getJSONArray("songs").getJSONObject(0)
.getJSONObject("al").getString("picUrl");
} catch (Exception e) {
gj.sc(e);
gj.sc("url picurl:" + e);
}
return null;
}

View File

@ -1,6 +1,5 @@
package com.muqingbfq;
import android.annotation.SuppressLint;
import android.view.View;
import android.widget.ImageView;
@ -15,21 +14,9 @@ import java.text.SimpleDateFormat;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Locale;
public class bfq_an {
public static class kz implements View.OnClickListener {
@Override
public void onClick(View view) {
int id = view.getId();
if (id == R.id.kg) {
MyButtonClickReceiver.playOrPause();
} else if (id == R.id.syq) {
syq();
} else if (id == R.id.xyq) {
xyq();
}
}
}
public static void syq() {
if (bfqkz.list.isEmpty()) {
@ -49,6 +36,7 @@ public class bfq_an {
return;
}
bfqkz.mt.pause();
// gj.sc(bfqkz.list.get(bfqkz.getmti()));
new url(bfqkz.list.get(bfqkz.getmti()));
}
@ -110,9 +98,7 @@ public class bfq_an {
}
}
@SuppressLint("SimpleDateFormat")
static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("mm:ss");
static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("mm:ss", Locale.CHINA);
public static String getTime(long time) {
return simpleDateFormat.format(new Date(time));
}

View File

@ -39,10 +39,13 @@ public class bfqkz extends MediaBrowserServiceCompat {
public static com.muqingbfq.mq.NotificationManagerCompat notify;
public static int getmti() {
if (xm == null) {
return 0;
}
int i = bfqkz.list.indexOf(xm) + 1;
if (i >= bfqkz.list.size()) {
i = 0;
}
if (i >= bfqkz.list.size()) {
i = 0;
}
return i;
}
@ -57,14 +60,12 @@ public class bfqkz extends MediaBrowserServiceCompat {
bfq_an.xyq();
return;
}
if (xm.picurl instanceof String) {
if (TextUtils.isEmpty(xm.picurl)) {
xm.picurl = url.picurl(xm.id);
}
if (TextUtils.isEmpty(mp3.picurl)) {
mp3.picurl = url.picurl(mp3.id);
}
mt.setDataSource(mp3);
} catch (Exception e) {
yc.start(home.appCompatActivity, "bfqkz mp3(" + mp3 + ") :" + e);
gj.sc("bfqkz mp3(" + mp3 + ") :" + e);
}
}
@ -90,6 +91,7 @@ public class bfqkz extends MediaBrowserServiceCompat {
public PendingIntent pendingIntent;
public MediaMetadataCompat.Builder builder = new MediaMetadataCompat.Builder();
@Override
public void onCreate() {
super.onCreate();

View File

@ -1,6 +1,5 @@
package com.muqingbfq.fragment;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Bundle;
import android.view.ViewGroup;
@ -18,26 +17,22 @@ import com.muqingbfq.bfqkz;
import com.muqingbfq.databinding.FragmentBflbDbBinding;
import com.muqingbfq.databinding.ListMp3ABinding;
import com.muqingbfq.list.MyViewHoder;
import com.muqingbfq.main;
import com.muqingbfq.yc;
public class bflb_db extends BottomSheetDialog {
public static RecyclerView.Adapter<MyViewHoder> adapter;
@SuppressLint("NotifyDataSetChanged")
FragmentBflbDbBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FragmentBflbDbBinding binding = FragmentBflbDbBinding.inflate(getLayoutInflater());
binding = FragmentBflbDbBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
int height = main.g - main.g / 2 / 2;
getBehavior().setPeekHeight(height);
getBehavior().setMaxHeight(height);
try {
binding.lb.setAdapter(new spq());
if (bfqkz.xm != null) {
binding.lb.smoothScrollToPosition(getI());
}
binding.xxbj.setOnClickListener(v -> {
binding.textView.setOnClickListener(v -> {
if (bfqkz.xm != null) {
binding.lb.smoothScrollToPosition(getI());
}
@ -46,7 +41,7 @@ public class bflb_db extends BottomSheetDialog {
.setTitle("清空播放列表")
.setPositiveButton("确定", (dialogInterface, i) -> {
bfqkz.list.clear();
adapter.notifyDataSetChanged();
dismiss();
})
.setNegativeButton("取消", null)
.show());
@ -74,7 +69,6 @@ public class bflb_db extends BottomSheetDialog {
public spq() {
adapter = this;
}
@NonNull
@Override
public MyViewHoder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
@ -82,12 +76,11 @@ public class bflb_db extends BottomSheetDialog {
return new MyViewHoder(ListMp3ABinding.
inflate(getLayoutInflater(),parent,false));
}
@Override
public void onBindViewHolder(@NonNull MyViewHoder holder, int position) {
MP3 x = bfqkz.list.get(position);
holder.bindingA.name.setText(x.name);
holder.bindingA.zz.setText(x.zz);
holder.bindingA.zz.setText(String.format(" · %s", x.zz));
int color = ContextCompat.getColor(holder.getContext(), R.color.text);
if (bfqkz.xm != null && x.id.equals(bfqkz.xm.id)) {
color = ContextCompat.getColor(holder.getContext(), R.color.text_cz);
@ -100,10 +93,15 @@ public class bflb_db extends BottomSheetDialog {
new url(x);
}
});
holder.bindingA.delete.setOnClickListener(v -> {
bfqkz.list.remove(holder.getAdapterPosition());
notifyItemRemoved(holder.getAdapterPosition());
});
}
@Override
public int getItemCount() {
// binding.textView.setText(String.valueOf(bfqkz.list.size()));
return bfqkz.list.size();
}
}

View File

@ -50,17 +50,10 @@ public class bfq_db extends Fragment implements GestureDetector.OnGestureListene
gestureDetector = new GestureDetector(getContext(), this);
binding.getRoot().setOnTouchListener((view, motionEvent) -> {
if (motionEvent.getAction() == MotionEvent.ACTION_UP) {
binding.name.setTranslationX(0);
binding.linearLayout.setTranslationX(0);
}
return gestureDetector.onTouchEvent(motionEvent);
});
// 恢复列表数据
if (bfqkz.xm != null) {
binding.name.setText(bfqkz.xm.name + "/" + bfqkz.xm.zz);
}
if (bfqkz.mt != null) {
setkg(bfqkz.mt.isPlaying());
}
return binding.getRoot();
}
@ -84,7 +77,7 @@ public class bfq_db extends Fragment implements GestureDetector.OnGestureListene
public void run() {
if (!Objects.equals(mp3, bfqkz.xm)) {
mp3 = bfqkz.xm;
setname(mp3.name + "/" + mp3.zz);
setname(mp3.name, " - " + mp3.zz);
}
if (bfqkz.mt != null && bfqkz.mt.isPlaying() != isPlaying) {
setkg(bfqkz.mt.isPlaying());
@ -110,8 +103,9 @@ public class bfq_db extends Fragment implements GestureDetector.OnGestureListene
isPlaying = bool;
}
public void setname(String str) {
binding.name.setText(str);
public void setname(String a,String b) {
binding.textview1.setText(a);
binding.textview2.setText(b);
}
@Override
@ -134,7 +128,7 @@ public class bfq_db extends Fragment implements GestureDetector.OnGestureListene
@Override
public boolean onScroll(@Nullable MotionEvent motionEvent, @NonNull MotionEvent motionEvent1,
float v, float v1) {
binding.name.setTranslationX(binding.name.getTranslationX() - v);
binding.linearLayout.setTranslationX(binding.linearLayout.getTranslationX() - v);
binding.getRoot().setBackgroundColor(ContextCompat.getColor(getContext(), R.color.bj));
return false;
}

View File

@ -2,6 +2,7 @@ package com.muqingbfq.fragment;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ActivityOptions;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
@ -26,7 +27,6 @@ import com.muqingbfq.api.resource;
import com.muqingbfq.bfq_an;
import com.muqingbfq.bfqkz;
import com.muqingbfq.databinding.ActivityGdBinding;
import com.muqingbfq.databinding.ActivityMp3Binding;
import com.muqingbfq.databinding.ListGdBBinding;
import com.muqingbfq.databinding.ListGdBinding;
import com.muqingbfq.main;
@ -49,6 +49,15 @@ public class gd extends com.muqingbfq.mq.FragmentActivity<ActivityGdBinding> {
public static RecyclerView.Adapter<VH> adapter;
int k;
public static void start(Activity context, String[] str, View view) {
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(context,
view, "view");
Intent intent = new Intent(context, gd.class);
intent.putExtra("id", str[0]);
intent.putExtra("name", str[1]);
context.startActivity(intent, options.toBundle());
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -116,17 +125,16 @@ public class gd extends com.muqingbfq.mq.FragmentActivity<ActivityGdBinding> {
}
public static class baseadapter extends RecyclerView.Adapter<VH> {
Context context;
Activity context;
public List<XM> list;
public baseadapter(Context context, List<XM> list) {
public baseadapter(Activity context, List<XM> list) {
this.context = context;
this.list = list;
}
boolean bool = false;
public baseadapter(Context context, List<XM> list, boolean bool) {
public baseadapter(Activity context, List<XM> list, boolean bool) {
this.context = context;
this.list = list;
this.bool = bool;
@ -261,12 +269,8 @@ public class gd extends com.muqingbfq.mq.FragmentActivity<ActivityGdBinding> {
@Override
public void onClick(View view) {
Context context = view.getContext();
XM xm = list.get(position);
Intent intent = new Intent(context, mp3.class);
intent.putExtra("id", xm.id);
intent.putExtra("name", xm.name);
context.startActivity(intent);
mp3.start(context, new String[]{xm.id, xm.name}, view);
}
}

View File

@ -20,6 +20,7 @@ import com.bumptech.glide.request.RequestOptions;
import com.muqingbfq.MP3;
import com.muqingbfq.R;
import com.muqingbfq.XM;
import com.muqingbfq.activity_search;
import com.muqingbfq.api.resource;
import com.muqingbfq.api.url;
import com.muqingbfq.bfqkz;
@ -42,7 +43,8 @@ public class gd_adapter extends Fragment {
FragmentGdBinding binding;
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
binding = FragmentGdBinding.inflate(getLayoutInflater(), container, false);
//初始化工具栏
@ -58,7 +60,7 @@ public class gd_adapter extends Fragment {
binding.recyclerview1.setHasFixedSize(true);
binding.recyclerview1.setNestedScrollingEnabled(false);
binding.recyclerview1.setLayoutManager(linearLayoutManager);
binding.recyclerview1.setAdapter(new gd.baseadapter(getContext(), list));
binding.recyclerview1.setAdapter(new gd.baseadapter(getActivity(), list));
new Thread() {
@Override
public void run() {
@ -119,6 +121,8 @@ public class gd_adapter extends Fragment {
}
});
mp3list();
binding.editView.setOnClickListener(v -> activity_search.start(getActivity(),v));
return binding.getRoot();
}

View File

@ -1,6 +1,8 @@
package com.muqingbfq.fragment;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ActivityOptions;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
@ -16,6 +18,7 @@ import android.widget.Filterable;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
@ -26,6 +29,7 @@ import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.muqingbfq.MP3;
import com.muqingbfq.R;
import com.muqingbfq.activity_search;
import com.muqingbfq.api.FileDownloader;
import com.muqingbfq.api.playlist;
import com.muqingbfq.bfq;
@ -48,7 +52,14 @@ public class mp3 extends FragmentActivity<ActivityMp3Binding> {
private List<MP3> list_ys = new ArrayList<>();
public static Adapter adapter;
// private static String id;
public static void start(Activity context, String[] str, View view) {
ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(context,
view, "view");
Intent intent = new Intent(context, mp3.class);
intent.putExtra("id", str[0]);
intent.putExtra("name", str[1]);
context.startActivity(intent, options.toBundle());
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -107,7 +118,7 @@ public class mp3 extends FragmentActivity<ActivityMp3Binding> {
gj.ycjp(binding.edittext);
adapter.getFilter().filter("");
} else {
finish();
ActivityCompat.finishAfterTransition(this);
}
} else if (itemId == 0) {
binding.title.setVisibility(View.GONE);
@ -125,7 +136,7 @@ public class mp3 extends FragmentActivity<ActivityMp3Binding> {
gj.ycjp(binding.edittext);
adapter.getFilter().filter("");
} else {
finish();
ActivityCompat.finishAfterTransition(this);
}
}

View File

@ -108,7 +108,7 @@ public class search extends Fragment {
String string = getArguments().getString("string");
RecyclerVBinding binding = RecyclerVBinding.inflate(inflater, container, false);
binding.recycleview.setLayoutManager(new LinearLayoutManager(getContext()));
binding.recycleview.setAdapter(new com.muqingbfq.fragment.gd.baseadapter(getContext(),
binding.recycleview.setAdapter(new com.muqingbfq.fragment.gd.baseadapter(getActivity(),
list, true));
list.clear();
binding.recyclerviewBar.setVisibility(View.VISIBLE);

View File

@ -11,6 +11,7 @@ import com.muqingbfq.R;
import com.muqingbfq.activity_about_software;
import com.muqingbfq.clean.fragment_clean;
import com.muqingbfq.home;
import com.muqingbfq.main;
import com.muqingbfq.mq.gj;
import java.util.List;
@ -52,7 +53,8 @@ public class sz {
// 关于软件
} else if (id == R.id.g) {
// 关闭软件
ActivityManager mActivityManager = (ActivityManager)home.appCompatActivity.getSystemService(Context.ACTIVITY_SERVICE);
ActivityManager mActivityManager = (ActivityManager)
main.application.getSystemService(Context.ACTIVITY_SERVICE);
List<ActivityManager.RunningAppProcessInfo> mList = mActivityManager.getRunningAppProcesses();
for (ActivityManager.RunningAppProcessInfo runningAppProcessInfo : mList)
{

View File

@ -61,11 +61,11 @@ public class wode extends Fragment {
{R.drawable.bf, "最近播放", "mp3_hc.json"},
{R.drawable.download, "下载音乐", "mp3_xz.json"},
{R.drawable.like, "喜欢音乐", "mp3_like.json"},
{R.drawable.icon, "本地搜索", "cd.json"},
{R.drawable.ic_launcher_foreground, "本地搜索", "cd.json"},
{R.drawable.fuwuzhongxing, "更换接口", "API"},
{R.drawable.gd, "导入歌单", "gd"},
{R.drawable.paihangbang, "排行榜", "排行榜"},
{R.drawable.icon, "开发中", ""}
{R.drawable.ic_launcher_foreground, "开发中", ""}
};
@SuppressLint("StaticFieldLeak")
@ -78,7 +78,7 @@ public class wode extends Fragment {
binding = FragmentWdBinding.inflate(inflater, container, false);
//初始化工具栏
((AppCompatActivity) requireActivity()).setSupportActionBar(binding.toolbar);
DrawerLayout drawerLayout = home.appCompatActivity.findViewById(R.id.chct);
DrawerLayout drawerLayout = getActivity().findViewById(R.id.chct);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
getActivity(), drawerLayout, binding.toolbar, R.string.app_name, R.string.app_name);
drawerLayout.addDrawerListener(toggle);
@ -145,10 +145,7 @@ public class wode extends Fragment {
getContext().startActivity(a);
break;
case "排行榜":
Intent b = new Intent(getContext(), com.muqingbfq.fragment.gd.class);
b.putExtra("id", data);
b.putExtra("name", s);
getContext().startActivity(b);
gd.start(getActivity(), new String[]{data, s}, holder.itemView);
break;
case "API":
EditViewDialog editViewDialog = new EditViewDialog(getContext(), "更换接口API")
@ -375,11 +372,7 @@ public class wode extends Fragment {
public void onBindViewHolder(@NonNull gd.VH holder, @SuppressLint("RecyclerView") int position) {
XM xm = list.get(position);
holder.itemView.setOnClickListener(v -> {
XM xm1 = list.get(position);
Intent intent = new Intent(getContext(), mp3.class);
intent.putExtra("id", xm1.id);
intent.putExtra("name", xm1.name);
getContext().startActivity(intent);
mp3.start(getActivity(), new String[]{xm.id, xm.name}, v);
});
holder.itemView.setOnLongClickListener(v -> {
String[] stringArray = {"下载歌单", "删除歌单"};

View File

@ -1,9 +1,7 @@
package com.muqingbfq;
import android.annotation.SuppressLint;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.media.MediaBrowserCompat;
@ -13,15 +11,12 @@ import android.view.Menu;
import android.view.MenuItem;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.viewpager2.adapter.FragmentStateAdapter;
import androidx.viewpager2.widget.ViewPager2;
import com.jaeger.library.StatusBarUtil;
import com.muqingbfq.databinding.ActivityHomeBinding;
import com.muqingbfq.fragment.bfq_db;
import com.muqingbfq.fragment.gd_adapter;
import com.muqingbfq.fragment.wode;
import com.muqingbfq.mq.gj;
@ -30,20 +25,13 @@ import java.util.ArrayList;
import java.util.List;
public class home extends com.muqingbfq.mq.AppCompatActivity<ActivityHomeBinding> {
@SuppressLint("StaticFieldLeak")
public static AppCompatActivity appCompatActivity;
// ActivityHomeBinding binding;
public MediaBrowserCompat mBrowser;
@Override
protected ActivityHomeBinding getViewBindingObject(LayoutInflater layoutInflater) {
return ActivityHomeBinding.inflate(layoutInflater);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
appCompatActivity = this;
setTheme(R.style.Theme_muqing);
super.onCreate(savedInstanceState);
setContentView(getViewBinding().getRoot());
@ -72,6 +60,9 @@ public class home extends com.muqingbfq.mq.AppCompatActivity<ActivityHomeBinding
//检测更新
new gj.jianchagengxin(this);
UI();
getSupportFragmentManager().beginTransaction()
.replace(R.id.bfq_db, new com.muqingbfq.fragment.bfq_db())
.commit();
// startService(new Intent(this, FloatingLyricsService.class));
} catch (Exception e) {
@ -140,15 +131,6 @@ public class home extends com.muqingbfq.mq.AppCompatActivity<ActivityHomeBinding
editor.putString("listData", jsonList);
editor.apply();
}
@Override
public void onResume() {
super.onResume();
getSupportFragmentManager().beginTransaction()
.replace(R.id.bfq_db, new bfq_db())
.commit();
}
@Override
public void onBackPressed() {
moveTaskToBack(true);
@ -223,8 +205,7 @@ public class home extends com.muqingbfq.mq.AppCompatActivity<ActivityHomeBinding
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.menu_search) {
Intent intent = new Intent(getContext(), activity_search.class);
startActivity(intent);
activity_search.start(this, binding.viewPager);
}
return super.onOptionsItemSelected(item);
}

View File

@ -146,10 +146,9 @@ public class FloatingLyricsService extends Service implements View.OnClickListen
getResources().getDisplayMetrics()));
binding.lrcView.setTextColor(Color.parseColor(setup.Color));
bfq_an.kz bfqAn = new bfq_an.kz();
binding.kg.setOnClickListener(this);
binding.syq.setOnClickListener(bfqAn);
binding.xyq.setOnClickListener(bfqAn);
binding.syq.setOnClickListener(v -> bfq_an.syq());
binding.xyq.setOnClickListener(v -> bfq_an.xyq());
binding.lock.setOnClickListener(this);
// params.gravity = Gravity.CENTER;

View File

@ -60,7 +60,7 @@ public class NotificationManagerCompat {
.setMediaSession(context.mSession.getSessionToken());
notificationManager = androidx.core.app.NotificationManagerCompat.from(context);
notificationBuilder = getNotificationBuilder(context)
.setSmallIcon(R.drawable.icon)
.setSmallIcon(R.drawable.foreground)
.setPriority(NotificationCompat.PRIORITY_LOW)
.setOngoing(true).setColorized(true).setShowWhen(false)
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)

View File

@ -109,7 +109,7 @@ public class gj {
}
}
} catch (SocketException e) {
yc.start(e);
gj.sc(e);
}
return false; // 默认为流量网络
}

View File

@ -3,6 +3,7 @@ package com.muqingbfq.mq;
import static androidx.core.content.ContextCompat.startActivity;
import android.Manifest;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
@ -205,7 +206,7 @@ public class wj {
Manifest.permission.WRITE_EXTERNAL_STORAGE
};
public static boolean isCD(Context context) {
public static boolean isCD(Activity context) {
//检查权限NEED_PERMISSION是否被授权 PackageManager.PERMISSION_GRANTED表示同意授权
if (Build.VERSION.SDK_INT >= 30) {
if (!Environment.isExternalStorageManager()) {
@ -220,7 +221,7 @@ public class wj {
if (ActivityCompat.checkSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE) !=
PackageManager.PERMISSION_GRANTED) {
//申请权限
ActivityCompat.requestPermissions(home.appCompatActivity
ActivityCompat.requestPermissions(context
, PERMISSIONS_STORAGE, REQUEST_EXTERNAL_STORAGE);
} else {
Log.i("swyLog", "Android 6.0以上11以下当前已有权限");

View File

@ -235,9 +235,8 @@ public class sz extends AppCompatActivity {
if (setup != null) {
setup.i = 0;
}
home.appCompatActivity
.stopService(new Intent(home.appCompatActivity,
FloatingLyricsService.class));
main.application.stopService(new Intent(main.application,
FloatingLyricsService.class));
}
FloatingLyricsService.baocun(setup);
});

View File

@ -34,7 +34,7 @@ public class CardImage extends MaterialCardView {
imageView = new ImageView(getContext());
imageView.setScaleType(ImageView.ScaleType.FIT_XY);
addView(imageView);
setImage(R.drawable.icon);
imageView.setImageResource(R.drawable.ic_launcher_foreground);
}
@ -49,7 +49,7 @@ public class CardImage extends MaterialCardView {
public void setImageapply(Object bitmap) {
Glide.with(getContext())
.load(bitmap)
.apply(new RequestOptions().placeholder(R.drawable.icon))
.apply(new RequestOptions().placeholder(R.drawable.ic_launcher_foreground))
// .error(R.drawable.app_warning)
.into(imageView);
}

View File

@ -1,8 +1,6 @@
package com.muqingbfq.view;
import android.content.Context;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.RippleDrawable;
@ -22,7 +20,6 @@ import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import com.muqingbfq.R;
import com.muqingbfq.activity_search;
public class Edit extends LinearLayout {
public Edit(@NonNull Context context) {
@ -126,8 +123,6 @@ public class Edit extends LinearLayout {
setGravity(Gravity.CENTER);
addView(textView);
textView.setPadding(26, 26, 26, 26);
setOnClickListener(view ->
getContext().startActivity(new Intent(getContext(), activity_search.class)));
}
a.recycle();
}

View File

@ -49,11 +49,6 @@ public class yc extends AppCompatActivity {
binding.text.setText(wb);
binding.button2.setOnClickListener(view -> finish());
}
public static void start(Object e) {
start(home.appCompatActivity, e);
}
public static void start(Context context, Object e) {
gj.sc(e);
Intent intent = new Intent(context, yc.class);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="200dp"
android:width="200dp"
android:viewportWidth="1024.0"
android:viewportHeight="1024.0">
android:height="36dp"
android:width="36dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:fillColor="@color/text"
android:pathData="M332.4,813.5h545.2c17.8,0 31.3,-13.3 31.3,-31.3s-13.3,-31.3 -31.3,-31.3L332.4,750.8c-17.8,0 -31.3,13.3 -31.3,31.3 0,13.3 13.5,31.3 31.3,31.3zM332.4,545.2h545.2c22.3,0 35.8,-13.3 35.8,-31.3s-13.3,-31.3 -31.3,-31.3L332.4,482.5c-17.8,-4.5 -31.3,9 -31.3,31.3 0,18 13.5,31.3 31.3,31.3zM332.4,281.6h545.2c22.3,0 35.8,-17.8 35.8,-35.8 0,-17.8 -13.3,-31.3 -31.3,-31.3L332.4,214.4c-17.8,0 -31.3,13.3 -31.3,31.3 0,17.8 13.5,35.8 31.3,35.8zM158.1,826.8c26.8,0 49.2,-22.3 49.2,-49.2s-22.3,-49.2 -49.2,-49.2 -49.2,22.3 -49.2,49.2 22.3,49.2 49.2,49.2zM207.3,513.8c0,-26.8 -22.3,-49.2 -49.2,-49.2 -26.8,-4.5 -49.2,17.8 -49.2,49.2 0,26.8 22.3,49.2 49.2,49.2s49.2,-22.3 49.2,-49.2zM158.1,294.9c26.8,0 49.2,-22.3 49.2,-49.2s-22.3,-49.2 -49.2,-49.2 -49.2,22.3 -49.2,49.2 22.3,49.2 49.2,49.2zM158.1,294.9" />

View File

@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M995,538.7c-13.8,-8.9 -30.3,-12 -46.4,-8.5l-182.9,39.3c-28.2,6.1 -48.6,31.4 -48.6,60.2v224.6c0,21.8 -17.7,39.5 -39.6,39.5 -21.8,0 -39.5,-17.7 -39.5,-39.5s17.7,-39.6 39.5,-39.6c15.4,0 27.8,-12.4 27.8,-27.8s-12.4,-27.8 -27.8,-27.8c-52.4,0 -95.1,42.7 -95.1,95.2 0,52.4 42.7,95.1 95.1,95.1 52.5,0 95.1,-42.7 95.1,-95.1V629.8c0,-2.9 2,-5.3 4.8,-5.9l182.9,-39.3c1.9,-0.5 3.6,0.2 4.5,0.8 1,0.6 2.2,1.8 2.7,5V814c0,21.8 -17.7,39.6 -39.6,39.6 -10.5,0 -20.5,-4.1 -27.9,-11.6 -7.5,-7.5 -11.6,-17.4 -11.6,-28 0,-21.8 17.7,-39.6 39.6,-39.6 15.4,0 27.8,-12.4 27.8,-27.8s-12.4,-27.8 -27.8,-27.8c-52.5,0 -95.1,42.7 -95.1,95.1 0,25.4 9.9,49.3 27.9,67.3s41.8,27.9 67.2,27.9c52.5,0 95.1,-42.7 95.1,-95.1V590.5c0,-4.4 -0.5,-8.7 -1.4,-12.9 -3.4,-16.1 -12.9,-29.9 -26.7,-38.9z"
android:fillColor="#000000"/>
<path
android:pathData="M338.3,315.1c35.3,-63.9 90.4,-114.1 158.6,-143.6 81.4,-35.2 171.7,-36.6 254.1,-3.9 106.7,42.3 183,134.9 204.1,247.8 3.1,16.7 17.7,28.4 34.1,28.4 2.1,0 4.3,-0.2 6.4,-0.6 18.9,-3.5 31.3,-21.7 27.8,-40.5C997.9,266.2 905.7,154.1 776.6,103c-99.7,-39.5 -208.8,-37.8 -307.3,4.7 -92.5,40 -165.1,111.6 -206.4,202.8 -48.9,3.6 -96.2,19.8 -137.8,48C62.2,400.9 19.7,465.3 5.3,539.7c-14.4,74.4 1,150 43.5,212.9 52.9,78.3 140.8,125 235.2,125h153.3c19.2,0 34.7,-15.6 34.7,-34.7s-15.6,-34.7 -34.7,-34.7H284c-71.3,0 -137.7,-35.3 -177.7,-94.4C74.2,666.3 62.6,609.3 73.5,553c10.9,-56.2 43,-104.8 90.5,-136.9 47.5,-32.1 104.5,-43.7 160.8,-32.8 56.2,10.9 104.8,43 136.9,90.5 10.7,15.9 32.3,20.1 48.2,9.3 15.9,-10.7 20.1,-32.3 9.3,-48.2 -42.4,-62.8 -106.6,-105.3 -180.9,-119.8z"
android:fillColor="#000000"/>
</vector>

View File

@ -1,12 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="64dp"
android:height="64dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<path
android:pathData="M995,538.7c-13.8,-8.9 -30.3,-12 -46.4,-8.5l-182.9,39.3c-28.2,6.1 -48.6,31.4 -48.6,60.2v224.6c0,21.8 -17.7,39.5 -39.6,39.5 -21.8,0 -39.5,-17.7 -39.5,-39.5s17.7,-39.6 39.5,-39.6c15.4,0 27.8,-12.4 27.8,-27.8s-12.4,-27.8 -27.8,-27.8c-52.4,0 -95.1,42.7 -95.1,95.2 0,52.4 42.7,95.1 95.1,95.1 52.5,0 95.1,-42.7 95.1,-95.1V629.8c0,-2.9 2,-5.3 4.8,-5.9l182.9,-39.3c1.9,-0.5 3.6,0.2 4.5,0.8 1,0.6 2.2,1.8 2.7,5V814c0,21.8 -17.7,39.6 -39.6,39.6 -10.5,0 -20.5,-4.1 -27.9,-11.6 -7.5,-7.5 -11.6,-17.4 -11.6,-28 0,-21.8 17.7,-39.6 39.6,-39.6 15.4,0 27.8,-12.4 27.8,-27.8s-12.4,-27.8 -27.8,-27.8c-52.5,0 -95.1,42.7 -95.1,95.1 0,25.4 9.9,49.3 27.9,67.3s41.8,27.9 67.2,27.9c52.5,0 95.1,-42.7 95.1,-95.1V590.5c0,-4.4 -0.5,-8.7 -1.4,-12.9 -3.4,-16.1 -12.9,-29.9 -26.7,-38.9z"
android:fillColor="@color/text"/>
<path
android:pathData="M338.3,315.1c35.3,-63.9 90.4,-114.1 158.6,-143.6 81.4,-35.2 171.7,-36.6 254.1,-3.9 106.7,42.3 183,134.9 204.1,247.8 3.1,16.7 17.7,28.4 34.1,28.4 2.1,0 4.3,-0.2 6.4,-0.6 18.9,-3.5 31.3,-21.7 27.8,-40.5C997.9,266.2 905.7,154.1 776.6,103c-99.7,-39.5 -208.8,-37.8 -307.3,4.7 -92.5,40 -165.1,111.6 -206.4,202.8 -48.9,3.6 -96.2,19.8 -137.8,48C62.2,400.9 19.7,465.3 5.3,539.7c-14.4,74.4 1,150 43.5,212.9 52.9,78.3 140.8,125 235.2,125h153.3c19.2,0 34.7,-15.6 34.7,-34.7s-15.6,-34.7 -34.7,-34.7H284c-71.3,0 -137.7,-35.3 -177.7,-94.4C74.2,666.3 62.6,609.3 73.5,553c10.9,-56.2 43,-104.8 90.5,-136.9 47.5,-32.1 104.5,-43.7 160.8,-32.8 56.2,10.9 104.8,43 136.9,90.5 10.7,15.9 32.3,20.1 48.2,9.3 15.9,-10.7 20.1,-32.3 9.3,-48.2 -42.4,-62.8 -106.6,-105.3 -180.9,-119.8z"
android:fillColor="@color/text"/>
</vector>

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:topLeftRadius="16dp"
android:topRightRadius="16dp" />
<solid android:color="@color/bj" />
</shape>

View File

@ -33,7 +33,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:src="@drawable/icon"
android:src="@drawable/ic_launcher_foreground"
tools:ignore="ImageContrastCheck" />
<TextView

View File

@ -8,6 +8,7 @@
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:transitionName="view"
android:layout_width="match_parent"
android:layout_height="wrap_content">

View File

@ -14,6 +14,7 @@
android:id="@+id/editview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:transitionName="view"
android:enabled="false"/>
</com.google.android.material.appbar.MaterialToolbar>
<RelativeLayout

View File

@ -1,144 +0,0 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:title="用户编辑" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:paddingStart="16dp"
android:paddingTop="6dp"
android:paddingEnd="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="16dp"
android:gravity="center_vertical"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables,UselessParent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="头像:" />
<androidx.constraintlayout.utils.widget.ImageFilterView
android:id="@+id/image1"
android:layout_width="68dp"
android:layout_height="68dp"
app:round="16dp"
android:layout_margin="16dp"
app:srcCompat="@drawable/ic_launcher_foreground" />
</LinearLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:counterEnabled="true"
app:counterMaxLength="10">
<EditText
android:id="@+id/edit_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints="name"
android:hint="用户名"
android:inputType="text"
android:singleLine="true"
tools:ignore="VisualLintTextFieldSize,TextContrastCheck" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:counterEnabled="true"
app:counterMaxLength="36">
<EditText
android:id="@+id/edit_qianming"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints="name"
android:hint="签名"
android:inputType="text"
android:singleLine="true"
tools:ignore="VisualLintTextFieldSize,TextContrastCheck" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/menu"
style="@style/Widget.Material3.TextInputLayout.FilledBox.ExposedDropdownMenu"
android:layout_width="match_parent"
android:hint="性别"
android:layout_height="wrap_content">
<AutoCompleteTextView
android:id="@+id/autoComplete"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:completionThreshold="1"
android:imeOptions="actionSearch"
android:maxLength="1"
android:singleLine="true"
app:simpleItems="@array/xingbie"
tools:ignore="VisualLintTextFieldSize,SpeakableTextPresentCheck" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="vertical"
tools:ignore="UseCompoundDrawables,UselessParent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="背景(此软件暂无使用背景):" />
<androidx.constraintlayout.utils.widget.ImageFilterView
android:id="@+id/image2"
android:layout_width="match_parent"
android:layout_height="200dp"
android:adjustViewBounds="true"
android:scaleType="fitXY"
app:round="16dp"
app:srcCompat="@drawable/ic_launcher_foreground" />
</LinearLayout>
<Button
android:id="@+id/user_end"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="6dp"
app:icon="@drawable/user_end"
android:text="@string/tuichudenglu" />
</LinearLayout>
</ScrollView>
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:contentDescription="保存"
android:text="保存"
app:icon="@drawable/icon" />
</LinearLayout>

View File

@ -36,7 +36,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:src="@drawable/icon" />
android:src="@drawable/ic_launcher_foreground" />
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
@ -143,5 +143,5 @@
android:layout_margin="16dp"
android:contentDescription="登录模式切换"
android:text="二维码"
app:icon="@drawable/icon" />
app:icon="@drawable/ic_launcher_foreground" />
</LinearLayout>

View File

@ -1,14 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/view1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#80000000">
android:background="#80000000"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -21,7 +22,9 @@
android:layout_weight="1"
android:gravity="center"
android:text="清空"
android:textColor="#FFFFFF" />
android:textColor="#FFFFFF"
tools:ignore="HardcodedText,TextContrastCheck" />
<TextView
android:id="@+id/text2"
android:layout_width="match_parent"
@ -29,7 +32,8 @@
android:layout_weight="1"
android:gravity="center"
android:text="复制"
android:textColor="#FFFFFF" />
android:textColor="#FFFFFF"
tools:ignore="HardcodedText,TextContrastCheck" />
<TextView
android:id="@+id/text3"
@ -38,7 +42,8 @@
android:layout_weight="1"
android:gravity="center"
android:text="暂停"
android:textColor="#FFFFFF" />
android:textColor="#FFFFFF"
tools:ignore="HardcodedText,TextContrastCheck" />
<TextView
android:id="@+id/text4"
@ -47,27 +52,26 @@
android:layout_weight="1"
android:gravity="center"
android:text="隐藏"
android:textColor="#FFFFFF" />
android:textColor="#FFFFFF"
tools:ignore="HardcodedText,TextContrastCheck" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="6dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager">
</androidx.recyclerview.widget.RecyclerView>
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"></androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
<androidx.cardview.widget.CardView
<androidx.constraintlayout.utils.widget.ImageFilterView
android:id="@+id/image"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginStart="6dp"
android:layout_centerVertical="true"
app:cardBackgroundColor="#00CCFF"
app:cardCornerRadius="18dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:src="@drawable/icon"/>
</androidx.cardview.widget.CardView>
android:layout_marginStart="6dp"
android:background="#00CCFF"
android:scaleType="fitXY"
android:src="@drawable/ic_launcher_foreground"
app:round="36dp"
tools:ignore="ImageContrastCheck" />
</RelativeLayout>

View File

@ -1,47 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/bflb_db"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/shape_sheet_dialog_bg"
android:orientation="vertical">
<LinearLayout
android:id="@+id/xxbj"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="6dp"
tools:ignore="UseCompoundDrawables">
android:gravity="center_horizontal"
android:orientation="horizontal">
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
android:id="@+id/bottomSheetDragHandleView"
android:layout_width="match_parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_height="wrap_content" />
<TextView
android:layout_width="0dp"
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginTop="16dp"
android:text="@string/bflb"
android:textColor="@color/text" />
android:textColor="@color/text"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="@+id/bottomSheetDragHandleView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/sc"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_gravity="end"
android:layout_marginEnd="6dp"
android:contentDescription="@null"
android:src="@drawable/deleat" />
</LinearLayout>
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:dividerInsetStart="16dp"
app:dividerInsetEnd="16dp"/>
android:src="@drawable/deleat"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/lb"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
android:padding="6dp" />
</androidx.appcompat.widget.LinearLayoutCompat>
android:layout_marginHorizontal="6dp"
android:layout_marginBottom="6dp"/>
</LinearLayout>

View File

@ -1,55 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/bj">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:baselineAligned="false"
android:paddingStart="10dp"
android:paddingBottom="6dp"
android:paddingEnd="10dp"
android:orientation="horizontal">
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="6dp"
android:paddingEnd="6dp">
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:id="@+id/textview1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/name"
android:textSize="26sp" />
android:textSize="16sp" />
<TextView
android:id="@+id/textview2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:text="@string/name"
android:textSize="13sp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/kg"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_margin="3dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@null"
android:src="@drawable/zt" />
<ImageView
android:id="@+id/kg"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_margin="6dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:contentDescription="@null"
android:src="@drawable/zt" />
<ImageView
android:id="@+id/txb"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_margin="6dp"
app:tint="@color/text"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/cd" />
</LinearLayout>
<ImageView
android:id="@+id/txb"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_margin="3dp"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:src="@drawable/cd"
app:tint="@color/text"
android:contentDescription="@string/nullPlaylists" />
</LinearLayout>
</FrameLayout>

View File

@ -10,6 +10,7 @@
android:id="@+id/image"
android:layout_width="120dp"
android:layout_height="120dp"
android:transitionName="view"
app:cardUseCompatPadding="true">
<ImageView
android:id="@+id/kg"

View File

@ -1,37 +1,35 @@
<?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="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal"
android:paddingBottom="16dp">
android:padding="10dp">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<com.google.android.material.card.MaterialCardView
android:id="@+id/cardview"
app:cardUseCompatPadding="true"
android:layout_width="56dp"
android:layout_height="56dp">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/icon" />
</com.google.android.material.card.MaterialCardView>
<androidx.constraintlayout.utils.widget.ImageFilterView
android:id="@+id/imageView"
android:layout_width="46dp"
android:layout_height="46dp"
app:round="10dp"
android:layout_marginEnd="10dp"
app:srcCompat="@drawable/ic_launcher_foreground" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.muqingbfq.view.Text
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16sp"
android:text="@string/app_name" />
<com.muqingbfq.view.Text
android:id="@+id/text2"
android:layout_width="wrap_content"

View File

@ -14,7 +14,9 @@
android:layout_width="36dp"
android:layout_height="wrap_content"
android:text="0"
android:textSize="26sp"/>
android:gravity="center"
android:textSize="26sp"
tools:ignore="HardcodedText" />
<androidx.cardview.widget.CardView
android:layout_width="3dp"

View File

@ -5,30 +5,37 @@
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:background="?android:attr/selectableItemBackground"
android:padding="10dp">
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:background="?android:selectableItemBackground">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1"
tools:ignore="UselessParent">
android:gravity="center_vertical"
android:layout_marginStart="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/name"
android:singleLine="true"
android:textColor="@color/text"
android:textSize="16sp" />
<TextView
android:id="@+id/zz"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text"
android:textColor="@color/text_tm"
android:singleLine="true"
android:text="@string/zz" />
</LinearLayout>
<ImageView
android:id="@+id/delete"
android:layout_width="26dp"
android:layout_height="26dp"
android:layout_marginEnd="6dp"
android:src="@drawable/chahao"/>
</LinearLayout>

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
@ -9,9 +10,10 @@
android:layout_width="56dp"
android:layout_height="56dp"
android:background="@null"
android:src="@drawable/icon"
android:src="@drawable/ic_launcher_foreground"
android:padding="6dp"
android:scaleType="fitXY"/>
android:scaleType="fitXY"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"

View File

@ -9,6 +9,8 @@
<style name="Theme.start" parent="Theme.Material3.DayNight">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<!--使用动画-->
<item name="android:windowContentTransitions">true</item>
<!-- 添加主题属性以启用沉浸式状态栏 -->
<item name="android:windowTranslucentStatus">true</item>