|
|
|
|
@ -3,6 +3,8 @@ package com.fongmi.android.tv.bean; |
|
|
|
|
import android.graphics.Color; |
|
|
|
|
import android.text.TextUtils; |
|
|
|
|
|
|
|
|
|
import com.fongmi.android.tv.utils.ResUtil; |
|
|
|
|
|
|
|
|
|
import java.util.regex.Matcher; |
|
|
|
|
|
|
|
|
|
public class DanmakuData { |
|
|
|
|
@ -23,8 +25,8 @@ public class DanmakuData { |
|
|
|
|
String[] params = parm.split(","); |
|
|
|
|
if (params.length < 4) throw new Exception(); |
|
|
|
|
this.type = Integer.parseInt(params[1]); |
|
|
|
|
this.size = Float.parseFloat(params[2]); |
|
|
|
|
this.time = (long) (Float.parseFloat(params[0]) * 1000); |
|
|
|
|
this.size = Float.parseFloat(params[2]) * (ResUtil.getDisplayMetrics().density - 0.6f); |
|
|
|
|
this.color = (int) (0xFF000000L | Long.parseLong(params[3]) & 0xFFFFFF); |
|
|
|
|
this.shadow = color == Color.BLACK ? Color.WHITE : Color.BLACK; |
|
|
|
|
} |
|
|
|
|
|