Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.

Related tags

UI/UX DraggablePanel
Overview

Draggable Panel Maven Central

DEPRECATED. This project is not maintained anymore.

Draggable Panel is an Android library created to build a draggable user interface similar to the new YouTube draggable video component based on Fragments or Views.

This Android library offers you two main classes to use and create your own awesome user interfaces. If you want to use it with fragments add DraggablePanel to your layout. If you want to use it with views use DraggableView and put your views inside.

This new component has been created using some concepts described on Flavien Laurent Blog and Denevell Blog.

To create this library I've used an Android component called ViewDragHelper and ViewDragHelper.Calback. This component doesn't have too much documentation and that's the reason why I've added some javadoc to my code in order to clarify the component usage.

This library works on Android 4.X or higher versions but not in lower versions because the scale effect is not going to work properly when the user try to drag the view. The clickable zone on a scaled view in Android 2.X is bigger than the real scaled zone.

Screenshots

Demo Screenshot 1 Demo Screenshot 2 Demo Screenshot 4 Demo Screenshot 3

Usage

To use Draggable Panel library and get your new awesome UI working you can use two different Android widgets:

    1. Add DraggablePanel widget to your layout. Configure the view customization elements using styleable attributes or programatically and configure your fragments to work as top or bottom fragment inside the DraggablePanel widget.
<com.github.pedrovgs.DraggablePanel
        android:id="@+id/draggable_panel"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"/>
private void initializeDraggablePanel() throws Resources.NotFoundException {
      draggablePanel.setFragmentManager(getSupportFragmentManager());
      draggablePanel.setTopFragment(placeFragment);
      draggablePanel.setBottomFragment(mapFragment);
      draggablePanel.initializeView();
}
    1. Add DraggableView widget to your layout. Configure the view to use two children views as the draggable view and the second view. Configure the customization elements using styleable attributes or programatically.
<com.github.pedrovgs.DraggableView
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:draggable_view="http://schemas.android.com/apk/res-auto"
          android:id="@+id/draggable_view"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          draggable_view:top_view_id="@+id/iv_fan_art"
          draggable_view:bottom_view_id="@+id/lv_episodes"
          draggable_view:top_view_x_scale_factor="@dimen/x_scale_factor"
          draggable_view:top_view_y_scale_factor="@dimen/y_scale_factor"
          draggable_view:top_view_margin_right="@dimen/top_fragment_margin"
          draggable_view:top_view_margin_bottom="@dimen/top_fragment_margin"
          android:background="@color/black">

      <!-- ListView Episodes -->

      <ListView
              android:id="@+id/lv_episodes"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
              android:layout_below="@+id/iv_fan_art"
              style="@style/episodes_list_view"/>

      <!-- TvShow Fan Art -->

      <ImageView
              android:id="@+id/iv_fan_art"
              android:layout_width="fill_parent"
              android:layout_height="@dimen/tv_show_fan_art_height"
              android:layout_alignParentTop="true"
              style="@style/image_view"/>

</com.github.pedrovgs.DraggableView>

**If you are going to use DraggablePanel or DraggableView combined with a DrawerLayout review Famous Places Sample Activity

Import DraggablePanel dependency

Download the project, compile it using maven or gradle and import draggablepanel-1.9.aar into your project.

Or declare it into your pom.xml. This library uses NineOldAndroid library and Android support library v4 version 19.1.0, you have to provide this dependencies from your local artifact repository or from maven central repository.

<dependency>
  <groupId>com.github.pedrovgs</groupId>
  <artifactId>draggablepanel</artifactId>
  <version>1.9</version>
  <type>aar</type>
</dependency>

Or into your build.gradle

dependencies {
    compile 'com.github.pedrovgs:draggablepanel:1.9'
}

Customization

You can customize some of the view effects programatically or using xml styleable attributes. The elements to customize are:

  • Draggable view / fragment height.
  • Draggable view X scale factor.
  • Draggable view Y scale factor.
  • Draggable view margin right applied when the view is minimized.
  • Draggable view margin bottom applied when the view is minimized.
  • Enable or disable the horizontal alpha effect applied while the view is being horizontally dragged.
  • Enable or disable touch on minimized/maximized view to minimize/maximize.
