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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:41:03+00:00 2026-06-14T15:41:03+00:00

I have a screen with textviews now i want to make this editable on

  • 0

I have a screen with textviews now i want to make this editable on click of that

i tried one solution using edittext making it as transparent background but initially it will show cursor and the click is not recognizing properly,if i set focusbaleintouchmode to false in xml it is not getting focus.but some how the click is not working properly as expected.first is this correct approach?

expected result is textview should be there once user clicks on it it should be editable once user clicks outside it it should be not editable. any sample code will helps me a lot.sorry for my english

Thanks in advance

finally i got one solution using below code
in xml edit text i gave foucasbletouchmode to false which makes click works properly after that with in onclick

        et.setFocusable(true);
        et.setEnabled(true);

        et.setFocusableInTouchMode(true);
        et.requestFocus();

to lose focus

        et.setFocusable(false);
        et.setClickable(true);
        et.clearFocus();
  • 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-14T15:41:04+00:00Added an answer on June 14, 2026 at 3:41 pm

    You can use the below code :

    private makeEditable(boolean isEditable,EditText et){
        if(isEditable){
            et.setBackgroundDrawable("Give the textbox background here");//You can store it in some variable and use it over here while making non editable.
            et.setFocusable(true);
            et.setEnabled(true);
            et.setClickable(true);
            et.setFocusableInTouchMode(true);
            et.setKeyListener("Set edit text key listener here"); //You can store it in some variable and use it over here while making non editable.
        }else{
            et.setBackgroundDrawable(new ColorDrawable(Color.WHITE));
            et.setFocusable(false);
            et.setClickable(false);
            et.setFocusableInTouchMode(false);
            et.setEnabled(false);
            et.setKeyListener(null);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed one application which has 15 screens. Now I want to display
I have a UITextView that I want to be scrollable. The problem right now,
I have 9 screen coordinates, each representing one of 9 positions. From the top
i have a screen and it is i want the buttons to put under
I have a screen that is supposed to have a few large sections of
I have a screen with pivot functionality, and I'd very much like just one
here in above screen, i have two linear layouts, one for two TextView and
EDITED: I HAVE FOUND THE SOLUTION MYSELF. THANK YOU! I want to create the
Ok I have a relative layout inside a linear one.Until now,the relative layout was
I have a listview of addresses in screen#1. On click of any item navigating

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.