Github_Kotlin
Github_Kotlin
改用kotlin就可以了,现在好像不兼容java了
重写: ``` class XBaseViewHolder(view: View) : BaseViewHolder(view) { fun getItemPosition(): Int { return layoutPosition } fun getItemViewsType(): Int { return itemViewType } } ```
viewpager 嵌套的fragment 超出一屏高度,支持上下滑动吗?
...自己添加点击事件~~~无语
我发现实际上是usbFile.listFiles() 这个方法很慢,不清楚为什么?
` @Throws(IOException::class) fun refresh() { dialog.setMessage("loading...") dialog.show() CoroutineScope(Dispatchers.IO).launch { Log.d(MainActivity.TAG,"开是检索文件") val usbFiles = currentDir.listFiles() files = listOf(*usbFiles) Log.d(MainActivity.TAG,"文件检索完成 files.size = ${files.size} ${usbFiles.contentToString()}") Collections.sort(files, comparator) withContext(Dispatchers.Main) { notifyDataSetChanged() dialog.dismiss() } }...
39秒才执行完 currentDir.listFiles() 是不是太慢了?
直接使用不行,需要改动不少地方,有需要联系QQ2676014118
已解决Apk测试: 链接: [https://pan.baidu.com/s/15Bd7b9ggxfXxAl2-J4nqmQ?pwd=4ap6 ](https://pan.baidu.com/s/15Bd7b9ggxfXxAl2-J4nqmQ?pwd=4ap6)提取码: 4ap6
> 找了一个解决办法,在PtpCamera#onSessionOpened 中: 加上queue.add(new SetDevicePropValueCommand(this, 0xD1F0, 1, uint8)); 这样可以在连接的同时打开预览和回放,但无法主动获取相片; 目前的解决方法是在获取相片处(即PtpCamera#retrieveStorages() 和 retrieveImageHandles()),调用queue.add(new SetDevicePropValueCommand(this, 0xD1F0, 0 uint8),获取完成后再调用queue.add(new SetDevicePropValueCommand(this, 0xD1F0, 1, uint8); > > 以上仅在三星s9+ Android 10,Nikon D7000上测试通过 我试过了尼康Z6不行