<com.github.pedrovgs.DraggableView
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:draggable_view="http://schemas.android.com/apk/res-auto"
        android:id="@+id/draggable_view"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        draggable_view:top_view_id="@+id/iv_fan_art"
        draggable_view:bottom_view_id="@+id/lv_episodes"
        draggable_view:top_view_x_scale_factor="@dimen/x_scale_factor"
        draggable_view:top_view_y_scale_factor="@dimen/y_scale_factor"
        draggable_view:top_view_margin_right="@dimen/top_fragment_margin"
        draggable_view:top_view_margin_bottom="@dimen/top_fragment_margin"
        draggable_view:enable_click_to_maximize_view="false"
        draggable_view:enable_click_to_minimize_view="true"
        android:background="@color/black">

        <!-- ....... -->

</com.github.pedrovgs.DraggableView>
draggablePanel.setTopFragment(placeFragment);
draggablePanel.setBottomFragment(mapFragment);
draggablePanel.setXScaleFactor(xScaleFactor);
draggablePanel.setYScaleFactor(yScaleFactor);
draggablePanel.setTopViewHeight(topViewHeight);
draggablePanel.setTopFragmentMarginRight(topViewMarginRight);
draggablePanel.setTopFragmentMarginBottom(topViewMargnBottom);
draggablePanel.setClickToMaximizeEnabled(enableClickToMaximize);
draggablePanel.setClickToMinimizeEnabled(enableClickToMinimize);

Similar customizable attributes are available programatically or using styleable attributes in DraggableView.

Do you want to resize the top view instead of scale it? Add dragable_view:top_view_resize attribute to your DraggableView:

<com.github.pedrovgs.DraggableView
            xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:draggable_view="http://schemas.android.com/apk/res-auto"
            android:id="@+id/draggable_view"
            draggable_view:top_view_resize="true">

Do you want to contribute? TODO

  • Support landscape mode when DraggableView is using ResizeTransformer.

Developed By

Follow me on Twitter Add me to Linkedin

*Does your app use DraggablePanel? If you want to be featured on this list tell me on Twitter

Libraries used on the sample project

License

