Skip to content

Instantly share code, notes, and snippets.

View e4basil's full-sized avatar
🎯
Focusing

Basi e4basil

🎯
Focusing
View GitHub Profile
@theapache64
theapache64 / gen-cfd-icon.sh
Created March 19, 2021 15:05
To generate launcher icons for compose desktop
function gen-cfd-icon(){
ICON_DIR="src/main/resources/drawables/launcher_icons"
mkdir -p $ICON_DIR
ORIGINAL_ICON="$ICON_DIR/original.png"
cp "$1" "$ORIGINAL_ICON"
# Linux
echo "🌀 Creating icon for Linux..."
convert -resize x128 "$ORIGINAL_ICON" "$ICON_DIR/linux.png"
@arunkumar9t2
arunkumar9t2 / PreferencesX.kt
Last active September 6, 2023 15:20
Android PreferenceScreen DSL for using with androidx.preference framework.
@file:Suppress("NOTHING_TO_INLINE")
import android.content.Context
import androidx.annotation.StringRes
import androidx.fragment.app.Fragment
import androidx.preference.*
/**
* DSL marker for restricting access scope when [PreferencesBuilder.preference] is nested.
*/
@sagar2093
sagar2093 / ImageSlider.java
Last active April 30, 2020 15:06
Image Slider Android using viewpager and pagerAdapter
public class ImageSlider {
private String name;
//optional @DrawableRes
@DrawableRes
private int resId;
public ImageSlider(String name, int resId) {
this.name = name;
this.resId = resId;
/*
* Copyright 2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@chomi3
chomi3 / ToolbarColorizeHelper
Last active February 11, 2022 23:41
Helper class to colorize all Android Toolbar Icons
/*
Copyright 2015 Michal Pawlowski
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@emil2k
emil2k / Connectivity.java
Last active December 22, 2023 06:03
Android utility class for checking device's network connectivity and speed.
/*
* Copyright (c) 2017 Emil Davtyan
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions: