fix(photoviewactivity.kt): 修复 Java 无法调用 launch 方法
This commit is contained in:
parent
b02f17d419
commit
fc444e076b
|
@ -288,20 +288,25 @@ class PhotoViewActivity : BaseActivity(), OnChangeBottomBarVisibilityListener, T
|
||||||
const val OBJ_TYPE_THREAD_PAGE = "pb"
|
const val OBJ_TYPE_THREAD_PAGE = "pb"
|
||||||
const val OBJ_TYPE_FORUM_PAGE = "frs"
|
const val OBJ_TYPE_FORUM_PAGE = "frs"
|
||||||
private val handler = Handler()
|
private val handler = Handler()
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
fun launch(context: Context, photoViewBean: PhotoViewBean) {
|
fun launch(context: Context, photoViewBean: PhotoViewBean) {
|
||||||
launch(context, arrayOf(photoViewBean))
|
launch(context, arrayOf(photoViewBean))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
fun launch(context: Context, photoViewBeanList: List<PhotoViewBean>) {
|
fun launch(context: Context, photoViewBeanList: List<PhotoViewBean>) {
|
||||||
launch(context, photoViewBeanList.toTypedArray(), 0)
|
launch(context, photoViewBeanList.toTypedArray(), 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
fun launch(context: Context, photoViewBeanList: List<PhotoViewBean>, position: Int) {
|
fun launch(context: Context, photoViewBeanList: List<PhotoViewBean>, position: Int) {
|
||||||
launch(context, photoViewBeanList.toTypedArray(), position)
|
launch(context, photoViewBeanList.toTypedArray(), position)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
@JvmOverloads
|
@JvmOverloads
|
||||||
fun launch(context: Context, photoViewBeans: Array<PhotoViewBean>?, position: Int = 0) {
|
fun launch(context: Context, photoViewBeans: Array<PhotoViewBean>, position: Int = 0) {
|
||||||
context.startActivity(Intent(context, PhotoViewActivity::class.java)
|
context.startActivity(Intent(context, PhotoViewActivity::class.java)
|
||||||
.putExtra(EXTRA_BEANS, photoViewBeans)
|
.putExtra(EXTRA_BEANS, photoViewBeans)
|
||||||
.putExtra(EXTRA_POSITION, position)
|
.putExtra(EXTRA_POSITION, position)
|
||||||
|
|
Loading…
Reference in New Issue