Copyright 2014 Pedro Vicente Gómez Sánchez

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.
Comments
  • List view is destroying UI of draggable pannel in sample app

    List view is destroying UI of draggable pannel in sample app

    I imported your sample app and done minor changes. In framelayout i took first element as Listview(as i need to show working same as youtube app). When we minimize the vedio and i select any other element from listview then draggable pannel UI is getting distorted. I changed activity_youtube_sample.xml as following

    <!-- Movie Thumbnail -->
    
    <ListView
            android:id="@+id/ivx_thumbnail"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            />
    
    <!-- DraggablePanel -->
    
    <com.github.pedrovgs.DraggablePanel
            android:id="@+id/draggable_panel"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            draggable_panel:x_scale_factor="@dimen/x_scale_factor"
            draggable_panel:y_scale_factor="@dimen/y_scale_factor"
            draggable_panel:top_fragment_height="@dimen/top_fragment_height"
            draggable_panel:top_fragment_margin_right="@dimen/top_fragment_margin"
            draggable_panel:top_fragment_margin_bottom="@dimen/top_fragment_margin"
            draggable_panel:enable_horizontal_alpha_effect="false"/>
    
    Even i tried putting listview and draggable pannel in separate linear layout(with match parent) but still not working. And the rest of the code is as it is. I captured vedio of the error http://videobam.com/IUjYH This library is not working for me in this situation. Kindly help.
    opened by manpreetsinghsodhi 23
  • Getting error after implementing all jar

    Getting error after implementing all jar

    08-05 12:16:24.701: E/AndroidRuntime(19177): FATAL EXCEPTION: main 08-05 12:16:24.701: E/AndroidRuntime(19177): java.lang.RuntimeException: Unable to create application com.github.pedrovgs.sample.DraggablePanelApplication: java.lang.IllegalStateException: Module adapter for class com.github.pedrovgs.sample.di.MainModule could not be loaded. Please ensure that code generation was run for this module. 08-05 12:16:24.701: E/AndroidRuntime(19177): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4593) 08-05 12:16:24.701: E/AndroidRuntime(19177): at android.app.ActivityThread.access$1400(ActivityThread.java:157) 08-05 12:16:24.701: E/AndroidRuntime(19177): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1349) 08-05 12:16:24.701: E/AndroidRuntime(19177): at android.os.Handler.dispatchMessage(Handler.java:99) 08-05 12:16:24.701: E/AndroidRuntime(19177): at android.os.Looper.loop(Looper.java:176) 08-05 12:16:24.701: E/AndroidRuntime(19177): at android.app.ActivityThread.main(ActivityThread.java:5317) 08-05 12:16:24.701: E/AndroidRuntime(19177): at java.lang.reflect.Method.invokeNative(Native Method) 08-05 12:16:24.701: E/AndroidRuntime(19177): at java.lang.reflect.Method.invoke(Method.java:511) 08-05 12:16:24.701: E/AndroidRuntime(19177): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) 08-05 12:16:24.701: E/AndroidRuntime(19177): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) 08-05 12:16:24.701: E/AndroidRuntime(19177): at dalvik.system.NativeStart.main(Native Method) 08-05 12:16:24.701: E/AndroidRuntime(19177): Caused by: java.lang.IllegalStateException: Module adapter for class com.github.pedrovgs.sample.di.MainModule could not be loaded. Please ensure that code generation was run for this module. 08-05 12:16:24.701: E/AndroidRuntime(19177): at dagger.internal.FailoverLoader$1.create(FailoverLoader.java:45) 08-05 12:16:24.701: E/AndroidRuntime(19177): at dagger.internal.FailoverLoader$1.create(FailoverLoader.java:40) 08-05 12:16:24.701: E/AndroidRuntime(19177): at dagger.internal.Memoizer.get(Memoizer.java:56) 08-05 12:16:24.701: E/AndroidRuntime(19177): at dagger.internal.FailoverLoader.getModuleAdapter(FailoverLoader.java:57) 08-05 12:16:24.701: E/AndroidRuntime(19177): at dagger.internal.Modules.loadModules(Modules.java:43) 08-05 12:16:24.701: E/AndroidRuntime(19177): at dagger.ObjectGraph$DaggerObjectGraph.makeGraph(ObjectGraph.java:174) 08-05 12:16:24.701: E/AndroidRuntime(19177): at dagger.ObjectGraph$DaggerObjectGraph.access$000(ObjectGraph.java:138) 08-05 12:16:24.701: E/AndroidRuntime(19177): at dagger.ObjectGraph.create(ObjectGraph.java:129) 08-05 12:16:24.701: E/AndroidRuntime(19177): at com.github.pedrovgs.sample.DraggablePanelApplication.onCreate(DraggablePanelApplication.java:39) 08-05 12:16:24.701: E/AndroidRuntime(19177): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1017) 08-05 12:16:24.701: E/AndroidRuntime(19177): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4590) 08-05 12:16:24.701: E/AndroidRuntime(19177): ... 10 more

    opened by patelajay745 21
  • DraggablePanel and VideoPlayer usage generates some empty spaces between dragged view and second view.

    DraggablePanel and VideoPlayer usage generates some empty spaces between dragged view and second view.

    Added two fragments to DraggablePanel one is Video player second one is list fragment

    while maximizing the view, videoview is getting moved slightly then it will have some empty space in corners its not happening with normal views like images its happening only while playing video

    bug 
    opened by jayachandrak 20
  • DraggablePanel using ResizeTransformer goes below the screen and is half hidden.

    DraggablePanel using ResizeTransformer goes below the screen and is half hidden.

    Hi, I am using Draggable panel and resizing feature to play videos. The issue is when i minimize the panel, it is half hidden in the screen and does not close to left or Right in minimize state.

    Please Look into the issue.

    bug 
    opened by Amritpal33 19
  • Resize transformer fix

    Resize transformer fix

    Many changes, please look at commit comments. I tried to commit small code changes related to one issue at time.

    ResizeTransformer should now work more smoothly, because layout is redrawn only once in one pass of Drag Listener.

    I removed some unnecessary methods an simplified Transformers code...

    opened by Fiddl3 18
  • ResizeTransformer can't be used from DraggablePanel, you have to use DraggableView

    ResizeTransformer can't be used from DraggablePanel, you have to use DraggableView

    There were many issues, that minimised youtubeplayersupportfragment displays only topleft corner of the video. And there were recommendations which did not work: set draggable_panel:top_view_resize="true"/ It did not work because this paramenter was never transmited to draggableview ( as i see in latest 1.6 snapshot version of source library) after I modefied

            public void initializeView() {
        checkFragmentConsistency();
        checkSupportFragmentManagerConsistency();
    
        inflate(getContext(), R.layout.draggable_panel, this);
        draggableView = (DraggableView) findViewById(R.id.draggable_view);
        draggableView.setTopViewHeight(topFragmentHeight);
        draggableView.setFragmentManager(fragmentManager);
        draggableView.attachTopFragment(topFragment);
        draggableView.setXTopViewScaleFactor(xScaleFactor);
        draggableView.setYTopViewScaleFactor(yScaleFactor);
        draggableView.setTopViewMarginRight(topFragmentMarginRight);
        draggableView.setTopViewMarginBottom(topFragmentMarginBottom);
        draggableView.attachBottomFragment(bottomFragment);
        draggableView.setDraggableListener(draggableListener);
          draggableView.setTopViewResize(true);
        draggableView.setHorizontalAlphaEffectEnabled(enableHorizontalAlphaEffect);
      }
    

    inside DragablePanel.java? I can see nice resied minimised youtubeplayerfragment ScreenShot But new issue arise from this. Dragview became overlaped by few pixels and i cant understand where it comes from.

    01-16 12:04:41.863  30020-30020/bigdig.yarh.ellotv.activitytry W/YouTubeAndroidPlayerAPI﹕ YouTube video playback stopped due to unauthorized overlay on top of player. The YouTubePlayerView is not contained inside its ancestor android.widget.FrameLayout{41c08630 V.E..... ........ 360,914-720,1114 #7f0d00ae app:id/drag_view}. The distances between the ancestor's edges and that of the YouTubePlayerView is: left: 0, top: 0, right: -3, bottom: -1 (these should all be positive).
    
    help wanted 
    opened by frakc 17
  • Draggable view is not working as expected  in minimized state when moving left or right.

    Draggable view is not working as expected in minimized state when moving left or right.

    Hi, when i drag view in left or right in minimized form then vedio is not behaving or moving properly. I tried to do some changes in viewcallback class but not working my way. It is not going smooth for me i.e on dragging right the view is going completely left.

    I checked your app on play store, there it is working fine but when i run your sample app i am facing these issues.

    Moreover when view is dragged to minimized state then it got some margins in left and right in every vedio. Please help me resolve this issue. Thanks

    bug 
    opened by manpreetsinghsodhi 11
  • DraggablePanel onclick Event for top view when view is minimized

    DraggablePanel onclick Event for top view when view is minimized

    I haven't been able to find a click event for top view when draggable panel view is minimized. I want to maximize the draggable view, on click of the top view (when its in minimized state). I am implementing the same feature as in Youtube.

    help wanted 
    opened by JoysonF 10
  • Cannot move Top player down/up when bottombar hide/show

    Cannot move Top player down/up when bottombar hide/show

    Dear All, I am facing a problem with Bottombar tab with Top player of DraggablePanel

    I cannot move Top player by setTopFragmentMarginBottom dynamically when bottombar show or hide

    Is Anyone using DraggablePanel with Bottombar successful?

    Thanks in advanced!

    question 
    opened by manhhoangxuan 8
  • Error on screen rotation when minimized: JNI DETECTED ERROR IN APPLICATION

    Error on screen rotation when minimized: JNI DETECTED ERROR IN APPLICATION

    Android version 6.0 When the player is minimized and I rotate the screen I get the following error: JNI DETECTED ERROR IN APPLICATION: JNI CallObjectMethod called with pending exception java.lang.IllegalStateException: Unable to create layer for FrameLayout

    Is anyone else exeriencing this?

    11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] JNI DETECTED ERROR IN APPLICATION: JNI CallObjectMethod called with pending exception java.lang.IllegalStateException: Unable to create layer for FrameLayout 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2) 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:323) 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] at void android.os.Looper.loop() (Looper.java:135) 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:5417) 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2) 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:726) 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:616) 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] in call to CallObjectMethod 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] from void android.os.MessageQueue.nativePollOnce(long, int) 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] "main" prio=5 tid=1 Runnable 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] | group="main" sCount=0 dsCount=0 obj=0x73a282a0 self=0xb4d36a00 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] | sysTid=352 nice=0 cgrp=default sched=0/0 handle=0xb6f13b34 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] | state=R schedstat=( 2126617067 433271528 2520 ) utm=185 stm=27 core=1 HZ=100 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] | stack=0xbe641000-0xbe643000 stackSize=8MB 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] | held mutexes= "mutator lock"(shared held) 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #00 pc 00370aa9 /system/lib/libart.so (art::DumpNativeStack(std::1::basic_ostream<char, std::1::char_traits >&, int, char const, art::ArtMethod, void)+160) 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #01 pc 003503b7 /system/lib/libart.so (art::Thread::Dump(std::1::basic_ostream<char, std::1::char_traits >&) const+150) 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #02 pc 0025a6fd /system/lib/libart.so (art::JavaVMExt::JniAbort(char const, char const)+740) 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #03 pc 0025add5 /system/lib/libart.so (art::JavaVMExt::JniAbortV(char const, char const, std::va_list)+64) 11-06 16:41:31.301 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #04 pc 000fd1d1 /system/lib/libart.so (art::ScopedCheck::AbortF(char const, ...)+32) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #05 pc 001022e5 /system/lib/libart.so (art::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const, art::JniValueType) (.constprop.95)+5072) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #06 pc 00110b73 /system/lib/libart.so (art::CheckJNI::CallMethodV(char const_, JNIEnv, jobject, jclass, jmethodID, std::va_list, art::Primitive::Type, art::InvokeType)+534) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #07 pc 001124f1 /system/lib/libart.so (art::CheckJNI::CallObjectMethod(JNIEnv, jobject, jmethodID, ...)+48) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #08 pc 00002bbb /system/lib/libnativehelper.so (jniGetReferent+94) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #09 pc 00076157 /system/lib/libandroid_runtime.so (android::NativeDisplayEventReceiver::dispatchVsync(long long, int, unsigned int)+26) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #10 pc 00076379 /system/lib/libandroid_runtime.so (android::NativeDisplayEventReceiver::handleEvent(int, int, void)+80) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #11 pc 00012d1b /system/lib/libutils.so (android::Looper::pollInner(int)+530) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #12 pc 00012deb /system/lib/libutils.so (android::Looper::pollOnce(int, int, int_, void__)+130) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #13 pc 00081b75 /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(JNIEnv, _jobject*, int)+22) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] native: #14 pc 0000056d /data/dalvik-cache/arm/system@[email protected] (Java_android_os_MessageQueue_nativePollOnce__JI+96) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] at android.os.MessageQueue.nativePollOnce(Native method) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] at android.os.MessageQueue.next(MessageQueue.java:323) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] at android.os.Looper.loop(Looper.java:135) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] at android.app.ActivityThread.main(ActivityThread.java:5417) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] at java.lang.reflect.Method.invoke!(Native method) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 11-06 16:41:31.302 352-352/com.myApp A/art: art/runtime/java_vm_ext.cc:410]

    opened by sierra-delta 8
  • FullScreen

    FullScreen

    @pedrovgs I'm facing some problems with the slide and touch issues. I need create a Sequencer animation on Rebound to provide a better look for this animation. But what we have now is amazing!

    I need some help!

    opened by ppamorim 8
  • How to bring DraggablePanel overlay all activity

    How to bring DraggablePanel overlay all activity

    Hi

    I try add DraggablePanel to windowmanager with type_system_overlay but thought exeption java.lang.IllegalArgumentException: No view found for id for dragview and second_view

    Please help me.

    opened by tuananhdtu 0
  • After updating Android 3.0

    After updating Android 3.0

    android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class com.github.pedrovgs.DraggableView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2924) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2985) at android.app.ActivityThread.-wrap14(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1635) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6692) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358) Caused by: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class com.github.pedrovgs.DraggableView Caused by: android.view.InflateException: Binary XML file line #0: Error inflating class com.github.pedrovgs.DraggableView Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:430) at android.view.LayoutInflater.createView(LayoutInflater.java:652) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:794) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:734) at android.view.LayoutInflater.rInflate(LayoutInflater.java:865) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:828) at android.view.LayoutInflater.inflate(LayoutInflater.java:525) at android.view.LayoutInflater.inflate(LayoutInflater.java:427) at android.view.LayoutInflater.inflate(LayoutInflater.java:378) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.lts.cricingif.Actvites.MainActivity.onCreate(MainActivity.java:236) at android.app.Activity.performCreate(Activity.java:6912) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2877) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2985) at android.app.ActivityThread.-wrap14(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1635) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6692) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358) Caused by: java.lang.NumberFormatException: For input string: "200.0dip" at java.lang.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1306) at java.lang.Float.parseFloat(Float.java:459) at android.content.res.TypedArray.getFloat(TypedArray.java:423) at com.github.pedrovgs.DraggableView.initializeAttributes(DraggableView.java:676) at com.github.pedrovgs.DraggableView.(DraggableView.java:85)

    opened by sandmanDev 0
  • After updating android studio to 3.0 faced this problem

    After updating android studio to 3.0 faced this problem

    10-30 12:12:17.610 26881-26881/? I/art: Late-enabling -Xcheck:jni 10-30 12:12:17.696 26881-26881/com.kidsapp W/System: ClassLoader referenced unknown path: /data/app/com.kidsapp-2/lib/arm 10-30 12:12:17.700 26881-26881/com.kidsapp D/ActivityThread: BIND_APPLICATION handled : 0 / AppBindData{appInfo=ApplicationInfo{32a37bc com.kidsapp}} 10-30 12:12:17.701 26881-26881/com.kidsapp V/ActivityThread: Handling launch of ActivityRecord{d5d3345 token=android.os.BinderProxy@2ac0a9a {com.kidsapp/com.kidsapp.Main2Activity}} startsNotResumed=false 10-30 12:12:17.717 26881-26881/com.kidsapp V/ActivityThread: ActivityRecord{d5d3345 token=android.os.BinderProxy@2ac0a9a {com.kidsapp/com.kidsapp.Main2Activity}}: app=android.app.Application@44113a8, appName=com.kidsapp, pkg=com.kidsapp, comp={com.kidsapp/com.kidsapp.Main2Activity}, dir=/data/app/com.kidsapp-2/base.apk 10-30 12:12:17.754 26881-26881/com.kidsapp W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 10-30 12:12:17.772 26881-26903/com.kidsapp I/System: FinalizerDaemon: finalize objects = 1 10-30 12:12:17.786 26881-26881/com.kidsapp E/MultiWindowProxy: getServiceInstance failed! 10-30 12:12:17.878 26881-26881/? D/AndroidRuntime: Shutting down VM 10-30 12:12:17.881 26881-26881/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.kidsapp, PID: 26881 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.kidsapp/com.kidsapp.Main2Activity}: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class com.github.pedrovgs.DraggableView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2572) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:207) at android.app.ActivityThread.main(ActivityThread.java:5728) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679) Caused by: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class com.github.pedrovgs.DraggableView at android.view.LayoutInflater.inflate(LayoutInflater.java:539) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at android.view.View.inflate(View.java:20171) at com.github.pedrovgs.DraggablePanel.initializeView(DraggablePanel.java:263) at com.kidsapp.Main2Activity.onCreate(Main2Activity.java:27) at android.app.Activity.performCreate(Activity.java:6301) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2519) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)  at android.app.ActivityThread.-wrap11(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)  at android.os.Handler.dispatchMessage(Handler.java:111)  at android.os.Looper.loop(Looper.java:207)  at android.app.ActivityThread.main(ActivityThread.java:5728)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)  Caused by: android.view.InflateException: Binary XML file line #0: Error inflating class com.github.pedrovgs.DraggableView at android.view.LayoutInflater.createView(LayoutInflater.java:645) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) at android.view.LayoutInflater.inflate(LayoutInflater.java:492) at android.view.LayoutInflater.inflate(LayoutInflater.java:423)  at android.view.LayoutInflater.inflate(LayoutInflater.java:374)  at android.view.View.inflate(View.java:20171)  at com.github.pedrovgs.DraggablePanel.initializeView(DraggablePanel.java:263)  at com.kidsapp.Main2Activity.onCreate(Main2Activity.java:27)  at android.app.Activity.performCreate(Activity.java:6301)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2519)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)  at android.app.ActivityThread.-wrap11(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)  at android.os.Handler.dispatchMessage(Handler.java:111)  at android.os.Looper.loop(Looper.java:207)  at android.app.ActivityThread.main(ActivityThread.java:5728)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)  Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance(Native Method) at android.view.LayoutInflater.createView(LayoutInflater.java:619) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)  at android.view.LayoutInflater.inflate(LayoutInflater.java:492)  at android.view.LayoutInflater.inflate(LayoutInflater.java:423)  at android.view.LayoutInflater.inflate(LayoutInflater.java:374)  at android.view.View.inflate(View.java:20171)  at com.github.pedrovgs.DraggablePanel.initializeView(DraggablePanel.java:263)  at com.kidsapp.Main2Activity.onCreate(Main2Activity.java:27)  at android.app.Activity.performCreate(Activity.java:6301)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2519)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)  at android.app.ActivityThread.-wrap11(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)  at android.os.Handler.dispatchMessage(Handler.java:111)  at android.os.Looper.loop(Looper.java:207)  at android.app.ActivityThread.main(ActivityThread.java:5728)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)  Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x12 at android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:666) at com.github.pedrovgs.DraggableView.initializeAttributes(DraggableView.java:680) at com.github.pedrovgs.DraggableView.(DraggableView.java:85) at java.lang.reflect.Constructor.newInstance(Native Method)  at android.view.LayoutInflater.createView(LayoutInflater.java:619)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)  at android.view.LayoutInflater.inflate(LayoutInflater.java:492)  at android.view.LayoutInflater.inflate(LayoutInflater.java:423)  at android.view.LayoutInflater.inflate(LayoutInflater.java:374)  at android.view.View.inflate(View.java:20171)  at com.github.pedrovgs.DraggablePanel.initializeView(DraggablePanel.java:263)  at com.kidsapp.Main2Activity.onCreate(Main2Activity.java:27)  at android.app.Activity.performCreate(Activity.java:6301)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2519)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2654)  at android.app.ActivityThread.-wrap11(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1488)  at android.os.Handler.dispatchMessage(Handler.java:111)  at android.os.Looper.loop(Looper.java:207)  at android.app.ActivityThread.main(ActivityThread.java:5728)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)  10-30 12:12:17.892 26881-26881/? I/Process: Sending signal. PID: 26881 SIG: 9


    apply plugin: 'com.android.application'

    android { compileSdkVersion 26 defaultConfig { applicationId "com.kidsapp" minSdkVersion 16 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    }
    
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    

    }

    dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' implementation files('libs/google-api-services-youtube-v3-rev182-1.22.0.jar') implementation files('libs/YouTubeAndroidPlayerApi.jar') compile 'com.amitshekhar.android:android-networking:1.0.0' compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.github.pedrovgs:draggablepanel:1.9'

    }


    <com.github.pedrovgs.DraggablePanel
        android:id="@+id/draggable_panel"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
    
    </com.github.pedrovgs.DraggablePanel>
    
    <Button
        android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:text="Click Me" />
    

    package com.kidsapp;

    import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button;

    import com.github.pedrovgs.DraggablePanel;

    public class Main2Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
    
        Button button;
        final DraggablePanel draggablePanel;
        draggablePanel = findViewById(R.id.draggable_panel);
    
        draggablePanel.setFragmentManager(getSupportFragmentManager());
        draggablePanel.setTopFragment(new One());
        draggablePanel.setBottomFragment(new Two());
        draggablePanel.setTopViewHeight(300);
        draggablePanel.initializeView();
    
    
        Handler handler = new Handler();
    
        handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                draggablePanel.closeToLeft();
            }
        },100);
    
        button = findViewById(R.id.button);
    
        button.setOnClickListener(
                new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        draggablePanel.maximize();
                    }
                }
        );
    
    
    }
    

    }

    opened by hasssanshah7864 0
  • Add ScrollView or NestedScrollView

    Add ScrollView or NestedScrollView

    Hi ... It is possible to add or make compatible with a ScrollView or NestedScrollView with the draggable Panel, for the user can move the image, video or top component (view_suspensible: top_view_id) when scrolling up and down.

    opened by rogerp91 0
  • Move player around the screen

    Move player around the screen

    Hello ! First congrats for the project!

    Someone can help me ? How can i move the player around the screen ? (better in all screen) not just left ou right side. in the bottom.. but move to center, top..down ..left, right..

    Sorry for my poor english!

    opened by lucazin 0
