Git Product home page Git Product logo

hoo's Introduction

Hi,我是九心

Anurag's GitHub stats

在哪里找到我:

掘金 公众号 简书
点我 九心说 点我

关于我:

  • 🙋🏻 Android 程序员,懂一点 Android Jetpack \ Flutter
  • 🏀 运动爱好者,游戏爱好者
  • 📫 [email protected]

技能点

Android Flutter Jenkins JavaScript Vue.js

最近更新:

我的作品

Above are the last 3 pictures posted by @jiuxin98!

hoo's People

Contributors

mcyp avatar wwcyp avatar yujinyan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hoo's Issues

java.lang.IllegalStateException: Required DataBindingComponent is null in class FragmentLoginBindingImpl. A BindingAdapter in com.joe.jetpackdemo.viewmodel.LoginModel is not static and requires an object to use, retrieved from the DataBindingComponent. If you don't use an inflation method taking a DataBindingComponent, use DataBindingUtil.setDefaultComponent or make all BindingAdapter methods static.

如题所示,出现了这个问题。
运行程序,点击“Have a account? Login”这个按钮,就报错闪退了。

优化 Paging 3 的使用

  1. 直接在主线程 collect flow,避免 viewModel.viewModelScope.launch(Dispatchers.IO)
    • 可能造成内存泄漏
    • 违背协程设计理念(对用户侧代码屏蔽线程切换)
  2. ShopModel 使用 StateFlow 记录用户选择的 brand
  3. 考虑用 Room 对协程的支持,在 dao 方法上加 suspend,让 Room 处理线程切换问题

新版本studio

Could not resolve all dependencies for configuration ':classpath'.

Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven(http://maven.aliyun.com/nexus/content/groups/public/)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.0.2/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.

建议移除 repository 层

注意到项目中的 ShoeRepository 几乎都是直接调用 dao,没有提供其他有用的价值,不如直接在 view model 使用 dao 更加方便维护。

有些 Repository 方法 withContext 做了线程切换操作,这个在 repository 做是合理的,但是 Room 原生也已经支持 suspend 方法了。

有篇相关的文章:
https://proandroiddev.com/anemic-repositories-mvi-and-rxjava-induced-design-damage-and-how-aac-viewmodel-is-silently-1762caa70e13

怎么用?

点进去没有任何按钮可以点击有效果的,就一个空界面

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.