This file contains hidden or 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
// assuming provider is inside Hilt-Android Module | |
@InstallIn(SingletonComponent::class) | |
@Module | |
class NetworkModule { | |
... | |
@Provides | |
@Singleton | |
fun providesOkHttpClient( | |
@ApplicationContext context: Context |
This file contains hidden or 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
# | |
# EXAMPLE OF MULTISTAGE BUILD FOR MONOREPOS | |
# | |
# @link https://github.com/belgattitude/nextjs-monorepo-example | |
# | |
################################################################### | |
# Stage 1: Install all workspaces (dev)dependencies # | |
# and generates node_modules folder(s) # | |
# ----------------------------------------------------------------# |
This file contains hidden or 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
inline fun <reified T : Fragment> launchFragmentInHiltContainer( | |
fragmentArgs: Bundle? = null, | |
@StyleRes themeResId: Int = R.style.Theme_GithubRepo, | |
fragmentFactory: FragmentFactory? = null, | |
crossinline action: Fragment.() -> Unit = {} | |
) { | |
val startActivityIntent = Intent.makeMainActivity( | |
ComponentName( | |
ApplicationProvider.getApplicationContext(), | |
HiltTestActivity::class.java |
This file contains hidden or 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
class ShimmerConstraintLayout @JvmOverloads constructor( | |
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 | |
) : ConstraintLayout(context, attrs, defStyleAttr) { | |
@LayoutRes | |
private var layoutRes: Int = 0 | |
@Dimension | |
private var shimmerPaddingStart: Int = 0 | |
@Dimension |