页面跳转,用Intent

Button button=(Button)findViewById(R.id.btId);

button.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
Intent nextPageIntent=new Intent();
nextPageIntent.setClass(MainActivity.this, TestActivity.class);
startActivity(nextPageIntent);
}

}) ;

注册Activity:

            android:name="com.example.hellotest.TestActivity"
            android:label="@string/test">
       

更多相关文章

  1. 【Android】Android android:launchMode=“singleInstance” 页
  2. Android android:launchMode=“singleInstance” 页面跳转黑屏
  3. Android Button按钮两个页面切换
  4. android屏幕页面实现滚动,页面跳…
  5. vue.js的h5页面与android(WebViewJavascriptBridge) / ios(windo
  6. android linearlayout 把控件view置底部(放在页面最下方)
  7. android 页面显示不下时怎么办?

随机推荐

  1. Android ViewPager多页面滑动切换以及单
  2. 关于ADT(eclipse android)项目迁移到Androi
  3. Android O新特性系列
  4. xmlns:android和xmlns:mi
  5. android实现通知栏下载更新app示例
  6. Android实现语音识别代码
  7. Android中 获取手机通讯录和手机机主手机
  8. [连载 4/15] Android 从入门到精通Exampl
  9. 疯狂android讲义---intent-filter
  10. Android踩坑日记:自定义水平和圆形Progres