Skip to content

Instantly share code, notes, and snippets.

View alialacan's full-sized avatar
🎯
Focusing

Ali ALACAN alialacan

🎯
Focusing
View GitHub Profile
@ardakazanci
ardakazanci / StretchTabComponent.kt
Created July 19, 2025 06:32
Stretch Tab Jetpack Compose
data class TabPosition(val left: Float, val right: Float)
@Composable
fun StretchTabComponent() {
val tabs = listOf("SALE", "RENT")
var selectedIndex by remember { mutableIntStateOf(0) }
val tabPositions = remember { mutableStateListOf<TabPosition>() }
val startX = remember { Animatable(0f) }
val endX = remember { Animatable(0f) }
val scope = rememberCoroutineScope()
@deepakpk009
deepakpk009 / add_git_submodule.txt
Created August 8, 2017 09:26
how to add a git android library project as a sub module, to a project
how to add a git android library project as a sub module, to a project
1. create an android project
2. add to vcs (vcs - import into version control - create git repository)
3. goto terminal and add sub-module - make sure the location folder name is different than the original project name
git submodule add https://XXX@bitbucket.org/YYY/ZZZ.git
4. goto file menu - project structure
5. click '+' on left top
6. select 'import gradle project'
@artem-zinnatullin
artem-zinnatullin / MyApp.java
Last active January 15, 2023 13:04
If you need to set one font for all TextViews in android application you can use this solution. It will override ALL TextView's typefaces, includes action bar and other standard components, but EditText's password font won't be overriden.
public class MyApp extends Application {
@Override
public void onCreate() {
TypefaceUtil.overrideFont(getApplicationContext(), "SERIF", "fonts/Roboto-Regular.ttf"); // font from assets: "assets/fonts/Roboto-Regular.ttf
}
}
@Skipants
Skipants / timezones.yaml
Created January 20, 2011 22:28
Timezones in YAML
TimeZone:
pacific/midway:
olson: Pacific/Midway
text: (GMT-11:00) Midway Island, Samoa
america/adak:
olson: America/Adak
text: (GMT-10:00) Hawaii-Aleutian
etc/gmt+10:
olson: Etc/GMT+10
text: (GMT-10:00) Hawaii