Skip to content

Instantly share code, notes, and snippets.

View RhymezxCode's full-sized avatar
🏠
Working Remote

Babajide Awodire Samuel RhymezxCode

🏠
Working Remote
View GitHub Profile
@RhymezxCode
RhymezxCode / .Unlocking the Power of CameraX in Jetpack Compose.md Code snippets for Medium blog post "Unlocking the Power of CameraX in Jetpack Compose"

Code snippets used in the blog post series "Unlocking the Power of CameraX in Jetpack Compose". I will add snippets as blog posts are released!

Each file can be copied as-is to the MainActivity.kt of a new project. However, it doesn't include any library dependencies or adaptations to AndroidManifest.xml, so make sure to follow the steps in the blog posts themselves to get a working sample.

@RhymezxCode
RhymezxCode / HomeActivity.kt
Created January 25, 2025 09:21
Here’s how a specific activity can extend the BaseActivity:
package com.example.app.ui
import com.example.app.base.BaseActivity
class HomeActivity : BaseActivity() {
override fun onNetworkRestored() {
super.onNetworkRestored()
// Custom behavior for network restoration
fetchDataFromServer()
@RhymezxCode
RhymezxCode / BaseActivity.kt
Last active January 25, 2025 09:13
The BaseActivity will serve as a parent class for all your activities. It encapsulates common network-related behavior, reducing redundancy and ensuring consistent behavior across the app.
package com.example.app.base
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.lifecycleScope
import io.github.rhymezxcode.networkstateobserver.network.NetworkObserver
import io.github.rhymezxcode.networkstateobserver.network.NetworkStateObserver
import io.github.rhymezxcode.networkstateobserver.network.Reachability
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.buffer
import kotlinx.coroutines.flow.first
@RhymezxCode
RhymezxCode / RubberBandSlider.kt
Created April 25, 2024 08:07 — forked from KlassenKonstantin/RubberBandSlider.kt
Rubber Band Slider Compose
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, false)
super.onCreate(savedInstanceState)
setContent {
RubberBandSliderTheme {
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) {
Box(contentAlignment = Alignment.Center) {
RubberBandSlider(modifier = Modifier
.height(200.dp)
@RhymezxCode
RhymezxCode / README.md
Last active October 6, 2023 12:58
TrackMe readme file

TrackMe Android Library

TrackMe Android Library least API level TrackMe Android Library on jitpack.io
@RhymezxCode
RhymezxCode / build.gradle
Created October 6, 2023 11:41
TrackMe module ( build.gradle )
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'maven-publish'
}
android {
namespace 'io.github.rhymezxcode.trackme'
compileSdk 33
@RhymezxCode
RhymezxCode / build.gradle
Created October 6, 2023 11:37
TrackMe project ( build.gradle )
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.0.2' apply false
id 'com.android.library' version '8.0.2' apply false
id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
}
@RhymezxCode
RhymezxCode / README.md
Created July 6, 2022 13:20 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@RhymezxCode
RhymezxCode / multiple_ssh_setting.md
Created March 1, 2022 15:41 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"