I'm a visually impaired developer, and I'm trying to figure out how to design good layouts for users that have the largest text enabled on their android devices. I made a good app layout and it looked fine in the designer and the emulator and it looked fine, the tested it on my device with large text on, and everything was incredibly wonky: Text was wrapping onto multiple lines and noting scaled properly. I turn off large text and everything is perfectly fine.
How do I do this? Other apps with large text are fine. What measurement should I be using and what text style/Size is the standard?
If you are looking for standard design principles supported by a strong Case to case study the Material Design Documentation is the right place to look at.
This documentation itself is created by the great minds from Google. All the thing being presented here is the do and don't.
What measurement should I be using and what text style/Size is the standard?
In general, You need to test the different system font size on different screens to make it looks good, get the font size and test it(Read font size from Settings). In my practice, use wrap_content instead of fixed height in ViewGroups(LinearLayout), and there is no standard style/Size, only the product UI design matters. In some apps like WeChat it defined custom app fontSize which will NOT be affected by the system settings, and DO the multi-devices adapt with it's own font system.
Related
My android app looks different on the phone than android studio
look at screenshot
app in the phone screenshot
App in the Android studio screenshot
why is that? and how can I fix that?
Your preview shows what your layout would look like on a Pixel 3, which is quite a large phone. From what I saw on your screenshot looks like your device isn't quite as large so I'd recommend you to use ConstraintLayout for 2 reasons:
Consistency across different screen sizes - it's much more likely your layout will look the same on a large screen and a small one
Better performance, especially for your case since you'll be able to do everything with a single layout, without having to nest several layouts
For more information on ConstraintLayout, please check out this post I wrote on Medium
Android Wear Watches are a lot smaller then Android phones, but when looking over the Android API pages and training guides, I didn't see any restrictions on layout elements. Some layouts, however, wouldn't make sense on some watches. For example, a large custom layout ListView wouldn't fit very well on round watches. Are all layout elements really available on Android Wear?
Not all layouts are available (WebView for example). You can see the unsupported libraries here.
And some layouts are meant to be used in Android Wear only.
There is no restriction as far as I know. There are some adjustments that one need to pay attention to in order to have a pleasant UI on both square and round displays, by adjusting the location of items and taking advantage of what the platform adds for handling round vs square, etc but outside of that, all the layouts are, as far as I know, available there too.
I have been developing Mobile phone apps in Mosync(Cross Platform C++ API - can make apps in iOS, Android, Symbian & Blackberry) & I am looking to develop apps in something else because of the limitations of Mosync.
But I dont want to move to a different API to find they have the same or worse limitations. I am thinking of moving to native API's (iOS or Android) but am open to other cross platform API's aswell.
If I was to move to Android OR iOS OR insert API here would I experience these limitations:
Resizing images is expensive(in terms of RAM & speed). IE, so can Android, iOS handle resizing 10+ images(for eg .png) & display them on screen in a relatively fast amt of time? In Mosync doing such stuff depends on the phone RAM but on HTC Desire(512mb) it takes about 6 seconds which is unacceptable for my app.
Does the API come with its own fonts & layout managers? Mosync doesn't have its own fonts, you have to create & import it & you cant change the colour of a font. You also cannot make the text in a widget display centred or word wrapped, can Android/iOS/other do this?
Can you create your own skins(.png) for buttons(any widget) & set a default API button's skin? This is actually a strength of Mosync where you can change button skins BUT it divides the skin up into 9 sections & only the 5th section is scalable, the others stay the same size, so on small phones a lrg skin looks weird.
Is it a REAL headache designing your app layout because of all the different potential phone sizes there are, so the widgets placement & skins will be incorrect on small screens & images will be out of proportion on large screens? Does the Android/iOS/other API help you by automatically laying out your GUI no matter the phone size & does it automatically scale image widgets & fonts to suit phone sizes?
Any info would be really helpful to a Junior programmer(intern) who is developing mobile apps all on his own & finding the myriad of phone sizes so ANNOYING to compensate for
My experience with Android Code:
Image resizing - Many current android apps seem to meet your
performance requirements although you don't mention the size of the
images which is the key issue.
Android supports many fonts internally, allows full control of font size, type face, colour etc
Android supports a complex variety of 'Drawables' including standard simple
graphics, 9-patch pngs (similar to what you describe) and simple vector descriptions of shapes and colours.
Android was designed with the difficulties of multiple screen sizes in mind; It supports multiple layouts for different screens sizes and orientations. This problem is intrinsically difficult and imho Android takes a lot of the trouble out the process - but it is always going to be a little bit of headache.
I am just reaching production on my first serious android app and have found the development experience pleasant and the learning curve easy.
reading about all these different resolutions and hardwares for Android I am a little unsure if the layout I created for an Samsung Galaxy will actually work the same way on all (most) Android devices.
I did not use anything fancy or complicated. However I had to use fixed width in several places to align text and buttons nicely. ALso there is some text with linebreaks that could look differntly if on narrower screens
How can I be sure that my layout will work on other devices? Or is this actually a no issue? Testing in the debugger is sooooo slow, that I actually never got it to work properly.
Thanks very much!
You can set up multiple emulators with different screen sizes, that simulate the possible targets.
In the emulator Ctrl-F11/12 (thanks #ccheneson) allows you to change the orientation, so that you can test that as well.
The emulator may be slow, but to see how the layouts look like it should be fast enough - you may still test the logic on a real device.
Also emulator speed seems to be highly dependent on the screen size.
I want to do screen optimization. That means once I develop the UI in android it should fit exactly the same in all android enabled phones.
So how do i do it?
It sounds like you want your UI to look exactly the same on all Android devices. As Daniel says, this is impossible, as Android devices differ hugely, due to different screen sizes, ratios and resolutions.
Fortunately, the Android UI system was designed precisely with different screens in mind. Given your UI design, it'll try it's best to make it work on the user's device, no matter what size or orientation it is. Buttons and labels and windows and images will adjust to fill the available space as specified by the UI designer.
Unless you have a specific technical reason to limit yourself to a rigid UI of specific dimensions, I'd advise you get to grips with Android's UI and components!