oers / reversatile

Reversatile: Reversi for Android
GNU General Public License v3.0
19 stars 6 forks source link

Responsive status area layout #69

Closed Insti closed 5 years ago

Insti commented 5 years ago

Screenshots:

Note: The "settings" and "opening" font and bottom row icon size should be the same on both these devices, even though it looks different due to the image scaling here on Github

720x1280 - Android 7.1.1 Screenshot_1563479296

1600x2560 - Android 9.+ Screenshot_1563479377

Insti commented 5 years ago

I don't know how far back the compatibilty for constraint layouts goes, I think that it might be resolved at build time so it should work for anything we can build for, but I'm not sure. (Android dev is not my day job.)

oers commented 5 years ago

In my Android Studio the buttons on the buttom are never visible in the board_layout preview. Do you see them in the preview?

And on my phone it looks like this:

image

Font seems to scale a bit too much.

oers commented 5 years ago

My Android Studio cannot load/resolve the new vector xml file images (it seems). I think that vector images are only supported with APK Level 21 (Android 5) and the target for the project is still 14 (I wanted to stay compatible with android 4, when I started working on the fork). Don't know why you see it in the preview and I don't. But I can see the buttons on my phone (android 9)

Insti commented 5 years ago

Ok, thanks for the screenshot. I can probably fix the digit alignment issue, I think it's caused by the font size being set when there are only 2 characters in the field, and when there is 4 it wraps.

I can see the icons in the designer mode. I'm on Android Studio 3.4.2 on OSX

I'll check what the project APK target setting for my build is.

oers commented 5 years ago

When I look at the XML for the status. The line with the img for the button is highlighted with an error for me.

Your solution to the sizing problems looks pretty good, I think you achieved what I tried to do with the row layout.

Insti commented 5 years ago

What version of Android Studio are you using?

Insti commented 5 years ago

https://github.com/oers/reversatile/pull/69/commits/8fd6cb4620d11b3ab091355a650cca2eaa905b64 won't fix the problem where 80sp font exactly fills the available space, but should stop the text becoming too big. (80sp might already be too big! - let me know if it should be smaller.)

What do you think about replacing the : with a disk that is either white or black depending on whose turn it is?

oers commented 5 years ago

I have 4.3.2 as well.

The idea with the disc in the middle sounds cool.

oers commented 5 years ago

with android:maxLines="1" Android will not wrap the textview. I just tested it and it works