Android
change activity
aucd29
2013. 10. 8. 14:38
source
[code]
Button btnShow = (Button) findViewById(R.id.btn_show);
btnShow.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// change activity
Intent imeWindow = new Intent($(baseClass).this, $(targetClass).class);
startActivity(imeWindow);
}
});
[/code]
AndroidManifest.xml
[code]
<application android:label="@string/app_name"
android:debuggable="true">
<activity android:name=".HelloJni"
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=".ImeWindow" />
</application>
[/code]
[code]
Button btnShow = (Button) findViewById(R.id.btn_show);
btnShow.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// change activity
Intent imeWindow = new Intent($(baseClass).this, $(targetClass).class);
startActivity(imeWindow);
}
});
[/code]
AndroidManifest.xml
[code]
<application android:label="@string/app_name"
android:debuggable="true">
<activity android:name=".HelloJni"
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=".ImeWindow" />
</application>
[/code]