Adapting to Data. Before we get to the fun stuff... Initial setup

Size: px
Start display at page:

Download "Adapting to Data. Before we get to the fun stuff... Initial setup"

Transcription

1 Adapting to Data So far, we've mostly been sticking with a recurring theme: visual elements are tied to XML-defined resources, not programmatic creation or management. But that won't always be the case. See, thus far, what's also been true is that we've already had everything we needed clearly identified, and ready in advance. However, that won't always be the case. Whether the data we want is available on the other end of some network resource; or in an unmanaged assets folder that could be updated; or on an SD card; or even something ostensibly readily available, but too bulky to immediately load in; we will sometimes need to deal with things from the programmatic side. Some of this, we'll be addressing later. But we can cover the general cases now. Before we get to the fun stuff... Let's first address a basic issue that we've already hinted at: needing to retrieve or process a resource that can't be immediately loaded. There are two (closely-related) aspects to this: 1. Simply retrieving the data could cause a delay 2. When users aren't permitted to operate their applications/devices, you should probably let them know it's normal, and not indefinite Properly addressing the former issue comes later, but we can at least look at the latter right away. Basically, we need some sort of widget that can indicate that progress is being made. Initial setup Before we get any further, let's create a project with an empty activity, and just put down a progress bar. We won't worry about attaching it to anything yet. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=" android:layout_height="match_parent" android:orientation="vertical" > <ProgressBar android:id="@+id/progressive" style="@android:style/widget.progressbar.horizontal" android:progress="0" android:max="100" </LinearLayout>

