Giter Site home page Giter Site logo

jetpack-missionary / jetpack-from-java-to-kotlin Goto Github PK

View Code? Open in Web Editor NEW
419.0 5.0 54.0 1.42 MB

本项目专注于提供 Jetpack 核心组件 Java vs Kotlin 1:1 对照示例 —— This project focuses on providing comparative examples of the core components of Jetpack from Java to Kotlin.

License: GNU General Public License v3.0

Java 75.56% HTML 14.08% Kotlin 10.36%
jetpack kotlin java android navigation databinding livedata jetpack-navigation jetpack-android jetpack-lifecycle-components

jetpack-from-java-to-kotlin's Issues

发布动态选择定位那里点击选择后返回闪退

java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionViewHolder{5d146ff position=0 id=-1, oldPos=0, pLpos:-1 scrap [attachedScrap] tmpDetached no parent} androidx.recyclerview.widget.RecyclerView{b308500 VFED..... .F....ID 0,160-720,1344 #7f08012a app:id/rv}, adapter:com.kunminx.jetpack_java.common_ui.adapter.LocationAdapter@a2ed139, layout:androidx.recyclerview.widget.LinearLayoutManager@4c4a37e, context:com.kunminx.jetpack_java.sample_01_lifecycles.ui.LifecycleLocationActivity@bdb7196

Overload resolution ambiguity

Kotlin 1.3.71 build error ,msg Overload resolution ambiguity

  public open fun containsKey(key: ViewModelStore): Boolean defined in java.util.HashMap
  public open fun containsKey(key: ViewModelStore!): Boolean defined in java.util.HashMap

fun getContentIfNotHandled(viewModelStore: ViewModelStore): T? {
return if (map.containsKey(viewModelStore)) {

Here's a solution

return if (map.contains(viewModelStore)) {

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.