Skip to content

Instantly share code, notes, and snippets.

@shikajiro
shikajiro / HomeFragment.kt
Last active September 27, 2017 12:05
Toothpickを使ったActivity, Fragment, ViewModelでの基本的な流れ
class HomeFragment : Fragment() {
private lateinit var scope: Scope
private lateinit var vm: HomeViewModel
@Inject lateinit var dialogDelegation: DialogDelegation
override fun onCreate(savedInstanceState: Bundle?) {
scope = Toothpick.openScopes(activity.application, activity, this)
scope.installModules(FragmentModule(this))
@shikajiro
shikajiro / fabfile.py
Last active November 28, 2016 10:14
Script to perform the build of Android on another machine
# Script Name : fabfile.py
# Author : shikajiro
# Created : 2016-11-03
# Last Modified : 2016-11-21
# Version : 1.1.0
# Modifications :
# Description :
# Script to perform the build of Android on another machine
# By performing such a build of severely time on another machine,
# it is possible to ensure the CPU resources of the development machine,
@yqritc
yqritc / gist:ccca77dc42f2364777e1
Last active March 29, 2024 10:25
Equal column spacing for Android RecyclerView GridLayoutManager by using custom ItemDecoration

ItemOffsetDecoration

public class ItemOffsetDecoration extends RecyclerView.ItemDecoration {

    private int mItemOffset;

    public ItemOffsetDecoration(int itemOffset) {
        mItemOffset = itemOffset;
    }
@rharter
rharter / RevealDrawable.java
Created April 3, 2015 17:41
A Drawable that transitions between two child Drawables based on this Drawable's current level value. The idea here is that the center value (5000) will show the 'selected' Drawable, and any other value will show a transitional value between the 'selected' Drawable and the 'unselected' Drawable.
package com.pixite.fragment.widget;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Drawable.Callback;
import android.view.Gravity;
@rackaam
rackaam / Box2DSeparator.java
Created May 31, 2014 15:47
Convex Separator for libGDX Box2D
/*
* Convex Separator for libGDX Box2D
*
* Made by https://github.com/rakam
* This class is a libGDX version of the Antoan Angelov's work.
* It is designed to work with Erin Catto's Box2D physics library.
*
* Everybody can use this software for any purpose, under two restrictions:
* 1. You cannot claim that you wrote this software.
* 2. You can not remove or alter this notice.
@hayajo
hayajo / changelog_en.md
Last active July 19, 2024 05:47
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形