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
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 |
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
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, |
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
@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) |
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
[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" |
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
Intent intent = getIntent(); | |
if (Intent.ACTION_VIEW.equals(intent.getAction())) { | |
Uri uri = intent.getData(); | |
String valueOne = uri.getQueryParameter("keyOne"); | |
String valueTwo = uri.getQueryParameter("keyTwo"); | |
<data android:host="www.clicky.pk" android:scheme="http"/> |
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
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 |
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
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 |
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
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 |
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
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 |
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
public Activity getActivity(Context context) | |
{ | |
if (context == null) | |
{ | |
return null; | |
} | |
else if (context instanceof ContextWrapper) | |
{ | |
if (context instanceof Activity) | |
{ |
NewerOlder