Skip to content

Instantly share code, notes, and snippets.

View elevation_shadow_offset_layout.xml
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f0f0f0">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="200dp"
android:padding="30dp"
android:clipChildren="false"
@Floern
Floern / FixedLinkMovementMethod.java
Created Jan 9, 2016
FixedLinkMovementMethod.java
View FixedLinkMovementMethod.java
public class FixedLinkMovementMethod extends LinkMovementMethod {
@Override
public boolean onTouchEvent(TextView widget, Spannable buffer, MotionEvent event) {
int action = event.getAction();
if (action == MotionEvent.ACTION_UP ||
action == MotionEvent.ACTION_DOWN) {
int x = (int) event.getX();
int y = (int) event.getY();
View gist:12e7d40ed3b6539e72e1
<RelativeLayout
...
tools:context=".MainActivity">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar" />
<LinearLayout
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"