Troubles with activity title language

前端 未结 4 1068
一个人的身影
一个人的身影 2021-02-18 20:26

I have two language in my app. values/strings.xml and values-ru/strings.xml When I programmatically change language, all strings translating, b

4条回答
  •  离开以前
    2021-02-18 20:49

    i used another way it seems stupid but it's work

    in each activity try to set the action bar title to your activity title from values file

    in my case i was using sherlockactionbar

    so i added this in oncreate of my productdetails activity

        getSupportActionBar().setTitle(getResources().getString(R.string.title_activity_product_details));
    

提交回复
热议问题