Skip to content

Instantly share code, notes, and snippets.

View sofakeer's full-sized avatar
🎯
Focusing

sofakeer sofakeer

🎯
Focusing
View GitHub Profile
@wesbos
wesbos / tab-trigger.js
Created November 16, 2015 19:33
How to properly get a TAB trigger working with Emmet inside of JSX
{
"keys": ["tab"],
"command": "expand_abbreviation_by_tab",
// put comma-separated syntax selectors for which
// you want to expandEmmet abbreviations into "operand" key
// instead of SCOPE_SELECTOR.
// Examples: source.js, text.html - source
"context": [
{
@mariozig
mariozig / migrate_repo.sh
Last active December 22, 2022 08:32
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
@nickbutcher
nickbutcher / 1 search_bar.xml
Last active March 26, 2022 10:03
Demonstrating morphing a search icon into a search field. To do this we use an AnimatedVectorDrawable (https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html) made up of two paths. The first is the search icon (as a single line) the second is the horizontal bar. We then animate the 'trimPathStart' property …
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
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
@JMPergar
JMPergar / ScrollViewWithMaxHeight.java
Created November 5, 2014 13:28
ScrollView that can be configured with max height
public class ScrollViewWithMaxHeight extends ScrollView {
public static int WITHOUT_MAX_HEIGHT_VALUE = -1;
private int maxHeight = WITHOUT_MAX_HEIGHT_VALUE;
public ScrollViewWithMaxHeight(Context context) {
super(context);
}
@cdsap
cdsap / AndroidManifest.xml
Last active January 7, 2021 17:59
Example ManifestPlaceHolder
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapplication" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
@chrisbanes
chrisbanes / SystemUiHelper.java
Last active March 2, 2024 18:57
SystemUiHelper
/*
* Copyright (C) 2014 The Android Open Source Project
*
* 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 April 20, 2024 14:15
The introduction to Reactive Programming you've been missing
@stefanhoth
stefanhoth / build.gradle
Created June 11, 2014 06:56
AndroidDev / gradle: How to rename your output apk during build time to include details like the version.
android {
// .. set up build flavors etc here
//instead of "app-release.apk" this method will rewrite the name to
// "MyCoolCompany-MyGreatProduct-v<defaultConfig.versionName>-RELEASE.apk which is much better suited for archiving and overall handling
// To restore the default behavior just delete the whole block below
applicationVariants.all { variant ->
def apk = variant.outputFile;
@felHR85
felHR85 / SoftKeyboard.java
Last active February 17, 2024 23:11
A solution to catch show/hide soft keyboard events in Android http://felhr85.net/2014/05/04/catch-soft-keyboard-showhidden-events-in-android/
/*
* Author: Felipe Herranz (felhr85@gmail.com)
* Contributors:Francesco Verheye (verheye.francesco@gmail.com)
* Israel Dominguez (dominguez.israel@gmail.com)
*/
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import android.os.Handler;
@lucasr
lucasr / AnimatedLinearLayout.java
Last active December 16, 2022 19:58
Animated LinearLayout
package com.example.android_transition_samples.app;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;