Skip to content

Instantly share code, notes, and snippets.

View yamin8000's full-sized avatar
💭
I may be slow to respond.

Yamin Siahmargooei yamin8000

💭
I may be slow to respond.
View GitHub Profile
@yamin8000
yamin8000 / LetterSpacedPersianText.kt
Created March 29, 2023 02:41
Jetpack Compose Letter Spaced Persian Text
@Composable
fun LetterSpacedPersianText(
text: String,
modifier: Modifier = Modifier,
color: Color = Color.Unspecified,
fontSize: TextUnit = 14.sp,
fontStyle: FontStyle? = null,
fontWeight: FontWeight? = null,
fontFamily: FontFamily? = null,
letterSpacing: TextUnit = TextUnit.Unspecified,
@yamin8000
yamin8000 / copyright-profile
Last active March 29, 2023 02:38
Android Studio GPLv3 Copyright Profile
@yamin8000
yamin8000 / !CsvFromListMain.kt
Last active August 15, 2022 06:51
Create CSV from a Kotlin List
fun main() {
val firstCategory = Category(0, "Phone")
val secondCategory = Category(1, "Laptop")
val categories = listOf(firstCategory, secondCategory)
val csv = csvOf(
listOf("id", "name"),
categories
) {
listOf(it.id.toString(), it.name)
}
@yamin8000
yamin8000 / OkHttpLambdaAsyncCallback.kt
Created June 30, 2021 18:15
OkHttp/Retrofit async call with lambda callback
package com.github.yamin8000.fare.model
import android.os.Bundle
import com.github.yamin8000.fare.databinding.ActivityMainBinding
import com.github.yamin8000.fare.ui.BaseActivity
import com.github.yamin8000.fare.web.Services
import com.github.yamin8000.fare.web.WEB
class MainActivity : BaseActivity() {