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 6826169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:06:55+00:00 2026-05-26T22:06:55+00:00

I am currently working on an Android app. When I click Menu, the Menu

  • 0

I am currently working on an Android app. When I click Menu, the Menu shows up, but then if you choose “Preferences” it crashes. If you click “New” it works fine. I don’t know what is going on. I am new to Android App development and the eclipse IDE, so anything helps. Here is the LogCat:

11-14 12:14:44.665: E/AndroidRuntime(392): FATAL EXCEPTION: main
11-14 12:14:44.665: E/AndroidRuntime(392): java.util.UnknownFormatConversionException: Conversion: r
11-14 12:14:44.665: E/AndroidRuntime(392):  at java.util.Formatter$FormatToken.unknownFormatConversionException(Formatter.java:1420)
11-14 12:14:44.665: E/AndroidRuntime(392):  at java.util.Formatter$FormatToken.checkFlags(Formatter.java:1357)
11-14 12:14:44.665: E/AndroidRuntime(392):  at java.util.Formatter.transform(Formatter.java:1463)
11-14 12:14:44.665: E/AndroidRuntime(392):  at java.util.Formatter.doFormat(Formatter.java:1102)
11-14 12:14:44.665: E/AndroidRuntime(392):  at java.util.Formatter.format(Formatter.java:1063)
11-14 12:14:44.665: E/AndroidRuntime(392):  at java.util.Formatter.format(Formatter.java:1032)
11-14 12:14:44.665: E/AndroidRuntime(392):  at java.lang.String.format(String.java:2104)
11-14 12:14:44.665: E/AndroidRuntime(392):  at java.lang.String.format(String.java:2078)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.preference.ListPreference.getSummary(ListPreference.java:152)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.preference.Preference.onBindView(Preference.java:500)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.preference.Preference.getView(Preference.java:450)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.preference.PreferenceGroupAdapter.getView(PreferenceGroupAdapter.java:221)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.AbsListView.obtainView(AbsListView.java:1949)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.ListView.measureHeightOfChildren(ListView.java:1228)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.ListView.onMeasure(ListView.java:1139)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.View.measure(View.java:10828)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4351)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1284)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.LinearLayout.measureVertical(LinearLayout.java:613)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.LinearLayout.onMeasure(LinearLayout.java:519)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.View.measure(View.java:10828)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4351)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1284)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:956)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.LinearLayout.onMeasure(LinearLayout.java:521)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.View.measure(View.java:10828)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4351)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1284)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.LinearLayout.measureVertical(LinearLayout.java:613)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.LinearLayout.onMeasure(LinearLayout.java:519)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.View.measure(View.java:10828)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4351)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.FrameLayout.onMeasure(FrameLayout.java:267)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.View.measure(View.java:10828)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4351)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.FrameLayout.onMeasure(FrameLayout.java:267)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.View.measure(View.java:10828)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4351)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1284)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.LinearLayout.measureVertical(LinearLayout.java:613)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.LinearLayout.onMeasure(LinearLayout.java:519)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.View.measure(View.java:10828)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4351)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.widget.FrameLayout.onMeasure(FrameLayout.java:267)
11-14 12:14:44.665: E/AndroidRuntime(392):  at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:1890)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.View.measure(View.java:10828)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.ViewRoot.performTraversals(ViewRoot.java:884)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.view.ViewRoot.handleMessage(ViewRoot.java:2003)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.os.Handler.dispatchMessage(Handler.java:99)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.os.Looper.loop(Looper.java:132)
11-14 12:14:44.665: E/AndroidRuntime(392):  at android.app.ActivityThread.main(ActivityThread.java:4025)
11-14 12:14:44.665: E/AndroidRuntime(392):  at java.lang.reflect.Method.invokeNative(Native Method)
11-14 12:14:44.665: E/AndroidRuntime(392):  at java.lang.reflect.Method.invoke(Method.java:491)
11-14 12:14:44.665: E/AndroidRuntime(392):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
11-14 12:14:44.665: E/AndroidRuntime(392):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
11-14 12:14:44.665: E/AndroidRuntime(392):  at dalvik.system.NativeStart.main(Native Method)

Here is the method that is called at the time of the crash:

/** when menu button option selected */
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
    case R.id.menu_options:
        startActivity(new Intent(this, WordSearchPreferences.class));
        return true;
    case R.id.menu_new:
        control.newWordSearch();
        return true;
    }return super.onOptionsItemSelected(item);
}

This is the preferences.xml that is used for this:

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
    <ListPreference android:key="@string/prefs_size"
    android:title="@string/size" android:defaultValue="10"
    android:summary="@string/prefs_size_summary"
    android:entryValues="@array/sizes_list_values"
    android:entries="@array/sizes_list_labels" />
<ListPreference android:key="@string/prefs_category"
    android:title="@string/category" android:defaultValue="@string/RANDOM"
    android:summary="@string/prefs_category_summary"
    android:entryValues="@array/categories_list_values"
    android:entries="@array/categories_list_labels" />
<ListPreference android:key="@string/prefs_touch_mode"
    android:title="@string/input_type" android:defaultValue="@string/DRAG"
    android:summary="@string/prefs_touch_mode_summary"
    android:entryValues="@array/touch_mode_list_values"
    android:entries="@array/touch_mode_list_labels" />
<ListPreference android:key="@string/PREFS_THEME"
    android:title="@string/THEME" android:defaultValue="@string/THEME_ORIGINAL"
    android:summary="@string/PREFS_THEME_SUMMARY"
    android:entryValues="@array/THEME_VALUES"
    android:entries="@array/THEME_LABELS" />
</PreferenceScreen>
  • 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-05-26T22:06:55+00:00Added an answer on May 26, 2026 at 10:06 pm

    ListPreference uses String.format() to generate the summary for the preference, so you can blend in data from the preference itself via %s. You appear to be using % or something in the description that is confusing String.format(). Make sure @string/prefs_size_summary and the others have values that will behave properly with String.format().

    Also, usually you don’t use string resources for android:key, because you are not going to be translating your preference keys. Only use string resources for things that will actually be translated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to android game development. I currently working on a simple android app
I am currently working on an Android app and I am trying to get
I am currently working on an Android app and I am having some issues
I'm currently working on an Android app. I would like to use the app
I'm currently working on converting an Android app I built natively as an iPhone
I am currently working on an Android app and I am trying to connect
I'm currently working on an XMPP app' on Android and I'm pondering about the
I'm currently working on my fist app for android phones and I want to
Currently, I'm working on an Android app for Pinterest. What I am trying to
I am currently working on building an Android app for my Rails backend. I

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.