页面跳转,竟然跳转到空白页面,求助啊
跳转界面实现不是Intent intent = new Intent ();intent.setClass ( A.this, B.class );
startActivity ( intent );吗?
但是为什么我跳转后找不到应有界面呢?代码如下 我想用登录界面的注册按钮跳转到注册页面,只是简单的跳转到应有界面,不需要实现按钮等功能
这个是登录界面:import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
import android.content.Intent;
import android.view.View;;
public class MainActivity extends AppCompatActivity {
TextView register;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate ( savedInstanceState );
setContentView ( R.layout.activity_main );
register = (TextView) findViewById ( R.id.user_register_button );
register.setOnClickListener ( new View.OnClickListener () {
@Override
public void onClick(View v) {
Intent intent = new Intent ();
intent.setClass ( MainActivity.this, zhuceActivity.class );
startActivity ( intent );
}
} );
}
}
注册界面:import android.app.Activity;
/**
* Created by ** on 2017/5/8.
*/
public class zhuceActivity extends Activity {
}
AndroidManifest.xml函数实现
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".zhuceActivity"></activity>
</application>
是否是注册界面需要实现什么功能呢?求大神帮忙啊 初学者