My problem is when I open new activity when pressing button an error accoutred "Unfortunately, ISPcheck has stopped".
Here is my MainActivity.java button click event code:
public void btnLogin_OnClick(View view) {
startActivity(new Intent(MainActivity.this, PersonInfo.class));
}
Here is button xml code in activity_main.xml:
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="تسجيل الدخول"
android:id="@+id/btnLogin"
android:layout_marginTop="72dp"
android:textColor="#ffffff"
android:layout_below="@+id/txtPassword"
android:layout_centerHorizontal="true"
android: önClick="btnLogin_OnClick" /
>
Here is AndroidManifest.xml code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hsa.ispcheck"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.hsa.ispcheck.MainActivity"
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="com.hsa.ispcheck.PersonInfo"
android:label="@string/title_activity_person_info" >
</activity>
</application>
</manifest>
So, What's wrong with what I did?
Note: I'm using Android Studio v0.3.2