File tree Expand file tree Collapse file tree
main/java/com/nagopy/android/overlayviewmanager
test/java/com/nagopy/android/overlayviewmanager Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,3 +111,28 @@ install {
111111 }
112112 }
113113}
114+
115+ task sourcesJar (type : Jar ) {
116+ from android. sourceSets. main. java. srcDirs
117+ classifier = ' sources'
118+ }
119+
120+ task javadoc (type : Javadoc ) {
121+ source = android. sourceSets. main. java. srcDirs
122+ classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
123+ }
124+
125+ afterEvaluate {
126+ javadoc. classpath + = files(android. libraryVariants. collect { variant ->
127+ variant. javaCompile. classpath. files
128+ })
129+ }
130+
131+ task javadocJar (type : Jar , dependsOn : javadoc) {
132+ classifier = ' javadoc'
133+ from javadoc. destinationDir
134+ }
135+ artifacts {
136+ archives javadocJar
137+ archives sourcesJar
138+ }
Original file line number Diff line number Diff line change @@ -380,6 +380,16 @@ public OverlayView<T> setX(int x) {
380380 return this ;
381381 }
382382
383+ /**
384+ * Get the X position.
385+ *
386+ * @return X position. The unit is pixels.
387+ * @see WindowManager.LayoutParams#x
388+ */
389+ public int getX () {
390+ return params .x ;
391+ }
392+
383393 /**
384394 * Set the Y position.
385395 *
@@ -393,6 +403,16 @@ public OverlayView<T> setY(int y) {
393403 return this ;
394404 }
395405
406+ /**
407+ * Get the Y position.
408+ *
409+ * @return Y position. The unit is pixels.
410+ * @see WindowManager.LayoutParams#y
411+ */
412+ public int getY () {
413+ return params .y ;
414+ }
415+
396416 /**
397417 * Set the brightness of the screen.
398418 *
Original file line number Diff line number Diff line change @@ -266,6 +266,22 @@ public void setY() throws Exception {
266266 assertThat (overlayView .params .y , is (200 ));
267267 }
268268
269+ @ Test
270+ public void getX () throws Exception {
271+ assertThat (overlayView .params .x , is (0 ));
272+
273+ overlayView .params .x = 100 ;
274+ assertThat (overlayView .getX (), is (100 ));
275+ }
276+
277+ @ Test
278+ public void getY () throws Exception {
279+ assertThat (overlayView .params .y , is (0 ));
280+
281+ overlayView .params .y = 200 ;
282+ assertThat (overlayView .getY (), is (200 ));
283+ }
284+
269285 @ Test
270286 public void setScreenBrightness () throws Exception {
271287 assertThat (overlayView .params .screenBrightness , is (BRIGHTNESS_OVERRIDE_NONE ));
Original file line number Diff line number Diff line change 1- # Sat, 06 Oct 2018 23: 16:33 +0900
1+ # Sat, 13 Oct 2018 16:32:42 +0900
22major =1
3- minor =2
4- patch =1
5- id =7
3+ minor =3
4+ patch =0
5+ id =8
You can’t perform that action at this time.
0 commit comments