₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,071 members, 8,420,155 topics. Date: Thursday, 04 June 2026 at 12:28 PM

Toggle theme

Rexben's Posts

Nairaland ForumRexben's ProfileRexben's Posts

1 2 3 4 5 6 7 8 9 10 (of 17 pages)

ProgrammingRe: Teencodeafrica Offers To Teach Your Student How To Design Website For Free by rexben(op): 7:06pm On May 14, 2018
If you know and school administrator or knows someone that knows a school administrator.
Mack Zuckerberg, Steve Jobs, Bill Gates started from when they were way younger.
Let's help the coming generation.
ProgrammingRe: I Want To Be A Good Programmer by rexben(m):
Emkay2018:
I want to be a good programmer. How will i start?
First thing is to pick a platform. There are several platforms like web development (front-end or backend), native apps (Android or iOS or hybrid), system apps.
Pick one and then contact me, I'll guide you for free.
ProgrammingTeencodeafrica Offers To Teach Your Student How To Design Website For Free by rexben(op):
In Teencode Africa we build the foundation of Africa's future technology leaders by partnering with schools to introduce a coding curriculum.
Teencode Africa is sponsored by Andela
Are you a school administrator?
Do you have a functioning computer lab?
Is your school located in Lagos?
Are you interested in partnering with us to teach your students on how build programs that solve problems?
Log on to www.teencodeafrica.com to register your school. You'll fill a form on the website and we'll get back to you.
You can follow teencodeafrica on Twitter @teencodeA
cc: lalastica, seun
Christianity EtcRe: Pastor Adeboye: Those Attacking Me On Internet Would Be Sent Out Of This Country by rexben(m): 11:00am On May 13, 2018
It's obvious that this man, Adeboye is not following the commands of Jesus.
Jesus never cared about critics, He even asked us to love them
CrimeRe: Househelp Brutalized For Waking Up Late To Take Care Of Her Boss’ Kids by rexben(m): 1:15pm On May 12, 2018
YoungDaNaval:
NwaAmaikpe's reaction




This is so sad.
This why Nigeria never progresses.
Politicians are elected to represent the people but they loot them, the police are meant to protect the people but they extort them. Lecturers are meant to train students but they exploit them.
Nigerians just never do the job they were called to do.
Why will she accept the job of house help, get paid for it.
Yet wake up late to do her job?
That is the height of negligence to duty.
Are you trying to justify what the woman did?
Did you know the time the house help slept?
Did you know that you can't always cheat nature?
Try to be considerate
ComputersRe: Latest Price Of Hard Disk Drive by rexben(op): 8:28am On May 11, 2018
geunik:
having same issue with my system. New 250gb SATA HDD is about 10k and 320gb is about 14k. Don't know about 500gb but should be about 18k or there about.
what about second hand?
ComputersLatest Price Of Hard Disk Drive by rexben(op): 12:38am On May 11, 2018
My hard disk just crashed and I'm in need of another one. How much can I get 320gb or 500gb hard disk? I'm based in Lagos. Thanks
WebmastersRe: Let Us Review Your Blog For Free. We'll Tell You Things You Are Doing Wrong. by rexben(m): 10:58am On May 10, 2018
ProgrammingRe: Udacity/google Africa Challenge Scholarship For Android And Web Development! by rexben(m): 11:44am On May 08, 2018
CodeTemplar:
Any particular link to their page? I keep seeing the US version when I searched it.
I'll advice that you follow them on Twitter or Facebook, search for Andela Nigeria or Andela Africa
ProgrammingRe: Udacity/google Africa Challenge Scholarship For Android And Web Development! by rexben(m):
I am a mentor for Android development track.
You can also check my blog rexandroid..com
ProgrammingRe: Udacity/google Africa Challenge Scholarship For Android And Web Development! by rexben(m): 8:03am On May 08, 2018
CodeTemplar:
How can I apply if it is still open for new entry?
No, you have to be on the lookout for ALC 4.0
ProgrammingRe: Your Smartphone Is Really Smart by rexben(op): 12:52am On Apr 24, 2018
Towbaba500:
thumbs up for the enlightenment, and pls can i set up a site with my phone
I don't know but if you mean a wordpress site, the answer is yes
ProgrammingYour Smartphone Is Really Smart by rexben(op): 1:10am On Apr 20, 2018
According to zimescience.com, smartphones are millions of time more powerful than all of NASA’s combined computing in 1969 used to guide humans across 356, 000km of space from the Earth to the moon and return them safely.

Growing up, I wanted to learn how to program because the world’s richest man is a programmer. The dream died and was buried because I was not able to lay my hand on any PC.

The buried dream resurrected after 12 years when I had access to a friend’s PC. If I had this information that I want to share with you back then, I won’t have waited for 12 years, at least I’ll have started coding with a smartphone 5 or 6 years before now. I don’t want you to get stuck like me. I don’t want you to wait more than a decade like me.

I will be telling you different smartphone IDEs that you can write and test your codes. You don’t need to wait to have a PC to start writing and debugging codes. Your smartphone is capable of doing those tasks.

I know the cost of acquiring or securing a PC is quite expensive but acquiring a smartphone is more feasible compared to getting a PC

These smartphones IDEs can be downloaded from google play store, App store or Windows store. Some Apps are totally free, some are In-App purchase and you have to pay for some. I’ll just give little details and features about the Apps, I have provided links below the features of each Apps to get detailed information about the Apps.

ANDROID
DroidScript -JavaScript Mobile Coding IDE

DroidScript uses Android’s built-in Chrome V8 JavaScript engine which is constantly updated and improved by Google and keeps up-to-date with modern internet standards.

Features:

· Add Buttons, Text and Graphics.

