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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:47:49+00:00 2026-06-11T07:47:49+00:00

I’m new in the world of android. Until now each and every OptionsMenu could

  • 0

I’m new in the world of android. Until now each and every “OptionsMenu” could be created like this:

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.activity_list_view_controller, menu);
    return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle item selection
        switch (item.getItemId()) {
            case R.id.menu_settings:
                startActivity(new Intent (ListViewControllerActivity.this, PreverencesActivity.class));
                return true;
            case R.id.menu_devsettings:
                startActivity(new Intent (ListViewControllerActivity.this, DevPreferencesActivity.class));
                return true;
            default:
                return super.onOptionsItemSelected(item);
        }
}

But now , for example, the new htc one have no hardware OptionsMenu button. When the OptionsMenu is implemented like my source, the menubutton inside the display won’t show up.
How can implement the OptionsMenu right, that no additional button in the layout is needed?
Or can this button inside the display somehow be activated?

EDIT:
I think I gave a little less information to solve the problem, because the android won’t take care of it in API 16 Jelly Bean.
So again. I’ve implemented the option menu like above. But now with the “htc one” which has no hardware option menu button, the in-screen option menu button doesn’t show up.

Here is my layout xml, which i’m using (it could be a layout problem):

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <ImageView
        android:id="@+id/img_logo"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true" />

    <TextView 
        android:id="@+id/txt_title"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:background="#1e4870"
        android:textColor="#ffffff"
        android:layout_below="@+id/img_logo"/>

    <ListView
        android:id="@android:id/list"
        android:layout_below="@+id/txt_title"
        android:layout_above="@+id/img_bottom_bar"
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
    </ListView>

     <ImageView
         android:id="@+id/img_bottom_bar"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_above="@+id/footer"
         android:layout_alignParentLeft="true"
         android:layout_alignParentRight="true"
         android:background="@android:drawable/bottom_bar"
         android:src="@android:drawable/bottom_bar" />

    <RelativeLayout
        android:id="@+id/footer"
        android:layout_width="wrap_content"
        android:layout_height="50dp"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/footer_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_toLeftOf="@+id/footer_img_bs"
            android:textAppearance="?android:attr/textAppearanceSmall" />

        <ImageView
            android:id="@+id/footer_img_bs"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true"
            android:src="@drawable/ic_launcher" />

    </RelativeLayout>

</RelativeLayout>

And here the part of the manifest, which i thought would solve this problem:

<uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="16" />

I’ve also googled this problem many times. But it seems that i’m the only person around here with that problem. So i have to be a little stupid or something.

Before I forget: Thank you WebnetMobile.com for trying to help me. It could be that i’m just (like i’ve said before) too stupid to understand your answer.

  • 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-11T07:47:51+00:00Added an answer on June 11, 2026 at 7:47 am

    I’ve solved the problem like this link describes. You can simply change the “targetSdkVersion” from 16 to 10.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
This could be a duplicate question, but I have no idea what search terms
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace
I would like to run a str_replace or preg_replace which looks for certain words

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.