2 There are a few things worth noting here: Setting the current progress to 0, and the max to 100, did absolutely nothing. Those are the defaults There are other progress bar styles. For example, try temporarily switching over to Large. We'll be sticking with Horizontal for this example, though There are two possible natures of progress bars: determinate (what we're using), and indeterminate Setting the android:indeterminate option to true makes it less about showing absolute progress, and more as an indication of activity. Personally, I'm partial to progress bars showing progress, so I'll stick to determinate For our initial test, add three buttons, and give them all the same onclick handler. I'll call mine buttona, buttonb, and buttonc. Let's switch over to the code to see how they can work. Since we're using a single method to handle all three, I'll just use a switch statement on their ID's: public void clickit(view v) { ProgressBar pb=(progressbar)findviewbyid(r.id.progressive); switch (v.getid()) { case R.id.buttonA: pb.setprogress(33); break; case R.id.buttonB: pb.setprogress(66); break; case R.id.buttonC: pb.incrementprogressby(1); break; Note that you can either set absolute progress values, or simply state the change. If we were using API 24 or higher, we could also specify whether or not we wanted the progress bar to animate when changing. Interjection: Here's a thought, suppose we added an extra line to the third button: pb.incrementsecondaryprogressby(2); What would we expect as the outcome? What the heck is a secondary progress? (For those following along via this script, instead of in-lecture, I'll include the answer on the next page. Just pause to think about it for a moment, though, k?)

3 Secondary progress simply allows you to show the progress of a second value, along the same scale as the original. The most common place you've seen one is for videos on the web (wherein you have your primary progress: where you are in the video, and a secondary progress: how much more of the video is already buffered). You can read more here: So, why aren't we using this for real yet? Let's explore that! Let's say we had a source of data: package ca.brocku.efoxwell.a2017_fourthstage; //your package name here! public class DataSource { static int counter=0; static byte[] getbytes() { int qty=(int)(math.random()*(100-counter)/2.0+1); byte[] datas=new byte[qty]; for (int i=0;i<qty;i++) datas[i]=(byte)(++counter); //try {Thread.sleep(1000); catch (InterruptedException ie) { return datas; And let's rewrite the third button thusly: case R.id.buttonC: int count=100; while (count>0) for (byte b:datasource.getbytes()) pb.setprogress(100-count--); break; Aaand... it probably works just fine, right? Oh, silly me, I forgot to uncomment that delay (to simulate latency in receiving or processing data). This time, it may or may not have reported an ANR error, but it certainly didn't work correctly, right? There are ways it can be made to work, but the best approach is to create an Asynchronous Task to handle the heavy lifting in the background, possibly provide status updates as it makes progress, and report back in once it's done. (And that comes later) So, next, let's look at something that doesn't require using generics with triple-parametrized types, yes?

4 ListViews Last lecture, we looked at how we can include data in arrays. We could very easily access that data from our code. If desired, we can also access that directly in our XML layouts. Let's make a new activity (LVA), and rewrite the first button to start it. Or add another button; I'm not the boss of you. First, we need an array resource: <string-array name="mayneverdie"> <item>tinfoil</item> <item>airhorns</item> <item>every chicken</item> <item>in this</item> <item>room</item> <item>hype</item> <item>100% confirmed</item> </string-array> and then we need a layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=" xmlns:app=" xmlns:tools=" android:layout_height="match_parent" tools:context="ca.brocku.efoxwell.a2017_fourthstage.lva" android:orientation="vertical"> <ListView android:id="@+id/bowl" android:entries="@array/mayneverdie" android:drawselectorontop="false" <TextView android:id="@+id/selectedb" </LinearLayout>

5 So far, so good. We don't need much code to support this: protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_lva); final String[] bowlarray=getresources().getstringarray(r.array.mayneverdie); final TextView selectedb=(textview)findviewbyid(r.id.selectedb); ListView cbowl=(listview)findviewbyid(r.id.bowl); cbowl.setonitemclicklistener(new AdapterView.OnItemClickListener() { public void onitemclick(adapterview<?> parent, View v, int position, long id) { selectedb.settext(":> "+bowlarray[position]); ); Try it out, and you'll see that it works pretty much as you'd expect. In case it isn't clear, even though the usage isn't really any harder, what it's doing is a bit more complicated. Basically, our list of text entries is a container View, holding several individual Views. We use an adapter to help us with the autogeneration of those Views. Do we want to chat about the 'drawselectorontop' stuff? Let me know if we do. This isn't what you promised This is true. I promised we'd look at data that isn't already within the resources. But switching over to some other form of array-based data will be a very tiny hop. This time, we'll be explicitly invoking an ArrayAdapter to generate our Views for us. I'll make another activity (LVAB), and set the second button on the first screen to start it. The layout isn't terribly remarkable: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=" xmlns:app=" xmlns:tools=" android:layout_height="match_parent" tools:context="ca.brocku.efoxwell.a2017_fourthstage.lvab" android:orientation="vertical"> <ListView android:id="@+id/fruits" android:drawselectorontop="false" <TextView

6 </LinearLayout> The Java code also hasn't changed much: protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_lvab); final String[] fruits={"spinach","aubergine","a rock","tomato","kale"; final TextView selectedf=(textview)findviewbyid(r.id.selectedf); ListView flist=(listview)findviewbyid(r.id.fruits); final ArrayAdapter<String> adapter=new ArrayAdapter<>( this, android.r.layout.simple_list_item_1, fruits ); flist.setadapter(adapter); flist.setonitemclicklistener(new AdapterView.OnItemClickListener() { public void onitemclick(adapterview<?> adapterview, View view, int i, long l) { selectedf.settext(":> "+fruits[i]); ); Most of this is fairly straightforward, but there's one thing that might be confusing: android.r.layout.simple_list_item_1. Remember the two points we've already learned: Our ListView is effectively a container of individual Views Our ArrayAdapter is creating those Views for us Basically, that's how we're identifying the type of View with which to populate the ListView. For example, if we'd gone with android.r.layout.simple_list_item_single_choice instead, it would look like radio buttons. However, it still wouldn't act like radio buttons. For something like that, we'd simply add: flist.setchoicemode(listview.choice_mode_single); Similarly, CHOICE_MODE_MULTIPLE is good for checkboxes (in which case, you'd probably want to switch the item Views to simple_list_item_multiple_choice. As a final thought, if the primary purpose for an Activity were solely to display a ListView, there's actually a ListActivity we can extend. You might feel it makes the process slightly simpler. Basically, there's a lot to play with here.

7 Interjection Presumably, you've noticed that this is not how one typically creates radio buttons. You've likely already stumbled upon the RadioButton and RadioGroup classes when working on the assignment, and that's how you'd normally handle trivial, well-defined selections. What we've looked at today is more for when dealing with arbitrary data. Something's missing... Very astute observation! What we've looked at so far might be suitable for any number of specific Use Cases. For example, filling out surveys, selecting extras for restaurant menu items, etc. Basically, it's fine for cases where you might want the group of selections to figure prominently into the overall view. But is that the only common usage for a group of multiple selections? Is that how one would normally, for example, wish to choose one's country? (Okay, so sometimes that is how it's done, but that doesn't make it good) In that case, how do we normally offer such a selection? Via a drop-down, right? Then let's talk about the Spinner. Twirling towards freedom First, I'll make another Activity (HelpMe), and repurpose that third button to start it. The layout is easy: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=" android:layout_height="match_parent" android:orientation="vertical" > <Spinner android:id="@+id/spinny" <TextView android:id="@+id/spun" </LinearLayout> Note that, if we wanted to, we could have specified the android:entries here.

8 Since the difference between a Spinner and a ListView is primarily presentation, the code is comparably easy: public class HelpMe extends AppCompatActivity implements AdapterView.OnItemSelectedListener { String[] cbowl; protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_help_me); cbowl=getresources().getstringarray(r.array.mayneverdie); Spinner spinny=(spinner)findviewbyid(r.id.spinny); ArrayAdapter<String> adapter=new ArrayAdapter<>( this,android.r.layout.simple_spinner_item,cbowl ); spinny.setadapter(adapter); spinny.setonitemselectedlistener(this); public void onitemselected(adapterview<?> parent, View v, int position, long id) { ((TextView)findViewById(R.id.spun)).setText(":> "+cbowl[position]); public void onnothingselected(adapterview<?> parent) { ((TextView)findViewById(R.id.spun)).setText("This likely isn't relevant"); That's neat, but that isn't how I make most selections This is true. Oftentimes, rather than needing to scroll through a lengthy list, you can simply type part of what you want, and have it fill in the rest. Let's add one more view to the same layout: <AutoCompleteTextView android:id="@+id/finishmythought" Of course, we could add more here, but we'll do it in the code section: ArrayAdapter<String> completion=new ArrayAdapter<>(this,android.R.layout.simple_dropdown_item_1line,cbowl); AutoCompleteTextView actv=(autocompletetextview)findviewbyid(r.id.finishmythought); actv.setthreshold(1); actv.setadapter(completion); Again, pretty straightforward, but let's still take a quick look.

9 Okay, so that's it! Sort of... That's everything we needed to cover this evening, but I imagine we have time for one more example, right? If we do have time, the book actually had an interesting example of another type of adapter, and I thought it might be worth taking a quick look at. I'll just include the whole thing here, and then talk about it afterwards. I'll be using an Activity name of Imagine for this one. I'll also put some images into the drawable folder. First, the layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=" xmlns:tools=" android:layout_height="match_parent" android:orientation="vertical" > <TextView android:text="browsing" android:gravity="center" android:textstyle="bold" android:id="@+id/kwyjibo" <android.support.v4.view.viewpager android:layout_height="400dip" android:layout_margintop="25dip" android:id="@+id/pager" </LinearLayout> And now (deep breath), the Java code: public class Imagine extends AppCompatActivity { public TextView kwyjibo; protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_imagine); kwyjibo=(textview)findviewbyid(r.id.kwyjibo); ViewPager pager=(viewpager)findviewbyid(r.id.pager); pager.setadapter(new ImageAdapter()); //pager.setonpagechangelistener(new PageListener()); //deprecated pager.addonpagechangelistener(new PageListener()); class ImageAdapter extends PagerAdapter { Integer[] images={ R.drawable.urgh1, R.drawable.urgh2,

10 ; R.drawable.urgh3, R.drawable.urgh4, R.drawable.urgh5 /*public Object instantiateitem(view container, int position) { ImageView view=new ImageView(Imagine.this); view.setimageresource(images[position]); ((ViewPager) container).addview(view,0); return view; */ //deprecated public Object instantiateitem(android.view.viewgroup container, int position) { ImageView view=new ImageView(Imagine.this); view.setimageresource(images[position]); container.addview(view,0); return view; public int getcount() { return images.length; public void destroyitem(view arg0, int arg1, Object arg2) { ((ViewPager)arg0).removeView((View) arg2); public boolean isviewfromobject(view arg0, Object arg1) { return arg0==((view)arg1); class PageListener extends ViewPager.SimpleOnPageChangeListener { public void onpageselected(int position) { kwyjibo.settext(":> "+position); Okay, so what does all of that do? Well, remember how I said the Adapter creates Views to be added to the UI? Here, we can actually see that being done. (Note that I included the 'old way' of doing a couple things, that are now deprecated) Let's try it out and see what we've done! On a side note: this is certainly not the only (nor the normal) way to scroll. If you've simply run out of space for what you want to include, just use a ScrollView. If we still have any time, I can even show that off really quickly. Just remember that a ScrollView only holds a single View (so make that View be a Layout/container if you want to hold multiple things).

More Effective Layouts

More Effective Layouts More Effective Layouts In past weeks, we've looked at ways to make more effective use of the presented display (e.g. elastic layouts, and separate layouts for portrait and landscape), as well as autogenerating

More information

Mobile Programming Lecture 3. Resources, Selection, Activities, Intents

Mobile Programming Lecture 3. Resources, Selection, Activities, Intents Mobile Programming Lecture 3 Resources, Selection, Activities, Intents Lecture 2 Review What widget would you use to allow the user to enter a yes/no value a range of values from 1 to 100 What's the benefit

More information

Managing Data. However, we'll be looking at two other forms of persistence today: (shared) preferences, and databases.

Managing Data. However, we'll be looking at two other forms of persistence today: (shared) preferences, and databases. Managing Data This week, we'll be looking at managing information. There are actually many ways to store information for later retrieval. In fact, feel free to take a look at the Android Developer pages:

More information

Layout and Containers

Layout and Containers Geez, that title is freakin' huge. Layout and Containers This week, we'll mostly just be looking at how to better-arrange elements. That will include our first introduction into managed resources (even

More information

PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between

PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between MITOCW Lecture 10A [MUSIC PLAYING] PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between all these high-level languages like Lisp and the query

More information

Adapter.

Adapter. 1 Adapter An Adapter object acts as a bridge between an AdapterView and the underlying data for that view The Adapter provides access to the data items The Adapter is also responsible for making a View

More information

Screen Slides. The Android Studio wizard adds a TextView to the fragment1.xml layout file and the necessary code to Fragment1.java.

Screen Slides. The Android Studio wizard adds a TextView to the fragment1.xml layout file and the necessary code to Fragment1.java. Screen Slides References https://developer.android.com/training/animation/screen-slide.html https://developer.android.com/guide/components/fragments.html Overview A fragment can be defined by a class and

More information

Skill 1: Multiplying Polynomials

Skill 1: Multiplying Polynomials CS103 Spring 2018 Mathematical Prerequisites Although CS103 is primarily a math class, this course does not require any higher math as a prerequisite. The most advanced level of mathematics you'll need

More information

Eventually, you'll be returned to the AVD Manager. From there, you'll see your new device.

Eventually, you'll be returned to the AVD Manager. From there, you'll see your new device. Let's get started! Start Studio We might have a bit of work to do here Create new project Let's give it a useful name Note the traditional convention for company/package names We don't need C++ support

More information

Instructor: Craig Duckett. Lecture 04: Thursday, April 5, Relationships

Instructor: Craig Duckett. Lecture 04: Thursday, April 5, Relationships Instructor: Craig Duckett Lecture 04: Thursday, April 5, 2018 Relationships 1 Assignment 1 is due NEXT LECTURE 5, Tuesday, April 10 th in StudentTracker by MIDNIGHT MID-TERM EXAM is LECTURE 10, Tuesday,

More information

Mobile Programming Lecture 2. Layouts, Widgets, Toasts, and Event Handling

Mobile Programming Lecture 2. Layouts, Widgets, Toasts, and Event Handling Mobile Programming Lecture 2 Layouts, Widgets, Toasts, and Event Handling Lecture 1 Review How to edit XML files in Android Studio? What holds all elements (Views) that appear to the user in an Activity?

More information

GUI Widget. Lecture6

GUI Widget. Lecture6 GUI Widget Lecture6 AnalogClock/Digital Clock Button CheckBox DatePicker EditText Gallery ImageView/Button MapView ProgressBar RadioButton Spinner TextView TimePicker WebView Android Widgets Designing

More information

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology.

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. Guide to and Hi everybody! In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology. This guide focuses on two of those symbols: and. These symbols represent concepts

More information

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5 [talking head] Formal Methods of Software Engineering means the use of mathematics as an aid to writing programs. Before we can

More information

Resources and Media and Dealies

Resources and Media and Dealies Resources and Media and Dealies In the second week, we created a new project that came with several files. The layout was kept in a res/layout folder. last week, we looked at a landscape layout, in the

More information

The Stack, Free Store, and Global Namespace

The Stack, Free Store, and Global Namespace Pointers This tutorial is my attempt at clarifying pointers for anyone still confused about them. Pointers are notoriously hard to grasp, so I thought I'd take a shot at explaining them. The more information

More information

MITOCW watch?v=0jljzrnhwoi

MITOCW watch?v=0jljzrnhwoi MITOCW watch?v=0jljzrnhwoi The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

MITOCW watch?v=rvrkt-jxvko

MITOCW watch?v=rvrkt-jxvko MITOCW watch?v=rvrkt-jxvko The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

Diving into Android. By Jeroen Tietema. Jeroen Tietema,

Diving into Android. By Jeroen Tietema. Jeroen Tietema, Diving into Android By Jeroen Tietema Jeroen Tietema, 2015 1 Requirements 4 Android SDK 1 4 Android Studio (or your IDE / editor of choice) 4 Emulator (Genymotion) or a real device. 1 See https://developer.android.com

More information

Creating a Custom ListView

Creating a Custom ListView Creating a Custom ListView References https://developer.android.com/guide/topics/ui/declaring-layout.html#adapterviews Overview The ListView in the previous tutorial creates a TextView object for each

More information

Accelerating Information Technology Innovation

Accelerating Information Technology Innovation Accelerating Information Technology Innovation http://aiti.mit.edu India Summer 2012 Review Session Android and Web Working with Views Working with Views Create a new Android project. The app name should

More information

Developing Android Applications Introduction to Software Engineering Fall Updated 1st November 2015

Developing Android Applications Introduction to Software Engineering Fall Updated 1st November 2015 Developing Android Applications Introduction to Software Engineering Fall 2015 Updated 1st November 2015 Android Lab 3 & Midterm Additional Concepts No Class Assignment 2 Class Plan Android : Additional

More information

ANDROID USER INTERFACE

ANDROID USER INTERFACE 1 ANDROID USER INTERFACE Views FUNDAMENTAL UI DESIGN Visual interface element (controls or widgets) ViewGroup Contains multiple widgets. Layouts inherit the ViewGroup class Activities Screen being displayed

More information

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 [talking head] This lecture we study theory design and implementation. Programmers have two roles to play here. In one role, they

More information

Linked Lists. What is a Linked List?

Linked Lists. What is a Linked List? Linked Lists Along with arrays, linked lists form the basis for pretty much every other data stucture out there. This makes learning and understand linked lists very important. They are also usually the

More information

PROFESSOR: Well, yesterday we learned a bit about symbolic manipulation, and we wrote a rather stylized

PROFESSOR: Well, yesterday we learned a bit about symbolic manipulation, and we wrote a rather stylized MITOCW Lecture 4A PROFESSOR: Well, yesterday we learned a bit about symbolic manipulation, and we wrote a rather stylized program to implement a pile of calculus rule from the calculus book. Here on the

More information

ListView Containers. Resources. Creating a ListView

ListView Containers. Resources. Creating a ListView ListView Containers Resources https://developer.android.com/guide/topics/ui/layout/listview.html https://developer.android.com/reference/android/widget/listview.html Creating a ListView A ListView is a

More information

Post Experiment Interview Questions

Post Experiment Interview Questions Post Experiment Interview Questions Questions about the Maximum Problem 1. What is this problem statement asking? 2. What is meant by positive integers? 3. What does it mean by the user entering valid

More information

Hi everyone. I hope everyone had a good Fourth of July. Today we're going to be covering graph search. Now, whenever we bring up graph algorithms, we

Hi everyone. I hope everyone had a good Fourth of July. Today we're going to be covering graph search. Now, whenever we bring up graph algorithms, we Hi everyone. I hope everyone had a good Fourth of July. Today we're going to be covering graph search. Now, whenever we bring up graph algorithms, we have to talk about the way in which we represent the

More information

CSE143 Notes for Monday, 4/25/11

CSE143 Notes for Monday, 4/25/11 CSE143 Notes for Monday, 4/25/11 I began a new topic: recursion. We have seen how to write code using loops, which a technique called iteration. Recursion an alternative to iteration that equally powerful.

More information

COSC 2P95 Lab 5 Object Orientation

COSC 2P95 Lab 5 Object Orientation COSC 2P95 Lab 5 Object Orientation For this lab, we'll be looking at Object Orientation in C++. This is just a cursory introduction; it's assumed that you both understand the lecture examples, and will

More information

Mobile Application Development Lab [] Simple Android Application for Native Calculator. To develop a Simple Android Application for Native Calculator.

Mobile Application Development Lab [] Simple Android Application for Native Calculator. To develop a Simple Android Application for Native Calculator. Simple Android Application for Native Calculator Aim: To develop a Simple Android Application for Native Calculator. Procedure: Creating a New project: Open Android Stdio and then click on File -> New

More information

It Might Be Valid, But It's Still Wrong Paul Maskens and Andy Kramek

It Might Be Valid, But It's Still Wrong Paul Maskens and Andy Kramek Seite 1 von 5 Issue Date: FoxTalk July 2000 It Might Be Valid, But It's Still Wrong Paul Maskens and Andy Kramek This month, Paul Maskens and Andy Kramek discuss the problems of validating data entry.

More information

Overview. What are layouts Creating and using layouts Common layouts and examples Layout parameters Types of views Event listeners

Overview. What are layouts Creating and using layouts Common layouts and examples Layout parameters Types of views Event listeners Layouts and Views http://developer.android.com/guide/topics/ui/declaring-layout.html http://developer.android.com/reference/android/view/view.html Repo: https://github.com/karlmorris/viewsandlayouts Overview

More information

A PROGRAM IS A SEQUENCE of instructions that a computer can execute to

A PROGRAM IS A SEQUENCE of instructions that a computer can execute to A PROGRAM IS A SEQUENCE of instructions that a computer can execute to perform some task. A simple enough idea, but for the computer to make any use of the instructions, they must be written in a form

More information

mid=81#15143

mid=81#15143 Posted by joehillen - 06 Aug 2012 22:10 I'm having a terrible time trying to find the Lightworks source code. I was under the impression that Lightworks was open source. Usually that means that it's possible

More information

Azon Master Class. By Ryan Stevenson Guidebook #5 WordPress Usage

Azon Master Class. By Ryan Stevenson   Guidebook #5 WordPress Usage Azon Master Class By Ryan Stevenson https://ryanstevensonplugins.com/ Guidebook #5 WordPress Usage Table of Contents 1. Widget Setup & Usage 2. WordPress Menu System 3. Categories, Posts & Tags 4. WordPress

More information

PROFESSOR: So far in this course we've been talking a lot about data abstraction. And remember the idea is that

PROFESSOR: So far in this course we've been talking a lot about data abstraction. And remember the idea is that MITOCW Lecture 4B [MUSIC-- "JESU, JOY OF MAN'S DESIRING" BY JOHANN SEBASTIAN BACH] PROFESSOR: So far in this course we've been talking a lot about data abstraction. And remember the idea is that we build

More information

mk-convert Contents 1 Converting to minikanren, quasimatically. 08 July 2014

mk-convert Contents 1 Converting to minikanren, quasimatically. 08 July 2014 mk-convert 08 July 2014 Contents 1 Converting to minikanren, quasimatically. 1 1.1 Variations on a Scheme..................... 2 1.2 Racket to minikanren, nally.................. 8 1.3 Back to the beginning......................

More information

1. Simple List. 1.1 Simple List using simple_list_item_1

1. Simple List. 1.1 Simple List using simple_list_item_1 1. Simple List 1.1 Simple List using simple_list_item_1 1. Create the Android application with the following attributes. Application Name: MySimpleList Project Name: Package Name: MySimpleList com.example.mysimplelist

More information

The following content is provided under a Creative Commons license. Your support

The following content is provided under a Creative Commons license. Your support MITOCW Lecture 23 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality, educational resources for free. To make a

More information

Arrays of Buttons. Inside Android

Arrays of Buttons. Inside Android Arrays of Buttons Inside Android The Complete Code Listing. Be careful about cutting and pasting.

More information

The following content is provided under a Creative Commons license. Your support

The following content is provided under a Creative Commons license. Your support MITOCW Lecture 10 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To make a

More information

MITOCW ocw f99-lec12_300k

MITOCW ocw f99-lec12_300k MITOCW ocw-18.06-f99-lec12_300k This is lecture twelve. OK. We've reached twelve lectures. And this one is more than the others about applications of linear algebra. And I'll confess. When I'm giving you

More information

LECTURE 08 UI AND EVENT HANDLING

LECTURE 08 UI AND EVENT HANDLING MOBILE APPLICATION DEVELOPMENT LECTURE 08 UI AND EVENT HANDLING IMRAN IHSAN ASSISTANT PROFESSOR WWW.IMRANIHSAN.COM User Interface User Interface The Android Widget Toolbox 1. TextView 2. EditText 3. Spinner

More information

Version Copyright Feel free to distribute this guide at no charge...

Version Copyright Feel free to distribute this guide at no charge... Version 2.0 Feel free to distribute this guide at no charge... You cannot edit or modify this guide in anyway. It must be left exactly the way it is. This guide is only accurate from the last time it was

More information

Building User Interface for Android Mobile Applications II

Building User Interface for Android Mobile Applications II Building User Interface for Android Mobile Applications II Mobile App Development 1 MVC 2 MVC 1 MVC 2 MVC Android redraw View invalidate Controller tap, key pressed update Model MVC MVC in Android View

More information

MITOCW ocw apr k

MITOCW ocw apr k MITOCW ocw-6.033-32123-06apr2005-220k Good afternoon. So we're going to continue our discussion about atomicity and how to achieve atomicity. And today the focus is going to be on implementing this idea

More information

MITOCW watch?v=w_-sx4vr53m

MITOCW watch?v=w_-sx4vr53m MITOCW watch?v=w_-sx4vr53m The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To

More information

Slide 1 CS 170 Java Programming 1 Testing Karel

Slide 1 CS 170 Java Programming 1 Testing Karel CS 170 Java Programming 1 Testing Karel Introducing Unit Tests to Karel's World Slide 1 CS 170 Java Programming 1 Testing Karel Hi Everybody. This is the CS 170, Java Programming 1 lecture, Testing Karel.

More information

Class #7 Guidebook Page Expansion. By Ryan Stevenson

Class #7 Guidebook Page Expansion. By Ryan Stevenson Class #7 Guidebook Page Expansion By Ryan Stevenson Table of Contents 1. Class Purpose 2. Expansion Overview 3. Structure Changes 4. Traffic Funnel 5. Page Updates 6. Advertising Updates 7. Prepare for

More information

Well, I hope you appreciate that we have inducted you into some real magic, the magic of

Well, I hope you appreciate that we have inducted you into some real magic, the magic of MITOCW Lecture 9B Well, I hope you appreciate that we have inducted you into some real magic, the magic of building languages, really building new languages. What have we looked at? We've looked at an

More information

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Managing Screen Orientation

EMBEDDED SYSTEMS PROGRAMMING Application Tip: Managing Screen Orientation EMBEDDED SYSTEMS PROGRAMMING 2016-17 Application Tip: Managing Screen Orientation ORIENTATIONS Portrait Landscape Reverse portrait Reverse landscape ON REVERSE PORTRAIT Android: all four orientations are

More information

MITOCW watch?v=se4p7ivcune

MITOCW watch?v=se4p7ivcune MITOCW watch?v=se4p7ivcune The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

The following content is provided under a Creative Commons license. Your support

The following content is provided under a Creative Commons license. Your support MITOCW Lecture 2 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To make a donation

More information

Agenda. Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen

Agenda. Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen Gill Cleeren Agenda Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen Lists and navigation Navigating from master to detail Optimizing the application Preparing

More information

Chrome if I want to. What that should do, is have my specifications run against four different instances of Chrome, in parallel.

Chrome if I want to. What that should do, is have my specifications run against four different instances of Chrome, in parallel. Hi. I'm Prateek Baheti. I'm a developer at ThoughtWorks. I'm currently the tech lead on Mingle, which is a project management tool that ThoughtWorks builds. I work in Balor, which is where India's best

More information

(c) Dr Sonia Sail LAJMI College of Computer Sciences & IT (girl Section) 1

(c) Dr Sonia Sail LAJMI College of Computer Sciences & IT (girl Section) 1 Level 5: Baccalaureus in Computer Sciences CHAPTER 4: LAYOUTS AND VIEWS Dr. Sonia Saïd LAJMI PhD in Computer Sciences 1 Layout.xml 2 Computer Sciences & IT (girl Section) 1 Layout Requirements android:layout_width:

More information

Supporting Class / C++ Lecture Notes

Supporting Class / C++ Lecture Notes Goal Supporting Class / C++ Lecture Notes You started with an understanding of how to write Java programs. This course is about explaining the path from Java to executing programs. We proceeded in a mostly

More information

ListView (link) An ordered collection of selectable choices. key attributes in XML:

ListView (link) An ordered collection of selectable choices. key attributes in XML: CS 193A Lists This document is copyright (C) Marty Stepp and Stanford Computer Science. Licensed under Creative Commons Attribution 2.5 License. All rights reserved. ListView (link) An ordered collection

More information

Android Layout Types

Android Layout Types Android Layout Types Android Linear Layout Android LinearLayout is a view group that aligns all children in either vertically or horizontally. android:divider - This is drawable to use as a vertical divider

More information

MITOCW watch?v=hverxup4cfg

MITOCW watch?v=hverxup4cfg MITOCW watch?v=hverxup4cfg PROFESSOR: We've briefly looked at graph isomorphism in the context of digraphs. And it comes up in even more fundamental way really for simple graphs where the definition is

More information

CS371m - Mobile Computing. User Interface Basics

CS371m - Mobile Computing. User Interface Basics CS371m - Mobile Computing User Interface Basics Clicker Question Have you ever implemented a Graphical User Interface (GUI) as part of a program? A. Yes, in another class. B. Yes, at a job or internship.

More information

BBC Learning English Face up to Phrasals Mark's Mistake

BBC Learning English Face up to Phrasals Mark's  Mistake BBC Learning English Face up to Phrasals Mark's Email Mistake Episode 1: Email Fun? Mark: Hey Ali, did you check out that email I sent you the one about stupid Peter, saying how stupid he is? Oh dear.

More information

Chapter 8 Positioning with Layouts

Chapter 8 Positioning with Layouts Introduction to Android Application Development, Android Essentials, Fifth Edition Chapter 8 Positioning with Layouts Chapter 8 Overview Create user interfaces in Android by defining resource files or

More information

Android Programming Family Fun Day using AppInventor

Android Programming Family Fun Day using AppInventor Android Programming Family Fun Day using AppInventor Table of Contents A step-by-step guide to making a simple app...2 Getting your app running on the emulator...9 Getting your app onto your phone or tablet...10

More information

MITOCW watch?v=kz7jjltq9r4

MITOCW watch?v=kz7jjltq9r4 MITOCW watch?v=kz7jjltq9r4 PROFESSOR: We're going to look at the most fundamental of all mathematical data types, namely sets, and let's begin with the definitions. So informally, a set is a collection

More information

05. SINGLETON PATTERN. One of a Kind Objects

05. SINGLETON PATTERN. One of a Kind Objects BIM492 DESIGN PATTERNS 05. SINGLETON PATTERN One of a Kind Objects Developer: What use is that? Guru: There are many objects we only need one of: thread pools, caches, dialog boxes, objects that handle

More information

So on the survey, someone mentioned they wanted to work on heaps, and someone else mentioned they wanted to work on balanced binary search trees.

So on the survey, someone mentioned they wanted to work on heaps, and someone else mentioned they wanted to work on balanced binary search trees. So on the survey, someone mentioned they wanted to work on heaps, and someone else mentioned they wanted to work on balanced binary search trees. According to the 161 schedule, heaps were last week, hashing

More information

Using the API: Introductory Graphics Java Programming 1 Lesson 8

Using the API: Introductory Graphics Java Programming 1 Lesson 8 Using the API: Introductory Graphics Java Programming 1 Lesson 8 Using Java Provided Classes In this lesson we'll focus on using the Graphics class and its capabilities. This will serve two purposes: first

More information

Android Specifics. Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9)

Android Specifics. Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9) Android Specifics Jonathan Diehl (Informatik 10) Hendrik Thüs (Informatik 9) Android Specifics ArrayAdapter Preferences Widgets Jonathan Diehl, Hendrik Thüs 2 ArrayAdapter Jonathan Diehl, Hendrik Thüs

More information

Intents. Your first app assignment

Intents. Your first app assignment Intents Your first app assignment We will make this. Decidedly lackluster. Java Code Java Code XML XML Preview XML Java Code Java Code XML Buttons that work

More information

MITOCW watch?v=flgjisf3l78

MITOCW watch?v=flgjisf3l78 MITOCW watch?v=flgjisf3l78 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To

More information

MITOCW ocw f99-lec07_300k

MITOCW ocw f99-lec07_300k MITOCW ocw-18.06-f99-lec07_300k OK, here's linear algebra lecture seven. I've been talking about vector spaces and specially the null space of a matrix and the column space of a matrix. What's in those

More information

Introduction. Using Styles. Word 2010 Styles and Themes. To Select a Style: Page 1

Introduction. Using Styles. Word 2010 Styles and Themes. To Select a Style: Page 1 Word 2010 Styles and Themes Introduction Page 1 Styles and themes are powerful tools in Word that can help you easily create professional looking documents. A style is a predefined combination of font

More information

Lesson4:CreatinganInterfaceandChecklistService

Lesson4:CreatinganInterfaceandChecklistService Lesson4:CreatinganInterfaceandChecklistService We have the majority of our template for the application set up so far, but we are also going to need to handle the "logic" that happens in the application.

More information

Mobile User Interfaces

Mobile User Interfaces Mobile User Interfaces CS 2046 Mobile Application Development Fall 2010 Announcements Next class = Lab session: Upson B7 Office Hours (starting 10/25): Me: MW 1:15-2:15 PM, Upson 360 Jae (TA): F 11:00

More information

Chapter 1 Getting Started

Chapter 1 Getting Started Chapter 1 Getting Started The C# class Just like all object oriented programming languages, C# supports the concept of a class. A class is a little like a data structure in that it aggregates different

More information

Hello World. Lesson 1. Android Developer Fundamentals. Android Developer Fundamentals. Layouts, and. NonCommercial

Hello World. Lesson 1. Android Developer Fundamentals. Android Developer Fundamentals. Layouts, and. NonCommercial Hello World Lesson 1 This work is licensed This under work a Creative is is licensed Commons under a a Attribution-NonCommercial Creative 4.0 Commons International Attribution- License 1 NonCommercial

More information

MITOCW watch?v=9h6muyzjms0

MITOCW watch?v=9h6muyzjms0 MITOCW watch?v=9h6muyzjms0 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

MITOCW watch?v=zm5mw5nkzjg

MITOCW watch?v=zm5mw5nkzjg MITOCW watch?v=zm5mw5nkzjg The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

1 Getting used to Python

1 Getting used to Python 1 Getting used to Python We assume you know how to program in some language, but are new to Python. We'll use Java as an informal running comparative example. Here are what we think are the most important

More information

The following content is provided under a Creative Commons license. Your support

The following content is provided under a Creative Commons license. Your support MITOCW Recitation 1 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high-quality educational resources for free. To make

More information

MITOCW watch?v=sdw8_0rdzuw

MITOCW watch?v=sdw8_0rdzuw MITOCW watch?v=sdw8_0rdzuw PROFESSOR: Directed acyclic graphs are a special class of graphs that really have and warrant a theory of their own. Of course, "directed acyclic graphs" is lot of syllables,

More information

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 4. Workshop

Android Apps Development for Mobile and Tablet Device (Level I) Lesson 4. Workshop Workshop 1. Create an Option Menu, and convert it into Action Bar (Page 1 8) Create an simple Option Menu Convert Option Menu into Action Bar Create Event Listener for Menu and Action Bar Add System Icon

More information

Instructor (Mehran Sahami):

Instructor (Mehran Sahami): Programming Methodology-Lecture26 Instructor (Mehran Sahami): All right. Welcome back to what kind of day is it going to be in 106a? Anyone want to fun-filled and exciting. It always is. Thanks for playing

More information

Azon Master Class. By Ryan Stevenson Guidebook #4 WordPress Installation & Setup

Azon Master Class. By Ryan Stevenson   Guidebook #4 WordPress Installation & Setup Azon Master Class By Ryan Stevenson https://ryanstevensonplugins.com/ Guidebook #4 WordPress Installation & Setup Table of Contents 1. Add Your Domain To Your Website Hosting Account 2. Domain Name Server

More information

COSC 2P95 Lab 9 Signals, Mutexes, and Threads

COSC 2P95 Lab 9 Signals, Mutexes, and Threads COSC 2P95 Lab 9 Signals, Mutexes, and Threads Sometimes, we can't achieve what we want via a single execution pipeline. Whether it's for responsiveness, or to process more data simultaneously, we rely

More information

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology

More information

CS103 Spring 2018 Mathematical Vocabulary

CS103 Spring 2018 Mathematical Vocabulary CS103 Spring 2018 Mathematical Vocabulary You keep using that word. I do not think it means what you think it means. - Inigo Montoya, from The Princess Bride Consider the humble while loop in most programming

More information

This lesson is part 5 of 5 in a series. You can go to Invoice, Part 1: Free Shipping if you'd like to start from the beginning.

This lesson is part 5 of 5 in a series. You can go to Invoice, Part 1: Free Shipping if you'd like to start from the beginning. Excel Formulas Invoice, Part 5: Data Validation "Oh, hey. Um we noticed an issue with that new VLOOKUP function you added for the shipping options. If we don't type the exact name of the shipping option,

More information

COMP2100/2500 Lecture 17: Shell Programming II

COMP2100/2500 Lecture 17: Shell Programming II [ANU] [DCS] [COMP2100/2500] [Description] [Schedule] [Lectures] [Labs] [Homework] [Assignments] [COMP2500] [Assessment] [PSP] [Java] [Reading] [Help] COMP2100/2500 Lecture 17: Shell Programming II Summary

More information

How to Improve Your Campaign Conversion Rates

How to Improve Your  Campaign Conversion Rates How to Improve Your Email Campaign Conversion Rates Chris Williams Author of 7 Figure Business Models How to Exponentially Increase Conversion Rates I'm going to teach you my system for optimizing an email

More information

PROFESSOR: Well, now that we've given you some power to make independent local state and to model objects,

PROFESSOR: Well, now that we've given you some power to make independent local state and to model objects, MITOCW Lecture 5B PROFESSOR: Well, now that we've given you some power to make independent local state and to model objects, I thought we'd do a bit of programming of a very complicated kind, just to illustrate

More information

One way ANOVA when the data are not normally distributed (The Kruskal-Wallis test).

One way ANOVA when the data are not normally distributed (The Kruskal-Wallis test). One way ANOVA when the data are not normally distributed (The Kruskal-Wallis test). Suppose you have a one way design, and want to do an ANOVA, but discover that your data are seriously not normal? Just

More information

Meniu. Create a project:

Meniu. Create a project: Meniu Create a project: Project name: P0131_MenuSimple Build Target: Android 2.3.3 Application name: MenuSimple Package name: ru.startandroid.develop.menusimple Create Activity: MainActivity Open MainActivity.java.

More information

Black Problem 2: Huffman Compression [75 points] Next, the Millisoft back story! Starter files

Black Problem 2: Huffman Compression [75 points] Next, the Millisoft back story! Starter files Black Problem 2: Huffman Compression [75 points] Copied from: https://www.cs.hmc.edu/twiki/bin/view/cs5/huff manblack on 3/15/2017 Due: 11:59 PM on November 14, 2016 Starter files First, here is a set

More information

contain a geometry package, and so on). All Java classes should belong to a package, and you specify that package by typing:

contain a geometry package, and so on). All Java classes should belong to a package, and you specify that package by typing: Introduction to Java Welcome to the second CS15 lab! By now we've gone over objects, modeling, properties, attributes, and how to put all of these things together into Java classes. It's perfectly okay

More information

MITOCW MIT6_172_F10_lec18_300k-mp4

MITOCW MIT6_172_F10_lec18_300k-mp4 MITOCW MIT6_172_F10_lec18_300k-mp4 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for

More information

Practical 1.ListView example

Practical 1.ListView example Practical 1.ListView example In this example, we show you how to display a list of fruit name via ListView. Android Layout file File : res/layout/list_fruit.xml

More information