2011년 3월 17일 목요일

type] about Activity

<?xml version="1.0" encoding="utf-8" ?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:orientation="vertical"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 >
<TextView
 android:layout_width="fill_parent"
 android:layout_height="wrap_content"
 android:text="sub activities"
 android:textSize="10sp"
 android:textColor="#00ff00"
 />
<Button
 android:id="@+id/close"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:text="Close"
 />
</LinearLayout>
---------------->
public class SubActivity extends Activity {
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.subactivity);
 Button btnClose=(Button)findViewById(R.id.close);
 btnClose.setOnClickListener(new Button.OnClickListener() {
  public void onClick(View v) {
  finish();
  }
 });
 }
}

댓글 없음:

댓글 쓰기

국정원의 댓글 공작을 지탄합니다.

UPBIT is a South Korean company, and people died of suicide cause of coin investment.

 UPBIT is a South Korean company, and people died of suicide cause of coin. The company helps the people who control the market price manipu...