-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from AlanCheen/feature/managers
Feature/managers
- Loading branch information
Showing
18 changed files
with
155 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
flap/src/main/java/me/yifeiyuan/flap/delegate/AdapterDelegateManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package me.yifeiyuan.flap.delegate | ||
|
||
/** | ||
* Created by 程序亦非猿 on 2022/9/5. | ||
* | ||
* @since 3.1.0 | ||
*/ | ||
class AdapterDelegateManager :IAdapterDelegateManager{ | ||
override val adapterDelegates: MutableList<AdapterDelegate<*, *>> = mutableListOf() | ||
} |
29 changes: 29 additions & 0 deletions
29
flap/src/main/java/me/yifeiyuan/flap/delegate/IAdapterDelegateManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package me.yifeiyuan.flap.delegate | ||
|
||
import androidx.annotation.NonNull | ||
|
||
/** | ||
* Created by 程序亦非猿 on 2022/9/5. | ||
* | ||
* @since 3.1.0 | ||
*/ | ||
interface IAdapterDelegateManager { | ||
|
||
val adapterDelegates: MutableList<AdapterDelegate<*,*>> | ||
|
||
fun registerAdapterDelegate(@NonNull adapterDelegate: AdapterDelegate<*,*>){ | ||
this.adapterDelegates.add(adapterDelegate) | ||
} | ||
|
||
fun registerAdapterDelegates(vararg adapterDelegates: AdapterDelegate<*, *>){ | ||
this.adapterDelegates.addAll(adapterDelegates) | ||
} | ||
|
||
fun unregisterAdapterDelegate(@NonNull adapterDelegate: AdapterDelegate<*,*>){ | ||
this.adapterDelegates.remove(adapterDelegate) | ||
} | ||
|
||
fun clearAdapterDelegates(){ | ||
adapterDelegates.clear() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@file:Suppress("unused") | ||
|
||
package me.yifeiyuan.flap.dsl | ||
|
||
import me.yifeiyuan.flap.Component | ||
|
Oops, something went wrong.