Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,218,376 members, 8,037,755 topics. Date: Thursday, 26 December 2024 at 04:37 PM

2. Learning Android Programming. - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / 2. Learning Android Programming. (1191 Views)

Learning Android Development For Novice And Experts / 2b. Learning Android Programming: Run Your First App. / 1. Learning Android Programming (2) (3) (4)

(1) (Reply) (Go Down)

2. Learning Android Programming. by Seunade4444: 5:04pm On Jul 19, 2016
Hello everyone.
The week has been hectic but I'm trying to ensure I keep up with the class. I meant I also want your commitments.

Our objectives today:
1. To understand the basic Android program structure.
2.To provide an enabling environment for android programming.
3. To run you first app on your mobile phone.
But I will divide the class into two and discuss the running of our first class later today because of the size of the lesson and my time. I type on my phone and can be tiring. I also have a busy schedule as a doctor.

I love to learn new lessons by relating it with what I'm familiar with. And I also love to move from the known to the unknown.

When you pick up a device with an Android Os and you run the App on it you carry out the developer intentions by interacting with the screen. That you are very much familier with. But really,
1. the developer had written the programs in well arranged files.
2. the IDE had debugged and compiled it into a single package called an Apk file. Java programmers are more familier with packages.
3. the apk file interact with the device android os through installation to provide a UI ( user interface).
4. You interact with the UI.

I will talk a little more on these starting from the last pathway phase because that is very much familiar.
The interface we are talking about here is the single interface. We will discuss about the multiple interface later on. So your screen page on the device is an interface.
An interface are made up of
1. Views or/and group view
2. Parent Layout

The view is a four side plain that perform a specific display role. The length and breath are determined through programming by the developer. And the name of the view depends on what it does. If it displays a read only text we call it a TextView. If it displays an image we will call it an ImageView.
There are views that launches a new activity( we will talk more on activities) when clicked. That means like having a new screen page on the device on clicking the view. that is called a ButtonView.
Look at the Image shown we see the icon on the logo at the left upper corner. The brainymed is a TextView while the image below it is an ImageView. If you look down you'll notice there are 6 image buttons which opens a new activity on a click. The 6 buttons are grouped together in a smaller layout as a group view.

The views rather than being the building block of the interface are rather contained in a layout. The layout is called the parent layout provide the maximum extend any of the child view can stretch . the layout also determine the positioning of the child views in it. Actually you don't always get to see the demarcation for the length and breadth of each view simply because the view background are often made transparent. So you only see what the view display on the layout background.
Other view includes a ListView, a ScrollView a, WebView and so on. We will discuss the views in details later on.

I will relate the user interface with the programming files.
Now you know the page in an Android screen is made up of a layout and the child views.
We build our layout and may bethe containing child view by writing our code xml code in the layout folder files with a .xml extension.
But the interface layout can only be displayed from the activity which is a java file. So to display an XML layout file you have to write your java code and reference the particular XML layout.
The activities also reference the layout view as object and define their behavior.
Our arrangements of the activity flow are written in the manifest file. So the first activity with the launcher intent- filter launches the app. So you decide which activity you want the app to first run on starting the app. The launching activity display any layout it reference. And also open a new activity by the user feed back from UI interaction with the referenced ButtonView.
This may sound like crooked at first but it's very straight if you follow it well. We will still discuss all these in details but as an overview to the lesson of discussion we briefly talk about how our first app works.
For now I will only talk on the part of the program you will edit to build your first app.

IDE.
After this aspect you should not expect any more special detail. I will write now extensively on the developer environment.
Earlier I recommended you download an android studio. You will also need to download the java Jdk file from the same site you have have downloaded the android studio. You will need to register with Oracle and agree to their terms for the jdk. I shouldn't need to tell you that Oracle now owns java. Note that the Android SDK is already in the studio.
So an IDE contains the default packages you need to develop an app, a debugger. and it also helps you to run your application. Here we mean a virtual machine that runs your app after building it. So you test your app on the virtual machine after building and compiling it.
You can also use your android phone to run your app . When we need to run our first app I will show how to turn your phone into a debugger.
After installing the Studio and the Java jdk you can now open your studio to crate a new project.
If you don't have a laptop simply use the Android IDE application. All are self directive on installing the IDE app.

We are set to run our first app from our IDE.
I will post the remaining part of today's lesson later tonight.

To follow up I opened a WhatsApp group on it.
To join contact me via WhatsApp on 08133371934.
Thanks.

Re: 2. Learning Android Programming. by Kruzilano(m): 5:06pm On Jul 19, 2016
Following
Re: 2. Learning Android Programming. by tolabrecords: 5:35pm On Jul 19, 2016
develop your android app here call for more details 07054908002
Re: 2. Learning Android Programming. by Jayke50(m): 8:38am On Aug 02, 2016
heading to lesson 2b, thanks for this article. Please i need andro studio
Re: 2. Learning Android Programming. by Seunade4444: 2:04pm On Aug 08, 2016
I will now keep to a single thread for my tutorial.
This earlier thread 1.Learning android programming will now be maintained thanks.

(1) (Reply)

MySql: Is It Advisable To Create Users In This Way Using Mysql? / How To Secure My Wireless Router / Using Composir To Create Websites - Review (with Pictures)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 28
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.