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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:03:17+00:00 2026-05-20T08:03:17+00:00

I have an editext which populates on the click of a button. The problem

  • 0

I have an editext which populates on the click of a button.

The problem is when I load android the cursor is allowing this editext to be editable.

I need the edittext not be editable and only update onclick. Is this possible?

Thanks

  • 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-20T08:03:17+00:00Added an answer on May 20, 2026 at 8:03 am

    Tommy…. You can change the text in the onClick handler using setText. Here is some sample code for enabling or disabling editing dynamically:

    given

    private boolean isProhibitEditPassword= false;
    

    You can do:

         if (cbProhibitEditPW.isChecked()) { // disable editing password
                editTextPassword.setFocusable(false);
                editTextPassword.setFocusableInTouchMode(false);
                editTextPassword.setClickable(false);
                isProhibitEditPassword= true;
            }
            else { // enable editing of password
                editTextPassword.setFocusable(true);
                editTextPassword.setFocusableInTouchMode(true);
                editTextPassword.setClickable(true);
                isProhibitEditPassword= false;
            }  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a screen which have editText and a button, now when we click
I have an EditText which is android:focusable=false. I would like to do something when
I have a textView which is configured as an EditText. But the problem is
We have Edittext which can take Decimal value. So I have used android:inputType=numberDecimal android:numeric=decimal
I have an EditText which should work as follows (Android 2.3.3): The user enters
i have a EditText in android in which i want the user to enter
I have an EditText view which I need to look like below (focused and
I am new to android development and I have an edittext for which i
I have an EditText which takes a String from the user and a searchButton.
I have a edittext in which some text are selected . I want to

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.