Back to project page editable-layout.
The source code is released under:
GNU General Public License
If you think the Android project editable-layout listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package nl.robinkanters.editablelayouttest; // www . ja v a2s. co m import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT; import nl.robinkanters.editablelayout.app.EditableLayoutActivity; import android.os.Bundle; import android.view.ViewGroup.LayoutParams; import android.widget.Button; public class MainActivity extends EditableLayoutActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addButton(); } private void addButton() { Button b = new Button(this); b.setText("This is a button"); b.setLayoutParams(new LayoutParams(WRAP_CONTENT, WRAP_CONTENT)); b.setX(100f); b.setY(150f); addView(b); } }