kotlin

Android开发12年的我跳槽为何如此困难!最终靠着这份Android学习资料,成功拿下阿里P8

佐手、 提交于 2020-08-11 01:28:24
前言 刚毕业参加工作那会儿,很多人辞职都可以跟着感觉走,一言不合可能就会走人。 可是随着工作年限增加,事情很快发生了变化,就算日常工作非常压抑的情况下,也很少辞职了,辞职似乎变得很艰难了。 为什么? 我找到5点原因,分享出来,看看是不是和你想的一样。 1. 刚毕业时,精力旺盛,学习力强,觉得自己什么都可以快速学会,即便进入新领域,更换专业能力,也能很快学会新技能,融入新环境,所以更有尝试的意愿和底气。 工作几年后,精力衰退,学习力下降,觉得上了年纪还要学习新技能,融入陌生环境,被不知道什么人的人评价,压力很大,所以轻易不愿意尝试。 2. 刚毕业时,还处在职业探索期,年龄小,心理上天然就觉得自己这个阶段应该尝试各种可能性。 工作几年后,进入安稳期,觉得自己应该安定下来了,心理上就会谨慎,不愿意随随便便尝试。 3. 刚毕业,往往单身,或者有恋爱对象但也没有谈婚论嫁,没什么家庭负担,父母也还年轻不需要依赖你照顾,所以这个时候辞职,家庭系统方面没什么阻力,一个人下定决心就可以了,更容易落实到行动上。 工作几年后,成家了,背上了房贷、车贷,有的还有了孩子,家庭生活开支陡增,有的父母年龄大了,需要赡养……各种压力不期而至,难以躲避,辞职时顾虑很多,家庭系统给你的阻力很大,万一找不到更好的工作呢,万一空窗几个月呢……手停口停哇,后果不敢想象,所以辞职就成了很纠结的事。 4. 刚毕业时

android - getString causes error getting from strings.xml

拥有回忆 提交于 2020-08-10 23:13:25
问题 Im currently working on an app which has a RecyclerView for the Settings Menu. My objective is to use strings saved in strings.xml for the RecyclerView, because my app has localization; In my case, i generate the RecyclerView with a list saved in the fragment, which needs strings from string.xml, however, trying to call strings from the xml dosnt work. How do you pass strings from string.xml as parameters? How can i pass im this scenario? frgSettingsMain.kt class frgSettingsMain : Fragment()

android - getString causes error getting from strings.xml

半世苍凉 提交于 2020-08-10 23:09:05
问题 Im currently working on an app which has a RecyclerView for the Settings Menu. My objective is to use strings saved in strings.xml for the RecyclerView, because my app has localization; In my case, i generate the RecyclerView with a list saved in the fragment, which needs strings from string.xml, however, trying to call strings from the xml dosnt work. How do you pass strings from string.xml as parameters? How can i pass im this scenario? frgSettingsMain.kt class frgSettingsMain : Fragment()

How to use a simple onscroll listener on a recyclerview that is inside a fragment

独自空忆成欢 提交于 2020-08-10 20:29:25
问题 Ive been looking all over the internet and cant find the answer that works for me. I am trying to create a fragment with an infinite scroller (just like on social network apps like twitter, facebook, instagram, tumblr etc ) and research suggests that a recycler view is the best way. This image show you how i have done it. File -> new -> Fragment -> Fragment (List) If I'm correct, the next step now is to create an on scroll listener so that i know when the user has scrolled to the bottom as

Saving and retrieving nested objects in Room database

烂漫一生 提交于 2020-08-10 20:23:31
问题 I want to save nested objects from API response into Room database so that I can retrieve them quickly next time the app is launched. The structure is the following, A root object that has fields which are themselves objects and contains some list of other objects, however all end up sharing same final object. How can I save the whole data into Room and be able to retrieve them back? Here's how it looks like: 1.Top most class: @Parcelize data class HomeResponse( @field:SerializedName("video")

Saving and retrieving nested objects in Room database

帅比萌擦擦* 提交于 2020-08-10 20:22:03
问题 I want to save nested objects from API response into Room database so that I can retrieve them quickly next time the app is launched. The structure is the following, A root object that has fields which are themselves objects and contains some list of other objects, however all end up sharing same final object. How can I save the whole data into Room and be able to retrieve them back? Here's how it looks like: 1.Top most class: @Parcelize data class HomeResponse( @field:SerializedName("video")

gradle kotlin DSL extendsfrom

橙三吉。 提交于 2020-08-10 20:13:27
问题 How can I reformulate: testCompile.extendsFrom compileOnly of the Gradle Groovy DSL to its Kotlin-based equivalent? configurations { testCompile{ extendsFrom(compileOnly) } } My approach above fails. 回答1: configurations { testCompile { extendsFrom(configurations.compileOnly.get()) } } https://github.com/spring-projects/spring-boot/issues/16251 来源: https://stackoverflow.com/questions/62452133/gradle-kotlin-dsl-extendsfrom

Springboot集成flowable modeler 免登录,并且查询用户/用户组改为自己系统数据

时光总嘲笑我的痴心妄想 提交于 2020-08-10 19:55:55
之前画流程图都是用tomcat启动flowable modeler,但是这样启动就不能在分配任务用户/用户组的时候查询自己系统里的数据。所以现在需要把flowable modeler集成到项目里来。 之前自己也搜索了很多文章,都感觉不是很清晰,可能也是因为我刚接触不久。现在自己集成好了之后,记录一下自己学习的结果。 首先需要创建一个springboot应用,pom文件中引入相关jar包: <properties> <java.version>1.8</java.version> <flowable.version>6.4.1</flowable.version> <lombok.version>1.18.0</lombok.version> <fastjson.version>1.2.9</fastjson.version> </properties> < dependencyManagement > < dependencies > < dependency > < groupId > org.springframework.boot </ groupId > < artifactId > spring-boot-dependencies </ artifactId > < type > pom </ type > < scope > import </ scope > </

Connect android device to python project via socket

断了今生、忘了曾经 提交于 2020-08-10 19:44:49
问题 BufferedReader.readline not works, I am trying to connect Android devices to the Server, Server side programming language is Python. server.py LENGTH = 1024 PORT = 1234 time.sleep(1) s = socket.socket() host = socket.gethostname() ip = socket.gethostbyname(host) s.bind((host, PORT)) # name = input(str("Enter your name: ")) name = "Admin" s.listen(1) print("\nWaiting for incoming connections...\n") conn, addr = s.accept() print("Received connection from ", addr[0], "(", addr[1], ")\n") s_name

Connect android device to python project via socket

本秂侑毒 提交于 2020-08-10 19:44:24
问题 BufferedReader.readline not works, I am trying to connect Android devices to the Server, Server side programming language is Python. server.py LENGTH = 1024 PORT = 1234 time.sleep(1) s = socket.socket() host = socket.gethostname() ip = socket.gethostbyname(host) s.bind((host, PORT)) # name = input(str("Enter your name: ")) name = "Admin" s.listen(1) print("\nWaiting for incoming connections...\n") conn, addr = s.accept() print("Received connection from ", addr[0], "(", addr[1], ")\n") s_name