Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8555935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:14:19+00:00 2026-06-11T15:14:19+00:00

I wrote a little app, which has some locales and language options. When user

  • 0

I wrote a little app, which has some locales and language options. When user changes the locale, OptionsActivity restarting and updating configuration. MainActivity updating configuration too in onRestart() method. All is well, but if user tap options hardware button, options menu creating with first loaded localized resources. I create options menu with code:

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    Log.d(Const.LOG_TAG, "onCreateOptionsMenu");
    final MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.activity_main, menu);
    return true;
}

/menu/activity_main.xml:

<menu xmlns:android="http://schemas.android.com/apk/res/android" >
    <item
        android:id="@+id/menu_settings"
        android:icon="@drawable/setting_icon"
        android:title="@string/menu_settings"/>
</menu>

menu_setting is localized string. What is wrong? Why are some resources updating, but some resources are not?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T15:14:20+00:00Added an answer on June 11, 2026 at 3:14 pm

    I’ve got it.

    @Override
    public boolean onPrepareOptionsMenu(Menu menu) {
        Log.d(Const.LOG_TAG, "Menu prepared");
        MenuItem item = menu.findItem(R.id.menu_settings);
        item.setTitle(R.string.menu_settings);
        return true;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i wrote a little addin, which does some formatting of my C# code. in
Here I wrote a little app which is able to read command line arguments
I'm a little confused about something. I wrote an app and tested it on
i wrote a little test programm which queries the status servlet of a tomcat
I wrote this little web app that lists the websites running on the local
I want to write a little app for myself which notifies me if there
I wrote a little program which prints help information if argument is not passed.
I've been tasked to code a little app in c# which searches a directory
I wrote a nice little app that gets Yahoo weather info and posts it
I'm writing a little command line todo app that has a general git-like interface.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.