title: How to move a button programmatically in an absolute layout
body: <p>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</p>
  
  <pre><code>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);
  }
  });
  </code></pre>
  
  <p>and i get application error</p>