Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Java
  3. Question
Java

How can I get screen width Android in java?

Asked by James Williams Oct 6, 2022 756 views 1 answer
Share

About this question

 How to detect the screen size for different android phones?

I want the coordinate values like startx, starty, endx, endy. With that I can use the swipe method which takes these coordinates as parameters.

I used

Dimension size = driver.manage().window().getSize();

Your answer

1 Answer

More Java discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Java Blogs

Guides, tips and career advice on Java from JanBask experts.