main.xml 디자인이 요런데요

(사진 엑박뜨네요...첨부파일참조해주세요 ㅠㅠ 형님들)

 

남성을 체크하면

Toast로 메시지뜨게하고

여성을 체크하면

Toast로 메시지 뜨게하고

Sungbul 이란 변수에 값을줘요

남잔 1로

여잔 2로

 

그리고 이름을 입력안하고 버튼을 누르면 입력하라하고

하고싶은데 오류가 뜨네요

 

 

<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:background="@drawable/main" >

    <ImageButton
        android:id="@+id/imgbtn01"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_x="180dip"
        android:layout_y="195dip"
        android:onClick="mOnClick"
        android:src="@drawable/clear"/>
    <EditText
        android:layout_width="130dip"
        android:layout_height="50dip"
        android:layout_x="50dip"
        android:layout_y="200dip" />

    <RadioButton
        android:id="@+id/RadioButton01"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_x="42dp"
        android:layout_y="261dp"
        android:text="남성"
        android:textColor="#000000" />

    <RadioButton
        android:id="@+id/RadioButton02"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_x="128dp"
        android:layout_y="259dp"
        android:text="여성"
        android:textColor="#000000" />
   
</AbsoluteLayout>

 

main.xml 소스입니다

 

package com.MyFuture;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
import android.widget.Toast;

public class MainActivity extends Activity {
    /** Called when the activity is first created. */
 
 int Sungbul;
 int r;
 EditText Name;
 EditText edit;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        findViewById(R.id.RadioButton01).setOnClickListener(myRadioClick1);
        findViewById(R.id.RadioButton02).setOnClickListener(myRadioClick2);
        findViewById(R.id.imgbtn01).setOnClickListener(myButtonClick);
    }//End of onCreate
    Button.OnClickListener myButtonClick = new Button.OnClickListener(){
     public void onClick(View v){
      
      if(edit != null)
      Toast.makeText(this, "이름을 입력해주세요^^", Toast.LENGTH_SHORT).show();
      else
      Toast.makeText(this, "이름이 입력되었습니다^^", Toast.LENGTH_SHORT).show();
      Name = edit;
     }
    };
    OnCheckedChangeListener myRadioClick1 = new RadioGroup.OnCheckedChangeListener(){
     public void onCheck (View v){
      Sungbul = 1;
      Toast.makeText(this, "성별이 남자로 체크되었습니다 ^^", Toast.LENGTH_SHORT).show();
     }
    RadioGroup.OnCheckListener myRadioClick2 = new RadioGroup.OnCheckedChangeListener(){
     public void onCheck (View v){
      Sungbul = 2;
      Toast.makeText(this, "성별이 여자로 체크되었습니다 ^^", Toast.LENGTH_SHORT).show();
     }
   
   
   
     };
   }
}

activity.java입니다

오류가 좀 많이 뜨네요;;

고수님들 부탁합니다 ㅠ