当前位置:网站首页>How to pass custom object via intent in kotlin
How to pass custom object via intent in kotlin
2022-07-04 08:39:00 【Rich in starch】
problem :
fun launchNextScreen(context: Context, people: People): Intent { val intent = Intent(context, NextScreenActivity::class.java) intent.putExtra(EXTRA_PEOPLE, (Parcelable) people) //intent.putExtra(EXTRA_PEOPLE, people as Parcelable) //intent.putExtra(EXTRA_PEOPLE, people) // tried above all three ways return intent}I tried the above code to pass an instance of the People class via intent using kotlin, but I am getting an error. I try to use the code above kotlin Through intention People Class , But something went wrong .What am I doing wrong? What on earth did I do wrong ?
Solution :
Reference resources : https://stackoom.com/en/question/3DhAL边栏推荐
- Guanghetong's high-performance 4g/5g wireless module solution comprehensively promotes an efficient and low-carbon smart grid
- How to use C language code to realize the addition and subtraction of complex numbers and output structure
- es6总结
- Group programming ladder race - exercise set l2-002 linked list de duplication
- go-zero微服务实战系列(九、极致优化秒杀性能)
- Li Kou today's question -1200 Minimum absolute difference
- 微服务入门:Gateway网关
- DM database password policy and login restriction settings
- AcWing 244. Enigmatic cow (tree array + binary search)
- MySQL relearn 1-centos install mysql5.7
猜你喜欢

Codeforces Round #750 (Div. 2)(A,B,C,D,F1)

Codeforces Global Round 21(A-E)

ES6 summary

Mouse over to change the transparency of web page image

Moher college phpMyAdmin background file contains analysis traceability

C, Numerical Recipes in C, solution of linear algebraic equations, Gauss Jordan elimination method, source code

How does Xiaobai buy a suitable notebook

Basic operations of databases and tables ----- view data tables

Four essential material websites for we media people to help you easily create popular models

AcWing 244. Enigmatic cow (tree array + binary search)
随机推荐
Educational Codeforces Round 115 (Rated for Div. 2)
Newh3c - routing protocol (RIP, OSPF)
SSRF vulnerability exploitation - attack redis
2022 gas examination registration and free gas examination questions
埃氏筛+欧拉筛+区间筛
manjaro安装微信
deno debugger
[go basics] 2 - go basic sentences
DM8 command line installation and database creation
Use preg_ Match extracts the string into the array between: & | people PHP
广和通高性能4G/5G无线模组解决方案全面推动高效、低碳智能电网
@Role of pathvariable annotation
[test de performance] lire jmeter
Example analysis of C # read / write lock
Sort by item from the list within the list - C #
[untitled] 2022 polymerization process analysis and polymerization process simulation examination
DM8 database recovery based on point in time
1. Getting started with QT
AcWing 244. Enigmatic cow (tree array + binary search)
What sparks can applet container technology collide with IOT