Skip to content

Instantly share code, notes, and snippets.

@NsAveek
Created March 2, 2019 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NsAveek/fb8239346b9cbfd54966d12ac3f599a7 to your computer and use it in GitHub Desktop.
Save NsAveek/fb8239346b9cbfd54966d12ac3f599a7 to your computer and use it in GitHub Desktop.
A class that contains the Base Context and interfaces for handling the States
class BaseContext(private var state: IBaseState) {
fun getState(): IBaseState {
return state
}
}
interface IBaseState {
fun setPackageExpiryVisibility()
}
interface IState1 : IBaseState {
fun setParams(@DrawableRes icon : Int, hasLimitedPackage : Boolean, totalFeature : Int, consumedFeature : Int , expiry : String)
}
interface IState2 : IBaseState {
fun setParams(@DrawableRes icon : Int, hasLimitedPackage : Boolean, totalFeature : Int, consumedFeature : Int )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment