Twidere-App-Android-Twitter.../twidere/src/main/kotlin/org/mariotaku/twidere/util/MapFragmentFactory.kt

41 lines
1.2 KiB
Kotlin
Raw Normal View History

2015-04-27 15:41:19 +02:00
/*
* Twidere - Twitter client for Android
*
* Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2016-07-06 15:21:34 +02:00
package org.mariotaku.twidere.util
2015-04-27 15:41:19 +02:00
2016-07-06 15:21:34 +02:00
import android.content.Context
2020-01-26 08:35:15 +01:00
import androidx.fragment.app.Fragment
2016-12-15 06:11:32 +01:00
import java.util.*
2015-04-27 15:41:19 +02:00
/**
* Created by mariotaku on 15/4/27.
*/
2016-07-06 15:21:34 +02:00
abstract class MapFragmentFactory {
2015-04-27 15:41:19 +02:00
2016-08-25 04:10:53 +02:00
abstract fun createMapFragment(context: Context): Fragment
2015-04-27 15:41:19 +02:00
2016-07-06 15:21:34 +02:00
companion object {
2016-12-15 13:15:58 +01:00
val instance: MapFragmentFactory by lazy {
ServiceLoader.load(MapFragmentFactory::class.java).first()
}
2016-07-06 15:21:34 +02:00
}
2015-04-27 15:41:19 +02:00
}