Created
December 1, 2017 08:54
-
-
Save SIMMORSAL/1e371d9500f2fbddb6d31f4b39ad9b03 to your computer and use it in GitHub Desktop.
View Drag Layout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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"> | |
<Button | |
android:id="@+id/btnShowLayout" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_alignParentEnd="true" | |
android:text="show draggable layout" /> | |
<pl.droidsonroids.gif.GifImageView | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:src="@drawable/droid_dance" /> | |
</RelativeLayout> | |
<!-- =================== The views behind the draggable layout --> | |
<!-- the dragging and related views ========================== --> | |
<ImageView | |
android:id="@+id/imgDarkOverlay" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="#e0000000" /> | |
<LinearLayout | |
android:id="@+id/linDraggable" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="#E91E63" | |
android:clickable="true" | |
android:gravity="center" | |
android:orientation="vertical"> | |
<ImageView | |
android:layout_width="match_parent" | |
android:layout_height="200dp" | |
android:layout_marginBottom="30dp" | |
android:src="@drawable/android_apps" | |
android:tint="#fff" /> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:gravity="center" | |
android:text="This is a draggable Linear Layout" | |
android:textColor="#fff" | |
android:textSize="20sp" /> | |
</LinearLayout> | |
<View | |
android:id="@+id/viewTouchListener" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" /> | |
<!-- ========================== the dragging and related views --> | |
</FrameLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment