Skip to content

Instantly share code, notes, and snippets.

View iniyanmurugavel's full-sized avatar
🎯
Focusing

Iniyan Murugavel iniyanmurugavel

🎯
Focusing
View GitHub Profile
import androidx.compose.animation.Animatable
import androidx.compose.animation.core.Animatable
import androidx.compose.animation.core.LinearEasing
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
@iniyanmurugavel
iniyanmurugavel / compscreen.txt
Created October 17, 2024 05:37 — forked from Shayan-Sakhaei/compscreen.txt
Compose Screen Android Studio Live Template
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import org.jetbrains.compose.ui.tooling.preview.Preview
import org.koin.androidx.compose.koinViewModel
@Composable
fun $NAME$Route(
modifier: Modifier = Modifier,
@iniyanmurugavel
iniyanmurugavel / LazyColumnPosition
Created October 4, 2024 01:04 — forked from ProArun/LazyColumnPosition
Save and Restore the Scroll Position of a LazyColumn Persistently
@OptIn(FlowPreview::class)
@Composable
fun LazyColumnPosition(modifier: Modifier = Modifier) {
val context = LocalContext.current
val pref by lazy {
context.getSharedPreferences("prefs", MODE_PRIVATE)
}
val scrollPosition = pref.getInt("scroll_position", 0)
@iniyanmurugavel
iniyanmurugavel / libs.versions.toml
Created September 18, 2024 04:32 — forked from BobbyESP/libs.versions.toml
A very complete TOML file for Android Development mainly thought for the new Jetpack Compose framework
[versions]
accompanist = "0.29.2-rc"
androidGradlePlugin = "7.4.2"
androidxComposeBom = "2023.01.00"
androidxComposeCompiler = "1.4.6"
androidxCore = "1.10.0-rc01"
androidMaterial = "1.9.0-alpha02"
androidxAppCompat = "1.7.0-alpha02"
androidxActivity = "1.7.1"
markdownDependency = "0.3.2"
@iniyanmurugavel
iniyanmurugavel / deeplink adb
Created May 12, 2021 11:16
Deeplink Trigger from adb command
Git Tag
There are two tag
1.Lightweight Tag
2.Annotated Tag
Lightweight Tag is used for requires only a quick and easy tag command
git tag v1.o
@iniyanmurugavel
iniyanmurugavel / Ssh
Created May 12, 2021 11:14
SSH integration in Android
How to add ssh in system and add in github
1. ssh-add -l
2.ssh-keygen -t rsa -b 4096 -C "[email protected]"
3.Press Enter to accept the default file location
4.Enter a secure passphrase
5.cat .ssh/id_rsa.pub
Github
Settings -Select SSH and GPG keys - Click New SSH key -Enter a title in the field -Paste your public key into the Key field -Click Add SSH key
@iniyanmurugavel
iniyanmurugavel / git crlf
Last active January 22, 2021 11:03
warning: CRLF will be replaced by LF in gradlew.bat
In Unix systems the end of a line is represented with a line feed (LF). In windows a line is represented with a carriage return (CR) and a line feed (LF) thus (CRLF). when you get code from git that was uploaded from a unix system they will only have an LF.
If you are a single developer working on a windows machine, and you don't care that git automatically replaces LFs to CRLFs, you can turn this warning off by typing the following in the git command line
git config core.autocrlf true
rm -f ./.git/index.lock
@iniyanmurugavel
iniyanmurugavel / gist:2be6c17292be31a337fed071a6419c0c
Created December 12, 2020 12:54
About Proguard Mapping File upload to particular version while releasing apk in playstore
PROGUARD
Generally ProGuard is a tool to help minify, obfuscate, and optimize your code.
It is not only especially useful for reducing the overall size of your Android application as well as removing unused classes and methods that contribute towards the intrinsic 64k method limit of Android applications. Because of the latter issue, ProGuard is often recommended to be used both in development and production especially for larger applications.
ProGuard can be enabled by using the minifyEnabled option for any build type.
If you intend to use it for production, it is highly recommended you also enable it on your development.
https://miro.medium.com/max/2640/1*J-9cAvm8kSn001rXGDtwxg.png
Generally retracing this kind of error log have two ways.Lets discuss one by one
Get the mapping.txt file and retrace the logs using proguardgui
@iniyanmurugavel
iniyanmurugavel / gist:92a04a87caf09ffc18f4eb53ccacf4a1
Created October 15, 2020 05:02
Context instead of Activity
public Activity getActivity(Context context)
{
if (context == null)
{
return null;
}
else if (context instanceof ContextWrapper)
{
if (context instanceof Activity)
{