Skip to content

Conversation

@XiXiongMaoXiong
Copy link
Contributor

Added 6 new very useful methods.

  1. getScreenXDpi() which returns the Width (X) density in DPI.
  2. getScreenYDpi() which returns the Height (Y) density in DPI.
  3. calculateDistanceByX() which returns the distance between the given View's X (start point of View's width) and the screen width.
  4. calculateDistanceByY() which returns the distance between the given View's Y (start point of View's height) and the screen height.
  5. getViewX() which returns the X coordinate of the given View on the screen.
  6. getViewY() which returns the Y coordinate of the given View on the screen.

Added 6 new very useful methods.
1. getScreenXDpi() which returns the Width (X) density in DPI.
2. getScreenYDpi() which returns the Height (Y) density in DPI.
3. calculateDistanceByX() which returns the distance between the given View's X (start point of View's width) and the screen width.
4. calculateDistanceByY() which returns the distance between the given View's Y (start point of View's height) and the screen height.
5. getViewX() which returns the X coordinate of the given View on the screen.
6. getViewY() which returns the Y coordinate of the given View on the screen.
@XiXiongMaoXiong
Copy link
Contributor Author

@Blankj

@Blankj Blankj merged commit e36f7d1 into Blankj:master Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants