Skip to content
This repository has been archived by the owner on Nov 22, 2017. It is now read-only.

Commit

Permalink
Merge branch 'release/Release_1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrovgs committed Aug 4, 2014
2 parents 5087868 + 44d538f commit e9dfd53
Show file tree
Hide file tree
Showing 23 changed files with 710 additions and 608 deletions.
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ private void initializeDraggablePanel() throws Resources.NotFoundException {
Import DraggablePanel dependency
--------------------------------

Download the project, compile it using maven or gradle and import ``draggablepanel-1.0.2.aar`` into your project.
Download the project, compile it using maven or gradle and import ``draggablepanel-1.1.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.

```xml
<dependency>
<groupId>com.github.pedrovgs</groupId>
<artifactId>draggablepanel</artifactId>
<version>1.0.3</version>
<version>1.1</version>
<type>aar</type>
</dependency>
```
Expand All @@ -107,7 +107,7 @@ Or into your build.gradle

```groovy
dependencies {
compile 'com.github.pedrovgs:draggablepanel:1.0.3@aar'
compile 'com.github.pedrovgs:draggablepanel:1.1@aar'
compile 'com.android.support:support-v4:19.1.+'
compile 'com.nineoldandroids:library:2.4.+'
}
Expand Down Expand Up @@ -158,14 +158,22 @@ draggablePanel.setTopFragmentMarginBottom(topViewMargnBottom);

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:

```xml
<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">
```

TODO
----

I don't have too much time to work on this library and I'm going to put in this section some things to do in the future:
Do you want to contribute? TODO
-------------------------------

* Support Android Studio / IntelliJ layout preview mode.
* Create other draggable component to resize elements instead of scale the view. This new component is needed to drag and resize videos.
* Add Travis CI support wity .travis.yml file.


Developed By
Expand All @@ -184,6 +192,7 @@ Who's using it
--------------

* [El Rubius Vídeos][9] using the first beta release.
* [DudePerfect Vídeos] [18] using the first beta release.

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

Expand Down Expand Up @@ -234,3 +243,4 @@ License
[15]: https://github.com/square/picasso
[16]: http://actionbarsherlock.com/
[17]: https://developers.google.com/youtube/android/player/
[18]: https://play.google.com/store/apps/details?id=com.nero.dudeperfect
Binary file modified art/screenshot4.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 10 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@ buildscript {
repositories {
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
classpath 'com.android.tools.build:gradle:0.12.+'
}
}

def isReleaseBuild() {
return version.contains("SNAPSHOT") == false
}

allprojects {

version = VERSION_NAME
group = GROUP

repositories {
mavenCentral()
mavenLocal()
}
}
}

def isReleaseBuild() {
return version.contains("SNAPSHOT") == false
}



10 changes: 5 additions & 5 deletions draggablepanel/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.pedrovgs">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.pedrovgs">

<uses-sdk android:minSdkVersion="8"
android:targetSdkVersion="19"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />

</manifest>
5 changes: 3 additions & 2 deletions draggablepanel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ android {
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
java.srcDirs = ['src/main/java']
res.srcDirs = ['res']
}
}
Expand All @@ -29,4 +29,5 @@ android {
}
}

apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
apply from: 'https://raw.github.com/jpardogo/gradle-mvn-push/master/gradle-mvn-push.gradle'

71 changes: 0 additions & 71 deletions draggablepanel/pom.xml

This file was deleted.

33 changes: 16 additions & 17 deletions draggablepanel/res/layout/draggable_panel.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<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/drag_view"
draggable_view:bottom_view_id="@+id/second_view">
<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:bottom_view_id="@+id/second_view"
draggable_view:top_view_id="@+id/drag_view">

<FrameLayout
android:id="@+id/second_view"
android:layout_below="@+id/drag_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
android:id="@+id/second_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/drag_view" />

<FrameLayout
android:id="@+id/drag_view"
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_alignParentTop="true"/>
android:id="@+id/drag_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:orientation="vertical" />

</com.github.pedrovgs.DraggableView>
29 changes: 15 additions & 14 deletions draggablepanel/res/values/attrs.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="draggable_panel">
<attr name="top_fragment_height" format="dimension"/>
<attr name="x_scale_factor" format="float"/>
<attr name="y_scale_factor" format="float"/>
<attr name="top_fragment_margin_right" format="dimension"/>
<attr name="top_fragment_margin_bottom" format="dimension"/>
<attr name="enable_horizontal_alpha_effect" format="boolean"/>
<attr name="top_fragment_height" format="dimension" />
<attr name="x_scale_factor" format="float" />
<attr name="y_scale_factor" format="float" />
<attr name="top_fragment_margin_right" format="dimension" />
<attr name="top_fragment_margin_bottom" format="dimension" />
<attr name="enable_horizontal_alpha_effect" format="boolean" />
</declare-styleable>

<declare-styleable name="draggable_view">
<attr name="top_view_id" format="reference"/>
<attr name="bottom_view_id" format="reference"/>
<attr name="top_view_height" format="dimension"/>
<attr name="top_view_x_scale_factor" format="float"/>
<attr name="top_view_y_scale_factor" format="float"/>
<attr name="top_view_margin_right" format="dimension"/>
<attr name="top_view_margin_bottom" format="dimension"/>
<attr name="enable_minimized_horizontal_alpha_effect" format="boolean"/>
<attr name="top_view_id" format="reference" />
<attr name="bottom_view_id" format="reference" />
<attr name="top_view_height" format="dimension" />
<attr name="top_view_x_scale_factor" format="float" />
<attr name="top_view_y_scale_factor" format="float" />
<attr name="top_view_margin_right" format="dimension" />
<attr name="top_view_margin_bottom" format="dimension" />
<attr name="enable_minimized_horizontal_alpha_effect" format="boolean" />
<attr name="top_view_resize" format="boolean" />
</declare-styleable>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class DraggablePanel extends FrameLayout {
private static final float DEFAULT_SCALE_FACTOR = 2;
private static final float DEFAULT_TOP_FRAGMENT_MARGIN = 0;
private static final boolean DEFAULT_ENABLE_HORIZONTAL_ALPHA_EFFECT = true;
private static final boolean DEFAULT_TOP_FRAGMENT_RESIZE = false;

private DraggableView draggableView;
private DraggableListener draggableListener;
Expand Down
Loading

0 comments on commit e9dfd53

Please sign in to comment.