0

I'm writing my first Android-App. The App should solve Sudokus for the user. So the interface should look like the typical Sudoku-Layout with some Buttons down below. For the number-fields i just used EditTexts.

At first i used a ContrainsLayout. That worked fine so far but the problem is that the editTexts on the right are not visible anymore if the screen of the user is too small. I use a fixed height and width of 40dp for the editTexts and a constraint of 1dp between the editTexts. But i cant get it to work that way on different screen sizes.

So i used the GridLayout. There problem here is that i cant get the whole thing to be in the center. And besides that i dont know if its possible to stretch a TEXTview over multiple rows?! I would need this to show the errorText in case the sudoku isnt solvable.

I hope someone can help me out or at least give me some ideas :) Thanks in advance

1 Answers1

0

If you want the same result for different screen sizes the recommendation is constraint layout but the reason you don't have the same result is that you used hard coded width and height and on different sizes you need to change the size that you hard coded. The best thing to do is to make separate xml files for screen sizes

for more info you can see here: how to have different sizes supported

  • It's unlikely that different XML files for different screen sizes would solve this problem. It's likely a mistake somewhere in the layout. – Ryan M Mar 06 '21 at 02:26