· Access GPS, Compass, Camera, Accelerometer, Bluetooth, Wi-Fi.

· Send and Receive emails and SMS.

· Use native controls and/or HTML5 and CSS.

· Build Native or Phaser based games.

· Make use of popular JavaScript libs such as JQuery.

· Share app source with your friends as .spk files.

· Built in JavaScript reference.

· Read more on DroidScript this http:///16Cotwp

· Download https://play.google.com/store/apps/details?id=com...androidscriptfree&hl=en

CppDroid

CppDroid is simple C/C++ IDE focused on learning programming languages and libraries.

Features:

· Code complete

· Real-time diagnostics (warnings and errors) and fixes

· File and tutorial navigator (variables, methods, etc.)

· Static analysis

· Smart syntax highlighting

· Works offline (built-in compiler, no internet connection required)

· Read more on CppDroid http://www.cppdroid.info

· Download https://play.google.com/store/apps/details?id=name.antonsmirnov.android.cppdroid

AWD (Android Web Developer)

Android Web Developer (AWD) is a IDE (Integrated development environment) for web developers. Supports next language and formats: PHP, CSS, JS, HTML, JSON.

Android Web Developer will turn your Android tablet with keyboard into a real development box. Android Web Developer will turn your Android Phone into a small development computer to browse and touch your code on the go.

Download https://play.google.com/store/apps/details?id=org.kidinov.awd&hl=en

JavaIDEdroid

JavaIDEdroid is an integrated development environment which runs on Android and allows to create native Android applications without the need to use the Android SDK on Windows or Linux.

You need Android 2.2.3 or higher and a storage card (/sdcard/) to use this app!

Following development tools are integrated in JavaIDEdroid:

aapt tool, Eclipse compiler for Java, dx tool, DexMerger tool, ApkBuilder

Read more on JavaIDEdroid http://www.tanapro.ch/products/JavaIDEdroid/historyen.html

Download https://play.google.com/store/apps/details?id=ch.tanapro.JavaIDEdroid

Java Editor

Java Editor is a very simple Java editor, it can color the syntax nodes: nodes, attributes, properties, events, support auto completion and search and replace. Opens the default files with the extensions: jav, java.

Requires Adobe Air (it’s FREE) and Android 2.2 or later.

Read more on Java Editor

Download https://play.google.com/store/apps/details?id=air.JavaEditor&hl=en

DroidEdit

DroidEdit is a text and source code editor (similar to Notepad++ or gedit) for android tablets and phones

Features:

