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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:36:35+00:00 2026-06-17T16:36:35+00:00

I am just trying to write a MenuInflate. when user clicks to AboutUs button

  • 0

I am just trying to write a MenuInflate. when user clicks to AboutUs button a small dialog box should appear and write what I want to. But somehow it writes MainActivity instead of “About us About us”

public boolean onOptionsItemSelected(MenuItem item) {

            switch (item.getItemId()) {
            case R.id.aboutUs:
                Intent i = new Intent("com.android.ABOUT");
                finish();
                startActivity(i);
                break;
            case R.id.preferences:
                break;
            }

            return false;
        }

this is my about.xml file

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/textView1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="About me About Me" >
        </TextView>
    >

    </LinearLayout>

and related part of AndroidManifest.xml

 <activity
            android:name=".AboutUs"
            android:exported="false"
            android:label="@string/title_activity_main"
            android:theme="@android:style/Theme.Dialog" >
            <intent-filter>
                <action android:name="com.android.ABOUT" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

and screenshot

  • 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-17T16:36:37+00:00Added an answer on June 17, 2026 at 4:36 pm

    If setContentView(R.layout.my_layout_file) isn’t included in the onCreate() method then Android doesn’t know what View to display resulting in nothing to display in the Activity. This also will keep the Activity from being able to instantiate any Views such as TextViews, EditTexts, Buttons, etc.

    http://developer.android.com/reference/android/app/Activity.html#setContentView(android.view.View)

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

Sidebar

Related Questions

Just trying to write a function that gets clock hand angles, but getting an
I am an Instapaper user and am just trying to write a script that
I am just trying to write a small web page that can parse some
I am just trying to write a multipart parser but things getting complicated and
Just trying to write my first ever WP7 app. I have several hundreds of
Hey i'm just trying to write some code in DrScheme: ((function (x) (* x
I'm trying to write (or just find an existing) PHP method that can take
I'm trying to write a very lightweight build script which will basically just get
I'm trying to write a non-blocking client and non-blocking server with requirements: Server just
just trying to test for equality in this piece of code, but getting a

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.