I tried so many things to relocate buttons of a list. Relocate the
current button is working but the older buttons not. To clarify the
situation:

There are two Activities (Activity A and B). At Activity A I customize
a button and pass it on Activity B via an intent. On Activity B I move
the button somewhere on the screen. This
will be done with other buttons. On Activity B I also want to show the
old Buttons.

Thats the code within onCreate():

         if(keyList.isEmpty() == false){
                        for (iter = keyList.iterator();
iter.hasNext();){

                                Button k =  (Button) iter.next();
                                Button ok = new Button(this);

                                ok.setHeight(k.getHeight());
                                ok.setWidth(k.getWidth());
                                ok.setText(k.getText());
                                ok.layout(k.getLeft(), k.getTop(),
k.getRight(), k.getBottom());
                                ok.setVisibility(1);

                                rel_layout.removeView(ok);
                                rel_layout.addView(ok);

           }


As above mentioned, I want to move the Buttons and set them
somewhere on the screen (e.g. down right). But everytime I call
Acitvity B again, all Buttons are located at top left.
I thought it would be achieved with

       ok.layout(k.getLeft(), k.getTop(), k.getRight(),
k.getBottom());

But obviously not.

Any suggestion and hints how this could be solved would be
appreciated !

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to