E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
putString
【面试题】Activity状态保存与恢复
OverrideprotectedvoidonSaveInstanceState(BundleoutState){super.onSaveInstanceState(outState);outState.
putString
毕加森
·
2018-08-31 17:16
android中activity和fragment中的传值
①第一种方法传值的activity:infoFragmentinfoFragment=newinfoFragment();Bundlebundle=newBundle();bundle.
putString
笨鸟可以先飞呀
·
2018-08-03 15:11
android
Android day_3 (登录案例 SharedPreferences 的使用)
SharedPreferencessp=getSharedPreferences("sp",0);存入数据://获取sp的编辑器SharedPreferences.Editoredit=sp.edit();edit.
putString
Depths_t
·
2018-07-22 19:03
Android
SharePreference为什么不适合存储大容量数据
看源码:valsp=getSharedPreferences("zhen",Context.MODE_PRIVATE)valeditor=sp.edit()editor.
putString
("key",
z真真
·
2018-06-17 16:06
android
基础
intent和handler的理解和使用
(3)intent传递参数的方式:(intent.
putString
("key","value")、inte
划船不用桨一生全靠浪
·
2018-04-26 14:33
Android
Bundle,Message,Handle用法解析
Bundle是一个载体,可以存放基本数据类型、对象等内容,相当于一辆汽车,可以装载很多东西,然后运到需要的地方,BundlemBundle=newBundle();//创建Bundle实例mBundle.
putString
流水荷花
·
2018-02-18 23:03
Android
Android 使用SharePreferences保存List集合,保存List集合到本地
compile'com.google.code.gson:gson:2.8.1'保存List集合Listlist=newArrayList();Gsongson=newGson();Stringdata=gson.toJson(list);sp.
putString
BillyZuo
·
2018-01-31 09:56
Android 使用SharePreferences保存List集合,保存List集合到本地
compile'com.google.code.gson:gson:2.8.1'保存List集合Listlist=newArrayList();Gsongson=newGson();Stringdata=gson.toJson(list);sp.
putString
BillyZuo
·
2018-01-31 09:56
Activity A与Activity B实现传值
ActivityA与ActivityB之间如何进行数据传递ActivityABundlebundle=newBundle();bundle.
putString
("voiceString",voiceString.toString
monkey0928
·
2018-01-11 11:37
Fragment与Activity之间的通信
//举例//Activity中Fragmentfm=newFragment();Bundlebundle=newBundle();bundle.
putString
("hello",hello);f
YbSTGing
·
2017-12-12 23:11
Android本地存储
this.getSharedPreferences("LoginInfor",MODE_PRIVATE);SharedPreferences.Editoreditor=preferences.edit();editor.
putString
怒放的狗尾巴花
·
2017-11-17 16:53
Fragment 与 Activity/Fragment 的数据传递
Bundleargs=newBundle();args.
putString
("name",name);BaseFragmentfragment=newCollectionFragment();fragment.setArguments
YbSTGing
·
2017-09-18 14:54
Android中Activity和Fragment传递数据的两种方式
、第一种方式,也是最常用的方式,就是使用Bundle来传递参数MyFragmentmyFragment=newMyFragment();Bundlebundle=newBundle();bundle.
putString
Gimi丶
·
2017-09-04 14:25
详解Android中的SharedPreferences
;3.使用简单.使用方法1、存数据SharedPreferencessp=getSharedPreferences("sp_demo",Context.MODE_PRIVATE);sp.edit().
putString
a15838319826
·
2017-05-26 10:26
Activity之间传递数据
1.通过intent传递数据1.activity1Bundlebundle=newBundle();bundle.
putString
("id",id);bundle.
putString
("type",type
Eburs
·
2017-05-01 20:23
ANDROID基础学习
(转)Activity和Fragment传递数据的两种方式
、第一种方式,也是最常用的方式,就是使用Bundle来传递参数MyFragmentmyFragment=newMyFragment();Bundlebundle=newBundle();bundle.
putString
ElvisDu
·
2017-04-03 20:28
Android基础
Activity与Fragment如何通信
核心:发送数据://Activity传值,通过BundleBundlebundle=newBundle();bundle.
putString
("MainAct
Kiven_Android
·
2017-02-14 16:13
项目总结
Fragment与Activity的交互
toString();//如上,从EditText控件中取出内容转为String对象并赋值给text;Fragment1fr=newFragment1();Bundlebun=newBundle();bun.
putString
Coutel
·
2017-01-17 15:40
Android
Adnroid源码学习笔记:Handler 线程间通讯
;//子线程:Messagemessage=newMessage();message.arg1=1;Bundlebundle=newBundle();bundle.
putString
("test"
扬州慢_
·
2017-01-15 14:14
Activity和Intent相关笔记
Intent.putExtras)Intentit=newIntent(Activity.Main.this,Activity2.class);Bundlebundle=newBundle();bundle.
putString
·
2016-10-26 00:00
android studio自动登录的问题
SpUtils.
putString
(Constants.SP_USERNAME,mNumber);//引用-SpUtils类中的
putString
方法SpUtils.
putString
Zeng_Lei
·
2016-10-23 17:29
SharedPreferences 源码分析
getSharedPreferences("name",Context.MODE_PRIVATE); SharedPreferences.Editoreditor=preferences.edit(); editor.
putString
yxhuang2008
·
2016-07-10 19:00
android
android
源码分析
android Activity和fragment通信之activity向Fragment发送数据
editText.getText().toString();MyFragment5fragment5=newMyFragment5();Bundlebundle=newBundle();bundle.
putString
ITzhongzi
·
2016-07-04 15:40
Android学习笔记
广播中的消息传递给activity
1.发送广播Intentintent=newIntent(BroadcastAction);Bundlebundle=newBundle();bundle.
putString
("***",SUCCESS
xiejunna
·
2016-06-08 14:00
Mina IoBuffer的特性介绍
Mina不直接使用NIOByteBuffer,有两个原因:它不提供有用的getters和putters方法,如fill/
putString
,get/putAsciiInt()。
boonya
·
2016-06-07 11:25
Mina
Apache
Mina
Activity和Fragment传递数据的两种方式
第一种方式,也是最常用的方式,就是使用Bundle来传递参数MyFragmentmyFragment=newMyFragment(); Bundlebundle=newBundle(); bundle.
putString
b10060224
·
2016-05-05 19:00
[置顶] Android开发值利用Intent进行put传值,setclass启动activity,并用get进行取值
传值方法一 [java] Intentintent=newIntent(); Bundlebundle=newBundle();//该类用作携带数据 bundle.
putString
("name","tom
qq_21376985
·
2016-04-26 14:00
java
android
Android开发
androidstudio
android桌面快捷方式跳转到指定activity
Intentintent=newIntent("*.intent.action.SHORTCUT"); Bundlebundle=newBundle(); //能够依据传递參数运行对应操作 bundle.
putString
yxwkaifa
·
2016-04-23 21:00
第五天:Bundle数据传递、StartActivityForResult传值
MainActivity.this,secondActivity.class); Bundle bundle=new Bundle(); //传递基本数据类型 bundle.putInt("age",23); bundle.
putString
火文乐武
·
2016-04-23 15:00
[转] Intent传值和 Bundle传值的区别
相对于Map,它提供了各种常用类型的putXxx()/getXxx()方法,如:
putString
()/getString()和putInt()/getInt(),putXxx()用于往Bundle对象放入数据
Bracer_Guild
·
2016-04-18 19:00
android
学习笔记
Activity之间使用Intent和Bundle传值的区别
相对于Map,它提供了各种常用类型的putXxx()/getXxx()方法,如:
putString
()/getString()和putInt()/getInt(),putXxx()用于往Bundle对象放入数据
guangmomo
·
2016-04-06 21:00
android
intent
为Intent附加数据的两种写法
附加数据的两种写法:第一种写法,用于批量添加数据到Intent:Intentintent=newIntent(); Bundlebundle=newBundle();//该类用作携带数据 bundle.
putString
YOYO__yy
·
2016-04-03 23:00
Android SharedPreferences
getSharedPreferences("you_app_name",MODE_PRIVATE); SharedPreferences.Editoreditor=sharedPreferences.edit(); editor.
putString
YYecust
·
2016-03-30 23:00
阅读《Android 从入门到精通》(32)——Bundle
内通过消息传递额外信息代码Messagemsg=newMessage(); Bundlebundle=newBundle(); msg.what=MSG_DISPLAY_AUDIO;//自定义消息 bundle.
putString
SweetLoveFT
·
2016-03-17 15:00
android
Android 数据传递(一) Activity之间的数据传递
他的用法如下://新建Bundle,将数据放入bundle类里面 BundlemBundle=newBundle(); mBundle.
putString
("flag","1"); //新建一个i
byhieg
·
2016-03-11 21:00
Activity之间的数据交互
Activity之间的数据交互,四种主要方式: *1、intent.putExtra("name","王三"); *2、bundle.
putString
("name","李四");intent.putExtras
lvyoujt
·
2016-03-05 22:00
[android] sharedPreference入门
调用sp对象的edit()方法,得到Editor编辑器对象调用Editor对象的
putString
(key,value)方
陶士涵
·
2016-03-02 21:00
Activity间传递数据
1.从当前的Activity传递数据到下一个Activity:(1)发送方(当前的Activity): Bundlebundle=newBundle();bundle.
putString
("name"
(•̀ω•́)y
·
2016-02-26 19:00
[Android] how to get facebook profile
Bundleparams=newBundle(); params.
putString
("fields","id,email,gender,cover,picture.type(large)"); newGraphRequest
LittleEyes
·
2016-02-19 15:00
为什么使用Fragment Arguments
this.content=content;}方法二:publicstaticSecondFragmentnewInstance(Stringcontent){Bundleargs=newBundle();args.
putString
cppalien
·
2016-02-19 14:36
Android那些事儿
子线程更新UI(非Handle)
Onlytheoriginalthreadthatcreatedaviewhierarchycantouchitsviews.翻译:子线程不可以去更新UI的主线程方法一:使用Handlehandle发送Bundle bun = new Bundle(); Message msg = new Message(); bun.
putString
LifeDemo
·
2016-02-03 17:00
thread
线程
主线程
子线程
子线程更新Ui
Android之SharedPreferences详解与原理分析
3.使用简单.使用方法1、存数据SharedPreferencessp=getSharedPreferences("sp_demo",Context.MODE_PRIVATE); sp.edit().
putString
lyl278401555
·
2016-01-30 11:00
android
数据
存储
数据无法存储
Android之SharedPreferences详解与原理分析
应用内数据共享;使用简单.使用方法1、存数据SharedPreferencessp=getSharedPreferences("sp_demo",Context.MODE_PRIVATE);sp.edit().
putString
农夫三拳_
·
2016-01-30 11:00
Android
Bundle的说明和用法
相对于Map,它提供了各种常用类型的putXxx()/getXxx()方法,如:
putString
()/getString()和putInt()/getInt(),putXxx()用于往Bundle对象放入数据
iblade
·
2016-01-05 18:00
android
Bundle
intent传值
Bundle的使用方法
Bundle是一个特殊的map它的键类型固定为String值的类型也只有几个发送数据:Bundlebundle=newBundle();bundle.
putString
("sex","男人");bundle.putDouble
Gaturae
·
2015-12-23 09:38
sharedoreference
this.getSharedPreferences("config",0);//文件名不要后缀,系统会自动加上xml后缀,0表示私有模式3.获取sp的编辑器Editoreditor=sp.edit();4.存储数据editor.
putString
曾颐楠
·
2015-12-10 11:33
Activity最佳的实践
使用onSaveInstanceState()回调方法,解决数据保存的问题onSaveInstanceState()方法中携带了一个Bundle类型的参数,可以通过
putString
hifn123p
·
2015-11-14 14:13
Android
Activity缓存方法
方法中有一个Bundle参数,
putString
()、put
rabbit_in_android
·
2015-11-14 10:00
【Android】Intent中使用Extra传递数据
传值方法一 Intent intent = new Intent(); Bundle bundle = new Bundle(); //该类用作携带数据 bundle.
putString
·
2015-11-13 12:52
android
使用Bundle在Activity间传递数据
Intent openWelcomeActivityIntent=new Intent(); Bundle myBundelForName=new Bundle(); myBundelForName.
putString
·
2015-11-11 16:26
Activity
上一页
1
2
3
4
5
6
7
8
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他