package aaa.android;
import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
public class Homework2Activity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LinearLayout ll= new LinearLayout(this);
ll.setOrientation(LinearLayout.VERTICAL);
Button btn_save = new Button(this);
btn_save.setText("Save");
Button btn_open = new Button(this);
btn_open.setText("OPen");
Button btn_img = new Button(this);
btn_img.setBackgroundResource(R.drawable.ic_launcher);
EditText edit = new EditText(this);
CheckBox autosave = new CheckBox(this);
autosave.setText("autosave");
CheckBox star = new CheckBox(this);
//star.setButtonDrawable(R.attr.starStyle);
RadioGroup rg = new RadioGroup(this);
RadioButton rb1,rb2;
rg.setOrientation(LinearLayout.VERTICAL);
rb1= new RadioButton(this);
rb2= new RadioButton(this);
rb1.setText("kbs");
rb2.setText("mbc");
LinearLayout.LayoutParams paramtext =
new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
LinearLayout.LayoutParams paramtext2 =
new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.FILL_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
ll.addView(btn_save,paramtext2);
ll.addView(btn_open,paramtext);
ll.addView(btn_img,paramtext2);
ll.addView(edit,paramtext2);
ll.addView(autosave,paramtext);
ll.addView(star,paramtext);
ll.addView(rg,paramtext);
ll.addView(rb1,paramtext);
ll.addView(rb2,paramtext);
setContentView(ll);
}
}
이런식으로 만들고 있는데요 체크 박스 별모양 안드로이드에 저장 되있는거 어떻게 불러오나요
또 라디오 그룹에 라디오버튼 어떻게 넣나요 알려주세요 ㅜㅜ
xml 로는 알겠는데 소스로 해야해서요
117호로 오시면 설명해 드릴게욬ㅋㅋㅋㅋㅋㅋㅋ