· Syntax Highlighting for several languages (C, C++, C#, Java, HTML, CSS, JavaScript, Python, Ruby, Lua, LaTeX, SQL, …)

· Several color themes

· Infinite undo & redo

· Search & replace

· Auto & block indentation

· Keep opened files and changes between sessions

· Open files directly from dropbox or a file manager

· Character encoding support

· Read more on DroidEdit http://www.droidedit.com/

· Download https://play.google.com/store/apps/details?id=com.aor.droidedit&hl=en

Dcoder

Dcoder is a mobile coding IDE (Compiler for mobile), where one can code and learn algorithms. Tailored to enhance your coding skills, via the use of code compilation and algorithm solving. Now learn to code anytime anywhere.

Added bonus: Dcoder uses a Rich Text Editor supporting syntax highlighting and packed with the necessary tools to offer you all the edge that an IDE or code compiler is supposed to.

Features

· Rich Text Editor with Syntax highlighting (Code Editor)

· Line number, Auto indent, Autocomplete Parenthesis.

· File Open/Save.

· Multiple Language Support.

· User input for languages like C, C++, Java, Php, JavaScript, Node.js and others.

· Active debug view for faster access to Output.

· Thoroughly designed Algorithm problems to improve coding Skills and make programmers industry ready.

· Dcoder is an online compiler, now run, compile and execute your code snippets on your own android mobile devices.

· Download https://play.google.com/store/apps/details?id=com.paprbit.dcoder&hl=en

CodePeeker

If you want to simply read your source code with syntax highlighting, look up snippets or cool solutions on-the-go then Code Peeker is for you!

It’s a great little code reader (note: read, NOT an editor) that enhances current coding knowledge by highlighting your past coding expertise.

With Code Peeker you can share coding success tricks during a jobinterview or meetings. It’ll make you look much better than promising “I don’t know. Let me get back to you on that one”.

Code Peeker will open and highlight any supported code language (and unicode/utf8) you throw at it.

Features:

· Mark the line number

· Provides a built-in file browser (in case your phone doesn’t have one)

· Opens from both external SD and internal memory!

· Supports other file browsers

· Download https://play.google.com/store/apps/details?id=twig.nguyen.codepeeker

Anacode

Anacode is an integrated development environment and source code editor for JAVA, HTML, CSS, PHP, JavaScript and C/C++ files that allows you to build and run Android applications directly on the device. Anacode can directly build an APK from your android project source code by single click on the “Run” item in the menu. Just open any JAVA or XML file that’s is part of your project.

Anacode introduces a new code edit model for smart devices allowing for faster and much easier writing and editing of source code than ever before. Copying, pasting, deleting (and other functions that are used a lot during coding) of lines, words or selections of code is a single tap/click away and speeds up your coding time dramatically.

Features:

· Indent line or selection

· Unlimited undo/redo

· Custom syntax highlighting of java, html/xml, css, php, javascript and c/c++ files

· Autocomplete for all supported languages

· Building android applications directly on the device

· Compile and run java programs directly on the device

· Create new java classes

· Run html files in an internal or external browser

· Contains Android, C/C++ and Java sample projects

· Read more on AnacodeIDE http://www.anacodeide.com/blog

· Download https://play.google.com/store/apps/details?id=com.majosoft.anacode&hl=en

AIDE

AIDE is an integrated development environment (IDE) for developing real Android apps directly on your Android device.

Follow interactive coding lessons and step-by-step become an expert app developer. Visually design apps, write code with the feature rich editor with code completion, real-time error checking, refactoring and smart code navigation, run your app with a single click and use the Java debugger to find AIDE offers Java programming for the beginning, intermediate or advanced programmer. Beginners can learn to code; developers can do real development. Using the advanced editor with code completion and syntax highlighting to edit Java and XML files, then compile the software, the use the Compiler to turn it into an app. AIDE.s incremental Compiler is blazingly fast. Interoperability with Android Studio and command line SDK Tools is provided. Not only does AIDE Support Java development but C and C++ native development is supported as well.

AIDE offers Java programming for the beginning, intermediate or advanced programmer. Beginners can learn to code; developers can do real development. Using the advanced editor with code completion and syntax highlighting to edit Java and XML files, then compile the software, the use the Compiler to turn it into an app. AIDEs incremental Compiler is blazingly fast. Interoperability with Android Studio and command line SDK Tools is provided. Not only does AIDE Support Java development but C and C++ native development is supported as well.

Read more on AIDE http://www.android-ide.com/

Download https://play.google.com/store/apps/details?id=com.aide.ui&hl=en

QPython3

QPython3 is a port of Python3 for android, it can run Python3 applications on your android devices like mobile or tablet, it also contains the Package Index where you can find many funny and usable Python applications easily.

(It is the only Python interpreter which works under android 4.0 in google play).

Features

· Run Python3 applications including script and projects on Android device

· Execute Python3 Code & File From QRCode.

· Support SL4A Programming, can access android’s feature, like network, bluetooth, location.

· Support Python3 console.

· Support QEdit which allow you edit Python code.

· Support FTP server, which can let you transfer the Python3 project from your PC to mobile easily.

· Read more on Qpython3 https://www.qpython.com/

· Download https://play.google.com/store/apps/details?id=org.qpython.qpy3

IPHONE IDEs
Textastic

Textastic is a fast and versatile text, code and markup editor. It supports syntax highlighting of more than 80 programming and markup languages. Connect to FTP, SFTP and WebDAV servers or to your Dropbox or Google Drive account. Use the built-in WebDAV server to easily transfer files from your Mac or PC over Wi-Fi.

Features
• Syntax highlighting of more than 80 languages:
HTML, JavaScript, CSS, XML, Markdown, Objective-C, Swift, C++, PHP, Perl, Python, SQL, shell scripts and many more (full list available on the website)
• Compatible with TextMate syntax definitions and themes
• Code completion for HTML, CSS, JavaScript and PHP functions
• FTP, FTPS (FTP over SSL), SFTP (SSH connection), WebDAV, Dropbox and Google Drive clients
• iCloud Drive
• WebDAV server
• Symbol list to quickly navigate in a file.

Read more on Textstatic https://www.textasticapp.com/mac.html

Download https://itunes.apple.com/us/app/textastic-code-editor-6/id1049254261?mt=8

Pythonista

Pythonista is a complete scripting environment for Python, running directly on your iPad or iPhone. It includes support for both Python 3.6 and 2.7, so you can use all the language improvements in Python 3, while still having 2.7 available for backwards compatibility.

In true Python fashion, batteries are included — from popular thirdparty modules like numpy, matplotlib, requests, and many more, to modules that are tailormade for iOS. You can write scripts that access motion sensor data, your photo library, contacts, reminders, the iOS clipboard, and much more.

You can also use Pythonista to build interactive multi-touch experiences, custom user interfaces, animations, and 2D games.

Features:

· Scriptable code editor with syntax highlighting and code completion

· Extended keyboard, designed specifically for Python

· Interactive prompt with code completion, command history, and support for showing images in the console output

· Integrated visual debugger and object inspector

· Integrated PEP 8 style checker with issues highlighted directly in the editor

· Complete offline documentation with quick lookup directly from the editor

· Various beautiful light and dark color themes, and a theme editor to make your own

· UI editor for quick prototyping

· Includes most of the Python standard library and additional modules for graphics, sound, and iOS system services (e.g. clipboard, contacts, reminders, twitter, UI…)

· Read more on Pythonista omz-software.com/pythonista

· Download
https://itunes.apple.com/us/app/pythonista-3/id1085978097?mt=8

PHP Programming Language

The classic PHP programming language for iPad, iPhone and iPod touch. Programming language is a perfect tool for studying, complex mathematical calculation, entertainment and many other useful tasks. The application is especially useful for learning the PHP programming language. You have to buy compilations inside the application. Internet connection is required.

Features

· Compile and run your program.

· Text input before program run and text output.

· Enhanced source code editor with syntax highlighting, line numbers, color themes and additional keyboard.

· Import and export programs by iTunes or by email.

· Online language reference and several program samples.

Download https://itunes.apple.com/us/app/php-programming-language/id486218269?mt=8

WINDOWS IDEs
Code Writer

Code Writer is a free text and code editor app with over 20 supported file types, and active syntax highlighting that updates as you edit documents. Use it as a replacement for Notepad and other quick edit apps.

The app has been built from the ground up for Windows 10. It’s fast and fluid, and gives you the power to edit documents with features you’d normally only find in desktop apps. Code Writer is perfect for editing any text-based file, doing code reviews, or giving presentations with code samples.

The text editor allows you to edit documents in near full-screen mode with the chrome fading to the background. The collapsible side bar houses feature like a document explorer, search functionality, advanced editing commands, print/share, settings, and help. A popup command palette provides quick keyboard access to almost every command in the app.

Read more on Code Writer www.actiprosoftware.com/go/apps-cw-info

Download
https://www.microsoft.com/en-us/store/p/code-writer/9wzdncrfhzdt

#Code

#Code is an online compiler that that lets you compile and execute code snippets on your Windows 10 device. As of now, #Code supports over 12 programming languages and is a oneofakind app on the Windows Store. You can write and compile your code snippets on your PC, tablet or mobile device. #Code is an elegant way to learn and explore various programming languages.

#Code supports the following 12 languages: C, C++, Java, Python, C#, PHP, Perl, Ruby, Swift, Visual Basic, JavaScript and Pascal.

Download https://www.microsoft.com/en-us/store/p/code-editor-free/9nblggh09fs3

Python 3 For Windows Phone

Python 3 For Windows Phone is a Windows Phone 8 app that provides an interactive Python shell. You can run scripts either interactively, by typing them into the bottom window, or run a script from SkyDrive.

Download https://www.microsoft.com/en-us/store/p/python-3/9nblggh083nz

Java For Everyone
This app provides you all basic and advanced details about every concept used in java. All data is divided within list and easy to understand. You don’t require a running internet connection for the functioning of the app. A must app for every programmer whether they are beginner or professional, this app will help you. Pocket JAVA Learn JAVA on the GO JAVA for Everyone Learn JAVA in Few-Time

Features

· Offline application

· Tutorials for all core java concepts.

· Sample codes.

· Good Navigation

· Download https://www.microsoft.com/en-us/store/p/java-for-everyone/9nblggh08hwj

Remember, your smartphone is smart. Please, share this post because I believe there is someone out there that needs to know this.
Source https://medium.com/@rexben/your-smartphone-is-actually-smart-96a990284394
ProgrammingAndroid Apps Development by rexben(op): 3:54am On Apr 15, 2018
Are you a tech enthusiast?
Do you love creating things?
Do you love to have an App in your name?
Do you have an App idea?
Do you wanna learn software programming?
Do you wanna learn Android programming?
Do you have a project on Android to be submitted and you need help?

Check out the blog https://rexandroid..com.ng/p/contact.html
Or email me rexben.rb@gmail.com
ProgrammingRe: Introduction To Java by rexben(op): 9:32am On Apr 02, 2018
CodeTemplar:
Is kotlin as good as java for web apps, enterprise app, etc ? I heard it is targetted at android.
Sure, it is just an alternative to Java
ProgrammingRe: Introduction To Java by rexben(op): 12:40am On Mar 12, 2018
Communicating between Activities


An Activity is a single screen that a user can interact with. There can be multiple activities in an App.
So, in this tutorial, I will show you how to move from one another to another activity.
Intent is used to communicate between activities; to link up two activities, you need Intent.
Intents is not limited to communicating between activities, you can also use Intent to communicate between Android components.

There are two types of Intents.
Explicit Intent: It is used when we want to communicate between activities.
Implicit Intent: It is used when we want to communicate between Android components.

In this tutorial, we will be making use of an explicit intent.
Steps:

Create a new Android Project.
Create another activity besides the one you have.
Modify your activity_main.xml by adding a button
Modify your MainActivity.java by writing the logic responsible for linking activities.
Modify your activity_main2.xml to differentiate it from the first activity

By now, you have been used to creating new Android project, if not, check out this link
Getting familiar with Android Studio

The second step, go to left side of your Android Studio, under your java folder, Right click on the first package.
Go to New > Activity > Empty Activity > Finish.






Step three: Go to your activity_main.xml and create a button. When the button is clicked, it will take us to the next Activity.

<!--Text to differentiate between the two activities-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="First Activity"
android:textSize="50sp"/>
<!--Button to take us to the next activity-->
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Next"
android:onClick="next"
android:textSize="30sp"/>

Step four: Go to your MainActivity.java and write logics

//Create an onClick listener method
//Create the intent that links the two activities
//@this means the current activity we are, i.e. the first activity
//@Main@Activity.class means the next activity we want to go when the next button is clicked
//@startActivity(activityIntent); starts the new activity
public void next (View view){
Intent activityIntent = new Intent(this, Main2Activity.class);
startActivity(activityIntent);
}

Step five: Go to your activity_main2.xml or whatever name you gave to the new activity you created and modify it by adding a TextView.

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is the Second Activity"
android:textSize="50sp"/>



Source: https://rexandroid..com.ng/2018/03/widgets-in-android.html
ProgrammingRe: Introduction To Java by rexben(op): 12:31am On Mar 12, 2018
Java Methods

Methods are behaviors of a class. They are responsible for how a class interact with other classes or behave generally. Class is just a container that holds different methods. It is in methods that logic are written and all actions are executed.
Syntax of a java method.

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}


