我想计算导航栏高度。我看过这个演讲:https : //chris.banes.me/talks/2017/becoming-a-master-window-fitter-nyc/
所以,我尝试使用方法View.setOnApplyWindowInsetsListener()。但是,出于某种原因,它从未被调用过。
有谁知道为什么?有什么限制吗?
我试过这样使用它:
navBarOverlay.setOnApplyWindowInsetsListener { v, insets ->
Timber.i("BOTTOM = ${insets.systemWindowInsetBottom}")
return@setOnApplyWindowInsetsListener insets
}
Run Code Online (Sandbox Code Playgroud)
请注意,我的根布局是一个ConstraintLayout.
有时; 当我执行DELETE时; 它不起作用.
我的配置:[cqlsh 5.0.1 | Cassandra 3.0.3 | CQL规范3.4.0 | 原生协议v4]
cqlsh:my_db> SELECT * FROM conversations WHERE user_id=120 AND conversation_id=2 AND peer_type=1;
user_id | conversation_id | peer_type | message_map
---------+-----------------+-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
120 | 2 | 1 | {0: {real_id: 68438, date: 1455453523, sent: True}, 1: {real_id: 68437, date: 1455453520, sent: True}, 2: {real_id: 68436, date: 1455453517, sent: True}, 3: {real_id: 68435, date: 1455453501, sent: True}, 4: {real_id: 68434, date: 1455453500, sent: True}, 5: {real_id: 68433, date: 1455453499, sent: True}, 6: …Run Code Online (Sandbox Code Playgroud) 我想学习如何为iOS设备开发,但我没有Mac,因此我使用VMWare虚拟化OS X.
我刚刚开始使用Objective-C,所以我只用一个按钮做了一个简单的视图.我将我的第一个项目构建到模拟器中,这很好,但我想用我的iPod进行开发.
我知道这个问题已在其他主题中修复,但我遇到了问题.我的硬盘根目录下没有任何名为"Developer"的文件夹(所以我不能做"cd/Developer /"......)
这怎么可能?如果我的问题很愚蠢,我很抱歉,但我真的是Mac环境中的初学者.