第一个页面跳转 传递值 
Button bn1=(Button)findViewById(R.id.btn_Login); //跳转
bn1.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View v) {
Intent intent=new Intent(tiaoz.this,nexts.class);
//传值
EditText txt_username=(EditText)findViewById(R.id.edit_username);
EditText txt_password=(EditText)findViewById(R.id.edit_password);

Bundle bundle = new Bundle();
bundle.putString("key_username", txt_username.getText().toString());
bundle.putString("key_password", txt_password.getText().toString());
intent.putExtras(bundle);
startActivity(intent);
finish();
}
});

第二个页面接收值
Bundle bunde = this.getIntent().getExtras();
String strs="用户名:"+bunde.getString("key_username").toString()+"密码:"+bunde.getString("key_password").toString();
//改变文本框的文本内容
show.setText(strs);

android开发如何在页面之间传参的更多相关文章

  1. jsp页面之间传参用el表达式获取

    jsp页面之间传参用el表达式获取 参数方法:${param.参数名} session方法:${session.变量名}

  2. 纯html页面之间传参

    //页面引入//传参方法,可解析url参数 (function($){ $.getUrlParam = function(name) { var reg = new RegExp("(^|& ...

  3. 微信小程序6 - 页面之间传参及通知系统封装

    1. 简单传参 wx.navigateTo({ url: '/pages/demo/index/index?id=1' }) /pages/demo/index/index.js 中 onLoad(o ...

  4. jsp之间传参中文乱码问题

    jsp页面之间传参,传中文会出现乱码问题. 如下: $('.yzjjfa_row').eq(0).append('<a class="yzjjfa_contItem jjfa_acti ...

  5. asp.net页面与页面之间传参数值

    一.利用POST传值 传值asp文件send.aspx  代码如下 复制代码 <form id="form1" runat="server" action ...

  6. action之间传参为中文;type='redirect'和 type='redirectAction'主要区别

    摘录自:http://blog.csdn.net/lhi705/article/details/7446156 Struts2中action之间传参中文乱码的问题 解决方法一(已经验证,可以): 两个 ...

  7. 微信小程序页面返回传参的问题

    比如提交问题,然后需要返回之前页面,由于onLoad只会加载一次,所以不会触发,但是我们页面又需要刷新,那怎么办? 1.onLoad与onShow区别 onLoad:监听页面加载.一个页面只会调用一次 ...

  8. Cookie的格式及组成、页面间传参实例

    做项目需要页面间参数传递,搜索了一下网上的回复,发现可以用cookie解决,借此学习cookie的格式及组成: Cookie由变量名和值组成,类似Javascript变量.其属性里既有标准的Cooki ...

  9. webview与webApp页面交互传参

    参考网址:https://blog.csdn.net/books1958/article/details/44747045 上一篇说了Android集成极光推送获取了RegistrationId推送标 ...

随机推荐

  1. sublime不支持ascill编码办法

    1.按下组合键ctrl+shift+p,输入:install package,回车 2.在弹出的安装包框中搜索:ConvertToUTF8或者GBK Encoding Support,选择点击安装: ...

  2. BZOJ-1563-郁闷的出纳员(权值线段树)

    偏移量要考虑清楚. #include <bits/stdc++.h> using namespace std; const int N=4e5+10; const int BASE=1e5 ...

  3. VS Code的git的使用方法

    上一篇文章中记录了vscode中git的配置过程VS Code中配置git 这篇文章中记录下vscode中git的简单使用 vscode不是一个IDE没有新建工程的方法 我一般是在本地中新建一个工程文 ...

  4. Servlet线程安全问题(转载)

    转载地址:https://www.cnblogs.com/LipeiNet/p/5699944.html 前言:前面说了很多关于Servlet的一些基础知识,这一篇主要说一下关于Servlet的线程安 ...

  5. windows C++ 网络编程

    转载:https://blog.csdn.net/yao_hou/article/details/91400832  https://blog.csdn.net/Ctrl_qun/article/li ...

  6. 图片识别OCR:

    使用Python制作一个简易的OCR图片文字识别工具:键盘上的PrtScr按键+画图工具+百度AI图片识别(账户,调用接口)+python 常见的OCR工具: 1. Microsoft Onenote ...

  7. dfs(迷宫)

    问题 J: 棋盘行走 时间限制: 1 Sec  内存限制: 128 MB[命题人:admin] 题目描述 小Biu在玩一个棋盘游戏,这个游戏给出一个n*m的棋盘,并且每个点上有一个棋子,棋子的颜色 用 ...

  8. php集成环境、基础标记符

    集成环境:wamp windows apache mysql php lamp linux apache mysql php 标记符: 1.<?php ...... ?> 2.<?p ...

  9. leetCode练题——38. Count and Say

    1.题目 38. Count and Say The count-and-say sequence is the sequence of integers with the first five te ...

  10. 最常用的CountDownLatch, CyclicBarrier你知道多少? (Java工程师必会)

    CountdownLatch,CyclicBarrier是非常常用并发工具类,可以说是Java工程师必会技能了.不但在项目实战中经常涉及,而且在编写压测程序,多线程demo也是必不可少,所以掌握它们的 ...