import android.app.*;
import android.os.*;
import android.view.ViewGroup.LayoutParams;
import android.widget.*;
public class LogDemoEx1Activity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.main);
LinearLayout layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.VERTICAL);
layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
EditText edit = new EditText(this);
edit.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
Button button = new Button(this);
button.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
button.setText("버튼");
layout.addView(edit);
layout.addView(button);
setContentView(layout);
}
}
[Android] Button (0) | 2011.08.03 |
---|---|
[Android] 스타일 과 테마 (0) | 2011.07.31 |
[Andorid] AutoCompleteTextView (0) | 2011.07.30 |
[Android] 뷰 (0) | 2011.07.26 |
[Android] 컴포넌트 활성화 및 비활성화 (0) | 2011.07.26 |
댓글 영역