A method must have an access modifier e.g. public, private, protected, default etc.
It must have a return type. If it is not meant to return anything, then you declare void as its return type. The example above has not return, thereby it is declared void.
Example of a method with return type

public String getMyLocation() {
return myLocation;
}


It must have a name. Your method must have a name. You are not permitted to use Java reserved words as a method name.
The first name or identifier must start with a lowercase. If there are concatenation of more than one name, the first name must be in lowercase and the first letter of the next word must be in upper case.

public String getMyLocation() {
return myLocation;
}


A method may have several numbers of arguments or no argument at all. The arguments are written in between the ( ). If a method contains more than one argument, the arguments should be separated by comma. If the arguments have the same data type, you must declare it separate as though they have different data types.

private int classGrades(int maths, int english){

return maths + english;
}

A java method is a collection of statements. Statements are written between two curly brackets {}.
protected void onCreate(Bundle savedInstanceState) {
//statements
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}


Method Overloading

Method Overloading is when a class have two or more methods with the same name but different parameters. The only thing that is different in this methods is the parameters they take.
This first method is not taking in any parameter

public String getMyLocation() {
return myLocation;
}

The second method is taking in a parameter
public String getMyLocation(String myLocation) {
return myLocation;
}


In the previous post, we worked on button clicks. I want to show you another way of how to implement button clicks (click listener) in our app.
In your activity_main.xml file, add android:onClick="addBtn"

