小编And*_*ach的帖子

如何在ExpandableListView中获取第一个/最后一个可见组的索引?

如何在ExpandableListView中获取第一个/最后一个可见组的索引?

getFirstVisiblePosition()和getLastVisiblePosition()对于ExpandableListViews几乎没用,因为它们返回列表中第一个/最后一个可见单元格的索引.这有所不同,因为扩展组计为多个单元格.

我需要的是一些方法,如getFirstVisibleGroupIndex(),getLastVisibleGroupIndex()或某些方法将"可见单元索引"值从上面的方法转换为实际组(+子)索引值.

注意:如果在ExpandableListView上设置了侦听器,则OnScrollListener.onScroll(...,int firstVisibleItem,int visibleItemCount,...)会遇到同样的问题.

android

7
推荐指数
2
解决办法
3819
查看次数

How to enable TLSv1.3 for OkHttp 3.12.x on Android 8/9?

I'm using OkHttp 3.12.2 on Android 9 (Pixel 2 device) and try to connect to an nginx 1.14.0 running with OpenSSL 1.1.1. The nginx is capable of TLSv1.3, I verified this with Firefox 66.0.2 on Ubuntu 18.04, Chrome 73.0 on Android 9 and ChromeOS 72.0.

However, OkHttp always negotiates TLSv1.2. I also tried to set a RESTRICTED_TLS ConnectionSpec, but it didn't help.

I did not find a specific instruction on how to get TLSv1.3 working on Android. I know …

android okhttp tls1.3

5
推荐指数
2
解决办法
1043
查看次数

标签 统计

android ×2

okhttp ×1

tls1.3 ×1