{"id":18142,"date":"2015-11-07T05:01:21","date_gmt":"2015-11-06T19:01:21","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=18142"},"modified":"2015-11-07T05:56:06","modified_gmt":"2015-11-06T19:56:06","slug":"android-app-learning-programming-ux-overlay-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/android-app-learning-programming-ux-overlay-tutorial\/","title":{"rendered":"Android App Learning Programming UX Overlay Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Learning\/Programming\/?isMobile=n\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Android App Learning Programming UX Overlay Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Android\/Overlay-Question.jpg\" title=\"Android App Learning Programming UX Overlay Tutorial\"   \/><\/a><p class=\"wp-caption-text\">Android App Learning Programming UX Overlay Tutorial<\/p><\/div>\n<p>When last talking about our Android App &#8220;Learning Programming&#8221; we ventured to say, with respect to the &#8220;user experience&#8221; (UX &#8230; which isn&#8217;t me burping, but please read more below at <a target=_blank title='Android App Learning Programming UX Primer Tutorial' href='#aalpupt'>Android App Learning Programming UX Primer Tutorial<\/a>) with Android App (or other mobile apps generally) &#8230;<\/p>\n<blockquote><p>\n&#8230; &#8220;paring down of functionality&#8221; for smaller screen sizes sounds like a bit of a &#8220;cop-out&#8221; &#8230;\n<\/p><\/blockquote>\n<p> &#8230; well, we haven&#8217;t changed our mind about this, exactly, but we believe in a tiered thought pattern regarding the &#8220;user experience&#8221; for a variety of users.  What we mean by that is that there are users with vastly differing motives who want to use the Android App &#8220;Learning Programming&#8221;.  We think there would be &#8230;<\/p>\n<ol>\n<li>users answering quiz questions to learn programming, alone<\/li>\n<li>users answering quiz questions to learn programming, collaboratively<\/li>\n<li>users who are just exercising their mind in &#8220;play&#8221;<\/li>\n<li>users venturing into a completely unknown world for them, but curious about programming<\/li>\n<\/ol>\n<p>The &#8220;users answering quiz questions to learn programming, alone&#8221; could benefit from a further &#8220;pared down&#8221; version that gets to the crux of what they aim to achieve without all the scoring and collaboration features.  For those users, in particular, but not exclusively, we are adding a dropdown HTML select element titled &#8220;Just&#8221; sitting to the left of the question mark link (that attributes thanks to sources).  So &#8220;Just ?&#8221; is a piece of functionality we want to encapsulate in an external piece of Javascript.<\/p>\n<p>Perhaps you are wondering why the change is &#8220;external Javascript&#8221; when there are files on a web server involved (this is not rhetorical &#8230; there are &#8220;files on a web server involved&#8221;)?  Well, yes, we adjust some PHP serverside code, but so little I&#8217;ll show you below &#8230; somewhere between &lt;head&gt; and &lt;\/head&gt; we place &#8230;<\/p>\n<p><code><br \/>\n&lt;script src='just.js' type='text\/javascript'&gt;&lt;\/script&gt;<br \/>\n<\/code><\/p>\n<p>How can these changes be changing an Android App?  Well, the Android App uses a WebView, and the innards of the WebView are what the PHP and Javascript represent &#8230; cute, huh?<\/p>\n<p>It behoves us to show you the external Javascript code then, there, here &#8230; <a target=_blank title='just.js' href='http:\/\/www.rjmprogramming.com.au\/Learning\/Programming\/just.js_GETME'>just.js<\/a><\/p>\n<p>This external Javascript does some &#8220;overlay&#8221; work &#8230; we&#8217;ve gone &#8220;high rise&#8221; thanks to our usual CSS suspects (for &#8220;overlay&#8221; work) &#8230;<\/p>\n<ul>\n<li><a target=_blank title='CSS position:absolute information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_class_position.asp'>position:absolute<\/a> property<\/li>\n<li><a target=_blank title='CSS z-index information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_pos_z-index.asp'>z-index<\/a><\/li>\n<\/ul>\n<p>So, if you have no room for McMansions, go &#8220;up&#8221;, we say.  The &#8220;upper&#8221; (bigger z-index) floor contains a &#8220;Just ?&#8221; widget pared down &#8220;just questions&#8221; version of the app we think might more suit the needs (and curiosities) of that user category 1 above.<\/p>\n<p>You can try this yourself by getting the <a target=_blank title='Google Play Learning Program Android App' href='https:\/\/play.google.com\/store\/apps\/details?id=com.rjmprogramming.learning_programming'>Android App<\/a> (if you have an Android mobile device) or this <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Learning\/Programming\/?isMobile=n\" title='Click picture'>live run<\/a> link, the latter being the basis of the tutorial image today.<\/p>\n<hr>\n<p id='aalpupt'>Previous relevant <a target=_blank title='Android App Learning Programming UX Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/android-app-learning-programming-ux-primer-tutorial\/'>Android App Learning Programming UX Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Android\/LP-Android-Question.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Android App Learning Programming UX Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Android\/LP-Android-Question.jpg\" title=\"Android App Learning Programming UX Primer Tutorial\" id='aux' onmouseover=\" this.src=this.src.replace('-Android-GetToQuestion.jpg','-Android-Question.xjpg').replace('-Android-Question.jpg','-iPad-GetToQuestion.xjpg').replace('-iPad-GetToQuestion.jpg','-iPad-Question.xjpg').replace('-iPad-Question.jpg','-Laptop-GetToQuestion.xjpg').replace('-Laptop-GetToQuestion.jpg','-Laptop-Question.xjpg').replace('-Laptop-Question.jpg','-Android-GetToQuestion.xjpg').replace('.x','.');        \"    \/><\/a><p class=\"wp-caption-text\">Android App Learning Programming UX Primer Tutorial<\/p><\/div>\n<p>The term <a target=_blank href='http:\/\/en.wikipedia.org\/wiki\/User_experience' title='User experience (UX) information from Wikipedia ... thanks'>&#8220;user experience&#8221;<\/a> (or UX &#8230; you now have UX Experts) refers to the ease with which users use your web or mobile or desktop applications.  For me, a list of some of the considerations could include &#8230;<\/p>\n<ul>\n<li>ease of navigation<\/li>\n<li>size of elements that that navigation involves<\/li>\n<li>amount of paring down of functionality relative to screen dimensions &#8230; if any?<\/li>\n<li>user emotions<\/li>\n<li>user behaviour regarding the application<\/li>\n<li>interest<\/li>\n<li>colour<\/li>\n<li>speed of response<\/li>\n<li>robustness of functionality<\/li>\n<li>security considerations<\/li>\n<\/ul>\n<p> &#8230; you could probably go on and on, but, today, taking our Android App called &#8220;Learning Programming&#8221; as an example wanted to talk a bit about the relationships of those first three points above.<\/p>\n<p>To me, &#8220;paring down of functionality&#8221; for smaller screen sizes sounds like a bit of a &#8220;cop-out&#8221;, so we try not to do that, if possible.  This has meant that the &#8220;Learning Programming&#8221; Android App has been a challenging project, with its design, but have been giving it a bit of thought and have made some &#8220;UX&#8221; improvements recently.  And do you know what?   The two changes, designed to only change mobile device usage, involved the enlarging of elements, not the shrinking &#8230; pretty counter-intuitive, wouldn&#8217;t you say?<\/p>\n<p>Think perhaps in the first three points of above, for mobile use, if we stick by our principle of &#8220;not paring down any functionality for smaller screen sizes&#8221;, an overarching &#8220;UX&#8221; principle is more the question &#8230;<\/p>\n<blockquote>\n<p>For the usual application functionality flow are the navigational elements required emphasised so that they are the prominent and obvious features?<\/p>\n<\/blockquote>\n<p> &#8230; and for the &#8220;Learning Programming&#8221; <a target=_blank title='Google Play Learning Program Android App' href='https:\/\/play.google.com\/store\/apps\/details?id=com.rjmprogramming.learning_programming'>Android App<\/a> we have, with this view in mind &#8230;<\/p>\n<ul>\n<li>for mobile platforms only, make the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Android\/LP-Android-GetToQuestion.jpg\" title='Making question marks bigger on mobile devices only'>question marks<\/a> bigger<\/li>\n<li>for mobile platforms only, make the answer <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Android\/LP-Android-Question.jpg\" title='Making answer labels bigger on mobile devices only'>labels<\/a> bigger<\/li>\n<\/ul>\n<p> &#8230; which, to me, creates a much better app &#8230; and reminds me, that another way to think of this is to ask the question &#8230;<\/p>\n<blockquote>\n<p>For the usual application functionality flow, for mobile devices, do we need to (use the) &#8220;stretch&#8221; or &#8220;pinch&#8221; (gestures on) the screen to see what&#8217;s going on?<\/p>\n<\/blockquote>\n<p> &#8230; and we hope the answer is &#8220;no&#8221; &#8230; or noooooooooooooooooo &#8230; or perhaps nooooooooooooo way &#8230; and yet, you want people to reach those more obscure parts of the (mobile) functionality should they choose to venture there &#8230; that is where allowing the &#8220;stretch&#8221; or &#8220;pinch&#8221; (or scaling) gesture to work (big time), makes for the best of both worlds, methinks &#8230; via the use of a meta tag viewport like &#8230;<\/p>\n<p><code><br \/>\n&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=0.25, maximum-scale=8, user-scalable=yes\" \/&gt;<br \/>\n<\/code><\/p>\n<p>Software code wise the changes to do this were in PHP to return a string that isn&#8217;t &#8220;&#8221; (ie. nothing) when the device is a mobile one &#8230; pretty specific to requirements (and thanks to this <a target=_blank href='http:\/\/stackoverflow.com\/questions\/6524301\/detect-mobile-browser' title='Useful link'>webpage<\/a>), but this looks like code snippets as below &#8230;<\/p>\n<p><code><br \/>\n&lt;?php<br \/>\nfunction maybetwo() {   \/\/ regarding size of question mark<br \/>\n  if (preg_match(\"\/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up.browser|up.link|webos|wos)\/i\", $_SERVER[\"HTTP_USER_AGENT\"])) {  \/\/ thanks to http:\/\/stackoverflow.com\/questions\/6524301\/detect-mobile-browser<br \/>\n    return '4';<br \/>\n  }<br \/>\n  return '';<br \/>\n}<br \/>\n?&gt;<br \/>\n<\/code><\/p>\n<p><code><br \/>\n&lt;?php<br \/>\nfunction maybeone() {    \/\/ regarding size of answer labels<br \/>\n  if (preg_match(\"\/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up.browser|up.link|webos|wos)\/i\", $_SERVER[\"HTTP_USER_AGENT\"])) {   \/\/ thanks to http:\/\/stackoverflow.com\/questions\/6524301\/detect-mobile-browser<br \/>\n    return '1';<br \/>\n  }<br \/>\n  return '';<br \/>\n}<br \/>\n?&gt;<br \/>\n<\/code><\/p>\n<p>We hope you get some ideas out of today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Android\/LP-Android-Question.jpg\" title='Click picture'>tutorial<\/a> showing usage on a MacBook Pro laptop, an iPad, and an Android mobile phone &#8230; so we&#8217;ll sign off for now &#8230; and hope to see you again soon.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d13308' onclick='var dv=document.getElementById(\"d13308\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=user-experience\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d13308' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d18142' onclick='var dv=document.getElementById(\"d18142\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/overlay\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d18142' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>When last talking about our Android App &#8220;Learning Programming&#8221; we ventured to say, with respect to the &#8220;user experience&#8221; (UX &#8230; which isn&#8217;t me burping, but please read more below at Android App Learning Programming UX Primer Tutorial) with Android &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/android-app-learning-programming-ux-overlay-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,12,37],"tags":[76,96,281,530,795,797,799,894,932,997,1319,1350,1356,1400,1402],"class_list":["post-18142","post","type-post","status-publish","format-standard","hentry","category-android","category-elearning","category-tutorials","tag-android","tag-application","tag-css","tag-google-play","tag-mobile","tag-mobile-application","tag-mobile-phone","tag-overlay","tag-php","tag-programming","tag-tutorial","tag-user-experience","tag-ux","tag-web","tag-web-application"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/18142"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=18142"}],"version-history":[{"count":10,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/18142\/revisions"}],"predecessor-version":[{"id":18156,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/18142\/revisions\/18156"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=18142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=18142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=18142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}