<!--The button that is responsible for add numbers-->
<Button
android:id="@+id/add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Add"
android:onClick="addBtn"/>


And in your MainActivity.java
Instead of this long process:

addButton.setOnClickListener(new View.OnClickListener() {

@Override

public void onClick(View view) {
//Anytime the button is clicked 1 is added to the screen
numberUpdate = numberUpdate + 1;

//Displays the numberUpdate to the screen
//if you don't set the text, nothing will be displayed to
//the screen
defaultText.setText("" + numberUpdate);
}
});


Just use this
 
//addBtn is the value of android:onClick value in the our xml
public void addBtn(View view) {
//Anytime the button is clicked 1 is added to the screen
numberUpdate = numberUpdate + 1;

//Displays the numberUpdate to the screen
//if you don't set the text, nothing will be displayed to
//the screen
defaultText.setText("" + numberUpdate);
}
ProgrammingRe: Introduction To Java by rexben(op): 2:16am On Mar 05, 2018
Making your App responds to button clicks

In this tutorial, we want to make our App interactive by making it to respond to button clicks. When the user clicks on the button, an event will occur.

Project: To display a number on the screen and a button. So, when the button is clicked, the number will be updated. Anytime you click on the button, the default number is increased by 1.
So, let’s get started.
First off, you will have to create a new project, give it any name you want. If you don’t know how to create a new project in Android Studio. Check this link, I explained explicitly on how create a new Android Studio project www.rexandroid..com

If you’ve launched Android Studio already and you are in project but want create another project.
Go to the top bar, Click on File > New Project and fill up the rest.

In activity_main, enter this following codes. Here is a link on how to understand the basics of XML, working with XML




<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp"
tools:context="com.android.rexben.demomapp.MainActivity">


<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="Number"
android:textSize="20sp" />


<!--The text that will be updated when a button is clicked-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="0"
android:textSize="20sp"
android:id="@+id/textView"/>


<!--The button that is responsible for add numbers-->
<Button
android:id="@+id/add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Add" />
</LinearLayout>



In your MainActivity.java, enter this following lines of code


package com.android.rexben.demoapp;


import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {
//This variable called field because it declared out a method
//It is variable where we store the values that are added
private int numberUpdate;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

//Casting views by resource IDs
final TextView defaultText = (TextView) findViewById(R.id.textView);
Button addButton = (Button) findViewById(R.id.add);


//setOnClickListener is responsible for happens when a button is clicked
//Any codes writing inside the setOnClickListener will be executed when the button is clicked
addButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

//Anytime the button is clicked 1 is added to the screen
numberUpdate = numberUpdate + 1;


//Displays the numberUpdate to the screen
//if you don't set the text, nothing will be display to
//the screen
defaultText.setText("" + numberUpdate);
}
});
}

}
When you are done, test run your App on your
Android device. If you don’ know how to run the App on your mobile device,
check this link Getting familiar with Android Studio



numberUpdate = numberUpdate + 1;

To:
numberUpdate = numberUpdate - 1; to decrease the value by 1 anytime there is a click.
numberUpdate = numberUpdate * 5; to multiply the value by 5 anytime there is a click.
numberUpdate = numberUpdate / 2; to divide the value by 2 anytime there is a click.

Just add the default value of your choice
private int numberUpdate = 10;

If you don’t want only the number to show, if you want to display other texts. For instance, instead of displaying only “1”, you can add “Number 1”.
Just add the text you want and add a space so that the text and the number won’t be together. You can enter a long text but it must be in between "".
defaultText.setText("Number " + numberUpdate);
ProgrammingRe: Introduction To Java by rexben(op): 2:14am On Mar 05, 2018
Methods are behaviors of a class. They are responsible for how a class interact with other classes or behave generally. Class is just a container that holds different methods. It is in methods that logic are written and all actions are executed.
Syntax of a java method.

protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}

A method must have an access modifier e.g. public, private, protected, default etc.
It must have a return type. If it is not meant to return anything, then you declare void as its return type. The example above has not return, thereby it is declared void.
Example of a method with return type

public String getMyLocation() {
return myLocation;
}

It must have a name. Your method must have a name. You are not permitted to use Java reserved words as a method name.
The first name or identifier must start with a lowercase. If there are concatenation of more than one name, the first name must be in lowercase and the first letter of the next word must be in upper case.

public String getMyLocation() {
return myLocation;
}

A method may have several numbers of arguments or no argument at all. The arguments are written in between the ( ). If a method contains more than one argument, the arguments should be separated by comma. If the arguments have the same data type, you must declare it separate as though they have different data types.

private int classGrades(int maths, int english){

return maths + english;
}
A java method is a collection of statements. Statements are written between two curly brackets {}.
protected void onCreate(Bundle savedInstanceState) {
//statements
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}

Method Overloading

Method Overloading is when a class have two or more methods with the same name but different parameters. The only thing that is different in this methods is the parameters they take.
This first method is not taking in any parameter

public String getMyLocation() {
return myLocation;
}
The second method is taking in a parameter
public String getMyLocation(String myLocation) {
return myLocation;
}

