DragImageView
????????Imageview?????????????
How To Use
- 1.add dependency
allprojects {
repositories {
...
maven {
url "https://jitpack.io"
}
}
}
dependencies {
compile 'com.github.JayFang1993:DragImageView:v1.0'
}
- 2.???????Fragment??DragImageView???????????????Fragment??????????DragImageView????????????RotateRelativeLayout??
<FrameLayout
android:id="@+id/fl_bottom"
android:layout_width="match_parent"
android:layout_height="match_parent">
<info.fangjie.dragimageview.DragImageView
android:layout_width="fill_parent"
android:id="@+id/dragview_bottom"
android:background="#00ffffff"
android:src="@drawable/cute_or_not_default"
android:layout_height="fill_parent" />
<info.fangjie.dragimageview.RotateRelativeLayout
android:layout_width="fill_parent"
android:id="@+id/rl_bottom"
android:layout_height="fill_parent">
<TextView
android:layout_width="wrap_content"
android:gravity="left"
android:id="@+id/tv_mark_bottom"
android:textSize="16sp"
android:layout_centerHorizontal="true"
android:layout_marginTop="60dp"
android:textColor="#ffffff"
android:layout_height="wrap_content" />
</info.fangjie.dragimageview.RotateRelativeLayout>
</FrameLayout>
- 3.?????????LayerView
public class MyLayerView extends BaseLayerView {
MyLayerView(int layerOrder){
super(layerOrder);
}
public RotateRelativeLayout relativeLayout;
public TextView textView;
}
- 3.???DragImagview???? DragListener????????
layerViewBottom.dragImageView.setDragListener(new DragListener() {
@Override
public void onDrag(Matrix matrix, int state) {
}
@Override
public void onDragOutFinish(int direction) {
}
@Override
public void onDragOut(int direction) {
}
@Override
public void onDragReset(int direction) {
}
}
);
- More... see example
??????????
- ????
License
Copyright 2015 JayFang, Inc. 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 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.