I'm developing an android app, it's about multilingual story. In this app I can switch from a language to another. Of course this application contains several images and texts. In the arabic language some photos need to be flipped, in the following code I'm flipping 4 images:
if (i == 0) {
rightImages[i].setImageResource(R.drawable.coverar);
}
if (i == 1) {
rightImages[i].setImageResource(R.drawable.page1ar);
}
if (i == 4)// for the arabic flipped pages
{
rightImages[i].setImageResource(R.drawable.page6_flipped);
leftImages[i].setImageResource(R.drawable.page7_flipped);
}
if (i == 8)// for the arabic flipped pages
{
rightImages[i].setImageResource(R.drawable.page14_flipped);
leftImages[i].setImageResource(R.drawable.page15_flipped);
}
if (i != 4 && i != 8) {
linLay[i].removeAllViews();
linLay[i].addView(rightImages[i]);
linLay[i].addView(leftImages[i]);
}
It's crashing and it's giving me the following error :
android.view.InflateException : Binary XML file line #26: Error inflating class <unknown>
The strange about it is that it won't crash when I change page6_flipped,page7_flipped,page14_flipped,page15_flipped to page6,page7,page14,page15.
Please note that I'm using the tablet galaxy note 10.1 2014 edition, on the other hand it isn't crashing on other tablets ( Samsung P7500 Galaxy Tab 10.1 , toshiba at7-a, samsung galaxy tab 3 10.1).
Any help please ?