Skip to content

Instantly share code, notes, and snippets.

View boybeak's full-sized avatar
🏠
Working from home

boybeak boybeak

🏠
Working from home
  • Guangzhou, China
View GitHub Profile
@boybeak
boybeak / KeyboardObserver.kt
Last active July 29, 2023 15:16
Best android soft keyboard height observer
import android.app.Activity
import android.graphics.Color
import android.graphics.Rect
import android.graphics.drawable.ColorDrawable
import android.graphics.drawable.GradientDrawable
import android.view.Gravity
import android.view.View
import android.view.View.OnLayoutChangeListener
import android.view.WindowManager
import android.widget.FrameLayout
@michael-simons
michael-simons / ThingEntity.java
Last active October 19, 2020 16:15
An example on how to use Hibernate-Spatial with Spring Data JPA Repositories
@Entity
@Table(name = "things")
public class ThingEntity {
@Id
private Long id;
// Needed for use with Hibernate Spatial 4.x
// @Type(type = "org.hibernate.spatial.GeometryType")
private Geometry geometry;
@NikolaDespotoski
NikolaDespotoski / BottomNavigationBehavior.java
Last active December 19, 2022 06:14
Bottom Navigation behavior
/*
* BottomNavigationLayout library for Android
* Copyright (c) 2016. Nikola Despotoski (http://github.com/NikolaDespotoski).
* 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