Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit fdb057c

Browse files
author
Matt Carroll
committed
Configured gradle to upload to Bintray and adjusted Javadoc comments to avoid breaking Doclint.
1 parent 61d0d3a commit fdb057c

File tree

9 files changed

+59
-7
lines changed

9 files changed

+59
-7
lines changed

build.gradle

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ buildscript {
77
dependencies {
88
classpath 'com.android.tools.build:gradle:1.3.0'
99

10-
// NOTE: Do not place your application dependencies here; they belong
11-
// in the individual module build.gradle files
10+
// For Bintray publishing
11+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
12+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
1213
}
1314
}
1415

hover/build.gradle

+36-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apply plugin: 'com.android.library'
22

3-
group = 'io.mattcarroll'
4-
version = '0.9.0-SNAPSHOT'
3+
version = '0.9.0'
54

65
android {
76
compileSdkVersion 23
@@ -25,3 +24,38 @@ dependencies {
2524
testCompile 'junit:junit:4.12'
2625
compile 'com.android.support:appcompat-v7:23.1.1'
2726
}
27+
28+
// For Bintray publishing
29+
ext {
30+
bintrayRepo = 'maven'
31+
bintrayName = 'hover'
32+
33+
publishedGroupId = 'io.mattcarroll.hover'
34+
artifact = 'hover'
35+
libraryName = 'Hover'
36+
37+
libraryDescription = 'An Android implementation of a floating menu.'
38+
39+
siteUrl = 'http://matthew-carroll.github.io/hover/'
40+
gitUrl = 'https://github.com/matthew-carroll/hover.git'
41+
42+
libraryVersion = version
43+
44+
developerId = 'matthew-carroll'
45+
developerName = 'Matt Carroll'
46+
developerEmail = 'me@mattcarroll.io'
47+
48+
licenseName = 'The Apache Software License, Version 2.0'
49+
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
50+
allLicenses = ["Apache-2.0"]
51+
}
52+
53+
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
54+
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
55+
56+
// The following is used to add our dependencies to the classpath for Javadoc linking.
57+
afterEvaluate {
58+
javadoc.classpath += files(android.libraryVariants.collect { variant ->
59+
variant.javaCompile.classpath.files
60+
})
61+
}

hover/src/main/java/io/mattcarroll/hover/HoverMenu.java

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ public interface HoverMenu {
1717
/**
1818
* Returns the current state of the collapsed menu anchor. When the {@code HoverMenu} is collapsed
1919
* and the user is not actively dragging it, the collapsed icon gets pulled to an anchor position.
20+
*
21+
* @return anchor state of this HoverMenu
2022
*/
2123
PointF getAnchorState();
2224

hover/src/main/java/io/mattcarroll/hover/Navigator.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ public interface Navigator {
1818
/**
1919
* Sets the title that is displayed by this {@code Navigator}. The details of the title presentation
2020
* are implementation specific.
21+
*
22+
* @param title Title displayed in this Navigator
2123
*/
2224
void setTitle(@NonNull String title);
2325

@@ -30,7 +32,7 @@ public interface Navigator {
3032
*
3133
* To remove the given {@code content}, make a corresponding call to {@link #popContent()}.
3234
*
33-
* @param content Content to display.
35+
* @param content Content to display
3436
*/
3537
void pushContent(@NonNull NavigatorContent content);
3638

hover/src/main/java/io/mattcarroll/hover/NavigatorContent.java

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ public interface NavigatorContent {
1010

1111
/**
1212
* Returns the visual display of this content.
13+
*
14+
* @return the visual representation of this content
1315
*/
1416
@NonNull
1517
View getView();

hover/src/main/java/io/mattcarroll/hover/defaulthovermenu/CollapsedMenuAnchor.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public float getAnchorNormalizedY() {
7979
* Sets the internal anchor state of this {@code CollapsedMenuAnchor}.
8080
*
8181
* @param side left or right side
82-
* @param normalizedY y-position normalized -> [0.0, 1.0]
82+
* @param normalizedY y-position normalized: [0.0, 1.0]
8383
*/
8484
public void setAnchorAt(int side, float normalizedY) {
8585
mSide = side;
@@ -112,7 +112,7 @@ public void setAnchorByInterpolation(@NonNull Rect bounds) {
112112
* were given, then the resulting anchor position would be (left, 0.7) because this anchor
113113
* operates by pulling items to the sides of the display.
114114
*
115-
* @param normalizedPosition (x,y) coordinate with normalized values -> [0.0,1.0]
115+
* @param normalizedPosition (x,y) coordinate with normalized values: [0.0,1.0]
116116
*/
117117
public void setAnchorByInterpolation(@NonNull PointF normalizedPosition) {
118118
mSide = normalizedPosition.x < 0.5f ? LEFT : RIGHT;

hover/src/main/java/io/mattcarroll/hover/defaulthovermenu/HoverMenuContentView.java

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ private void init() {
5454

5555
/**
5656
* Positions the selector triangle below the center of the given {@code tabView}.
57+
*
58+
* @param tabView the tab with which this content view will align its selector
5759
*/
5860
public void setActiveTab(@NonNull View tabView) {
5961
if (null != mSelectedTabView) {

hover/src/main/java/io/mattcarroll/hover/defaulthovermenu/utils/view/Dragger.java

+6
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,22 @@ interface DragListener {
3131

3232
/**
3333
* The user has begun dragging.
34+
* @param x x-coordinate of the user's drag start (in the parent View's coordinate space)
35+
* @param y y-coordiante of the user's drag start (in the parent View's coordinate space)
3436
*/
3537
void onDragStart(float x, float y);
3638

3739
/**
3840
* The user has dragged to the given coordinates.
41+
* @param x x-coordinate of the user's drag (in the parent View's coordinate space)
42+
* @param y y-coordiante of the user's drag (in the parent View's coordinate space)
3943
*/
4044
void onDragTo(float x, float y);
4145

4246
/**
4347
* The user has stopped touching the drag area.
48+
* @param x x-coordinate of the user's release (in the parent View's coordinate space)
49+
* @param y y-coordiante of the user's release (in the parent View's coordinate space)
4450
*/
4551
void onReleasedAt(float x, float y);
4652

hover/src/main/java/io/mattcarroll/hover/defaulthovermenu/utils/window/InWindowDragger.java

+3
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ public boolean onTouch(View view, MotionEvent motionEvent) {
8484

8585
/**
8686
* Note: {@code view} must already be added to the {@code Window}.
87+
* @param context context
88+
* @param windowViewController windowViewController
89+
* @param tapTouchSlop tapTouchSlop
8790
*/
8891
public InWindowDragger(@NonNull Context context, @NonNull WindowViewController windowViewController, float tapTouchSlop) {
8992
mContext = context;

0 commit comments

Comments
 (0)