Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
ccf9508
Fix NPE resulting from HoverViewState's callback after it already los…
SeoJungHong Dec 3, 2018
eeeab6b
Update gradle version, build properties (#1)
SeoJungHong Dec 3, 2018
44b8fa9
[BZZRWRDD-100] Add Preview State for customization (#4)
SeoJungHong Jan 14, 2019
78ae4e3
Collapsed State일때 5초가 지나면 hover view가 반투명해지도록 변경
Feb 13, 2019
5fedc98
handler에서 특정 runnable만 제거하도록 변경
Feb 14, 2019
d5f9f92
Merge pull request #5 from Buzzvil/feature/collapsed_state_transparency
Feb 14, 2019
e4d2159
[BZZRWRDD-165] MessageView 영역도 drag, tab 가능하게 만들기 (#6)
SeoJungHong Feb 14, 2019
e83facd
Preview가 시간이 다 되어 닫힐때 사용자가 Drag를 하고있을 경우 exit view가 계속 표시되는 버그 수정 (#7)
Feb 14, 2019
e6e30a8
[BZZRWRDD-252] Added 'Anchored' State for not using ContentDisplay, r…
SeoJungHong Feb 15, 2019
597400d
[BZZRWRDD-262] Anchored 일때 Drag없이 터치만 가능하도록 Dragger의 일부를 TouchControl…
SeoJungHong Feb 18, 2019
9111eca
[BZZRWRDD-262] Floating Tab 아이콘, 사이즈 변경시키기 (for AnchoredState) (#10)
SeoJungHong Feb 19, 2019
564a53c
[BZZRWRDD-262] Disable 'clipping' to use shadow around child view (#11)
SeoJungHong Feb 21, 2019
b748949
[BZZRWRDD-262] Disable 'clipping' to use shadow around child view - i…
SeoJungHong Feb 21, 2019
ddc33d0
Previewed state 에서 OnStateChanged 콜백이 두번 불리는 문제 수정 (#14)
SeoJungHong Feb 22, 2019
7c9e0e3
뷰 사이즈가 아닌 Window default display size 를 항상 참조하도록 & TouchController가 여…
Feb 24, 2019
5b9e24e
Preview 모드에서 MessageView UI가 업데이트 되지 않던 현상 수정 (#15)
SeoJungHong Feb 24, 2019
7da49d3
서비스가 종료될 때 onDock event가 불릴 경우, 서비스는 종료 되지만 터치영역이 남아있는 이슈 수정 (#16)
Feb 25, 2019
c5e72b2
[BZZRWRDD-272] Preview 가 떴을 때 드래그하면 최초 터치한 위치에서 뷰가 이동된 상태로 드래그 됨 (#17)
Mar 4, 2019
61a1a64
[BZZRWRDD-280] Docked 여부와 상관 없이 Orientation Changed 가 불리면 FloatingTab…
SeoJungHong Mar 5, 2019
d63e86c
[BZZRWRDD-284] Floating Button을 아래로 드래그하면 버튼이 안보이는 현상 수정 (#19)
Mar 6, 2019
ce78fbb
Add publisher.gradle file for bintray upload
SeoJungHong Mar 7, 2019
5451ea7
StateAnchored를 제거 하고 StateHidden 추가 (#20)
Mar 8, 2019
35d2211
[BZZRWRDD-296] Detailed UI 적용 - ExitView 아이콘 변경, Alpha 값 변경 (#21)
SeoJungHong Mar 11, 2019
8707ccf
Bump version to 1.0.0-rc.1
SeoJungHong Mar 11, 2019
78d0d3e
Hidden State으로 전환될 때 Animation 추가 (#22)
Mar 20, 2019
3298e5d
Bump version to 1.0.0-rc.2
Apr 3, 2019
9c3f5f0
Collapsed state일 때 일정 시간이 지나면 반투명해지거나 아이콘이 사라질 수 있도록 설정할 수 있게 변경 (#23)
Apr 11, 2019
2f30071
Pop 드래그 시 Preview가 사라지는 기능 구현
ybbarng Apr 12, 2019
c85d82a
불필요하게 뜨는 로그 제거
ybbarng Apr 12, 2019
26b0e99
불필요하게 위치 로그가 뜨고 계산을 반복적으로 하는 부분을 방지
ybbarng Apr 12, 2019
b6654a0
collapse animation은 처리하는 부분을 조금 더 상세하게 변경
ybbarng Apr 15, 2019
588648a
animation 상태를 다루는 변수 대신에 안전하게 visibility로 애니메이션 적용 여부를 체크 하도록 함
ybbarng Apr 15, 2019
88c5ae8
View에서 알아서 Visibility에 따라 애니메이션 적용 여부를 결정하게 함
ybbarng Apr 15, 2019
d82ae05
사용자가 Drop한 경우 변수 초기화
ybbarng Apr 15, 2019
64edd36
초기화한다는 의미를 살려서 init()이라는 함수로 분리
ybbarng Apr 15, 2019
956c51a
Pop을 놓는 경우가 아니라 버리는 경우에 init()을 호출하도록 변경
ybbarng Apr 15, 2019
cd4637f
Merge pull request #24 from Buzzvil/feature/preview-close
ybbarng Apr 15, 2019
a6710e7
Pop과 Preview의 drag 이벤트를 서로 다르게 구분하고 따로 처리하도록 변경
ybbarng Apr 15, 2019
cb06f0a
함수의 실제 동작에 맞게 이름 변경
ybbarng Apr 15, 2019
baede9b
onLayoutChangeListener 대신에 onPositionChangeListener를 사용하도록 변경
ybbarng Apr 15, 2019
0bfb97c
드래그 정도에 따라 alpha 값 변경
ybbarng Apr 15, 2019
fde6d82
이미지를 변경할 수 있도록 HoverMenu에 상태 구현
ybbarng Apr 16, 2019
41edfe7
일정 거리 이상 드래그하면 Preview를 끄는 기능 구현
ybbarng Apr 16, 2019
e07a2ed
Menu가 변경되면 View를 업데이트하도록 함
ybbarng Apr 16, 2019
6600215
Preview가 보이기 시작하고 나서 약 1초간 터치가 안되는 버그 수정
ybbarng Apr 16, 2019
1d586d7
Preview가 Pop의 아래쪽에 위치하도록 함
ybbarng Apr 16, 2019
75a0118
Bump version to 1.0.0-rc.3
Apr 17, 2019
016aeb5
LongPress하는 경우 드래그로 처리
ybbarng Apr 18, 2019
4bdbdc6
TabMessageView의 TouchDown과 TouchUp 이벤트에 대한 인터페이스 구현
ybbarng Apr 18, 2019
c6bdab2
view.setAlpha(0.x)를 설정할 때 그림자가 잘리는 문제 처리
ybbarng Apr 19, 2019
fa71ace
callback의 일관성을 위해 View를 리턴하는 형태로 변경
ybbarng Apr 22, 2019
a624842
사용하는 쪽에서 커스터마이징을 할 수 있도록 애니메이션 처리 등을 변경
ybbarng Apr 22, 2019
ab08221
Pop을 드래그하면 Preview를 숨기던 부분도 밖에서 처리하도록 변경
ybbarng Apr 22, 2019
2e2a21a
FloatingTab 리스너 쪽과 이름을 맞춤
ybbarng Apr 22, 2019
bef619b
낮은 버전의 안드로이드에서 alpha값이 적용되지 않는 버그 수정 (#26)
Apr 22, 2019
1a6da34
Bump version to 1.0.0-rc.4
Apr 22, 2019
a4291d4
투명해진 버튼이 원래대로 돌아오지 않는 버그 수정 (#27)
Apr 22, 2019
0395587
드래그 중간에 화면을 끄면 드래그 Cancel 처리
ybbarng Apr 22, 2019
16fbc98
Merge pull request #25 from Buzzvil/feature/preview-close-on-drag
ybbarng Apr 26, 2019
7e69946
Collapsed State에서 idle 상태가 되었을때 동작을 외부에서 정할 수 있도록 변경 (#28)
May 2, 2019
715d891
OnExitListener가 의미대로 동작하지 않는 문제 수정 (#29)
May 2, 2019
bb30703
Bump version to 1.0.0-rc.6
May 8, 2019
f91040f
Hover crash fix (#30)
May 21, 2019
13eb141
Bump version to 1.0.0-rc.7
May 21, 2019
03e360d
Fix initialDocPosition on PopupConfig
realwind2048 Aug 26, 2019
b84cc2a
Merge pull request #31 from Buzzvil/feature/hover_options
realwind2048 Aug 27, 2019
98869a1
Add ExitView show/hide animation
realwind2048 Sep 5, 2019
8755b79
Add show/hide Animation test for ExitView
realwind2048 Sep 6, 2019
71b041e
Set new exitZone
realwind2048 Sep 9, 2019
98fcadb
Add TODO
realwind2048 Sep 9, 2019
b980abd
Add TODO
realwind2048 Sep 9, 2019
293ae30
Add Doc position calculation
realwind2048 Sep 9, 2019
551d2be
Add calculation
realwind2048 Sep 10, 2019
1a5d18b
Add center align test code
realwind2048 Sep 10, 2019
d9f665e
Improve touch UX
realwind2048 Sep 11, 2019
3f57a72
Add TODOs
realwind2048 Sep 11, 2019
28e8391
Polish exit Animation
realwind2048 Sep 17, 2019
95b4d35
Polish code
realwind2048 Sep 17, 2019
74d97a4
Add HandleDrop
realwind2048 Sep 17, 2019
836366e
Resolve TODO
realwind2048 Sep 17, 2019
9d1a905
Add initExitIconViewStatus
realwind2048 Sep 17, 2019
8db94a7
Remove unused import
realwind2048 Sep 17, 2019
e3f6baa
Apply review
realwind2048 Sep 18, 2019
726fda2
Apply design review: allow setting pop icon location on left bottom a…
realwind2048 Sep 18, 2019
009a224
Polish code
realwind2048 Sep 18, 2019
2fed293
Apply review: improve readability
realwind2048 Sep 18, 2019
15d7663
Apply design review: adjust min MIN_TAB_VERTICAL_POSITION to fix cutt…
realwind2048 Sep 18, 2019
3f43375
polish code
realwind2048 Sep 18, 2019
fbfdb83
Apply review: improve readability
realwind2048 Sep 18, 2019
d1c6976
Add missing commits
realwind2048 Sep 18, 2019
524ac14
Apply review: remove unused code
realwind2048 Sep 18, 2019
1174bf4
Merge pull request #32 from Buzzvil/feature/close_pop
realwind2048 Sep 19, 2019
c82a872
Add GestureBlackBox to improve throw
realwind2048 Sep 23, 2019
bf8a69c
Polish code
realwind2048 Sep 23, 2019
7557b85
Apply review
realwind2048 Sep 24, 2019
3ba84e8
Fix disappearing pop icon
realwind2048 Sep 25, 2019
e1adecd
change variable names
realwind2048 Sep 25, 2019
4f49a5a
Fix crash
realwind2048 Sep 25, 2019
a28c20b
Revert "Fix crash"
realwind2048 Sep 25, 2019
943672d
Apply review - fix crash
realwind2048 Sep 25, 2019
2748736
Fix crash
realwind2048 Sep 25, 2019
624d2a0
Merge pull request #34 from Buzzvil/fix/disppearing_pop_icon
realwind2048 Sep 25, 2019
30313d3
Merge pull request #33 from Buzzvil/fix/pop_throw_close
realwind2048 Sep 27, 2019
3393905
Bump version to 1.0.0 (#35)
Sep 30, 2019
de2113b
add public to hover view state
Nov 5, 2019
2832dec
Merge pull request #36 from Buzzvil/public-hoverviewstate
toc2menow Nov 7, 2019
77cb8f6
fix lint
EthanYoo Nov 7, 2019
8b7d81d
fix lint whitespace before (#37)
EthanYoo Nov 7, 2019
ea32d8f
Bump version to 1.0.1 (#38)
Nov 11, 2019
03a75e7
apply publish.gradle to hover
EthanYoo Nov 12, 2019
7f86edb
Merge branch 'master' of github.com:Buzzvil/hover
EthanYoo Nov 12, 2019
9a9a95d
change publish.gradle path to be based on root dir
EthanYoo Nov 13, 2019
05003d8
remove unnecessary plugin import code
EthanYoo Nov 13, 2019
56c599a
updated VcsUrl
Nov 14, 2019
ecc7d39
androidx
Dec 31, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,21 @@

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha4'

// For Bintray publishing
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.android.tools.build:gradle:3.2.1'
}
}

plugins {
id "com.jfrog.bintray" version "1.8.0"
}

allprojects {
repositories {
google()
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
5 changes: 2 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
compileSdkVersion = 26
targetSdkVersion = 25
buildToolsVersion = 25.0.3
supportLibVersion = 24.2.0
targetSdkVersion = 26
supportLibVersion = 26.1.0
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Jun 24 21:38:23 PDT 2017
#Tue Nov 13 00:07:04 KST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-rc-1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
63 changes: 17 additions & 46 deletions hover/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.library'
apply plugin: 'checkstyle'

version = '0.9.8'
project.group = 'com.buzzvil'
project.version = '1.0.1'

android {
compileSdkVersion project.compileSdkVersion.toInteger()
buildToolsVersion project.buildToolsVersion

defaultConfig {
minSdkVersion 15
Expand All @@ -21,52 +21,13 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:appcompat-v7:${supportLibVersion}"
compile "com.android.support:recyclerview-v7:${supportLibVersion}" // Used to get DiffUtil
implementation fileTree(dir: 'libs', include: ['*.jar'])
api ("androidx.appcompat:appcompat:$androidXAppcompatVersion")
api ("androidx.recyclerview:recyclerview:$androidXRecyclerviewVersion")

testCompile 'junit:junit:4.12'
testImplementation "junit:junit:$junitVersion"
}

// For Bintray publishing
ext {
bintrayRepo = 'maven'
bintrayName = 'hover'

publishedGroupId = 'io.mattcarroll.hover'
artifact = 'hover'
libraryName = 'Hover'

libraryDescription = 'An Android implementation of a floating menu.'

siteUrl = 'http://google.github.io/hover/'
gitUrl = 'https://github.com/google/hover.git'

libraryVersion = version

developerId = 'matthew-carroll'
developerName = 'Matt Carroll'
developerEmail = 'me@mattcarroll.io'

licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'

// The following is used to add our dependencies to the classpath for Javadoc linking.
afterEvaluate {
javadoc.classpath += files(android.libraryVariants.collect { variant ->
variant.javaCompile.classpath.files
})
}

// This disabled Javadoc tasks because its breaking the release build. Since Javadocs are
// not mission critical, they will remain disabled until the issue can be debugged.
tasks.withType(Javadoc).all { enabled = false }

//------ Checkstyle -------
task checkstyle(type: Checkstyle) {
showViolations = true
Expand All @@ -86,4 +47,14 @@ project.afterEvaluate {
preBuild.dependsOn('checkstyle')
assemble.dependsOn('lint')
check.dependsOn('checkstyle')
}
}

ext {
pName = 'hover'
pDescription = 'Buzzvil hover Android SDK'
pPublisherVcsUrl = 'https://github.com/Buzzvil/hover.git'
pGroup = project.group
pVersion = project.version
}

apply from: "$rootDir/gradle/publish.gradle"
61 changes: 20 additions & 41 deletions hover/src/main/java/io/mattcarroll/hover/BaseHoverViewState.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,64 +15,43 @@
*/
package io.mattcarroll.hover;

import android.support.annotation.NonNull;
import android.view.WindowManager;
import androidx.annotation.CallSuper;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/**
* {@link HoverViewState} that includes behavior common to all implementations.
*/
abstract class BaseHoverViewState implements HoverViewState {

private HoverView mHoverView;
private boolean mHasControl = false;
protected HoverView mHoverView;

@CallSuper
@Override
public void takeControl(@NonNull HoverView hoverView) {
mHoverView = hoverView;
}

// Only call this if using HoverMenuView directly in a window.
@Override
public void addToWindow() {
if (!mHoverView.mIsAddedToWindow) {
mHoverView.mWindowViewController.addView(
WindowManager.LayoutParams.MATCH_PARENT,
WindowManager.LayoutParams.MATCH_PARENT,
false,
mHoverView
);

mHoverView.mIsAddedToWindow = true;

if (mHoverView.mIsTouchableInWindow) {
mHoverView.makeTouchableInWindow();
} else {
mHoverView.makeUntouchableInWindow();
}
public void takeControl(@NonNull HoverView hoverView, Runnable onStateChanged) {
if (mHasControl) {
throw new RuntimeException("Cannot take control of a FloatingTab when we already control one.");
}
mHasControl = true;
mHoverView = hoverView;
}

// Only call this if using HoverMenuView directly in a window.
@CallSuper
@Override
public void removeFromWindow() {
if (mHoverView.mIsAddedToWindow) {
mHoverView.mWindowViewController.removeView(mHoverView);
mHoverView.mIsAddedToWindow = false;
public void giveUpControl(@NonNull HoverViewState nextState) {
if (!mHasControl) {
throw new RuntimeException("Cannot give up control of a FloatingTab when we don't have the control");
}
mHasControl = false;
mHoverView = null;
}

@Override
public void makeTouchableInWindow() {
mHoverView.mIsTouchableInWindow = true;
if (mHoverView.mIsAddedToWindow) {
mHoverView.mWindowViewController.makeTouchable(mHoverView);
}
protected final boolean hasControl() {
return mHasControl;
}

@Override
public void makeUntouchableInWindow() {
mHoverView.mIsTouchableInWindow = false;
if (mHoverView.mIsAddedToWindow) {
mHoverView.mWindowViewController.makeUntouchable(mHoverView);
}
public void setMenu(@Nullable HoverMenu menu) {
}
}
166 changes: 166 additions & 0 deletions hover/src/main/java/io/mattcarroll/hover/BaseTouchController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
package io.mattcarroll.hover;

import android.graphics.PointF;
import android.graphics.Rect;
import androidx.annotation.NonNull;
import androidx.core.util.Pair;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public abstract class BaseTouchController {
private static final String TAG = "BaseTouchController";

protected Map<String, TouchViewItem> mTouchViewMap = new HashMap<>();
protected boolean mIsActivated;
private boolean mIsDebugMode;

private final HoverFrameLayout.OnPositionChangeListener mOnPositionChangeListener = new HoverFrameLayout.OnPositionChangeListener() {
@Override
public void onPositionChange(@NonNull View view) {
moveTouchViewTo(mTouchViewMap.get(view.getTag()).mTouchView, new PointF(view.getX(), view.getY()));
}
};

public abstract View createTouchView(@NonNull Rect rect);

public abstract void destroyTouchView(@NonNull View touchView);

public abstract void moveTouchViewTo(@NonNull View touchView, @NonNull PointF position);

public void activate(final List<Pair<? extends HoverFrameLayout, ? extends TouchListener>> viewList) {
if (!mIsActivated) {
Log.d(TAG, "Activating.");
mIsActivated = true;

clearTouchViewMap();
for (int i = 0; i < viewList.size(); i++) {
final Pair<? extends HoverFrameLayout, ? extends TouchListener> viewItem = viewList.get(i);
final String tag = "view" + i;
final TouchViewItem touchViewItem = createTouchViewItem(viewItem.first, viewItem.second, tag);
mTouchViewMap.put(tag, touchViewItem);
}
updateTouchControlViewAppearance();
}
}

public void deactivate() {
if (mIsActivated) {
Log.d(TAG, "Deactivating.");
clearTouchViewMap();
mIsActivated = false;
}
}

public void enableDebugMode(boolean isDebugMode) {
mIsDebugMode = isDebugMode;
updateTouchControlViewAppearance();
}

private <T extends TouchListener<V>, V extends HoverFrameLayout> TouchViewItem createTouchViewItem(final V originalView, final T listener, final String tag) {
return new TouchViewItem<>(originalView, createTouchViewFrom(originalView), listener, tag);
}

protected <T extends TouchListener<V>, V extends View> TouchDetector createTouchDetector(final V originalView, final T touchListener) {
return new TouchDetector<>(originalView, touchListener);
}

private void clearTouchViewMap() {
for (final TouchViewItem touchViewItem : mTouchViewMap.values()) {
touchViewItem.destroy();
}
mTouchViewMap.clear();
}

private void updateTouchControlViewAppearance() {
for (final TouchViewItem touchViewItemItem : mTouchViewMap.values()) {
final View touchView = touchViewItemItem.mTouchView;
if (null != touchView) {
if (mIsDebugMode) {
touchView.setBackgroundColor(0x44FF0000);
} else {
touchView.setBackgroundColor(0x00000000);
}
}
}
}

private Rect getRectFrom(final View view) {
final Rect rect = new Rect();
view.getDrawingRect(rect);
return rect;

}

private View createTouchViewFrom(final View originalView) {
final View touchView = createTouchView(getRectFrom(originalView));
moveTouchViewTo(touchView, new PointF(originalView.getX(), originalView.getY()));
return touchView;
}

public interface TouchListener <V extends View> {
void onTap(V view);

void onTouchDown(V view);

void onTouchUp(V view);
}

protected class TouchDetector<T extends TouchListener<V>, V extends View> implements View.OnTouchListener {

@NonNull
protected final V mOriginalView;
@NonNull
protected final T mEventListener;

TouchDetector(@NonNull final V originalView, @NonNull final T touchListener) {
this.mOriginalView = originalView;
this.mEventListener = touchListener;
}

@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
switch (motionEvent.getAction()) {
case MotionEvent.ACTION_DOWN:
Log.d(TAG, "ACTION_DOWN");
mEventListener.onTouchDown(mOriginalView);
return true;
case MotionEvent.ACTION_UP:
Log.d(TAG, "ACTION_UP");
mEventListener.onTouchUp(mOriginalView);
mEventListener.onTap(mOriginalView);
return true;
default:
return false;
}
}
}

protected class TouchViewItem<V extends HoverFrameLayout, T extends TouchListener<V>> {
final V mOriginalView;
final View mTouchView;
final T mTouchListener;

TouchViewItem(final V originalView, final View touchView, final T touchListener, final String tag) {
this.mOriginalView = originalView;
this.mTouchView = touchView;
this.mTouchListener = touchListener;

mOriginalView.setTag(tag);
mTouchView.setTag(tag);

mTouchView.setOnTouchListener(createTouchDetector(mOriginalView, mTouchListener));
mOriginalView.addOnPositionChangeListener(mOnPositionChangeListener);
}

void destroy() {
mTouchView.setOnTouchListener(null);
mOriginalView.removeOnPositionChangeListener(mOnPositionChangeListener);
destroyTouchView(mTouchView);
}
}
}
Loading