책에 나온 간단한 예제 만들다가 xml부분에서 에러가 나는듯 합니다 ㅠㅠ
확인한번 부탁드릴게요 ㅠㅠㅠ
우선 자바소스입니다
import android.app.Activity;
import android.content.Intent;
import android.app.LauncherActivity;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class IntentActivity extends Activity implements OnClickListener {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button button1 = (Button)findViewById(R.id.Button01);
Button button2 = (Button)findViewById(R.id.Button02);
Button button3 = (Button)findViewById(R.id.Button03);
button1.setOnClickListener(this);
button2.setOnClickListener(this);
button3.setOnClickListener(this);
}
@Override
public void onClick(View v) {
if(v.getId() == R.id.Button01)
{
Intent i = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:1234567890"));
startActivity(i);
}
else if(v.getId() == R.id.Button02)
{
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.co.kr"));
startActivity(i);
}
else if(v.getId() == R.id.Button03)
{
Intent intent = new Intent(getApplicationContext(), LauncherActivity.class);
startActivity(intent);
}
}
}
여기서 button03을 누르면 액티비티를 불러오는건데요;;;
Mainfest에 activity를 추가했는데도 에러가 나네요 ㅠㅠ
Mainfest 코드입니다.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="kr.hews.intent"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name="IntentActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="LauncherActivity" >
</activity>
</application>
<uses-sdk android:minSdkVersion="7" />
</manifest>
어떤점에서 문제점이 있는지 알려주세요 ㅠㅠㅠ 이걸로 3시간 해메고 있습니다 ㅠㅠㅠ