アプリに問題があり、何が問題なのかわかりません。ICS ではアプリは動作しますが、2.X では問題があります。ループに関係していると思いますが、まだ少し混乱しています。
開発者コンソールは、エラーレポートのためにこれをスローします:
Exception class > java.lang.StackOverflowError
Source method > Matrix.setScale()
これは問題を引き起こしているコードです...
private void shiftLoop7()
{
if (d7 != doy && d7 < 366)
{
d7 = d7 + 8;
shiftLoop7();
}
else if(d7 == doy)
{
if (hour >= 0 && hour < 8)
{
shift.setText("C");
shift.setTextAppearance(getApplicationContext(), R.style.CShift);
shiftImage.setImageResource(R.drawable.c);
timeTill.setText("till 7:45 AM");
dayshift.setText("A Shift");
day1.setBackgroundResource(R.color.A);
day2.setBackgroundResource(R.color.A);
day3.setBackgroundResource(R.color.A);
day4.setBackgroundResource(R.color.A);
nightshift.setText("C Shift");
night1.setBackgroundResource(R.color.C);
night2.setBackgroundResource(R.color.C);
night3.setBackgroundResource(R.color.C);
night4.setBackgroundResource(R.color.C);
}
else if (hour >= 8 && hour < 17)
{
shift.setText("A");
shift.setTextAppearance(getApplicationContext(), R.style.AShift);
shiftImage.setImageResource(R.drawable.a);
timeTill.setText("till 4:45 PM");
dayshift.setText("A Shift");
day1.setBackgroundResource(R.color.A);
day2.setBackgroundResource(R.color.A);
day3.setBackgroundResource(R.color.A);
day4.setBackgroundResource(R.color.A);
nightshift.setText("C Shift");
night1.setBackgroundResource(R.color.C);
night2.setBackgroundResource(R.color.C);
night3.setBackgroundResource(R.color.C);
night4.setBackgroundResource(R.color.C);
}
else
{
shift.setText("C");
shift.setTextAppearance(getApplicationContext(), R.style.CShift);
shiftImage.setImageResource(R.drawable.c);
timeTill.setText("till 7:45 AM");
dayshift.setText("A Shift");
day1.setBackgroundResource(R.color.A);
day2.setBackgroundResource(R.color.A);
day3.setBackgroundResource(R.color.A);
day4.setBackgroundResource(R.color.A);
nightshift.setText("C Shift");
night1.setBackgroundResource(R.color.C);
night2.setBackgroundResource(R.color.C);
night3.setBackgroundResource(R.color.C);
night4.setBackgroundResource(R.color.C);
}
}
else
{
shiftLoop8();
}
}