Skip to content

Instantly share code, notes, and snippets.

View konifar's full-sized avatar
💭
💯

Yusuke Konishi konifar

💭
💯
View GitHub Profile
@bomberstudios
bomberstudios / sketch-diff-in-git.md
Last active May 17, 2024 02:53
How to diff your .sketch files in Git

Using sketchtool to diff your .sketch files using text

Requirements

You need to have SketchTool installed somewhere in your path.

Setup

Add this in your ~/.gitconfig file (for some reason, it won't work in a local .gitconfig file):

PR: konifar/droidkaigi2016#108

もとの問題

アプリを起動(MainActivity)して任意のセッション詳細(SessionDetailActivity)を開いてSessionの状態を変更して戻る。このときMainActivityが破棄-再生成されていた場合にクラッシュする

構造的な問題

MainActivity-SessionsFragment-ViewPager-SessionsTabFragmentの構造のなかで、それぞれのコンポーネント間で直接onActivityResult()を呼び出して伝搬する方法を取っていた。

@lopspower
lopspower / README.md
Last active April 17, 2024 23:43
All InputType for EditText

All InputType for EditText

Twitter

Constant Description
none There is no content type. The text is not editable.
import android.content.Context
import android.content.SharedPreferences
import android.preference.PreferenceManager
import java.util.*
import kotlin.reflect.KProperty
/*
* Android Shared Preferences Delegate for Kotlin
*
* Usage:
@nickbutcher
nickbutcher / avd_bundle.xml
Last active July 10, 2024 11:24
An example of the Android xml bundle format for creating an AnimatedVectorDrawable. See https://plus.google.com/+NickButcher/posts/A8KKxnJdg4r
<?xml version="1.0" encoding="utf-8"?>
<!--
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
@cumanzor
cumanzor / steppedSlider.swift
Created June 6, 2016 03:01
stepped UISlider.
let step: Float = 50;
// extra slider initialization. the IBAction func below points to the UISlider we are using.
@IBAction func onStrengthChange(sender: UISlider) {
let roundedValue = round(sender.value/step) * step
sender.value = roundedValue
}
@mikemimik
mikemimik / main.dart
Last active August 3, 2022 04:21
Flutter: Custom theme data
import 'package:flutter/material.dart';
import 'theme.dart' as Theme;
void main() {
runApp(
new MaterialApp(
title: 'CompanyApp',
color: Theme.CompanyColors.blue[500],
theme: Theme.CompanyThemeData,
home: new Scaffold(
@yatatsu
yatatsu / recyclerview-expand-collapse-transition.md
Last active December 5, 2021 00:11
AndroidのRecyclerViewでアイテムのExpand/Collapseのアニメーションをいい感じにする

問題

AndroidでViewの高さを変えるとき、そこまでこだわらずにシンプルに実装したいときは、 Transition(android.support.transition.Transition)を使うことが多いと思います。

RecyclerViewのアイテムをタップしてそのアイテムの高さを変える、詳細部分の表示非表示を切り替える、 いわゆるExpand/Collapseと言われているような効果を、いい感じのアニメーションで実現したいときにやり方を少し調べたので説明します。

解決方法

子育て9ヶ月を振り返って

昨年6月に娘が無事産まれて、かれこれ9ヶ月が経ちました。毎日成長していく姿に、日々感動です。

産まれた頃はどうすれば寝てくれるのか等、夫婦で悩んだものでしたが、そんな娘もこの4月から保育園通いです。

これを機に、この9ヶ月を振り返ってみたいと思います。 そして、これまでの子育てにおいて、先輩パパ達の知恵に随所で助けられてきました。

@caseywatts
caseywatts / 0 push to talk.md
Last active September 21, 2023 13:55
Push To Talk - Google Meet Bookmarklet

Short link to this page: http://caseywatts.com/ptt

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Push To Talk in a Google Hangout (Meet)

  1. Save this bookmarklet. Right-click on boomarks toolbar Add Page...
  • Name: PTT (push to talk) or whatever you'd like (maybe short so it stays on your bookmarks toolbar)