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

  • Home
  • SEARCH
  • 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 8772615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:04:43+00:00 2026-06-13T18:04:43+00:00

I have a small timer app and EditText widgets named etH , etM and

  • 0

I have a small timer app and EditText widgets named etH, etM and etS which allow input and show the time ticking. When the start button is clicked and the timer is started, I forbid the interaction by doing the following:

btnS.setOnClickListener(new View.OnClickListener() {
    public void onClick(View v) {
    if (calculateMS() != 0) {
        OnTimerStartButtonClicked();
        initiateTimer();
        DisableEditTexts();
                    ...

The method:

public void DisableEditTexts() {
    etH.setFocusable(false);
    etM.setFocusable(false);
    etS.setFocusable(false);
}

By pressing the reset button I want to re-enable the interaction by calling the method the does the reverse thing (sets focusable to true):

btnR.setOnClickListener(new View.OnClickListener() {
    public void onClick(View v) {
        OnTimerResetButtonClicked();
        clearValues();
        EnableEditTexts();
        ...

The problem: the edittexts do NOT become focusable by clicking the reset button. All I’m doing in last method is

etH.setFocusable(true);
etM.setFocusable(true);
etS.setFocusable(true);

What am I doing wrong?

  • 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-13T18:04:44+00:00Added an answer on June 13, 2026 at 6:04 pm

    Try calling EditText#setFocusableInTouchMode() instead:

    etH.setFocusableInTouchMode(true);
    // etc.
    

    When you call setFocusable(false), behind the scenes, setFocusableInTouchMode(false) is called for you. However when you call setFocusable(true), nothing else happens behind the scenes, leaving setFocusableInTouchMode() as false.

    When you call setFocusableInTouchMode(true), a similar thing happens, setFocusable(true) is called for you. And the same as before setFocusableInTouchMode(false), does not call setFocuable(false).

    Take a peak at the source code to see this quirk.

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

Sidebar

Related Questions

I have a small app with iAds, and allow people to pay to upgrade.
I have a small Sinatra app that uses Twitter OAuth for authentication. Some time
Back story: Small-time iPhone developer, even have a (tiny) app on the App Store,
I used to have a small chat app(which was almost working), that uses PHP,
I have made an app that starts a service, which starts a timer, which
I have a small class with a timer, but don't have anything for the
I'm trying to write a small application and have come across a compile time
I have small script in bash, which is generating graphs via gnuplot. Everything works
I have small test app: Socket socket = new Socket(jeck.ru, 80); PrintWriter pw =
I have a simple iPhone app which accesses some remote data on start-up then

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.