Skip to content

Instantly share code, notes, and snippets.

View RadiationX's full-sized avatar
💭
I may be slow to respond.

Evgeny Nizamiev RadiationX

💭
I may be slow to respond.
View GitHub Profile
/*
* Copyright (C) 2017 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
@kidinov
kidinov / Undo_Redo android
Last active September 4, 2023 06:06
Undo/Redo with batches for any TextView descendant.
/*
* THIS CLASS IS PROVIDED TO THE PUBLIC DOMAIN FOR FREE WITHOUT ANY
* RESTRICTIONS OR ANY WARRANTY.
*/
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.text.Editable;
import android.text.Selection;
import android.text.TextUtils;