Skip to content

Instantly share code, notes, and snippets.

View kozaxinan's full-sized avatar

Sinan Kozak kozaxinan

View GitHub Profile
@kozaxinan
kozaxinan / LabelWithBadge.kt
Last active August 30, 2023 14:02
A Jetpack compose implementation for displaying counter for hidden word becuase of text overflow
package foo
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
is24-android-app git:(develop) ➜ gw ktlintCheck
Starting a Gradle Daemon, 4 stopped Daemons could not be reused, use --status for details
Watching the file system is an incubating feature.
Spent 12 ms registering watches for file system events
Virtual file system retained information about 0 files, 0 directories and 0 missing files since last build
> Configure project :app
Full version name: 15.1.0.907
> Configure project :finance_calculator
package de.is24.git.diff
import org.eclipse.jgit.api.Git
import org.eclipse.jgit.lib.Repository
import org.eclipse.jgit.revwalk.RevWalk
import org.eclipse.jgit.treewalk.AbstractTreeIterator
import org.eclipse.jgit.treewalk.CanonicalTreeParser
import org.gradle.api.DefaultTask
import org.gradle.api.Project
import org.gradle.api.Task
@kozaxinan
kozaxinan / LazyComparision.kt
Last active February 19, 2020 14:27
Kotlin lazy vs object creator method
// Object creator method with extra referce
private var _name: String? = null
fun getName(): String {
if (_name == null) {
_name = "Sinan"
}
return _name!!
}
// Lazy version
@kozaxinan
kozaxinan / policy.html
Last active March 19, 2017 13:30
privacy policy for "Touch Screen Fix - OnePlus One"
<html>
<body>
<h2>Privacy Policy</h2>
<p>Kozaxinan built the "Touch Screen Fix - OnePlus One" app as a open source, free, ad-supported app. This SERVICE is provided by Kozaxinan and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding our policies with the collection, use, and
disclosure of Personal Information if anyone decided to use our Service.</p>
<p>If you choose to use our Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that we collect are used for providing and
improving the Service. we will not use or share your information with anyone except as described