Skip to content

Instantly share code, notes, and snippets.

@SIMMORSAL
SIMMORSAL / Resizer.java
Last active Jan 3, 2018
testing phase of Resizer
View Resizer.java
import android.content.Context;
import android.content.res.Resources;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
public class Resizer {
@SIMMORSAL
SIMMORSAL / MainActivity.java
Created Dec 2, 2017
MainActivity code for ViewDrag
View MainActivity.java
package com.simmorsal.viewdragtest;
import android.graphics.Color;
import android.os.Build;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewTreeObserver;
import android.widget.Button;
View activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- The views behind the draggable layout =================== -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f5f5f5">