startActivityForResult()startActivity之间的差异()差异、startActivityForResult、startActivity

2023-09-12 04:56:43 作者:书桌上刻着的青春

我是一个新鲜的学习机器人之家。当我读到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.

 
精彩推荐
图片推荐