Android - Menu Items Don't Show Up In Arabic
I am making an Android app, and want to display a Menu of two items (Home Page , Logout). My problem exactly is the Menu items don't show up at all when i switch my phone's languag
Solution 1:
Try adding a menu-ar resource folder and copy your main.xml to it.
Solution 2:
Use string resources.
new AlertDialog.Builder(this)
.setTitle(R.string.home_title)
.setMessage(R.string.you_are_on_home_page)
.setNeutralButton(R.string.btn_ok, new DialogInterface.OnClickListener() {
publicvoidonClick(DialogInterface dialog, int which){
//Do Nothing
}
}).show();
For two language (en/ar) add to strings.xml
example,
en:
<string name="you_are_on_home_page">You Are In The Home Page Now</string>
ar:
<string name="you_are_on_home_page">مندوب المبيعات</string>
About right justify text in Dialog, you can read here https://stackoverflow.com/a/6131224
Post a Comment for "Android - Menu Items Don't Show Up In Arabic"