How to make my android button layout goes down?
<p>i am currently making an tetris game, the game will be using android image button as the object. this game will utilize android accelerometer to make the button move to left or right every time the device tilted. the sensor changed function work really well already, i can move button horizontally. the problem is when i try to move the button down, it doesn't move at all. is anybody know the problem? here's my code :</p>

<pre><code>public void onSensorChanged(SensorEvent event) {
    if (event.sensor.getType() != Sensor.TYPE_ACCELEROMETER)
        return;
   // System.out.println((int)event.values[0]);
    int mMovement=(int)event.values[0];
    if(mMovement&gt;prevMove&amp;onMove==false&amp;test.getLeft()-40&gt;=0){
        test.layout(test.getLeft()-40, test.getTop()+1, test.getRight()-40, test.getBottom()+1);
        prevMove=mMovement;
    }
    else if(mMovement&lt;prevMove&amp;onMove==false&amp;test.getRight()+40&lt;=320){
        test.layout(test.getLeft()+40, test.getTop()+1, test.getRight()+40, test.getBottom()+1);
        prevMove=mMovement;
    }
}

public void downdowndown(){
    System.out.println(test.getBottom());
    while(test.getBottom()&lt;480){
        test.layout(test.getLeft(), test.getTop()+40, test.getRight(), test.getBottom()+40);
    }
}`
</code></pre>

<p>test is the button variable, icalled downdowndown onCreate();. also the +1 onsensorchanged also work here, idon't know why downdowndown didn't move my button at all..</p>
