Skip to content

Instantly share code, notes, and snippets.

@nuovothoth
nuovothoth / SingleLineTextView.java
Last active January 13, 2020 15:35 — forked from mrleolink/SingleLineTextView.java
A custom TextView that can shrink its text size to fit in a single line
/**
* Forked from: http://androidxref.com/4.1.1/xref/frameworks/base/core/java/com/android/internal/widget/DialogTitle.java
* Created by LeoLink on 2014-06-30.
*/
import android.annotation.SuppressLint;
import android.content.Context;
import android.support.annotation.Nullable;
import android.text.Layout;
import android.text.TextUtils;
import android.util.AttributeSet;
@nuovothoth
nuovothoth / MiddleDividerItemDecoration.java
Created January 13, 2020 06:51
java version of Veeyikpong/MiddleDividerItemDecoration.kt
/*
* Copyright 2018 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
@nuovothoth
nuovothoth / MiddleDividerItemDecoration.kt
Created January 13, 2020 06:34 — forked from Veeyikpong/MiddleDividerItemDecoration.kt
MiddleDividerItemDecoration, suitable for both LinearLayoutManager and GridLayoutManager.
/*
* Copyright 2018 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