player
This commit is contained in:
parent
6f0d507e50
commit
1deb6b3c4b
|
@ -33,8 +33,7 @@ public class SrcAnaClock extends View implements Choreographer.FrameCallback {
|
|||
super(prog.getContext());
|
||||
var timeZoneStr = source.str("timeZone");
|
||||
//if(timeZoneStr!=null) timeZone = ZoneId.of(timeZoneStr);
|
||||
TimeZone timeZone = null;
|
||||
if(timeZoneStr!=null) timeZone = TimeZone.getTimeZone(timeZoneStr);
|
||||
var timeZone = timeZoneStr==null ? null : TimeZone.getTimeZone(timeZoneStr);
|
||||
calendar = timeZone==null ? Calendar.getInstance() : Calendar.getInstance(timeZone);
|
||||
|
||||
var sideLen = Math.min(w, h);
|
||||
|
@ -127,7 +126,7 @@ public class SrcAnaClock extends View implements Choreographer.FrameCallback {
|
|||
|
||||
void cal() {
|
||||
//var time = timeZone==null ? LocalTime.now() : LocalTime.now(timeZone);
|
||||
calendar.setTimeInMillis(lastSec);
|
||||
calendar.setTimeInMillis(lastSec*1000);
|
||||
sAngle = calendar.get(Calendar.SECOND) * 6;
|
||||
mAngle = calendar.get(Calendar.MINUTE) * 6 + sAngle/60;
|
||||
hAngle = calendar.get(Calendar.HOUR_OF_DAY) * 30 + mAngle/12;
|
||||
|
|
|
@ -238,7 +238,7 @@ public class SrcDigiClock extends LinearBox implements Choreographer.FrameCallba
|
|||
|
||||
void cal() {
|
||||
//var dt = timeZone==null ? LocalDateTime.now() : LocalDateTime.now(timeZone);
|
||||
calendar.setTimeInMillis(lastSec);
|
||||
calendar.setTimeInMillis(lastSec*1000);
|
||||
var hms = timeptn.format(calendar.getTime());
|
||||
ampmComp.setImageBitmap(imgs.get(calendar.get(Calendar.HOUR_OF_DAY) < 12?"AM":"PM"));
|
||||
hourComps[0].setImageBitmap(imgs.get(hms.substring(0,1)));
|
||||
|
|
|
@ -58,7 +58,7 @@ public class SrcDigitalClock extends WebView implements Choreographer.FrameCallb
|
|||
}
|
||||
|
||||
void cal() {
|
||||
calendar.setTimeInMillis(lastSec);
|
||||
calendar.setTimeInMillis(lastSec*1000);
|
||||
var htm = html;
|
||||
if(hasYear) htm = htm.replace("%y", Long.toString(calendar.get(Calendar.YEAR)));
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue
Block a user