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

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
FixedHeaderTableLayout is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells with scrolling and zooming features. FixedHeaderTableLayout is similar in construction and use as to Android's TableLayout

FixedHeaderTableLayout is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells with scrolling and zooming features. FixedHeaderTableLayout is similar in construction and use as to Android's TableLayout

null 33 Dec 8, 2022
Android component which presents a dismissible view from the bottom of the screen

BottomSheet BottomSheet is an Android component which presents a dismissible view from the bottom of the screen. BottomSheet can be a useful replaceme

Flipboard 4.5k Dec 28, 2022
ConstraintLayout is an Android layout component which allows you to position and size widgets in a flexible way

ConstraintLayout is a layout manager for Android which allows you to position and size widgets in a flexible way. It's available for both the Android view system and Jetpack Compose.

Android Jetpack 970 Jan 6, 2023
This component like SwipeRefreshLayout, it is more beautiful than SwipeRefreshLayout.

android-PullRefreshLayout This component like SwipeRefreshLayout, it is more beautiful than SwipeRefreshLayout. Demo Usage Add dependency. dependencie

星一 2.1k Dec 3, 2022
A wave view of android,can be used as progress bar.

WaveView ![Gitter](https://badges.gitter.im/Join Chat.svg) A wave view of android,can be used as progress bar. Screenshot APK demo.apk What can be use

Kai Wang 1.3k Dec 28, 2022
A togglelayout that can be used in setting interface

ToggleExpandLayout A togglelayout that can be used in setting interface. Originally designed by dribbble. And the author said that's why he designed t

Rongchan Liu 893 Dec 6, 2022
null 2.4k Dec 30, 2022
TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.

This project isn't maintained anymore. It is now recommended to use https://github.com/peterLaurence/MapView. MapView is maintained by Peter, one of o

Mike Dunn 1.5k Nov 21, 2022
A pull to refresh layout for android, the RecyclerRefreshLayout is based on the SwipeRefreshLayout. support all the views, highly customizable, code simplicity, etc. really a practical RefreshLayout!

RecyclerRefreshLayout English | 中文版 RecyclerRefreshLayout based on the {@link android.support.v4.widget.SwipeRefreshLayout} The RecyclerRefreshLayout

dinus_developer 1.7k Nov 10, 2022
Added support to modify text size and indicator width based on the original TabLayout.

XTabLayout——可修改选中项字体大小和指示器长度的TabLayout XTabLayout是基于design包中的TabLayout进行了功能的扩展,在保留原有功能的基础上,增加了修改选中项字体大小、修改指示器长度以及限制屏幕显示范围内显示的Tab个数。 集成步骤: 1.添加XTabLayo

Kennor 660 Dec 20, 2022
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

Txus Ballesteros 1.5k Jan 2, 2023
An Android library that help you to build app with swipe back gesture.

SwipeBackLayout An Android library that help you to build app with swipe back gesture. Demo Apk GooglePlay Requirement The latest android-support-v4.j

ike_w0ng 6.1k Dec 29, 2022
SwipeBack is an android library that can finish a activity by using gesture.

SwipeBack SwipeBack is a android library that can finish a activity by using gesture. You can set the swipe direction,such as left,top,right and botto

Eric 1.7k Nov 21, 2022
A very simple arc layout library for Android

ArcLayout A very simple arc layout library for Android. Try out the sample application on the Play Store. Usage (For a working implementation of this

ogaclejapan 1.4k Dec 26, 2022
A floating menu library for Android.

Hover Hover is a floating menu implementation for Android. Goals The goals of Hover are to: Provide an easy-to-use, out-of-the-box floating menu imple

Google 2.7k Dec 27, 2022
Simple android library to present an animated ferris wheel

Ferris Wheel View Overview An Android Library used to implement an animated Ferris Wheel in android. API SDK 15+ Written in Kotlin Supports landscape

Igor Lashkov 318 Dec 7, 2022
Android Library that lights items for tutorials or walk-throughs etc...

Spotlight Gradle dependencies { implementation 'com.github.takusemba:spotlight:x.x.x' } Usage val spotlight = Spotlight.Builder(this) .setTarg

TakuSemba 3.4k Dec 23, 2022
It's an Android library that allows you to use Layout as RadioButton or CheckBox.

Android - CompoundLayout It's an Android library that allows you to use Layout as RadioButton or CheckBox. The librarie is Android 14+ compatible. Gra

null 483 Nov 25, 2022