In the previous post, we worked on button clicks. I want to show you another way of how to implement button clicks (click listener) in our app.
In your activity_main.xml file, add android:onClick="addBtn"

<!--The button that is responsible for add numbers-->
<Button
android:id="@+id/add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Add"
android:onClick="addBtn"/>

And in your MainActivity.java
Instead of this long process:

addButton.setOnClickListener(new View.OnClickListener() {

@Override

public void onClick(View view) {
//Anytime the button is clicked 1 is added to the screen
numberUpdate = numberUpdate + 1;

//Displays the numberUpdate to the screen
//if you don't set the text, nothing will be displayed to
//the screen
defaultText.setText("" + numberUpdate);
}
});

Just use this

//addBtn is the value of android:onClick value in the our xml
public void addBtn(View view) {
//Anytime the button is clicked 1 is added to the screen
numberUpdate = numberUpdate + 1;

//Displays the numberUpdate to the screen
//if you don't set the text, nothing will be displayed to
//the screen
defaultText.setText("" + numberUpdate);
}
PhonesRe: Help Me Choose by rexben(m): 1:59am On Mar 04, 2018
Aguiyi13:
Guys i have two phones in mind Itel
P51 n Leagoo kpower , which do i go for.

Now my utmost concern in a phone it's battery capacity , display , 1gb ram is okay for me. Am not much of a gamer, FTS / Dream League is okay for me.

Then again i mostly watch videos online.

So pls which should i opt for ?
Pls, don't go for Leagoo ooo
ProgrammingWhat Is Android? by rexben(op): 1:56am On Mar 04, 2018
What is Android?

Android is a software stack for mobile devices. Android is an open source, Linux-based software stack created for a wide array of devices and form factors. The Android SDK provides the tools and APIs necessary to develop applications on the Android platform using the Java programming language.

Brief History of Android

Andy Rubin founded Android Incorporation in Palo Alto, California in October ,2003.
Google acquired Android on 17th August 2005. Since then it is a subsidiary of Google Incorporation.
Google formed Open Handset alliance(OHA) on 5th November 2007.

What is Open Handset Alliance?
The Open Handset Alliance is a group of 84 technology and mobile companies who have come together to accelerate innovation in mobile and offer consumers a richer, less expensive, and better mobile experience. The group include mobile operators, handset manufacturers, semiconductors\ companies, software companies and commercialization companies.
Member firms include HTC, Sony, Dell, Intel, Motorola, Qualcomm, Texas Instruments, Google, Samsung Electronics, LG Electronics, T-Mobile, Sprint Corporation, Nvidia, and Wind River Systems.

The first commercially available smartphone running Android was the HTC Dream it came to the market as the T-Mobile G1 in the USA. It was approved by the Federal Communications Commission (FCC) on 18 August 2008, and became available on 22 October.

Android Version Names



Android names its versions alphabetically and these versions are named after sweets.
They include:
Aestro, Blender, Cupcake, Doughnut, Eclair, Froyo, Gingerbread, Honeycomb, Icecream, Sandwhich, Jellybean, Kitkat, Lollipop, Marshmellow, Nougat, Orion.
As at the time of writing this post, the most recent being Android 8.0 with Nougat API level 25.

Operating System:

As computers (desktops, laptops, palmtops etc.) has Operating Systems so likewise Android too. Android’s Operating System is Linux Kernel.
To know the version of Linus Kernel your Android mobile phone or tablet is operating on, Go to Settings > About phone or tablet.

Functions of Linux Kernel/Operating System:
Memory Management: Allocate a memory to a new file, Free the memory when a specific file is deleted etc.
Power Management: Providing power to various devices like bluetooth, camera etc.
Resource Management: It provides resources to each process, thus providing the ability to do multiple operations at the same time. i.e. Surfing Internet, Listening Songs etc
Driver Management: It handles installation of various drivers.
Networking.
Security settings.



Android’s native/core libraries.
– Libc: c standard lib.
– SSL: Secure Socket Layer
– SGL: 2D image engine
– OpenGL|ES: 3D image engine
– Media Framework: media codecs
– SQLite: Database engine
– WebKit: Kernel of web browser
– FreeType: Bitmap and Vector
– SufraceManager: Compose window manager with off-screen buffering

Applications:
Applications are written by Java and Kotlin programming languages.

Application Framework:
The android framework is the set of API's that allow developers to quickly and easily write apps for android phones. Application framework provides essential and core services to developers in form of Java classes. Application developers are allowed to make use of these services in their applications. Application frameworks include Activity Manager, Package Manager, Window Manager, View System, Package Manager, Telephony Manager, Content Providers, Resource Manager, Location Manager, Notification Manager.

Android Runtime:
It comprises of Dalvik Virtual Machine and Core Libraries.
Applications:
Applications layer is the top most layer of Android Architecture. All applications using android framework uses android runtime and libraries. While android runtime and native libraries are using Linux Kernel


Programming languages used in Android development.
Java: Java is used for Application development. Application framework are also provided in form of java classes.
Kotlin: Kotlin is used for Application development. Last year, Google officially announced Kotlin as the official language for Android development but you can still use Java.
C/C++: The libraries in Android are written in C/C++.
C: Android OS & Drivers are written in C: Android OS & Drivers are written in C programming language.


Application Components

Each component is an entry point through which the system or a user can enter an app. Some components depend on others.

Activities
An activity in Android represents a single screen with which a user can interact with. An Application can have more than one activity. The Activities are independent but they can linked to one another through intents. For an Activity to visible t.o the user, it must be declared in AndroidManifest.xml file.

Services
It is responsible for keeping the App working in the background. It performs long running process in the background. A user can't interact with a service unlike an activity. For instance, a service keeps a music playing while the user is chatting

