0

I'm new to android studio and trying to create a simple app with multiple tabs that displays different graphs. I've managed to plot my graphs in the app fine but for some reason the graph keeps going out of the screen. I'm pretty sure the screen i have is 5.46" and i have that in my android studio settings (im also using the constraint widget to try and keep everything in place) but it still goes out of border. I'm thinking its possible this issue is happening because i have my orientation set to landscape in the 'orientation preview' button. If the issue is with the landscape then how do i convert my app to landscape?

screenshot of my android studio: Android studio xml layout screenshot

And this is what it displays on my device: Screenshot of screen display

By the way, the device I'm using is not an andriod phone or tablet, its a screen with andriod installed on it.

parsley72
  • 8,449
  • 8
  • 65
  • 98
yoyo
  • 59
  • 1
  • 7
  • Set `android:layout_width="match_parent"` and `android:layout_height="match_parent"` of your `Graphview` – Android Geek Jul 22 '21 at 04:28
  • this is making the plot go over the whole screen, i want it only in the area I've selected – yoyo Jul 22 '21 at 06:45
  • I think this thread might have your answer https://stackoverflow.com/questions/4743116/get-screen-width-and-height-in-android – Jalen Mar 17 '22 at 19:44
  • Post the xml for your layout. It seems like you are typing a fixed height and the screen size with other elements is not able to accommodate the hard-coded height that you have specified. – Naveed Sep 02 '22 at 02:40

0 Answers0