Skip to content

Instantly share code, notes, and snippets.

View m4kvn's full-sized avatar
🐔
Hahsibiroko Kawai

m4kvn m4kvn

🐔
Hahsibiroko Kawai
View GitHub Profile
@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と言われているような効果を、いい感じのアニメーションで実現したいときにやり方を少し調べたので説明します。

解決方法

@extralam
extralam / URLImageParser.java
Created April 12, 2017 02:53
URLImageParser - TextView show Image html , use Glide Image Library
import java.util.ArrayList;
import com.bumptech.glide.GenericRequestBuilder;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.animation.GlideAnimation;
import com.bumptech.glide.request.target.SimpleTarget;
import com.bumptech.glide.request.target.Target;
import android.content.Context;
@okapies
okapies / mastodon-client.md
Last active October 3, 2023 10:18
Mastodon API の叩き方

Mastodon の API を叩くには以下の手順を踏む必要がある:

  1. OAuth2 クライアントを登録する
  2. アクセストークンを取得する
  3. アクセストークンを Authorization ヘッダに指定して API にアクセスする

OAuth2 クライアント登録

Mastodon の Apps API に登録情報を送ってクライアントを払い出してもらう(一度だけやれば OK).

@voluntas
voluntas / gae_go.rst
Last active March 15, 2019 16:31
GAE/Go コトハジメ

GAE/Go コトハジメ

日時:2017-07-21
作:@voluntas
バージョン:0.6.0
URL:https://voluntas.githu.io/

突っ込みは Twitter @voluntas まで。

@handstandsam
handstandsam / MyLifecycleOwner.kt
Last active July 13, 2024 05:35
Jetpack Compose OverlayService. You have to have all the correct permissions granted and in your manifest, but if you do, this this will show a green box with "Hello" in it!
import android.os.Bundle
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleRegistry
import androidx.savedstate.SavedStateRegistry
import androidx.savedstate.SavedStateRegistryController
import androidx.savedstate.SavedStateRegistryOwner
internal class MyLifecycleOwner : SavedStateRegistryOwner {
private var mLifecycleRegistry: LifecycleRegistry = LifecycleRegistry(this)
private var mSavedStateRegistryController: SavedStateRegistryController = SavedStateRegistryController.create(this)
/*
MIT License
Copyright (c) 2021 Tomachi
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
import androidx.compose.animation.core.EaseInOut
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.tween
import androidx.compose.desktop.ui.tooling.preview.Preview
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.hoverable
import androidx.compose.foundation.interaction.MutableInteractionSource