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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:33:13+00:00 2026-05-28T01:33:13+00:00

i have text View in layout and set text in layout..now i want to

  • 0

i have text View in layout and set text in layout..now i want to maove this text on touch event means depends on the motion event ..so how to move this text and set text , where i put off my finger from screen..i searched in Google and found , can get x and y cordinates of screen using ,event.getX() and ,y= + event.getY()..but how to use it to set the text at that position only..

   TextView textView = (TextView)findViewById(R.id.textView);

    // this is the view on which you will listen for touch events
    View touchView = findViewById(R.id.touchView);
    touchView.setOnTouchListener(new View.OnTouchListener() {
        public boolean onTouch(View v, MotionEvent event) {

            if (event.getAction() == MotionEvent.ACTION_DOWN) {

 }}

  }
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-28T01:33:14+00:00Added an answer on May 28, 2026 at 1:33 am

    your question is not clear what do you mean by moving text on touch ? you want to move the text where finger touches ? if you want this then make two variables x and y in activity and update them with like this.

      x = event.getX()  // or getRawX();
     y = event.getY();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this layout that works correctly, a relative layout with a text view
http://dl.dropbox.com/u/24856/android_issue.PNG i have a text view on top running into the relative layout with
I need to have various text view on a single line. And I want
I have Auto completed text view,i want to filter the items present in the
I have created 5 TextView programmatically, now i want to set few Parameters/Attributes of
I have a set a variable in my Base Adapter class, now I want
I have the following TextView in my XML layout file:- <TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/autolink_test
I have this layout: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=wrap_content android:layout_height=wrap_content > <TextView android:id=@+id/solution_title
In my application,i have text view with long text. i need text wrapping like
I have a GTK# Text View with word wrap and scroll bars turned on.

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.