Skip to content

Instantly share code, notes, and snippets.

View razavioo's full-sized avatar

Seyyed Emad Razavi razavioo

View GitHub Profile
@razavioo
razavioo / CurvedScrollView.kt
Last active February 26, 2023 07:38
This is a Jetpack Compose function that creates a curved scrollable list of items, with custom scrolling behavior and visual effects. It takes in parameters for item count, center item callback, and item Composable.
import androidx.compose.foundation.*
import androidx.compose.foundation.gestures.FlingBehavior
import androidx.compose.foundation.gestures.ScrollScope
import androidx.compose.foundation.layout.Box
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.Layout
@razavioo
razavioo / PresentationLayer.kt
Last active September 22, 2021 05:13
UDF MVVM Presentation Layer IntelliJ Templates
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")
package ${PACKAGE_NAME}
#end
import androidx.lifecycle.MutableLiveData
import com.emad.shop.common.ui.base.BaseViewModel
import com.emad.shop.common.ui.livedata.SingleLiveData
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject
@razavioo
razavioo / RestrictLineEditText.java
Created April 15, 2020 15:44
EditText that has restricted lines and removes from start of the text while writing new texts
import android.content.Context;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.AttributeSet;
import androidx.appcompat.widget.AppCompatEditText;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;