Skip to content

Commit 1a4c37e

Browse files
committed
android fixes
1 parent c547b26 commit 1a4c37e

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

code-gen-library/FormatDateLabelAsDate/Android.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class FormatDateLabelAsDate {
4040

4141
is Double -> {
4242
try {
43-
val millis = item.toLong()
43+
val ticks = item
44+
var millis = (ticks / 10000.0).toLong();
4445
Calendar.getInstance().apply { timeInMillis = millis }
4546
} catch (e: Exception) {
4647
return item.toString()

code-gen-library/FormatDateLabelAsShortDate/Android.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class FormatDateLabelAsShortDate {
4040

4141
is Double -> {
4242
try {
43-
val millis = item.toLong()
43+
val ticks = item
44+
var millis = (ticks / 10000.0).toLong();
4445
Calendar.getInstance().apply { timeInMillis = millis }
4546
} catch (e: Exception) {
4647
return item.toString()
@@ -67,10 +68,10 @@ class FormatDateLabelAsShortDate {
6768
}
6869

6970
return String.format(
70-
"%02d/%02d/%02d %02d:%02d:%02d",
71+
"%02d/%02d/%02d",
7172
calendar.get(Calendar.MONTH) + 1,
72-
calendar.get(Calendar.DAY_OF_MONTH) + 1,
73-
calendar.get(Calendar.YEAR)
73+
calendar.get(Calendar.DAY_OF_MONTH),
74+
calendar.get(Calendar.YEAR) % 100
7475
)
7576
}
7677
//end eventHandler

code-gen-library/FormatDateLabelAsTime/Android.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class FormatDateLabelAsTime {
4040

4141
is Double -> {
4242
try {
43-
val millis = item.toLong()
43+
val ticks = item
44+
var millis = (ticks / 10000.0).toLong();
4445
Calendar.getInstance().apply { timeInMillis = millis }
4546
} catch (e: Exception) {
4647
return item.toString()

code-gen-library/TestsAddStaticTextTooltip/Android.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//begin imports
2+
import com.infragistics.mobile.controls.IgaChartToolTipUpdatingEventHandler
3+
import com.infragistics.mobile.controls.IgaChartToolTipUpdatingEventArgs
24
import com.infragistics.mobile.controls.IgaDataChart
35
import android.widget.TextView
46
//end imports
@@ -13,7 +15,17 @@ public class TestsAddStaticTextTooltip {
1315
val chart = CodeGenHelper.getDescription<IgaDataChart>("content")!!;
1416
for (series in chart.series!!.toArray()) {
1517
if (!series!!.isLayer) {
16-
//TODO
18+
series.chartToolTipUpdating = object : IgaChartToolTipUpdatingEventHandler {
19+
override fun invoke(sender: Any?, args: IgaChartToolTipUpdatingEventArgs?) {
20+
var cv = args!!.currentView;
21+
if (cv == null) {
22+
var tv = android.widget.TextView(chart.context);
23+
cv = tv;
24+
args!!.currentView = cv;
25+
}
26+
(cv as android.widget.TextView).text = "text"
27+
}
28+
}
1729
}
1830
}
1931
}

0 commit comments

Comments
 (0)