Mark M. | has entered the room |
Mark M. | turned on guest access |
Oct 31 | 7:30 PM |
Susheel | has entered the room |
Susheel |
Hi Mark!
|
Mark M. |
hello, Susheel!
|
Mark M. |
Happy Halloween!
|
Susheel |
Thank you, I dressed up as a coder to work!
|
Mark M. |
sounds elaborate -- are you cosplaying as somebody from the show "Silicon Valley"? :-)
|
Susheel |
Haha. No just wearing a t-shirt and jeans. Regular developer clothes. But that would have been dope :)
|
Mark M. |
so, how can I help you today?
|
Susheel |
I have a couple of questions. First one is about the system navigation bar.
|
Susheel |
for phones that have a soft navigation bar, I want to be able to know if it appears on the left or right of the phone in landscape mode. But I want this info programatically. Is that possible?
|
Susheel |
I looked at this answer on stackoverflow: https://stackoverflow.com/questions/20264268/ho...
|
Mark M. |
IIRC, there's no supported way to do that
|
Mark M. |
yeah, there are a handful of quasi-workarounds like those in those answers
|
Susheel |
The reply with 65 votes works for me but it doesn't tell me when the bar appears on the left vs right
|
Susheel |
I see.
|
Mark M. |
IIRC, the code for this is in WindowManager, so you're welcome to poke around in there
|
Mark M. |
I had a similar desire once, and I elected to go another direction... and I don't think things got any easier
|
Oct 31 | 7:35 PM |
Susheel |
Cool.
|
Oct 31 | 7:35 PM |
Mark M. |
also, if your app is for off-the-shelf devices, don't forget multi-window mode, particularly on Chrome OS
|
Susheel |
So are you saying it's possible to find out if I dig in to the source code for WindowManager?
|
Mark M. |
IIRC, the nav bar logic is in there
|
Susheel |
Cool
|
Susheel |
I have another question.
|
Susheel |
When you're ready
|
Mark M. |
go right ahead
|
Susheel |
Have you ever come across readable-content-guide on iOS? https://useyourloaf.com/blog/readable-content-g...
|
Mark M. |
I know next to nothing about iOS UIs
|
Susheel |
If you have text that stretches across the width of the device you can get lines that are so long they become hard to read. This is especially true on larger devices like the iPad. The readable content guide creates an area that can be easily read without you losing track of the lines.
|
Susheel |
I want to implement this in Android.
|
Mark M. |
um, OK
|
Mark M. |
but... that's not a question :-)
|
Oct 31 | 7:40 PM |
Susheel |
Haha. Yes. I was wondering if I can just throw in a textview inside a scrollview with a padding.
|
Susheel |
What is a good way to do it in your opinion?
|
Mark M. |
IMHO, this isn't something that you would do in isolation
|
Mark M. |
the space that you are not using for the large block of text should be used for something
|
Susheel |
Hmm.
|
Mark M. |
take that very blog post's Web page for example
|
Mark M. |
it uses a center content area for the prose
|
Mark M. |
the left is for nav, the right is for an ad banner-ish thingy
|
Mark M. |
if you're saying that you want shorter lines, and just whitespace on each side... I wouldn't do it
|
Susheel |
I see. Their rationale is that longer lines get harder to read.
|
Mark M. |
and I've heard that argument before
|
Mark M. |
my counter-argument is: if they're using a larger screen, you should use the larger screen for *something*
|
Mark M. |
otherwise, they'd just be using a phone
|
Susheel |
Hmm.
|
Mark M. |
Ars Technica gets on everybody's case for this, where tablet apps are just phone apps that don't do anything useful with the extra space
|
Oct 31 | 7:45 PM |
Mark M. |
and it's something that I agree with them on
|
Susheel |
We have the same UX designer for iOS and Android and she was asking me if there was an Android equivalent for this iOS feature.
|
Mark M. |
there's nothing out of the box for it, though your TextView-padding-ScrollView approach should work
|
Mark M. |
I'm just not a fan of that UI design approach
|
Mark M. |
then again, I'm not a UI design expert
|
Susheel |
Right. I am thinking Autosizing TextViews (from support library) should also work.
|
Susheel |
I see.
|
Susheel |
Thank you for your input though.
|
Mark M. |
autosizing the text might help in terms of offering a text zoom option
|
Mark M. |
but that just controls the font size
|
Susheel |
Oh that's right
|
Mark M. |
it won't add gutters on either side of the text
|
Susheel |
True.
|
Susheel |
I will dig into WIndowManager for my first question.
|
Susheel |
Thanks for your help
|
Mark M. |
happy to be useful!
|
Susheel |
Hope you have a good day :)
|
Mark M. |
you too!
|
Susheel |
Thank you!
|
Oct 31 | 8:10 PM |
Susheel | has left the room |
Oct 31 | 8:25 PM |
Mark M. | turned off guest access |