修复歌单搜索BUG,修复平板模式播放器显示BUG,修复液已知的歌单操作BUG

添加播放器UI手势,完善播放器控制内部组件
This commit is contained in:
muqing 2023-12-03 13:21:28 +08:00
parent 137a7135e7
commit 157ca8a230
4 changed files with 19 additions and 21 deletions

View File

@ -167,7 +167,7 @@ public class MediaPlayer {
Media.setProgress(0);
Media.setname(name);
Media.setzz(zz);
bfq_an.islike(Media.view.getContext());
bfq_an.islike();
}
bfq_db.setname(name);
bfq_db.setzz(zz);

View File

@ -29,7 +29,7 @@ import org.json.JSONObject;
public class bfq extends AppCompatActivity {
@SuppressLint("StaticFieldLeak")
public static AppCompatActivity context;
ActivityBfqBinding inflate;
public ActivityBfqBinding inflate;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
@ -56,15 +56,6 @@ public class bfq extends AppCompatActivity {
}
return false;
});
if (bfqkz.xm != null) {
Media.setname(bfqkz.xm.name);
Media.setzz(bfqkz.xm.zz);
}
/* inflate.name.setOnLongClickListener(view -> {
gj.fz(bfq.this, inflate.name.getText().toString());
gj.ts(bfq.this, "复制成功");
return false;
});*/
bfq_an.kz kz = new bfq_an.kz();
inflate.kg.setOnClickListener(kz);
inflate.xyq.setOnClickListener(kz);
@ -74,18 +65,17 @@ public class bfq extends AppCompatActivity {
inflate.control.setOnClickListener(new bfq_an.control(inflate.control));
if (bfqkz.mt != null && bfqkz.mt.build.isPlaying()) {
inflate.kg.setImageResource(R.drawable.bf);
bfq_an.islike(this);
}
text();
inflate.like.setOnClickListener(view1 -> {
ImageView like = (ImageView) view1;
try {
if (bfqkz.like_bool) {
like.setImageTintList(ContextCompat.getColorStateList(bfq.this, R.color.text));
inflate.like
.setImageTintList(ContextCompat.getColorStateList(bfq.this, R.color.text));
com.muqingbfq.fragment.gd.like.remove(String.valueOf(bfqkz.xm.id));
} else {
like.setImageTintList(ContextCompat.
inflate.like.setImageTintList(ContextCompat.
getColorStateList(bfq.this, android.R.color.holo_red_dark));
JSONObject json = new JSONObject();
json.put("name", bfqkz.xm.name);
@ -100,7 +90,11 @@ public class bfq extends AppCompatActivity {
e.printStackTrace();
}
});
if (bfqkz.xm != null) {
Media.setname(bfqkz.xm.name);
Media.setzz(bfqkz.xm.zz);
bfq_an.islike();
}
}
public static Bitmap bitmap;

View File

@ -95,7 +95,7 @@ public class bfq_an {
public static String getTime(long time) {
return simpleDateFormat.format(new Date(time));
}
public static void islike(Context context) {
public static void islike() {
try {
gd.like.getJSONObject(String.valueOf(bfqkz.xm.id));
bfqkz.like_bool = true;

View File

@ -25,6 +25,7 @@ import com.muqingbfq.bfqkz;
import com.muqingbfq.databinding.FragmentBfqBinding;
import com.muqingbfq.home;
import com.muqingbfq.main;
import com.muqingbfq.mq.gj;
import org.json.JSONObject;
@ -171,13 +172,16 @@ public class Media extends Fragment {
}
public static void setlike(boolean bool) {
ImageView imageView = bfq.findViewById(R.id.like);
if (bfq == null || bfq.inflate == null) {
return;
}
int color = R.color.text;
if (bool) {
color = android.R.color.holo_red_dark;
}
imageView.setImageTintList(ContextCompat.
getColorStateList(view.getContext(), color));
gj.sc(color);
bfq.inflate.like.setImageTintList(ContextCompat.
getColorStateList(com.muqingbfq.bfq.context, color));
}
public static void setImageBitmap() {