Skip to content

Instantly share code, notes, and snippets.

cozvtieg9 fedorenkoalex

Block or report user

Report or block fedorenkoalex

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mpetlyuk
mpetlyuk / CloneView
Created Aug 23, 2018
Draw view from the existing original view
View CloneView
public class CloneView extends View {
private View mSource;
public CloneView(Context context) {
super(context);
}
public CloneView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
@mpetlyuk
mpetlyuk / ScrollSensitiveLinkMovementMethod
Last active Nov 7, 2018
LinkMovementMethod class, which helps to find, highlight and handle clicks on links inside the TextView, has the issue with processing onTouch() method - if you tap on the link and try to scroll the textview, you will see that no scrolling will occur. ScrollSensitiveLinkMovementMethod has better processing touches and allows you to scroll even i…
View ScrollSensitiveLinkMovementMethod
package your_package_name;
import android.text.Layout;
import android.text.Selection;
import android.text.Spannable;
import android.text.method.LinkMovementMethod;
import android.text.method.Touch;
import android.text.style.ClickableSpan;
import android.view.MotionEvent;
import android.widget.TextView;
View FixAppBarLayoutBehavior.java
/*
* 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
You can’t perform that action at this time.