startActivityForResult()startActivity之间的差异() [英] difference between startActivityForResult() startActivity()

查看:80
本文介绍了startActivityForResult()startActivity之间的差异()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个新鲜的学习机器人之家。当我读到startActivityForResult()startActivity()方法,我困惑与方法,其中地方使用。所以好心的人的细节很清楚。

I am a fresher learning Android from home. When I read startActivityForResult() startActivity() methods i confused with which method to be used in which place. so kindly anyone detail it clearly.

推荐答案

开始活动,就像你启动应用程序:比如:你有一个主屏和用户信息界面的应用程序:如果您preSS用户信息按钮,启动用户自信息活动与此有关。

startActivity

Start an activity, like you would start an application: for instance: you have an app with a home-screen and a user-info screen: if you press the user-info button, you start the user-info activity with this.

开始活动,并期望有所回报。例如,你的用户信息屏上,你可以上传个人资料图片。开始时你有明确的目标,获得一个URI回来的preferred图片画廊活动。你开始这个活动literaly以获得结果(图片。有一些techinical的方式,以确保你真正得到的结果,但他们在手册中很清楚的。

Start an activity and expect something in return. For instance, on your user-info screen, you can upload a profile picture. You start the gallery-activity with the explicit goal to get a URI back with the preferred picture. You start this activity literaly to obtain a result (the picture. There are some techinical ways to make sure you actually get the result, but they are quite clear in the manual.

这篇关于startActivityForResult()startActivity之间的差异()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