android - how to move a view from viewgroup into another viewgroup? -


<linearlayout     android:id="@+id/linear1"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:background="#ff4d00"     android:orientation="vertical" >      <button         android:id="@+id/button1"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:text="button" /> </linearlayout>  <linearlayout     android:id="@+id/linear2"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:background="#ff4d00"     android:orientation="vertical" > </linearlayout> 

i wanna move @button1 @linear2, , attributes belong button1 can't lost, include click lisener. then, @linear1 gonna empty. cut operation. how can do?

you need add , remove button pragmatically ur activity class

this may add & delete view layout


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -