I have an application that is suppose to be built in English and Arabic. so i have drawable-en and drawable-ar.
My question is, is it better to set the images in XML, because android will figure out which language is selected and to show the appropriate image. Or i do this through code and check for language and set its image. I don't want the application to crash with memory error etc.
Method 1: android:background="@drawable/background2"
Method 2: //here some cache is put into work.
ImageResourceHandler.RenderImageBackgroundForView(getResources(), findViewById(R.id.imageView), R.drawable.activitybackground);
//this is direct image set to backgroup
((Button) findViewById(R.id.languageButton)).setBackgroundResource(R.drawable.langeng);
Thanks in advance.