LuckSiege / LuckSiege/PictureSelector
在主Activitity的fragment 中OnResult 方法不回调,在activity中和其他fragment中没问题
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 13.6k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
class HomeLoginFragment : BaseMvvmFragment() {
override fun initView(view: View, savedInstanceState: Bundle?) {
// showLoading()
// LoginServiceProvider.refreshToken(RefreshModel(UserServiceProvider.getUserInfo()?.refreshToken))
mBinding!!.ivMessage.click {
PictureSelector.create(this)
.openCamera(SelectMimeType.ofImage())
.setMaxVideoSelectNum(3)
.forResult(object : OnResultCallbackListener {
override fun onResult(result: ArrayList) {
Log.e(TAG, "onResult:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", )
}
override fun onCancel() {
}
})
}
}
}
在主Activitity的fragment 中OnResult 方法不回调,在activity中和其他fragment中没问题,另外选择相册回调没问题,相册里面拍照也没问题。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue from HomeLoginFragment through PictureSelector.create(this).openCamera(...).forResult, comparing it with the working activity and other-fragment cases mentioned in the report. Trace the OnResultCallbackListener path and fragment lifecycle handling; done means the camera selection invokes onResult from the main activity's fragment while album selection continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100