|
@@ -1810,23 +1810,33 @@ public class RemoteMeterMainScreen extends WpadScreen{
|
|
|
*/
|
|
|
private void ShowGraphValue(float usedValue_Myhome, int PointX, float f, boolean isShowBottomValue, String BottomValue, int BottomValueofPointY)
|
|
|
{
|
|
|
- Show_TopGraphValue_Text[mDrawGraphValue] = new WpadTextView(getContext(), false, 120, 30, Gravity.CENTER, Color.WHITE, Common.fontsize._26_DEFAULT, false, ID.RemoteMeterMainScreenID.text.TEXT_INFO);
|
|
|
- ViewRegistration(getLayout(), Show_TopGraphValue_Text[mDrawGraphValue],
|
|
|
- Common.ImgPosion.GetX(PointX-35),
|
|
|
- Common.ImgPosion.GetY((int) f-35));
|
|
|
- Show_TopGraphValue_Text[mDrawGraphValue].setText(Integer.toString((int) usedValue_Myhome));
|
|
|
-
|
|
|
- //전년비의 아래 텍스트값(2017.11 출력)
|
|
|
- if(isShowBottomValue == true)
|
|
|
+ //2024.01.11 jglee - 배열에러 처리
|
|
|
+ try
|
|
|
{
|
|
|
- Show_BottomGraphValue_Text[mDrawGraphValue] = new WpadTextView(getContext(), false, 120, 30, Gravity.CENTER, Color.parseColor("#969696"), Common.fontsize._26_DEFAULT, false, ID.RemoteMeterMainScreenID.text.TEXT_INFO);
|
|
|
- ViewRegistration(getLayout(), Show_BottomGraphValue_Text[mDrawGraphValue],
|
|
|
- Common.ImgPosion.GetX(PointX-25),
|
|
|
- Common.ImgPosion.GetY(BottomValueofPointY+16));
|
|
|
- Show_BottomGraphValue_Text[mDrawGraphValue].setText(BottomValue);
|
|
|
+ Show_TopGraphValue_Text[mDrawGraphValue] = new WpadTextView(getContext(), false, 120, 30, Gravity.CENTER, Color.WHITE, Common.fontsize._26_DEFAULT, false, ID.RemoteMeterMainScreenID.text.TEXT_INFO);
|
|
|
+ ViewRegistration(getLayout(), Show_TopGraphValue_Text[mDrawGraphValue],
|
|
|
+ Common.ImgPosion.GetX(PointX-35),
|
|
|
+ Common.ImgPosion.GetY((int) f-35));
|
|
|
+ Show_TopGraphValue_Text[mDrawGraphValue].setText(Integer.toString((int) usedValue_Myhome));
|
|
|
+
|
|
|
+ //전년비의 아래 텍스트값(2017.11 출력)
|
|
|
+ if(isShowBottomValue == true)
|
|
|
+ {
|
|
|
+ Show_BottomGraphValue_Text[mDrawGraphValue] = new WpadTextView(getContext(), false, 120, 30, Gravity.CENTER, Color.parseColor("#969696"), Common.fontsize._26_DEFAULT, false, ID.RemoteMeterMainScreenID.text.TEXT_INFO);
|
|
|
+ ViewRegistration(getLayout(), Show_BottomGraphValue_Text[mDrawGraphValue],
|
|
|
+ Common.ImgPosion.GetX(PointX-25),
|
|
|
+ Common.ImgPosion.GetY(BottomValueofPointY+16));
|
|
|
+ Show_BottomGraphValue_Text[mDrawGraphValue].setText(BottomValue);
|
|
|
+ }
|
|
|
+
|
|
|
+ mDrawGraphValue++;
|
|
|
}
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ e.printStackTrace();
|
|
|
+ Log.d(TAG, "ShowGraphValue erroo : " + e.toString() );
|
|
|
+; }
|
|
|
|
|
|
- mDrawGraphValue++;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -2742,11 +2752,12 @@ public class RemoteMeterMainScreen extends WpadScreen{
|
|
|
&& (Integer.parseInt(imapRemotemeter.GetAttributeVal(i, "year")) == (CalendarYear)))
|
|
|
{
|
|
|
DebugLogOutput("day " + imapRemotemeter.GetAttributeVal(i, "day"));
|
|
|
+ //2024.01.11 jglee - 데이터가 없는 경우 처리 추가
|
|
|
switch (ShowNowEnergyIndex)
|
|
|
{
|
|
|
case 0: // 전기
|
|
|
TempString = imapRemotemeter.GetAttributeVal(i, "elect_used");
|
|
|
- if (TempString.equals("1000000") == false)
|
|
|
+ if (TempString!=null && TempString.equals("1000000") == false)
|
|
|
{
|
|
|
CalendarItemShow(mCalendarItemIndex, (Integer.parseInt(imapRemotemeter.GetAttributeVal(i, "day"))),
|
|
|
imapRemotemeter.GetAttributeVal(i, "elect_used"));
|
|
@@ -2755,7 +2766,7 @@ public class RemoteMeterMainScreen extends WpadScreen{
|
|
|
|
|
|
case 1: // 수도
|
|
|
TempString = imapRemotemeter.GetAttributeVal(i, "water_used");
|
|
|
- if (TempString.equals("1000000") == false)
|
|
|
+ if (TempString!=null && TempString.equals("1000000") == false)
|
|
|
{
|
|
|
CalendarItemShow(mCalendarItemIndex, (Integer.parseInt(imapRemotemeter.GetAttributeVal(i, "day"))),
|
|
|
imapRemotemeter.GetAttributeVal(i, "water_used"));
|
|
@@ -2764,7 +2775,7 @@ public class RemoteMeterMainScreen extends WpadScreen{
|
|
|
|
|
|
case 2: // 가스
|
|
|
TempString = imapRemotemeter.GetAttributeVal(i, "gas_used");
|
|
|
- if (TempString.equals("1000000") == false)
|
|
|
+ if (TempString!=null && TempString.equals("1000000") == false)
|
|
|
{
|
|
|
CalendarItemShow(mCalendarItemIndex, (Integer.parseInt(imapRemotemeter.GetAttributeVal(i, "day"))),
|
|
|
imapRemotemeter.GetAttributeVal(i, "gas_used"));
|
|
@@ -2773,7 +2784,7 @@ public class RemoteMeterMainScreen extends WpadScreen{
|
|
|
|
|
|
case 3: // 온수
|
|
|
TempString = imapRemotemeter.GetAttributeVal(i, "hotwater_used");
|
|
|
- if (TempString.equals("1000000") == false)
|
|
|
+ if (TempString!=null && TempString.equals("1000000") == false)
|
|
|
{
|
|
|
CalendarItemShow(mCalendarItemIndex, (Integer.parseInt(imapRemotemeter.GetAttributeVal(i, "day"))),
|
|
|
imapRemotemeter.GetAttributeVal(i, "hotwater_used"));
|
|
@@ -2782,7 +2793,7 @@ public class RemoteMeterMainScreen extends WpadScreen{
|
|
|
|
|
|
case 4: // 난방
|
|
|
TempString = imapRemotemeter.GetAttributeVal(i, "energy_used");
|
|
|
- if (TempString.equals("1000000") == false)
|
|
|
+ if (TempString!=null && TempString.equals("1000000") == false)
|
|
|
{
|
|
|
CalendarItemShow(mCalendarItemIndex, (Integer.parseInt(imapRemotemeter.GetAttributeVal(i, "day"))),
|
|
|
imapRemotemeter.GetAttributeVal(i, "energy_used"));
|
|
@@ -2792,7 +2803,7 @@ public class RemoteMeterMainScreen extends WpadScreen{
|
|
|
|
|
|
case 5: // 탄소
|
|
|
TempString = imapRemotemeter.GetAttributeVal(i, "carbon_used");
|
|
|
- if (TempString.equals("1000000") == false)
|
|
|
+ if (TempString!=null && TempString.equals("1000000") == false)
|
|
|
{
|
|
|
CalendarItemShow(mCalendarItemIndex, (Integer.parseInt(imapRemotemeter.GetAttributeVal(i, "day"))),
|
|
|
imapRemotemeter.GetAttributeVal(i, "carbon_used"));
|