修复BUG优化UI
This commit is contained in:
parent
973157c1a8
commit
69c7cd15b9
|
@ -18,7 +18,7 @@ android {
|
||||||
//noinspection OldTargetApi
|
//noinspection OldTargetApi
|
||||||
targetSdk 31
|
targetSdk 31
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.7.8"
|
versionName "1.8.0"
|
||||||
|
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
|
|
|
@ -149,7 +149,7 @@ public class MediaPlayer extends android.media.MediaPlayer {
|
||||||
BitmapFactory.decodeByteArray(albumImage, 0, albumImage.length);
|
BitmapFactory.decodeByteArray(albumImage, 0, albumImage.length);
|
||||||
}
|
}
|
||||||
} catch (Exception a) {
|
} catch (Exception a) {
|
||||||
gj.sc(a);
|
gj.sc("yc:"+a);
|
||||||
}
|
}
|
||||||
bfqkz.notify.setBitmap();
|
bfqkz.notify.setBitmap();
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -90,10 +90,7 @@ public class MyButtonClickReceiver extends BroadcastReceiver {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
FloatingLyricsService lei = FloatingLyricsService.lei;
|
FloatingLyricsService lei = FloatingLyricsService.lei;
|
||||||
gj.sc(lei.setup.i);
|
if (lei.setup.i == 1) {
|
||||||
if (lei.setup.i == 0) {
|
|
||||||
lei.show();
|
|
||||||
} else if (lei.setup.i == 1) {
|
|
||||||
lei.setyc();
|
lei.setyc();
|
||||||
} else {
|
} else {
|
||||||
lei.setup.i = 0;
|
lei.setup.i = 0;
|
||||||
|
@ -102,6 +99,8 @@ public class MyButtonClickReceiver extends BroadcastReceiver {
|
||||||
new Intent(home.appCompatActivity, FloatingLyricsService.class));
|
new Intent(home.appCompatActivity, FloatingLyricsService.class));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case "like":
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// 处理按钮点击事件的逻辑
|
// 处理按钮点击事件的逻辑
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,19 +2,18 @@ package com.muqingbfq.api;
|
||||||
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.muqingbfq.R;
|
import com.muqingbfq.main;
|
||||||
import com.muqingbfq.mq.gj;
|
import com.muqingbfq.mq.gj;
|
||||||
import com.muqingbfq.mq.wj;
|
import com.muqingbfq.mq.wj;
|
||||||
import com.muqingbfq.mq.wl;
|
import com.muqingbfq.mq.wl;
|
||||||
|
import com.muqingbfq.xm;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.muqingbfq.xm;
|
|
||||||
|
|
||||||
public class resource {
|
public class resource {
|
||||||
|
|
||||||
public static void recommend(List<xm> list) {
|
public static void recommend(List<xm> list) {
|
||||||
|
@ -54,6 +53,16 @@ public class resource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static xm Playlist_content(String UID) throws JSONException {
|
||||||
|
String hq = wl.get(main.api + "/playlist/detail?id=" + UID);
|
||||||
|
JSONObject js = new JSONObject(hq).getJSONObject("playlist");
|
||||||
|
String id = js.getString("id");
|
||||||
|
String name = js.getString("name");
|
||||||
|
String coverImgUrl = js.getString("coverImgUrl");
|
||||||
|
return new xm(id, name, coverImgUrl);
|
||||||
|
}
|
||||||
|
|
||||||
public static void 排行榜(List<xm> list) {
|
public static void 排行榜(List<xm> list) {
|
||||||
String hq;
|
String hq;
|
||||||
try {
|
try {
|
||||||
|
@ -78,9 +87,8 @@ public class resource {
|
||||||
if (!TextUtils.isEmpty(description) && !description.equals("null")) {
|
if (!TextUtils.isEmpty(description) && !description.equals("null")) {
|
||||||
name += description;
|
name += description;
|
||||||
}
|
}
|
||||||
boolean cz = wj.cz(wj.gd + id);
|
|
||||||
String coverImgUrl = get.getString("coverImgUrl");
|
String coverImgUrl = get.getString("coverImgUrl");
|
||||||
list.add(new xm(id, name, coverImgUrl, cz));
|
list.add(new xm(id, name, coverImgUrl));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -90,9 +98,8 @@ public class resource {
|
||||||
|
|
||||||
private static void add(JSONObject jsonObject, List<xm> list) throws Exception {
|
private static void add(JSONObject jsonObject, List<xm> list) throws Exception {
|
||||||
String id = jsonObject.getString("id");
|
String id = jsonObject.getString("id");
|
||||||
boolean cz = wj.cz(wj.gd + id);
|
|
||||||
String name = jsonObject.getString("name");
|
String name = jsonObject.getString("name");
|
||||||
String picUrl = jsonObject.getString("picUrl");
|
String picUrl = jsonObject.getString("picUrl");
|
||||||
list.add(new xm(id, name, picUrl, cz));
|
list.add(new xm(id, name, picUrl));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import android.os.Bundle;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
|
@ -46,19 +47,13 @@ public class bfq extends AppCompatActivity {
|
||||||
public static String lrc;
|
public static String lrc;
|
||||||
public static com.muqingbfq.view.LrcView lrcView;
|
public static com.muqingbfq.view.LrcView lrcView;
|
||||||
private void setLrc(){
|
private void setLrc(){
|
||||||
lrcView = binding.lrcView;/*
|
lrcView = binding.lrcView;
|
||||||
lrcview.setCurrentColor(ContextCompat.getColor(this,R.color.text));
|
|
||||||
lrcview.setLabel(getString(R.string.app_name));
|
ViewGroup.LayoutParams layoutParams = binding.cardview.getLayoutParams();
|
||||||
lrcview.setCurrentTextSize(TypedValue.applyDimension(
|
layoutParams.height = main.k;
|
||||||
TypedValue.COMPLEX_UNIT_SP, 16, getResources().getDisplayMetrics()));
|
layoutParams.width = main.k;
|
||||||
// lrcView.setLrcPadding(16);
|
binding.cardview.setLayoutParams(layoutParams);/*
|
||||||
lrcview.setCurrentTextSize(TypedValue.applyDimension(
|
|
||||||
TypedValue.COMPLEX_UNIT_SP, 20, getResources().getDisplayMetrics()));
|
|
||||||
lrcview.setTimelineTextColor(ContextCompat.getColor(this,R.color.text_tm));
|
|
||||||
lrcview.setDraggable(true, (view, time) -> {
|
|
||||||
bfqkz.mt.seekTo(Math.toIntExact(time));
|
bfqkz.mt.seekTo(Math.toIntExact(time));
|
||||||
return false;
|
|
||||||
});
|
|
||||||
if (!gj.isTablet(this)) {
|
if (!gj.isTablet(this)) {
|
||||||
lrcview.setOnTapListener((view, x, y) -> {
|
lrcview.setOnTapListener((view, x, y) -> {
|
||||||
View kp = binding.kp1;
|
View kp = binding.kp1;
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class Media {
|
||||||
a = jsonObject.getJSONObject("lrc").getString("lyric");
|
a = jsonObject.getJSONObject("lrc").getString("lyric");
|
||||||
b = jsonObject.getJSONObject("tlyric").getString("lyric");
|
b = jsonObject.getJSONObject("tlyric").getString("lyric");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
gj.sc(e);
|
gj.sc("Media loadLyric "+e);
|
||||||
}
|
}
|
||||||
LrcView.setLrc(a, b);
|
LrcView.setLrc(a, b);
|
||||||
// bfq.lrcView.getLrc();
|
// bfq.lrcView.getLrc();
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.muqingbfq.fragment;
|
package com.muqingbfq.fragment;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
@ -11,38 +13,47 @@ import androidx.core.content.ContextCompat;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||||
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
import com.muqingbfq.MP3;
|
import com.muqingbfq.MP3;
|
||||||
import com.muqingbfq.R;
|
import com.muqingbfq.R;
|
||||||
import com.muqingbfq.api.url;
|
import com.muqingbfq.api.url;
|
||||||
import com.muqingbfq.bfqkz;
|
import com.muqingbfq.bfqkz;
|
||||||
|
import com.muqingbfq.databinding.FragmentBflbDbBinding;
|
||||||
import com.muqingbfq.list.MyViewHoder;
|
import com.muqingbfq.list.MyViewHoder;
|
||||||
import com.muqingbfq.main;
|
import com.muqingbfq.main;
|
||||||
import com.muqingbfq.mq.gj;
|
|
||||||
import com.muqingbfq.xm;
|
|
||||||
import com.muqingbfq.yc;
|
import com.muqingbfq.yc;
|
||||||
|
|
||||||
public class bflb_db extends BottomSheetDialog {
|
public class bflb_db extends BottomSheetDialog {
|
||||||
public static RecyclerView.Adapter<MyViewHoder> adapter;
|
public static RecyclerView.Adapter<MyViewHoder> adapter;
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.fragment_bflb_db);
|
FragmentBflbDbBinding binding = FragmentBflbDbBinding.inflate(getLayoutInflater());
|
||||||
|
setContentView(binding.getRoot());
|
||||||
int height = main.g - main.g / 2 / 2;
|
int height = main.g - main.g / 2 / 2;
|
||||||
getBehavior().setPeekHeight(height);
|
getBehavior().setPeekHeight(height);
|
||||||
getBehavior().setMaxHeight(height);
|
getBehavior().setMaxHeight(height);
|
||||||
try {
|
try {
|
||||||
RecyclerView lb = findViewById(R.id.lb);
|
binding.lb.setAdapter(new spq());
|
||||||
lb.setAdapter(new spq());
|
|
||||||
if (bfqkz.xm != null) {
|
if (bfqkz.xm != null) {
|
||||||
lb.smoothScrollToPosition(getI());
|
binding.lb.smoothScrollToPosition(getI());
|
||||||
}
|
}
|
||||||
findViewById(R.id.xxbj).
|
binding.xxbj.setOnClickListener(v -> {
|
||||||
setOnClickListener(v -> {
|
|
||||||
if (bfqkz.xm != null) {
|
if (bfqkz.xm != null) {
|
||||||
lb.smoothScrollToPosition(getI());
|
binding.lb.smoothScrollToPosition(getI());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
binding.sc.setOnClickListener(view -> {
|
||||||
|
new MaterialAlertDialogBuilder(getContext())
|
||||||
|
.setTitle("清空播放列表")
|
||||||
|
.setPositiveButton("确定", (dialogInterface, i) -> {
|
||||||
|
bfqkz.list.clear();
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
})
|
||||||
|
.setNegativeButton("取消", null)
|
||||||
|
.show();
|
||||||
|
});
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
yc.start(getContext(), e);
|
yc.start(getContext(), e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,31 +14,21 @@ import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
import androidx.fragment.app.FragmentActivity;
|
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
|
||||||
import androidx.viewpager2.widget.ViewPager2;
|
|
||||||
|
|
||||||
import com.bumptech.glide.Glide;
|
|
||||||
import com.bumptech.glide.request.RequestOptions;
|
|
||||||
import com.google.android.material.card.MaterialCardView;
|
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||||
import com.muqingbfq.MP3;
|
|
||||||
import com.muqingbfq.R;
|
import com.muqingbfq.R;
|
||||||
import com.muqingbfq.api.playlist;
|
import com.muqingbfq.api.playlist;
|
||||||
import com.muqingbfq.api.resource;
|
import com.muqingbfq.api.resource;
|
||||||
import com.muqingbfq.bfq_an;
|
import com.muqingbfq.bfq_an;
|
||||||
import com.muqingbfq.bfqkz;
|
import com.muqingbfq.bfqkz;
|
||||||
import com.muqingbfq.databinding.FragmentGdBinding;
|
|
||||||
import com.muqingbfq.databinding.FragmentMp3Binding;
|
import com.muqingbfq.databinding.FragmentMp3Binding;
|
||||||
import com.muqingbfq.list.MyViewHoder;
|
|
||||||
import com.muqingbfq.main;
|
import com.muqingbfq.main;
|
||||||
import com.muqingbfq.mq.gj;
|
import com.muqingbfq.mq.gj;
|
||||||
import com.muqingbfq.mq.wj;
|
import com.muqingbfq.mq.wj;
|
||||||
import com.muqingbfq.mq.wl;
|
import com.muqingbfq.mq.wl;
|
||||||
|
import com.muqingbfq.view.CardImage;
|
||||||
import com.muqingbfq.xm;
|
import com.muqingbfq.xm;
|
||||||
|
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
|
@ -100,7 +90,7 @@ public class gd extends com.muqingbfq.mq.FragmentActivity {
|
||||||
String id = jsonObject.getString("id");
|
String id = jsonObject.getString("id");
|
||||||
String name = jsonObject.getString("name");
|
String name = jsonObject.getString("name");
|
||||||
String coverImgUrl = jsonObject.getString("coverImgUrl");
|
String coverImgUrl = jsonObject.getString("coverImgUrl");
|
||||||
list.add(new xm(id, name, coverImgUrl, false));
|
list.add(new xm(id, name, coverImgUrl));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
gj.sc(e);
|
gj.sc(e);
|
||||||
|
@ -110,7 +100,7 @@ public class gd extends com.muqingbfq.mq.FragmentActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class baseadapter extends RecyclerView.Adapter<VH> {
|
public static class baseadapter extends RecyclerView.Adapter<VH>{
|
||||||
Context context;
|
Context context;
|
||||||
List<xm> list;
|
List<xm> list;
|
||||||
|
|
||||||
|
@ -144,63 +134,14 @@ public class gd extends com.muqingbfq.mq.FragmentActivity {
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull VH holder, int position) {
|
public void onBindViewHolder(@NonNull VH holder, int position) {
|
||||||
xm xm = list.get(position);
|
xm xm = list.get(position);
|
||||||
holder.cardView.setOnClickListener(view -> {
|
CARD card = new CARD(xm);
|
||||||
Context context = view.getContext();
|
if (bool) {
|
||||||
Intent intent = new Intent(context, mp3.class);
|
holder.itemView.setOnClickListener(card);
|
||||||
intent.putExtra("id", xm.id);
|
holder.itemView.setOnLongClickListener(card);
|
||||||
intent.putExtra("name", xm.name);
|
} else {
|
||||||
context.startActivity(intent);
|
holder.image.setOnClickListener(card);
|
||||||
});
|
holder.image.setOnLongClickListener(card);
|
||||||
holder.cardView.setOnLongClickListener(view -> {
|
}
|
||||||
String[] stringArray = view.getResources()
|
|
||||||
.getStringArray(R.array.gd_list);
|
|
||||||
new MaterialAlertDialogBuilder(view.getContext()).setItems(stringArray, (dialog, id) -> {
|
|
||||||
new Thread() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
if (id == 0) {
|
|
||||||
String hq = wl.hq(playlist.api + xm.id + "&limit=30");
|
|
||||||
if (hq != null) {
|
|
||||||
wj.xrwb(wj.gd + xm.id, hq);
|
|
||||||
xm.cz = true;
|
|
||||||
try {
|
|
||||||
JSONObject jsonObject = new JSONObject();
|
|
||||||
if (wj.cz(wj.gd_xz)) {
|
|
||||||
jsonObject = new JSONObject(Objects.requireNonNull(wj.dqwb(wj.gd_xz)));
|
|
||||||
}
|
|
||||||
JSONObject json = new JSONObject();
|
|
||||||
json.put("name", xm.name);
|
|
||||||
json.put("picUrl", xm.picurl);
|
|
||||||
jsonObject.put(xm.id, json);
|
|
||||||
wj.xrwb(wj.gd_xz, jsonObject.toString());
|
|
||||||
} catch (JSONException e) {
|
|
||||||
gj.sc("list gd onclick thear " + e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (id == 2) {
|
|
||||||
wj.sc(wj.gd + xm.id);
|
|
||||||
if (xm.id.equals("mp3_xz.json")) {
|
|
||||||
wj.sc(new File(wj.mp3));
|
|
||||||
}
|
|
||||||
xm.cz = false;
|
|
||||||
try {
|
|
||||||
JSONObject jsonObject = new JSONObject(Objects.requireNonNull(wj.dqwb(wj.gd_xz)));
|
|
||||||
jsonObject.remove(xm.id);
|
|
||||||
list.remove(xm);
|
|
||||||
wj.xrwb(wj.gd_xz, jsonObject.toString());
|
|
||||||
} catch (JSONException e) {
|
|
||||||
gj.sc(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
main.handler.post(() -> notifyDataSetChanged());
|
|
||||||
}
|
|
||||||
}.start();
|
|
||||||
// 在这里处理菜单项的点击事件
|
|
||||||
dialog.dismiss();
|
|
||||||
}).show();
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
holder.textView.setText(xm.name);
|
holder.textView.setText(xm.name);
|
||||||
holder.kg.setOnClickListener(view1 -> {
|
holder.kg.setOnClickListener(view1 -> {
|
||||||
ImageView tx = (ImageView) view1;
|
ImageView tx = (ImageView) view1;
|
||||||
|
@ -228,8 +169,8 @@ public class gd extends com.muqingbfq.mq.FragmentActivity {
|
||||||
color_kg = ContextCompat.getDrawable(context, R.drawable.bf);
|
color_kg = ContextCompat.getDrawable(context, R.drawable.bf);
|
||||||
}
|
}
|
||||||
holder.kg.setImageDrawable(color_kg);
|
holder.kg.setImageDrawable(color_kg);
|
||||||
Glide.with(context).load(xm.picurl).apply(new RequestOptions().placeholder(R.drawable.icon))
|
// xm.picurl
|
||||||
.into(holder.imageView);
|
holder.image.setImageapply(xm.picurl);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -237,22 +178,99 @@ public class gd extends com.muqingbfq.mq.FragmentActivity {
|
||||||
return list.size();
|
return list.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class CARD implements View.OnClickListener
|
||||||
|
, View.OnLongClickListener {
|
||||||
|
xm xm;
|
||||||
|
|
||||||
|
public CARD(xm xm) {
|
||||||
|
this.xm = xm;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
Context context = view.getContext();
|
||||||
|
Intent intent = new Intent(context, mp3.class);
|
||||||
|
intent.putExtra("id", xm.id);
|
||||||
|
intent.putExtra("name", xm.name);
|
||||||
|
context.startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onLongClick(View view) {
|
||||||
|
|
||||||
|
String[] stringArray = view.getResources()
|
||||||
|
.getStringArray(R.array.gd_list);
|
||||||
|
new MaterialAlertDialogBuilder(view.getContext()).setItems(stringArray, (dialog, id) -> {
|
||||||
|
new Thread() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
if (id == 0) {
|
||||||
|
String hq = wl.hq(playlist.api + xm.id + "&limit=100");
|
||||||
|
if (hq != null) {
|
||||||
|
wj.xrwb(wj.gd + xm.id, hq);
|
||||||
|
try {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
if (wj.cz(wj.gd_xz)) {
|
||||||
|
jsonObject = new JSONObject(Objects.requireNonNull(wj.dqwb(wj.gd_xz)));
|
||||||
|
}
|
||||||
|
xm fh=resource.Playlist_content(xm.id);
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
json.put("name", fh.name);
|
||||||
|
json.put("picUrl", fh.picurl);
|
||||||
|
jsonObject.put(fh.id, json);
|
||||||
|
wj.xrwb(wj.gd_xz, jsonObject.toString());
|
||||||
|
main.handler.post(new sx());
|
||||||
|
} catch (JSONException e) {
|
||||||
|
gj.sc("list gd onclick thear " + e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (id == 2) {
|
||||||
|
wj.sc(wj.gd + xm.id);
|
||||||
|
if (xm.id.equals("mp3_xz.json")) {
|
||||||
|
wj.sc(new File(wj.mp3));
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
JSONObject jsonObject = new JSONObject(Objects.requireNonNull(wj.dqwb(wj.gd_xz)));
|
||||||
|
jsonObject.remove(xm.id);
|
||||||
|
list.remove(xm);
|
||||||
|
wj.xrwb(wj.gd_xz, jsonObject.toString());
|
||||||
|
} catch (JSONException e) {
|
||||||
|
gj.sc(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
main.handler.post(new sx());
|
||||||
|
}
|
||||||
|
}.start();
|
||||||
|
// 在这里处理菜单项的点击事件
|
||||||
|
dialog.dismiss();
|
||||||
|
}).show();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class sx implements Runnable {
|
||||||
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static class VH extends RecyclerView.ViewHolder {
|
static class VH extends RecyclerView.ViewHolder {
|
||||||
TextView textView;
|
TextView textView;
|
||||||
ImageView imageView, kg;
|
ImageView kg;
|
||||||
MaterialCardView cardView;
|
CardImage image;
|
||||||
|
|
||||||
public VH(@NonNull View itemView) {
|
public VH(@NonNull View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
textView = itemView.findViewById(R.id.wb1);
|
textView = itemView.findViewById(R.id.wb1);
|
||||||
imageView = itemView.findViewById(R.id.fh);
|
image = itemView.findViewById(R.id.image);
|
||||||
cardView = itemView.findViewById(R.id.cardview);
|
|
||||||
kg = itemView.findViewById(R.id.kg);
|
kg = itemView.findViewById(R.id.kg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class lbspq_sx implements Runnable {
|
private class lbspq_sx implements Runnable {
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -125,6 +125,13 @@ public class search extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void mp3() {
|
private void mp3() {
|
||||||
|
try {
|
||||||
|
Long.parseLong(name);
|
||||||
|
com.muqingbfq.api.playlist.hq(list, name);
|
||||||
|
return;
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
gj.sc(e);
|
||||||
|
}
|
||||||
String hq = wl.hq("/search?keywords=" + name + "&type=1");
|
String hq = wl.hq("/search?keywords=" + name + "&type=1");
|
||||||
try {
|
try {
|
||||||
JSONArray jsonArray = new JSONObject(hq).getJSONObject("result")
|
JSONArray jsonArray = new JSONObject(hq).getJSONObject("result")
|
||||||
|
@ -154,8 +161,21 @@ public class search extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void gd() {
|
private void gd() {
|
||||||
String hq = wl.hq("/search?keywords=" + name + "&limit=" + (k * 3) + "&type=1000");
|
|
||||||
try {
|
try {
|
||||||
|
Long.parseLong(name);
|
||||||
|
String hq = wl.hq("/playlist/detail?id=" + name);
|
||||||
|
JSONObject js = new JSONObject(hq).getJSONObject("playlist");
|
||||||
|
String id = js.getString("id");
|
||||||
|
String name = js.getString("name");
|
||||||
|
String coverImgUrl = js.getString("coverImgUrl");
|
||||||
|
// gj.sc(name);
|
||||||
|
xmList.add(new xm(id, name, coverImgUrl));
|
||||||
|
return;
|
||||||
|
} catch (Exception e) {
|
||||||
|
gj.sc(e);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
String hq = wl.hq("/search?keywords=" + name + "&limit=" + (k * 3) + "&type=1000");
|
||||||
JSONArray jsonArray = new JSONObject(hq).getJSONObject("result")
|
JSONArray jsonArray = new JSONObject(hq).getJSONObject("result")
|
||||||
.getJSONArray("playlists");
|
.getJSONArray("playlists");
|
||||||
int length = jsonArray.length();
|
int length = jsonArray.length();
|
||||||
|
@ -165,8 +185,7 @@ public class search extends Fragment {
|
||||||
String name = jsonObject.getString("name");
|
String name = jsonObject.getString("name");
|
||||||
String coverImgUrl = jsonObject.getString("coverImgUrl");
|
String coverImgUrl = jsonObject.getString("coverImgUrl");
|
||||||
// gj.sc(name);
|
// gj.sc(name);
|
||||||
xmList.add(new xm(id, name, coverImgUrl, false));
|
xmList.add(new xm(id, name, coverImgUrl));
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
gj.sc(e);
|
gj.sc(e);
|
||||||
|
|
|
@ -148,11 +148,10 @@ public class wode extends Fragment {
|
||||||
JSONObject date = new JSONObject(wj.dqwb(wj.gd_xz));
|
JSONObject date = new JSONObject(wj.dqwb(wj.gd_xz));
|
||||||
for (Iterator<String> it = date.keys(); it.hasNext(); ) {
|
for (Iterator<String> it = date.keys(); it.hasNext(); ) {
|
||||||
String id = it.next();
|
String id = it.next();
|
||||||
boolean cz = wj.cz(wj.gd + id);
|
|
||||||
JSONObject jsonObject = date.getJSONObject(id);
|
JSONObject jsonObject = date.getJSONObject(id);
|
||||||
String name = jsonObject.getString("name");
|
String name = jsonObject.getString("name");
|
||||||
String picUrl = jsonObject.getString("picUrl");
|
String picUrl = jsonObject.getString("picUrl");
|
||||||
list.add(new xm(id, name, picUrl, cz));
|
list.add(new xm(id, name, picUrl));
|
||||||
}
|
}
|
||||||
main.handler.post(() -> binding.recyclerview2.getAdapter().notifyDataSetChanged());
|
main.handler.post(() -> binding.recyclerview2.getAdapter().notifyDataSetChanged());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -12,11 +12,13 @@ import android.view.LayoutInflater;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.muqingbfq.R;
|
||||||
import com.muqingbfq.bfq_an;
|
import com.muqingbfq.bfq_an;
|
||||||
import com.muqingbfq.bfqkz;
|
import com.muqingbfq.bfqkz;
|
||||||
import com.muqingbfq.databinding.FloatLrcviewBinding;
|
import com.muqingbfq.databinding.FloatLrcviewBinding;
|
||||||
|
@ -52,9 +54,10 @@ public class FloatingLyricsService extends Service implements View.OnClickListen
|
||||||
SETUP setup = gson.fromJson(dqwb, type);
|
SETUP setup = gson.fromJson(dqwb, type);
|
||||||
return setup.i != 0;
|
return setup.i != 0;
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Handler handler = new Handler();
|
Handler handler = new Handler();
|
||||||
LrcView lrcView;
|
LrcView lrcView;
|
||||||
WindowManager.LayoutParams params;
|
WindowManager.LayoutParams params;
|
||||||
|
@ -67,8 +70,6 @@ public class FloatingLyricsService extends Service implements View.OnClickListen
|
||||||
}
|
}
|
||||||
|
|
||||||
public SETUP setup = new SETUP();
|
public SETUP setup = new SETUP();
|
||||||
File file;
|
|
||||||
|
|
||||||
public int lock() {
|
public int lock() {
|
||||||
if (setup != null && setup.i == 2) {
|
if (setup != null && setup.i == 2) {
|
||||||
return WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
|
return WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
|
||||||
|
@ -77,13 +78,12 @@ public class FloatingLyricsService extends Service implements View.OnClickListen
|
||||||
return WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
|
return WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
|
||||||
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
|
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
lei = this;
|
lei = this;
|
||||||
|
File file = new File(wj.filesdri + "FloatingLyricsService.json");
|
||||||
try {
|
try {
|
||||||
file = new File(wj.filesdri + "FloatingLyricsService.json");
|
|
||||||
if (file.exists() && file.isFile()) {
|
if (file.exists() && file.isFile()) {
|
||||||
String dqwb = wj.dqwb(file.toString());
|
String dqwb = wj.dqwb(file.toString());
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
|
@ -95,20 +95,15 @@ public class FloatingLyricsService extends Service implements View.OnClickListen
|
||||||
setup.TOP = 0;
|
setup.TOP = 0;
|
||||||
setup.Y = -main.g;
|
setup.Y = -main.g;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
wj.sc(file.toString());
|
wj.sc(file.toString());
|
||||||
gj.sc(e);
|
gj.sc(getClass() + ":" + e);
|
||||||
}
|
}
|
||||||
// 创建悬浮窗歌词的 View
|
// 创建悬浮窗歌词的 View
|
||||||
// FloatLrcviewBinding
|
// FloatLrcviewBinding
|
||||||
FloatLrcviewBinding binding = FloatLrcviewBinding.inflate(LayoutInflater.from(this));
|
FloatLrcviewBinding binding = FloatLrcviewBinding.inflate(LayoutInflater.from(this));
|
||||||
layout = binding.getRoot();
|
layout = binding.getRoot();
|
||||||
layout.setOnTouchListener(this);
|
layout.setOnTouchListener(this);
|
||||||
// ViewGroup.LayoutParams layoutParams = layout.getLayoutParams();
|
|
||||||
// layout.setLayoutParams(layoutParams);
|
|
||||||
|
|
||||||
// int i = WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;FLAG_NOT_TOUCH_MODAL
|
// int i = WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;FLAG_NOT_TOUCH_MODAL
|
||||||
params = new WindowManager.LayoutParams(
|
params = new WindowManager.LayoutParams(
|
||||||
WindowManager.LayoutParams.MATCH_PARENT,
|
WindowManager.LayoutParams.MATCH_PARENT,
|
||||||
|
@ -124,7 +119,7 @@ public class FloatingLyricsService extends Service implements View.OnClickListen
|
||||||
|
|
||||||
lrcView = binding.lrcView;
|
lrcView = binding.lrcView;
|
||||||
bfq_an.kz bfqAn = new bfq_an.kz();
|
bfq_an.kz bfqAn = new bfq_an.kz();
|
||||||
binding.kg.setOnClickListener(bfqAn);
|
binding.kg.setOnClickListener(this);
|
||||||
binding.syq.setOnClickListener(bfqAn);
|
binding.syq.setOnClickListener(bfqAn);
|
||||||
binding.xyq.setOnClickListener(bfqAn);
|
binding.xyq.setOnClickListener(bfqAn);
|
||||||
binding.lock.setOnClickListener(this);
|
binding.lock.setOnClickListener(this);
|
||||||
|
@ -140,7 +135,10 @@ public class FloatingLyricsService extends Service implements View.OnClickListen
|
||||||
layout.findViewById(com.muqingbfq.R.id.controlLayout).setVisibility(View.GONE);
|
layout.findViewById(com.muqingbfq.R.id.controlLayout).setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
windowManager.addView(layout, params);
|
windowManager.addView(layout, params);
|
||||||
gj.sc("添加成功");
|
if (setup.i == 0) {
|
||||||
|
setup.i = 1;
|
||||||
|
}
|
||||||
|
baocun();
|
||||||
handler.post(updateSeekBar); // 在播放开始时启动更新进度
|
handler.post(updateSeekBar); // 在播放开始时启动更新进度
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,8 +161,8 @@ public class FloatingLyricsService extends Service implements View.OnClickListen
|
||||||
}
|
}
|
||||||
|
|
||||||
public void baocun() {
|
public void baocun() {
|
||||||
String s = new Gson().toJson(setup);
|
wj.xrwb(new File(wj.filesdri + "FloatingLyricsService.json").toString(),
|
||||||
wj.xrwb(new File(wj.filesdri + "FloatingLyricsService.json").toString(), s);
|
new Gson().toJson(setup));
|
||||||
}
|
}
|
||||||
|
|
||||||
private int initialY;
|
private int initialY;
|
||||||
|
@ -196,7 +194,24 @@ public class FloatingLyricsService extends Service implements View.OnClickListen
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
setyc();
|
int id = view.getId();
|
||||||
|
if (id == R.id.kg) {
|
||||||
|
ImageView kg = (ImageView) view;
|
||||||
|
if (bfqkz.mt == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (bfqkz.mt.isPlaying()) {
|
||||||
|
bfqkz.mt.pause();
|
||||||
|
kg.setImageResource(R.drawable.zt);
|
||||||
|
} else {
|
||||||
|
bfqkz.mt.start();
|
||||||
|
kg.setImageResource(R.drawable.bf);
|
||||||
|
}
|
||||||
|
} else if (id==R.id.lock) {
|
||||||
|
setyc();
|
||||||
|
} else if (id == R.id.like) {
|
||||||
|
// bfq
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setyc() {
|
public void setyc() {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package com.muqingbfq.view;
|
package com.muqingbfq.view;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.Bitmap;
|
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
import com.google.android.material.card.MaterialCardView;
|
import com.google.android.material.card.MaterialCardView;
|
||||||
import com.muqingbfq.R;
|
import com.muqingbfq.R;
|
||||||
|
|
||||||
|
@ -37,6 +37,15 @@ public class CardImage extends MaterialCardView {
|
||||||
public void setImage(Object bitmap) {
|
public void setImage(Object bitmap) {
|
||||||
Glide.with(getContext())
|
Glide.with(getContext())
|
||||||
.load(bitmap)
|
.load(bitmap)
|
||||||
|
// .apply(new RequestOptions().placeholder(R.drawable.icon))
|
||||||
|
.into(imageView);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImageapply(Object bitmap) {
|
||||||
|
Glide.with(getContext())
|
||||||
|
.load(bitmap)
|
||||||
|
.apply(new RequestOptions().placeholder(R.drawable.icon))
|
||||||
|
// .error(R.drawable.app_warning)
|
||||||
.into(imageView);
|
.into(imageView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,21 +3,15 @@ package com.muqingbfq.view;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
import android.graphics.Canvas;
|
|
||||||
import android.graphics.Paint;
|
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.text.Layout;
|
|
||||||
import android.text.StaticLayout;
|
|
||||||
import android.text.TextPaint;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.Gravity;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.LinearLayout;
|
import android.view.ViewTreeObserver;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
@ -28,17 +22,12 @@ import androidx.recyclerview.widget.LinearSmoothScroller;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.muqingbfq.R;
|
import com.muqingbfq.R;
|
||||||
import com.muqingbfq.main;
|
|
||||||
import com.muqingbfq.mq.gj;
|
import com.muqingbfq.mq.gj;
|
||||||
import com.muqingbfq.yc;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class LrcView extends RecyclerView {
|
public class LrcView extends RecyclerView {
|
||||||
private void sc(Object obj) {
|
|
||||||
gj.sc("LRC " + obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<lrc> lrclist = new ArrayList<>();
|
static List<lrc> lrclist = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -91,10 +80,11 @@ public class LrcView extends RecyclerView {
|
||||||
TextColor = ta.getColor(R.styleable.LrcView_TextColor,
|
TextColor = ta.getColor(R.styleable.LrcView_TextColor,
|
||||||
ContextCompat.getColor(getContext(), R.color.text));
|
ContextCompat.getColor(getContext(), R.color.text));
|
||||||
Lrcline = ta.getBoolean(R.styleable.LrcView_Lrcline, true);
|
Lrcline = ta.getBoolean(R.styleable.LrcView_Lrcline, true);
|
||||||
|
addOnGlobalLayoutListener = ta.
|
||||||
|
getBoolean(R.styleable.LrcView_addOnGlobalLayoutListener, false);
|
||||||
ta.recycle();
|
ta.recycle();
|
||||||
}
|
}
|
||||||
linearLayoutManager = new LinearLayoutManager(getContext()) {
|
linearLayoutManager = new LinearLayoutManager(getContext()) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void smoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, int position) {
|
public void smoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, int position) {
|
||||||
RecyclerView.SmoothScroller smoothScroller = new CenterSmoothScroller(recyclerView.getContext());
|
RecyclerView.SmoothScroller smoothScroller = new CenterSmoothScroller(recyclerView.getContext());
|
||||||
|
@ -108,9 +98,9 @@ public class LrcView extends RecyclerView {
|
||||||
setForeground(null);
|
setForeground(null);
|
||||||
setOverScrollMode(RecyclerView.OVER_SCROLL_NEVER);
|
setOverScrollMode(RecyclerView.OVER_SCROLL_NEVER);
|
||||||
if (!Lrcline) {
|
if (!Lrcline) {
|
||||||
addItemDecoration( new RecyclerView.ItemDecoration() {
|
addItemDecoration(new RecyclerView.ItemDecoration() {
|
||||||
@Override
|
@Override
|
||||||
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
|
public void getItemOffsets(@NonNull Rect outRect, @NonNull View view, @NonNull RecyclerView parent, @NonNull RecyclerView.State state) {
|
||||||
super.getItemOffsets(outRect, view, parent, state);
|
super.getItemOffsets(outRect, view, parent, state);
|
||||||
|
|
||||||
int parentHeight = parent.getHeight();
|
int parentHeight = parent.getHeight();
|
||||||
|
@ -166,7 +156,6 @@ public class LrcView extends RecyclerView {
|
||||||
long time = (long) minute * 60 * 1000 + second * 1000L + millisecond;
|
long time = (long) minute * 60 * 1000 + second * 1000L + millisecond;
|
||||||
int currentLineIndex = getCurrentLineIndex(time);
|
int currentLineIndex = getCurrentLineIndex(time);
|
||||||
lrclist.set(currentLineIndex, lrclist.get(currentLineIndex).setTlyric(lyric));
|
lrclist.set(currentLineIndex, lrclist.get(currentLineIndex).setTlyric(lyric));
|
||||||
// gj.sc(lyric);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -195,13 +184,15 @@ public class LrcView extends RecyclerView {
|
||||||
int millisecond = Integer.parseInt(secondParts[1]);
|
int millisecond = Integer.parseInt(secondParts[1]);
|
||||||
long time = (long) minute * 60 * 1000 + second * 1000L + millisecond;
|
long time = (long) minute * 60 * 1000 + second * 1000L + millisecond;
|
||||||
lrclist.add(new lrc(lyric, time));
|
lrclist.add(new lrc(lyric, time));
|
||||||
// gj.sc(lyric);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int index = -1;
|
||||||
|
boolean addOnGlobalLayoutListener;
|
||||||
|
|
||||||
class adaper extends RecyclerView.Adapter<VH> {
|
class adaper extends RecyclerView.Adapter<VH> {
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
@ -218,11 +209,26 @@ public class LrcView extends RecyclerView {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull VH holder, int position) {
|
public void onBindViewHolder(@NonNull VH holder, int position) {
|
||||||
if (lrclist.isEmpty()) {
|
|
||||||
holder.textView.setText("纯音乐,请欣赏");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (Lrcline) {
|
if (Lrcline) {
|
||||||
|
if (addOnGlobalLayoutListener) {
|
||||||
|
// 注册布局监听器
|
||||||
|
holder.textView.getViewTreeObserver().addOnGlobalLayoutListener(
|
||||||
|
new ViewTreeObserver.OnGlobalLayoutListener() {
|
||||||
|
@Override
|
||||||
|
public void onGlobalLayout() {
|
||||||
|
int height = holder.textView.getHeight();
|
||||||
|
ViewGroup.LayoutParams layoutParams = LrcView.this.getLayoutParams();
|
||||||
|
layoutParams.height = height * 5;
|
||||||
|
LrcView.this.setLayoutParams(layoutParams);
|
||||||
|
// 移除布局监听器
|
||||||
|
holder.textView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (lrclist.isEmpty()) {
|
||||||
|
holder.textView.setText("纯音乐,请欣赏");
|
||||||
|
return;
|
||||||
|
}
|
||||||
int currentLineIndex = getCurrentLineIndex();
|
int currentLineIndex = getCurrentLineIndex();
|
||||||
if (currentLineIndex >= 0 && currentLineIndex < lrclist.size()) {
|
if (currentLineIndex >= 0 && currentLineIndex < lrclist.size()) {
|
||||||
|
|
||||||
|
@ -244,6 +250,10 @@ public class LrcView extends RecyclerView {
|
||||||
holder.textView.setText(text);
|
holder.textView.setText(text);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (lrclist.isEmpty()) {
|
||||||
|
holder.textView.setText("纯音乐,请欣赏");
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
lrc lrc = lrclist.get(position);
|
lrc lrc = lrclist.get(position);
|
||||||
StringBuilder stringBuffer = new StringBuilder();
|
StringBuilder stringBuffer = new StringBuilder();
|
||||||
|
@ -265,7 +275,6 @@ public class LrcView extends RecyclerView {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemCount() {
|
public int getItemCount() {
|
||||||
gj.sc(lrclist.size());
|
|
||||||
if (lrclist.size() < 3) {
|
if (lrclist.size() < 3) {
|
||||||
for (lrc a : lrclist) {
|
for (lrc a : lrclist) {
|
||||||
if (a.time == 5940000 && a.lrc.equals("纯音乐,请欣赏")) {
|
if (a.time == 5940000 && a.lrc.equals("纯音乐,请欣赏")) {
|
||||||
|
@ -291,14 +300,9 @@ public class LrcView extends RecyclerView {
|
||||||
textView = itemView.findViewById(R.id.text);
|
textView = itemView.findViewById(R.id.text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* @Override
|
|
||||||
public void onDraw(@NonNull Canvas canvas) {
|
|
||||||
super.onDraw(canvas);
|
|
||||||
setTimeLrc(canvas);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
private int getCurrentLineIndex() {
|
private int getCurrentLineIndex() {
|
||||||
int index = -1;
|
index = -1;
|
||||||
for (int i = 0; i < lrclist.size(); i++) {
|
for (int i = 0; i < lrclist.size(); i++) {
|
||||||
lrc lineLrc = lrclist.get(i);
|
lrc lineLrc = lrclist.get(i);
|
||||||
if (lineLrc.time <= time) {
|
if (lineLrc.time <= time) {
|
||||||
|
@ -311,7 +315,7 @@ public class LrcView extends RecyclerView {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getCurrentLineIndex(long time) {
|
private static int getCurrentLineIndex(long time) {
|
||||||
int index = -1;
|
int index = 0;
|
||||||
for (int i = 0; i < lrclist.size(); i++) {
|
for (int i = 0; i < lrclist.size(); i++) {
|
||||||
lrc lineLrc = lrclist.get(i);
|
lrc lineLrc = lrclist.get(i);
|
||||||
if (lineLrc.time <= time) {
|
if (lineLrc.time <= time) {
|
||||||
|
@ -331,22 +335,15 @@ public class LrcView extends RecyclerView {
|
||||||
this.time = a;
|
this.time = a;
|
||||||
if (!Lrcline) {
|
if (!Lrcline) {
|
||||||
int currentLineIndex = getCurrentLineIndex(a);
|
int currentLineIndex = getCurrentLineIndex(a);
|
||||||
if (currentLineIndex == -1) {
|
getAdapter().notifyDataSetChanged();
|
||||||
|
if (currentLineIndex < 3) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// smoothScrollToPosition(getCurrentLineIndex(a));
|
||||||
linearLayoutManager.smoothScrollToPosition(this,
|
linearLayoutManager.smoothScrollToPosition(this,
|
||||||
new RecyclerView.State(), currentLineIndex);
|
new RecyclerView.State(), currentLineIndex);
|
||||||
// smoothScrollToPosition(getCurrentLineIndex(a));
|
|
||||||
getAdapter().notifyItemChanged(--currentLineIndex);
|
|
||||||
getAdapter().notifyItemChanged(getCurrentLineIndex(a));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
getAdapter().notifyDataSetChanged();
|
getAdapter().notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getLrc() {
|
|
||||||
for (lrc a : lrclist) {
|
|
||||||
sc(a.time + ":" + a.lrc + ":" + a.tlyric);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,16 @@
|
||||||
package com.muqingbfq;
|
package com.muqingbfq;
|
||||||
|
|
||||||
public class xm {
|
public class xm {
|
||||||
public String id, name, zz;
|
public String id, name;
|
||||||
public Object picurl;
|
public Object picurl;
|
||||||
public boolean cz;
|
public xm(String id, String name, String picurl) {
|
||||||
public xm(String id, String name, String zz, String picurl) {
|
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.zz = zz;
|
|
||||||
this.picurl = picurl;
|
this.picurl = picurl;
|
||||||
}
|
}
|
||||||
public xm(String id, String name, String picurl, boolean cz) {
|
public xm(String id, String name, int picurl) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.picurl = picurl;
|
this.picurl = picurl;
|
||||||
this.cz = cz;
|
|
||||||
}
|
|
||||||
public xm(String id, String name, int picurl, boolean cz) {
|
|
||||||
this.id = id;
|
|
||||||
this.name = name;
|
|
||||||
this.picurl = picurl;
|
|
||||||
this.cz = cz;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -30,9 +30,10 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/zz"
|
android:id="@+id/zz"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="2"
|
android:maxLines="1"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
android:text="@string/zz"
|
android:text="@string/zz"
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -29,9 +29,10 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/zz"
|
android:id="@+id/zz"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:maxLines="2"
|
android:maxLines="1"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
android:text="@string/zz"
|
android:text="@string/zz"
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -66,7 +67,8 @@
|
||||||
<com.muqingbfq.view.LrcView
|
<com.muqingbfq.view.LrcView
|
||||||
android:id="@+id/lrcView"
|
android:id="@+id/lrcView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="260dp"
|
android:layout_height="wrap_content"
|
||||||
|
app:addOnGlobalLayoutListener="true"
|
||||||
android:layout_weight="2"/>
|
android:layout_weight="2"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -27,51 +27,56 @@
|
||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:src="@drawable/like"
|
android:src="@drawable/like"
|
||||||
android:text="喜欢"
|
android:text="喜欢"
|
||||||
|
android:tint="@color/white"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:ignore="UseAppTint" />
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/syq"
|
android:id="@+id/syq"
|
||||||
android:layout_width="36dp"
|
android:layout_width="36dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
|
||||||
android:src="@drawable/syq"
|
android:src="@drawable/syq"
|
||||||
|
android:tint="@color/white"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/kg"
|
app:layout_constraintEnd_toStartOf="@+id/kg"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription,UseAppTint" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/kg"
|
android:id="@+id/kg"
|
||||||
android:layout_width="46dp"
|
android:layout_width="46dp"
|
||||||
android:layout_height="46dp"
|
android:layout_height="46dp"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:tint="@color/white"
|
||||||
android:src="@drawable/zt"
|
android:src="@drawable/zt"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription,UseAppTint" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/xyq"
|
android:id="@+id/xyq"
|
||||||
android:layout_width="36dp"
|
android:layout_width="36dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
|
||||||
android:src="@drawable/xyq"
|
android:src="@drawable/xyq"
|
||||||
|
android:tint="@color/white"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/kg"
|
app:layout_constraintStart_toEndOf="@+id/kg"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:ignore="UseAppTint" />
|
||||||
|
|
||||||
<Button
|
<ImageView
|
||||||
android:id="@+id/lock"
|
android:id="@+id/lock"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="锁定"
|
android:src="@drawable/lock"
|
||||||
|
android:tint="@color/white"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:ignore="UseAppTint" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -5,38 +5,20 @@
|
||||||
android:layout_width="120dp"
|
android:layout_width="120dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:background="@null">
|
|
||||||
|
|
||||||
<RelativeLayout
|
<com.muqingbfq.view.CardImage
|
||||||
android:id="@+id/relativeLayout"
|
android:id="@+id/image"
|
||||||
android:layout_width="120dp"
|
android:layout_width="120dp"
|
||||||
android:layout_height="120dp">
|
android:layout_height="120dp"
|
||||||
|
app:cardUseCompatPadding="true">
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
android:id="@+id/cardview"
|
|
||||||
android:layout_width="120dp"
|
|
||||||
android:layout_height="120dp"
|
|
||||||
app:cardUseCompatPadding="true">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/fh"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:scaleType="fitXY" />
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/kg"
|
android:id="@+id/kg"
|
||||||
android:layout_width="36dp"
|
android:layout_width="36dp"
|
||||||
android:layout_height="36dp"
|
android:layout_height="36dp"
|
||||||
android:layout_alignEnd="@id/cardview"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_alignBottom="@id/cardview"
|
android:src="@drawable/zt"/>
|
||||||
android:layout_marginEnd="6dp"
|
</com.muqingbfq.view.CardImage>
|
||||||
android:layout_marginBottom="6dp"
|
|
||||||
android:src="@drawable/zt"
|
|
||||||
tools:ignore="RtlSymmetry" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/wb1"
|
android:id="@+id/wb1"
|
||||||
|
@ -46,5 +28,5 @@
|
||||||
android:lines="2"
|
android:lines="2"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:text="@string/name"
|
android:text="@string/name"
|
||||||
android:textColor="@color/text"/>
|
android:textColor="@color/text" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -1,40 +1,34 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
app:cardUseCompatPadding="true">
|
||||||
android:orientation="horizontal">
|
<LinearLayout
|
||||||
<com.google.android.material.card.MaterialCardView
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/cardview"
|
android:layout_height="wrap_content">
|
||||||
android:layout_width="120dp"
|
<com.muqingbfq.view.CardImage
|
||||||
android:layout_height="120dp"
|
android:id="@+id/image"
|
||||||
app:cardUseCompatPadding="true">
|
android:layout_width="120dp"
|
||||||
<ImageView
|
android:layout_height="120dp"
|
||||||
android:id="@+id/fh"
|
app:cardUseCompatPadding="true"
|
||||||
android:layout_width="match_parent"
|
android:padding="16dp">
|
||||||
android:layout_height="match_parent"
|
<ImageView
|
||||||
android:scaleType="fitXY" />
|
android:id="@+id/kg"
|
||||||
<ImageView
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/kg"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="36dp"
|
android:alpha="0.5"
|
||||||
android:layout_height="36dp"
|
android:src="@drawable/zt"/>
|
||||||
android:layout_marginEnd="6dp"
|
</com.muqingbfq.view.CardImage>
|
||||||
android:layout_marginBottom="6dp"
|
<TextView
|
||||||
android:layout_gravity="bottom|end"
|
android:id="@+id/wb1"
|
||||||
android:src="@drawable/zt"/>
|
android:layout_width="wrap_content"
|
||||||
</com.google.android.material.card.MaterialCardView>
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
<TextView
|
android:lines="2"
|
||||||
android:id="@+id/wb1"
|
android:maxLines="2"
|
||||||
android:layout_width="wrap_content"
|
android:text="@string/name"
|
||||||
android:layout_height="wrap_content"
|
android:textColor="@color/text" />
|
||||||
android:gravity="center_horizontal"
|
</LinearLayout>
|
||||||
android:layout_marginTop="16dp"
|
</com.google.android.material.card.MaterialCardView>
|
||||||
android:lines="2"
|
|
||||||
android:maxLines="2"
|
|
||||||
android:text="@string/name"
|
|
||||||
android:textColor="@color/text" />
|
|
||||||
</LinearLayout>
|
|
|
@ -7,5 +7,14 @@
|
||||||
<!– Secondary brand color. –>
|
<!– Secondary brand color. –>
|
||||||
<item name="colorOnSecondary">@color/text</item>-->
|
<item name="colorOnSecondary">@color/text</item>-->
|
||||||
<item name="android:windowLightStatusBar">false</item>
|
<item name="android:windowLightStatusBar">false</item>
|
||||||
|
|
||||||
|
<item name="android:colorPrimary">@color/bj_tint</item>
|
||||||
|
<item name="colorPrimaryDark">@color/bj_tint</item>
|
||||||
|
<item name="tabStyle">@style/Widget.App.TabLayout</item>
|
||||||
|
<item name="toolbarStyle">@style/Widget.App.Toolbar</item>
|
||||||
</style>
|
</style>
|
||||||
|
<!--
|
||||||
|
<style name="ThemeOverlay.App.TabLayout" parent="">
|
||||||
|
<item name="colorPrimary">@color/bj_tint</item>
|
||||||
|
</style>-->
|
||||||
</resources>
|
</resources>
|
|
@ -4,5 +4,6 @@
|
||||||
<!--声明MyTextView需要使用系统定义过的text属性,注意前面需要加上android命名-->
|
<!--声明MyTextView需要使用系统定义过的text属性,注意前面需要加上android命名-->
|
||||||
<attr name="TextColor" format="color" />
|
<attr name="TextColor" format="color" />
|
||||||
<attr name="Lrcline" format="boolean" />
|
<attr name="Lrcline" format="boolean" />
|
||||||
|
<attr name="addOnGlobalLayoutListener" format="boolean" />
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
</resources>
|
</resources>
|
|
@ -15,5 +15,6 @@
|
||||||
<color name="tm">#00FFFFFF</color>
|
<color name="tm">#00FFFFFF</color>
|
||||||
<color name="bj">#F2ECF6</color>
|
<color name="bj">#F2ECF6</color>
|
||||||
|
|
||||||
<color name="button_bj">#B3E5FC</color>
|
<!-- <color name="button_bj">@color/bj</color>-->
|
||||||
|
<color name="bj_tint">#FFCCCC</color>
|
||||||
</resources>
|
</resources>
|
|
@ -15,34 +15,35 @@
|
||||||
<!-- <item name="android:colorControlActivated">#FF7F50</item>-->
|
<!-- <item name="android:colorControlActivated">#FF7F50</item>-->
|
||||||
<!-- 设置文本颜色 -->
|
<!-- 设置文本颜色 -->
|
||||||
<item name="android:textColorPrimary">@color/text</item>
|
<item name="android:textColorPrimary">@color/text</item>
|
||||||
<item name="android:colorPrimary">#00BCD4</item>
|
<item name="android:colorPrimary">@color/bj</item>
|
||||||
<item name="colorPrimaryDark">#8000BCD4</item>
|
<item name="colorPrimaryDark">@color/bj</item>
|
||||||
|
|
||||||
<item name="tabStyle">@style/Widget.App.TabLayout</item>
|
<item name="tabStyle">@style/Widget.App.TabLayout</item>
|
||||||
<item name="toolbarStyle">@style/Widget.App.Toolbar</item>
|
<item name="toolbarStyle">@style/Widget.App.Toolbar</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Widget.App.Toolbar" parent="Widget.Material3.Toolbar">
|
|
||||||
<item name="android:background">@drawable/background</item>
|
|
||||||
<item name="materialThemeOverlay">@style/ThemeOverlay.App.Toolbar</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="ThemeOverlay.App.Toolbar" parent="">
|
<style name="ThemeOverlay.App.Toolbar" parent="">
|
||||||
<item name="colorSurface">@color/bj</item>
|
<item name="colorSurface">@color/bj</item>
|
||||||
<item name="colorOnSurface">@color/bj</item>
|
<item name="colorOnSurface">@color/bj</item>
|
||||||
</style>
|
</style>
|
||||||
|
<style name="ThemeOverlay.App.TabLayout" parent="">
|
||||||
|
<item name="colorPrimary">@color/bj_tint</item>
|
||||||
|
<item name="colorSurface">@color/bj</item>
|
||||||
|
<!-- <item name="colorOnSurface">@color/bj_tint</item>-->
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="Widget.App.TabLayout" parent="Widget.Material3.TabLayout">
|
<style name="Widget.App.TabLayout" parent="Widget.Material3.TabLayout">
|
||||||
<item name="materialThemeOverlay">@style/ThemeOverlay.App.TabLayout</item>
|
<item name="materialThemeOverlay">@style/ThemeOverlay.App.TabLayout</item>
|
||||||
<!-- <item name="tabTextAppearance">@style/TextAppearance.App.LabelLarge</item>-->
|
<!-- <item name="tabTextAppearance">@style/TextAppearance.App.LabelLarge</item>-->
|
||||||
</style>
|
</style>
|
||||||
|
<style name="Widget.App.Toolbar" parent="Widget.Material3.Toolbar">
|
||||||
<style name="ThemeOverlay.App.TabLayout" parent="">
|
<item name="android:background">@drawable/background</item>
|
||||||
<item name="colorPrimary">#00BCD4</item>
|
<item name="materialThemeOverlay">@style/ThemeOverlay.App.Toolbar</item>
|
||||||
<item name="colorOnSurface">#ADD8E6</item>
|
|
||||||
</style>
|
</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>
|
||||||
<item name="android:windowBackground">@android:color/transparent</item>
|
<item name="android:windowBackground">@android:color/transparent</item>
|
||||||
|
@ -62,7 +63,7 @@
|
||||||
|
|
||||||
<!-- 按钮主题-->
|
<!-- 按钮主题-->
|
||||||
<style name="Button">
|
<style name="Button">
|
||||||
<item name="android:backgroundTint">#1C71A9</item>
|
<item name="android:textColor">@color/text</item>
|
||||||
|
<item name="android:backgroundTint">@color/bj</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue
Block a user