Coder Social home page Coder Social logo

xiangang / androiddevelopmentpractices Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 2.0 110.98 MB

Android开发实践专栏代码仓库

Home Page: https://www.yuque.com/nongxiangang/androidsample

License: GNU General Public License v3.0

Java 7.40% AIDL 0.02% Kotlin 13.47% CMake 0.91% C++ 53.95% Groovy 0.01% Shell 0.01% C 23.97% Makefile 0.04% Roff 0.10% HTML 0.12%
aidl android asm gradle-plugin jetpack-compose

androiddevelopmentpractices's Issues

飞机大战项目中退出按钮没有判断状态

box中倒是有一个 (gameState == GameState.Over) 的判断,设成透明了,但是这样在非over的state下点击退出按钮所在的位置(此时按钮alpha为0,看不见,但是点击事件能相应),就可以直接退出了,当时无意间点了一下,直接退出了,还以为是崩溃,有点懵逼..
不过以上不是重点,我觉得只是作者疏忽了,我真正想请教的是,当我把退出按钮的 onClick 改为 onClick = { if (gameState == GameState.Over) gameAction.exit },居然点击没有反应,emm.. 不能说没有反应,准确说,应该是 gameAction.exit 函数执行没有效果,然后我试了一下,与前面的 if 判断没有关系,只要是 onClick 的内容用大括号括起来,它的执行就没有效果,让我有点费解。对 Flow 的了解不深,希望您能解答一下,感谢。

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.