| | |
| | | case MotionEvent.ACTION_UP: |
| | | if(binding.btnStart.getText().equals("开启") || pause) { |
| | | int index = binding.lyric.getIndexFromOffsetY(binding.lyric.getOffsetY()); |
| | | binding.lyric.setIndex(index); |
| | | binding.lyric.setOffsetY(220 - index * (binding.lyric.getSIZEWORD() + 44)); |
| | | LyricObject object = LyricServer.getLrc_map().get(index); |
| | | Log.e("LyricView", "object:" + object); |
| | | progress = object.begintime; |
| | | Log.e("LyricView", "index:"+index+" object:" + object); |
| | | if(object != null) { |
| | | binding.lyric.setIndex(index); |
| | | binding.lyric.setOffsetY(220 - index * (binding.lyric.getSIZEWORD() + 44)); |
| | | Log.e("LyricView", "object:" + object); |
| | | progress = object.begintime; |
| | | binding.timer.setText(msFormat.format(progress)); |
| | | } |
| | | binding.lyric.invalidate(); |
| | | } |
| | | break; |