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

Commit e9dfd53

Browse files
committed
Merge branch 'release/Release_1.1'
2 parents 5087868 + 44d538f commit e9dfd53

23 files changed

+710
-608
lines changed

README.md

+17-7
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ private void initializeDraggablePanel() throws Resources.NotFoundException {
8989
Import DraggablePanel dependency
9090
--------------------------------
9191

92-
Download the project, compile it using maven or gradle and import ``draggablepanel-1.0.2.aar`` into your project.
92+
Download the project, compile it using maven or gradle and import ``draggablepanel-1.1.aar`` into your project.
9393

9494
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.
9595

9696
```xml
9797
<dependency>
9898
<groupId>com.github.pedrovgs</groupId>
9999
<artifactId>draggablepanel</artifactId>
100-
<version>1.0.3</version>
100+
<version>1.1</version>
101101
<type>aar</type>
102102
</dependency>
103103
```
@@ -107,7 +107,7 @@ Or into your build.gradle
107107

108108
```groovy
109109
dependencies {
110-
compile 'com.github.pedrovgs:draggablepanel:1.0.3@aar'
110+
compile 'com.github.pedrovgs:draggablepanel:1.1@aar'
111111
compile 'com.android.support:support-v4:19.1.+'
112112
compile 'com.nineoldandroids:library:2.4.+'
113113
}
@@ -158,14 +158,22 @@ draggablePanel.setTopFragmentMarginBottom(topViewMargnBottom);
158158

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

161+
Do you want to resize the top view instead of scale it? Add ``dragable_view:top_view_resize`` attribute to your DraggableView:
162+
163+
```xml
164+
<com.github.pedrovgs.DraggableView
165+
xmlns:android="http://schemas.android.com/apk/res/android"
166+
xmlns:draggable_view="http://schemas.android.com/apk/res-auto"
167+
android:id="@+id/draggable_view"
168+
draggable_view:top_view_resize="true">
169+
```
161170

162-
TODO
163-
----
164171

165-
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:
172+
Do you want to contribute? TODO
173+
-------------------------------
166174

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

170178

171179
Developed By
@@ -184,6 +192,7 @@ Who's using it
184192
--------------
185193

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

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

@@ -234,3 +243,4 @@ License
234243
[15]: https://github.com/square/picasso
235244
[16]: http://actionbarsherlock.com/
236245
[17]: https://developers.google.com/youtube/android/player/
246+
[18]: https://play.google.com/store/apps/details?id=com.nero.dudeperfect

art/screenshot4.gif

5.65 MB
Loading

build.gradle

+10-7
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,25 @@ buildscript {
22
repositories {
33
mavenCentral()
44
}
5-
65
dependencies {
7-
classpath 'com.android.tools.build:gradle:0.9.+'
6+
classpath 'com.android.tools.build:gradle:0.12.+'
87
}
98
}
109

11-
def isReleaseBuild() {
12-
return version.contains("SNAPSHOT") == false
13-
}
14-
1510
allprojects {
11+
1612
version = VERSION_NAME
1713
group = GROUP
1814

1915
repositories {
2016
mavenCentral()
2117
mavenLocal()
2218
}
23-
}
19+
}
20+
21+
def isReleaseBuild() {
22+
return version.contains("SNAPSHOT") == false
23+
}
24+
25+
26+

draggablepanel/AndroidManifest.xml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest
3-
xmlns:android="http://schemas.android.com/apk/res/android"
4-
package="com.github.pedrovgs">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.github.pedrovgs">
54

6-
<uses-sdk android:minSdkVersion="8"
7-
android:targetSdkVersion="19"/>
5+
<uses-sdk
6+
android:minSdkVersion="8"
7+
android:targetSdkVersion="19" />
88

99
</manifest>

draggablepanel/build.gradle

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ android {
1919
sourceSets {
2020
main {
2121
manifest.srcFile 'AndroidManifest.xml'
22-
java.srcDirs = ['src']
22+
java.srcDirs = ['src/main/java']
2323
res.srcDirs = ['res']
2424
}
2525
}
@@ -29,4 +29,5 @@ android {
2929
}
3030
}
3131

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

draggablepanel/pom.xml

-71
This file was deleted.
+16-17
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<com.github.pedrovgs.DraggableView
3-
xmlns:android="http://schemas.android.com/apk/res/android"
4-
xmlns:draggable_view="http://schemas.android.com/apk/res-auto"
5-
android:id="@+id/draggable_view"
6-
android:layout_width="fill_parent"
7-
android:layout_height="fill_parent"
8-
draggable_view:top_view_id="@+id/drag_view"
9-
draggable_view:bottom_view_id="@+id/second_view">
2+
<com.github.pedrovgs.DraggableView xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:draggable_view="http://schemas.android.com/apk/res-auto"
4+
android:id="@+id/draggable_view"
5+
android:layout_width="fill_parent"
6+
android:layout_height="fill_parent"
7+
draggable_view:bottom_view_id="@+id/second_view"
8+
draggable_view:top_view_id="@+id/drag_view">
109

1110
<FrameLayout
12-
android:id="@+id/second_view"
13-
android:layout_below="@+id/drag_view"
14-
android:layout_width="fill_parent"
15-
android:layout_height="fill_parent"/>
11+
android:id="@+id/second_view"
12+
android:layout_width="fill_parent"
13+
android:layout_height="fill_parent"
14+
android:layout_below="@+id/drag_view" />
1615

1716
<FrameLayout
18-
android:id="@+id/drag_view"
19-
android:orientation="vertical"
20-
android:layout_height="wrap_content"
21-
android:layout_width="fill_parent"
22-
android:layout_alignParentTop="true"/>
17+
android:id="@+id/drag_view"
18+
android:layout_width="fill_parent"
19+
android:layout_height="wrap_content"
20+
android:layout_alignParentTop="true"
21+
android:orientation="vertical" />
2322

2423
</com.github.pedrovgs.DraggableView>

draggablepanel/res/values/attrs.xml

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<declare-styleable name="draggable_panel">
4-
<attr name="top_fragment_height" format="dimension"/>
5-
<attr name="x_scale_factor" format="float"/>
6-
<attr name="y_scale_factor" format="float"/>
7-
<attr name="top_fragment_margin_right" format="dimension"/>
8-
<attr name="top_fragment_margin_bottom" format="dimension"/>
9-
<attr name="enable_horizontal_alpha_effect" format="boolean"/>
4+
<attr name="top_fragment_height" format="dimension" />
5+
<attr name="x_scale_factor" format="float" />
6+
<attr name="y_scale_factor" format="float" />
7+
<attr name="top_fragment_margin_right" format="dimension" />
8+
<attr name="top_fragment_margin_bottom" format="dimension" />
9+
<attr name="enable_horizontal_alpha_effect" format="boolean" />
1010
</declare-styleable>
1111

1212
<declare-styleable name="draggable_view">
13-
<attr name="top_view_id" format="reference"/>
14-
<attr name="bottom_view_id" format="reference"/>
15-
<attr name="top_view_height" format="dimension"/>
16-
<attr name="top_view_x_scale_factor" format="float"/>
17-
<attr name="top_view_y_scale_factor" format="float"/>
18-
<attr name="top_view_margin_right" format="dimension"/>
19-
<attr name="top_view_margin_bottom" format="dimension"/>
20-
<attr name="enable_minimized_horizontal_alpha_effect" format="boolean"/>
13+
<attr name="top_view_id" format="reference" />
14+
<attr name="bottom_view_id" format="reference" />
15+
<attr name="top_view_height" format="dimension" />
16+
<attr name="top_view_x_scale_factor" format="float" />
17+
<attr name="top_view_y_scale_factor" format="float" />
18+
<attr name="top_view_margin_right" format="dimension" />
19+
<attr name="top_view_margin_bottom" format="dimension" />
20+
<attr name="enable_minimized_horizontal_alpha_effect" format="boolean" />
21+
<attr name="top_view_resize" format="boolean" />
2122
</declare-styleable>
2223

2324
</resources>

draggablepanel/src/main/java/com/github/pedrovgs/DraggablePanel.java

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class DraggablePanel extends FrameLayout {
3535
private static final float DEFAULT_SCALE_FACTOR = 2;
3636
private static final float DEFAULT_TOP_FRAGMENT_MARGIN = 0;
3737
private static final boolean DEFAULT_ENABLE_HORIZONTAL_ALPHA_EFFECT = true;
38+
private static final boolean DEFAULT_TOP_FRAGMENT_RESIZE = false;
3839

3940
private DraggableView draggableView;
4041
private DraggableListener draggableListener;

0 commit comments

Comments
 (0)