I add this in my MainActivity.java
btn = (Button)findViewById(R.id.aboutTheDeveloper);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void openAboutTheDeveloper(View v) {
startActivity(new Intent(MainActivity.this, aboutTheDeveloper.class));
}
}
I have also edited my manifests:
<activity
android:name=".aboutTheDeveloper"
android:label="@string/title_activity_about_the_developer" >
</activity>
Scenario:
I have this button inside MainActivity.xml with id = @id/openAboutTheDeveloper
Which should open the AboutTheDeveloper Activity.
Inside button I also placed android:onclick="openAboutTheDeveloper"
Which should call function openAboutTheDeveloper inside MainActivity.java
It doesn't seem to work. T_T
Sorry if I'm too explicit. I'm very new to Android and I'm not really friends with Java.