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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:33:45+00:00 2026-05-14T04:33:45+00:00

In the onCreate() of an activity, I’ve got a call to requestFocus() on an

  • 0

In the onCreate() of an activity, I’ve got a call to requestFocus() on an EditText. Immediately after, I’ve got the following:

    System.out.println(mEdit.isFocusableInTouchMode());
    System.out.println(mEdit.isFocusable());
    System.out.println(mEdit.isFocused());

These were just put in while I was trying to figure out what is wrong with this activity… they all print “true”. However, as you may have guessed, the EditText does NOT have focus, and if I try to start typing, nothing happens. I have to click on the EditText to being typing.

I can’t see that anything else has focus, but obviously something has to have it.. how can I find out what it is?

  • 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-14T04:33:46+00:00Added an answer on May 14, 2026 at 4:33 am

    I think I figured it out. It was due to this activity being in a TabActivity. Apparently when you click on a tab, TabHost just calls requestFocus(FOCUS_FORWARD) on the tab content view (I found this in TabHost.java).

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

Sidebar

Related Questions

In the Android Activity lifecycle, when Activity.onCreate() is called after resuming (IE. not when
In the onCreate of an activity we are connecting to a remote system and
I've got the following problem. After starting, application works fine - even after changing
In my activity oncreate method, i have called a service using OnStartCommand(). My requirement
This is my activity oncreate() method. I set a positive button ok with a
I have a LinearLayout and its child - ImageView. My activity's onCreate does nothing
I have an activity in whose onCreate method an Init function is called (the
I have Activity with ListView inside it and in the onCreate method of the
I'm creating a new database in my Activity like this: @Override public void onCreate(Bundle
I have an Activity that should only get created once. That is, onCreate can

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.