Releases(RELEASE-1.9)
Owner
Pedro Vicente Gómez Sánchez
"Sometimes it is the people no one imagines anything of who do the things no one can imagine." - Alan Turing
Pedro Vicente Gómez Sánchez
This library provides a simple way to add a draggable sliding up panel (popularized by Google Music and Google Maps) to your Android application. Brought to you by Umano.

Note: we are not actively responding to issues right now. If you find a bug, please submit a PR. Android Sliding Up Panel This library provides a simp

Umano: News Read To You 9.4k Dec 31, 2022
Draggable views with rotation and skew/scale effects

DraggableView Draggable views with rotation and skew/scale effects. Usage Implement DragController.IDragViewGroup Create instance of DragController Ov

Eugene Levenetc 562 Nov 11, 2022
Android library implementing a poppy view on scroll, similar to the one found in the Google Plus app

PoppyView PoppyView is a library which implements view on the bottom which come and go relative to the user scroll. It can be seen in the Google plus

Flavien Laurent 409 Nov 23, 2022
A beautiful Android custom View that works similar to a range or seekbar. With animations.

ValueBar A beautiful Android custom View that works similar to a range or seekbar. Selection by gesture. With animations. Supporting API level 11+. De

Philipp Jahoda 147 Nov 20, 2022
A simple screen that is shown when your app gets crashed instead of the normal crash dialog. It's very similar to the one in Flutter.

