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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:46:27+00:00 2026-06-13T12:46:27+00:00

So, I want the user to be able to type over an image that

  • 0

So, I want the user to be able to type over an image that I set to an Image View. The image is set and works. When the user clicks the image, an Edit Text box shows up where they clicked. But the white background of the Edit Text blocks the image in the background. So, I set the Edit Text background to transparent:

    editTextOne.setBackgroundColor(Color.TRANSPARENT);

This works with making the Edit Text background transparent. However, now the cursor also doesn’t display, unless, the begin typing.

So, what I’m asking is if there is anyway to make the EditText background transparent but still have the cursor show and blink? Any help will be greatly appreciated, thanks!

Code:

    public boolean onTouch(View view, MotionEvent event){
            if (type == true){
                touchX = (int) event.getX();
                touchY = (int) event.getY();
                RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) editTextOne.getLayoutParams();
                params.leftMargin = touchX;
                params.topMargin = touchY;
                params.addRule(RelativeLayout.ALIGN_PARENT_TOP);
                params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
                editTextOne.setLayoutParams(params);
                editTextOne.setVisibility(View.VISIBLE);
                editTextOne.bringToFront();
                editTextOne.setBackgroundColor(Color.TRANSPARENT);
                editTextOne.requestFocus();
                editTextOne.setCursorVisible(true);
            }//end of if statement
            return true;
        }//end of onTouch

XML:

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

<Button
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:layout_toLeftOf="@+id/load"
    android:layout_alignParentBottom="true"
    android:layout_margin="10dp"
    android:text="C"
    android:textStyle="bold"
    android:textSize="20dp"
    android:id="@+id/camera"
    android:onClick="camera"/>

<Button
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:layout_toLeftOf="@+id/view"
    android:layout_alignParentBottom="true"
    android:layout_margin="10dp"
    android:id="@+id/load"
    android:text="L"
    android:textStyle="bold"
    android:textSize="20dp"
    android:onClick="load"/>

<Button
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:layout_alignParentRight="true"
    android:layout_alignParentBottom="true"
    android:layout_margin="10dp"
    android:text="v"
    android:id="@+id/view"
    android:textStyle="bold"
    android:textSize="20dp"
    android:onClick="view"/>

<Button 
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:layout_toLeftOf="@+id/camera"
    android:layout_alignParentBottom="true"
    android:layout_margin="10dp"
    android:text="T"
    android:textStyle="bold"
    android:textSize="20dp"
    android:id="@+id/text"
    android:onClick="text"/>

<TextView 
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:background="@null"
    android:visibility="invisible"
    android:id="@+id/textone"/>

<EditText
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:visibility="invisible"
    android:inputType="textAutoCorrect"
    android:singleLine="true"
    android:id="@+id/edittextone"/>

<ImageView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerInParent="true"
    android:id="@+id/picture"/>

</RelativeLayout>  

EDIT: I’m not to sure why the cursor wouldn’t display right away but I found that the cursor was visible once the space bar was pressed. So, in order to solve my problem I used:

     editTextOne.setText(" ");

This places a space as the initial text, and therefore, displays the cursor. I hope that this may help someone else stuck with a similar problem.

  • 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-13T12:46:28+00:00Added an answer on June 13, 2026 at 12:46 pm

    Have you tried manually setting the focus to the text view? After you show the view, you can try calling requestFocus()?

    Also, you can attempt to explicitly set the cursor to visible through the setCursorVisible method.

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

Sidebar

Related Questions

I want the user to be able to type only a float (that is,
I have a MovieClip that I want the user to be able to drag
I have a dictionary of strings that i want the user to be able
I want the user to be able to type in only numbers and spaces.
I have a user that want to be able to select a textbox and
I have the following url: http://mywebsite.com/somepage.php?product=343&type=4 I want the user to be able to
I want the user to be able to see the source code of the
I want the user to be able to make some preferences like colors, prefered
I want the user to be able to see my application in the menu
I want the user to be able to enter a name for a file

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.