Broadcast Receivers
They handle communication between Android OS and applications.
They don't display a user interface. The App sending the broadcast does not need to be launched. since they don't display a user interface, they may just show a notification on the status bar.

Content Providers
Content Providers are responsible for managing application data stored in the web or SQLite database etc.

Source: https://rexandroid..com.ng/p/what-is-android_53.html
Christianity EtcRe: Tithe Saga by rexben(op): 12:59am On Mar 04, 2018
greatnaija01:
hahahahahaha guy pls find a bush and HIDE.... your matter is STALE.... people who have gone to heaven, hell or blazes PAID tithes.... and people who didnt pay also WENT to heaven or hell or wherever...


TITHE IS NOT SALVATION.... it is not even an ISSUE because... nothing given to God is wasted.... anyway if you feel TITHE is what makes GO's WEALTHY then you must be HIGH on expired fumes and your brain must have stretch marks.

10% can not make anyone rich..... remember that they were tithing even before they had LARGE members... if it works for them... LEAVE THEM... you are not sent to ARGUE or try to prove points... OUR JOB IS TO PREACH THE GOSPEL TO THE LOST.... The freaking GREAT COMMISSION....

stick with it... and keep your opinion in the place of PRAYER.... coming here to drop your nuisance wont help anyone. THOSE WHO PAY AND ARE HAPPY TO PAY WONT STOP EITHER.
It is crystal clear that GOD DOES ACCEPT TITHES, TITHES ARE NOT GIVEN TO GOD BUT YOUR PASTORS. Christians are actually the dumbest set of people to explain things to. They apply senses to other things but when it comes to their beliefs, they are completely daft and don't wanna learn.
I understand the situation perfectly because I was once in that shoe. The main goal of religion is to enslave people, collect their senses and give them another.
For instance, instead of thinking out things and being sincere to themselves, they say it is heretic. Truth which is Jesus is heretic to Christians.
As you rightly said, it is not TITHES. Tell your pastors to stop exploiting innocent souls in the name of giving to God. Is God broke? Is He is hungry?
I hope you see Jesus and listen to Him, come out of the shackles of religion and embrace Jesus
Christianity EtcTithe Saga by rexben(op): 2:32am On Mar 03, 2018
I don't know why people are yelling at someone who decides to say the truth. God is not interested in your tithing system. Take away tithes and offerings from Christianity, you will see that most of your highly respected idol of God will resign.
I wonder why, people hoard the truth. Or lemme say, they pretend to know the truth whereas they know nothing.
God don't need your tithe or firstfruits.
There are many atheist today because of these so called GOs.
One thing atheist don't know is that, they hold on to the words of pastors as the words of God.
The true is that pastors are liars, they shut the gate; they don't go in and they don't allow others to go in.
I just wish people can just listen to Jesus alone and shut their ears to the epistles of thieves and robbers (pastors).
Pastors as and will never represent God. Why? Because God never sent them what they are doing.
Christianity EtcRe: God Is Broke by rexben(m): 2:18am On Mar 03, 2018
Horus:
God Is Broke. The omnipotent god is so broke that he need your money every Sunday at church.

A scamming holy ghost!

God is omniscient, omnipotent, omnitemporal but he is broke and he need your paycheck

God is broke, So pay up while you can or you'll end up in hell grin
God can,t be broke. He created the cosmos. chop am
The mistake people make is that they believe in the testimony of pastors rather than of Jesus.
God did not ask anybody for money. Na your pastor they collect am, they
ProgrammingRelative Layout (android Development) by rexben(op): 2:13am On Mar 03, 2018
Relative Layout

It is compound and complex compared to Linear Layout. In Linear Layout, the views fall in place horizontally or vertically but it is not the same in Relative Layout. If you don't put some "functions" in place, your views will just lie on top each other.

<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">
<TextView

android:id="@+id/donald"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Donald"
android:textSize="30sp" />
<TextView

android:id="@+id/soo_yii"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/donald"
android:text="Soo Yii"
android:textSize="30sp" />
<TextView

android:id="@+id/tunde"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/soo_yii"
android:text="Tunde"
android:textSize="30sp" />
<TextView

android:id="@+id/ben"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tunde"
android:text="Ben"
android:textSize="30sp" />
<TextView

android:id="@+id/alice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/ben"
android:text="Alice"
android:textSize="30sp" />

</RelativeLayout>

To set text or image or button below any other view, you will use android:layout_below="@id/top"

Working with IDs

You and I were given different names so that we can be easily identified. So, to identify views, we assign ids to them.

To assign an id to a view

android:id="@+id/button"

Referencing a view

To reference an ImageView with id (image) in XML,
android:layout_below="@id/image".

To set a text to the right side of another text. Given that the first text's id is text1.
android:layout_toRightOf="text1"
To set a text to the left side of another text. Given that the first text's id is text1.
android:layout_toLeftOf="text1"
To set a text above another text. Given that the first text's id is text1.
android:layout_above="text1"

To set a text below another text. Given that the first text's id is text1.
android: layout_below="text1".
Another interesting thing about Relative Layout is that you can align views to the parent view group (e.g RelativeLayout).
To align a button to the parent bottom, android:layout_alignParentBottom="true"
To align a button to the top of a parent, android:layout_alignParentTop="true"
To align a button to the left of a parent, android:layout_alignParentLeft="true"
To align a button to the right of a parent, android:layout_alignParentRight="true"