Red Screen Of Death What A simple screen that is shown when your app gets crashed instead of the normal crash dialog. It's very similar to the one in

Ahmad Melegy 178 Dec 9, 2022
Pinterest like awesome menu control for Android

Pinterest like awesome menu control for Android DEMO NOTE Any pull request is available. HOW TO USE /** * PinterestView'layoutPar

Bruce too 421 Nov 21, 2022
Awesome RunnerBe design system and more!

Honeycomb Awesome RunnerBe design system and more! Core Preview 아직 모든 요소가 구현되지 않았으며 단순히 미리보기 입니다 class MainActivity : AppCompatActivity() { overri

RunnerBe 2 Apr 21, 2022
Library and example project on how to use the UITableView component

UITableView for Android Usage Installation Android Studio Paste or clone this library into the /libs folder, in the root directory of your project. Cr

Thiago Locatelli 679 Nov 11, 2022
Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. The library is based on the code of Mario Klingemann.

Android StackBlur Android StackBlur is a library that can perform a blurry effect on a Bitmap based on a gradient or radius, and return the result. Th

Enrique López Mañas 3.6k Dec 29, 2022
A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on Android 2.1+ (Eclair MR1 / level 7).

Android Switch Preference Backport A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on

Benoit Lubek 498 Dec 29, 2022
[] A fast PDF reader component for Android development

This project is no longer maintained. You can find a good replacement here, which is a fork relying on Pdfium instead of Vudroid/MuPDF for decoding PD

Joan Zapata 2.8k Dec 16, 2022
(Deprecated) A custom view component that mimics the new Material Design Bottom Navigation pattern.

BottomBar (Deprecated) I don't have time to maintain this anymore. I basically wrote the whole library in a rush, without tests, while being a serious

Iiro Krankka 8.4k Dec 29, 2022
A tinder like swipeable card stack component

AndroidSwipeableCardStack Change log: provide option to infinitly swipe in a loop card rotation setting card gravity setting undo animation Thanks for

wenchao jiang 824 Nov 10, 2022
Component Box - a multiplatform server-driven UI framework

Component Box · Component Box is a multiplatform server-driven UI framework. Learn how to use Component Box in your project. Installation implementati

Dropbox 216 Dec 31, 2022
A Tinder-like Android library to create the swipe cards effect. You can swipe left or right to like or dislike the content.

Swipecards Travis master: A Tinder-like cards effect as of August 2014. You can swipe left or right to like or dislike the content. The library create

Dionysis Lorentzos 2.3k Dec 9, 2022
💳 CreditCardView is an Android library that allows developers to create the UI which replicates an actual Credit Card.

CreditCard View CreditCardView is an Android library that allows developers to create the UI which replicates an actual Credit Card. Displaying and en

Vinay Gaba 769 Dec 14, 2022
Android library to create chat message view easily

ChatMessageView ChatMessageView helps you to create chat message view quickly like a typical chatting application. Its a container view, so you can ad

Himanshu Soni 641 Dec 24, 2022
Sentinel is a simple one screen UI which provides a standardised entry point for tools used in development and QA alongside device, application and permissions data.

Sentinel Sentinel is a simple one screen UI that provides standardised entry point for tools used in development and QA alongside device, application

Infinum 29 Dec 12, 2022