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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:45:47+00:00 2026-05-29T07:45:47+00:00

i make a test application in eclipse with adt plugin. I want when a

  • 0

i make a test application in eclipse with adt plugin. I want when a button is clicked to move it in a random position in the screen, i found some example around the internet by nothing works

Button noBtn = (Button) findViewById(R.id.NoBtn);
noBtn.setOnClickListener(new OnClickListener() {
public void onClick(View v)
{
    Button noBtn = (Button) findViewById(R.id.NoBtn);
    AbsoluteLayout.LayoutParams OBJ=new
    AbsoluteLayout.LayoutParams(35,35,408,160);
    noBtn.setLayoutParams(OBJ);
}
});

and i get application error

  • 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-29T07:45:49+00:00Added an answer on May 29, 2026 at 7:45 am

    by using the layoutparam in android, u can specify the position of your widget through the java code rather than specifying it in the xml file in android.

    AbsoluteLayout.LayoutParams OBJ = new AbsoluteLayout.LayoutParams(35,35,408,160);
    button.setLayoutParams(OBJ);
    

    here-

    AbsoluteLayout.LayoutParams(width,height,X-position,Y-position) 
    

    is what i have specified as (35,35,408,160)

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

Sidebar

Related Questions

I'm trying to test an application and I need to make an valid IP
I have been trying to test my application to make sure that all the
I'm writing a little Maven application in Eclipse. I store some property files and
I'm trying to make test-program that opens a website by pushing a button. I
I am running a Junit test case on my eclipse application that was built
I've been trying to make a unit test for an application I'm writing. I
I want to move a long-running process in an Java EE application from synchronous
I'm learning Android programming, and I want to make an application which has to
Trying to make a django test application which will use stored oracle's procedures to
I want to learn more about threading and created a little test application that

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.