To align a button to the center of a parent, android:layout_centerInParent="true"
WebmastersRe: Drop Your Website Or Blog Url For Review, And Get Good Backlinks And Traffic by rexben(m): 2:10am On Mar 03, 2018
Do you wanna learn Android App Development?
Then try https://rexandroid..com.ng
ProgrammingIntroduction To Java by rexben(op): 2:03am On Mar 03, 2018
Source: https://rexandroid..com.ng/2018/02/introduction-to-java_22.html
Java is an object oriented Programming (OOP) developed by Sun MicroSystems and it was released in the year 1995. It was acquired by Oracle Corporation in 2009. Java runs on a variety of platforms that ranges from Mac OS, UNIX and Windows.

Features of Java
It is object oriented.
It is secured.
It runs on various platforms.
It is portable and dynamic.

Java programs is a collection of objects that communicate via invoking each other’s methods.
Objects is an instance of a class. It has states (fields) and behaviours (methods).
Class is a template that describes the behavior and state that the objects of its type supports.
Methods are where the logics are written, data is manipulated and all actions are executed.
Java Identifiers are names used for classes, methods and variables. Java Identifiers must begin with letter A to Z or a to z, currency character ($) or an underscore (_).
Constructor: Every class has at least one constructor. A constructor of a class must have the same name as the class. A class can have more than one constructor.

Basic Syntax of Java
Java is case sensitive. It means Song and song are not the same because the Song starts with an uppercase and the other with a lower case.

Methods in Java must start with a lower case. If several words are joined together to make a word, the first letter will be in lowercase and the first letter of subsequent words will be in upper case. Examples include: public void goToMarket(), private annualSalaryPayment(), protected void onCreate() etc.

Classes in Java must start with an upper case unlike methods. If several words are joined together to make a word, the first letter will be in uppercase and the first letter of subsequent words will be in uppercase. Examples include: public class BasicSalary, private static AggregateScore etc.

Variables are reserved memory locations

Java keywords are reserved words in Java. They are words that cannot be used as constant or variables.
Comments in Java
// example of single comment
/*another example of single comment */
/*
*Example of multi comment
*in Java
/




1. Package com.android.rexben.lagos is the package name of my Application Lagos. It is where all your java classes are stored. You can have as many classes as possible in a package. It is the way of categorizing classes and interfaces.
2. Import statement – In Android Studio and Java, you don’t need to write all the classes or methods. So, all you need to do is to import them. Any class you import will be listed in that spot.
3. Public class MainActivity extends AppcompatActivity – I will pick the term one after the other.
Public is an access modifier that determines whether a class or method can be accessed by other classes or methods class or method or only within its c. When a method is declared public, it means it can be accessed by any class or method. Other Access Modifiers include protected, private, default, abstract etc.
Class is where all your java codes are written. Where your methods are written and implemented. Class is a compartment that house methods and states.
MainActivity is the name of your java class.
Extends is used when you want to inherit some methods and fields from another class. You extend the features of another class (super class) to a new class (sub class).
AppCompatActivity is a class that the MainActivity is inheriting from. AppCompatActivity ….
4. This is the entry of your App as public static void main (Striing args[]) is the entry when use Netbeans or Eclipse.

Data Types in Java

There are two data types in Java
Primitive Data types
Reference or Object Data types
Primitive Data Types
There are eight primitive data types. They are usually in lower cases. They include byte, short, int, long, float, double, boolean and char. They are used to save memory.
Byte: Byte data type is an 8-bit signed two’s complement integer. The minimum value of byte is -128 (-27) and the maximum value is 127 (27 -1), the default value is 0.
Examples include: byte score = 99;
byte count = -3 etc.
Short: Short data types is a 16-bit signed two’s complement integer. The minimum value is -32, 768 (-215) and the maximum value is 32, 767 (215 -1), the default value is 0.
Examples include: short score = 32, 000;
short count = -20, 989 etc.
Int: Int data type is a 32-bit signed two’s complement integer. The minimum value of an int is -2,147, 483, 648 (-231) vand the maximum value is 2, 147, 483, 647 (231 -1), the default value is 0.
Examples include: int score = 1, 150, 000;
Int count = -2, 760, 444
Long: Long data type is a 64-bit signed two’s complement integer. The minimum value of (-263) and the maximum value is (263 -1), the default value is 0L
Examples include: long score = 200 000L;
Long count = -100 000L
Float: Float is a single-precision 32-bit IEEE 754 floating point used to save memory in large arrays of floating points number. Default value is 0.0f
Examples include: float score = 234.5f;
float count = -11.4f.
Double: Double is a double-precision 32-bit IEEE 754 floating point, used as the default data type for decimal values. Default value is 0.0d.
Examples include: double score = 123.4;
double count = -120.4.
Boolean: Boolean represents one bit of information. There are only two possible vaues: true and false. Default value is false.
Examples include: boolean isScore = true;
boolean isCount = false.
Char: Char is a single16-bit Unicode character. It is used to store any character.
Examples include: char letterA = “A”;
char letter = “V”

Reference Data Types
They are created using defined constructors of the classes. They are declared to be a specific type that cannot be changed. Class objects and various types of array are examples of reference data types. Default value is null.

Variable types
There are basic three types of variable in Java
Local Variables are variables that are declared and initialized inside methods or constructors.
Instance Variables are variables that are declared outside any methods or constructors but within a class. It can be accessed from inside any methods or constructors of that particular class. They are also referred to as fields.
Class Variables are variables declared outside any methods or constructors but within a class with the static keyword. The difference between a class variable and an instance variable is the static keyword.


Creating an object in the java
In Java, an object is created from a class and it created with the new keyword.
There are three steps when creating an object from a class.
Declaration: A variable name with an object type e.g. String score;
Instantiation: The new keyword is used to create a class.
Initialization: The new keyword is followed by a call to a constructor e.g. String score = new String(};

1 2 3 4 5 6 7 8 9 10 (of 17 pages)