From there follow along with each tutorial lesson and learn this tutorial - viewid. You
can also create; RUN your apps using the code in these tutorials, with Android Studio. Android Studio is for desktop computers. Choose Java XML as the programming language.
Android Studio is free to install and use; and has helpful guides. Complete Example Codes are available for each of our tutorials. With these example codes you can make a functioning android app in
either AIDE or Android Studio.
Each interactive type tutorial shows you how to create your app for the tutorial code topic: with complete example code to do so. Learn the code pages easily with photos.
AIDE and ANDROID STUDIO
We are using AIDE, to create these tutorial apps on our 8.9" tablet with android version 4.2.2; using the Android Java XML programming language.
We are using the AIDE coding editor to code our pages; and then to Create - RUN our apps. AIDE is a SDK coding environment for android devices like a tablet or smartphone. AIDE has a free and paid version. The paid version is required if you want to create Java/xml template apps; and add a 'keystore' to your App. With a keystore, you can publish it to the market places like Google and Amazon.
Once you create your apps code pages, you need to RUN the app to build your apk package; then you INSTALL it on your tablet or smartphone. As of October, the paid version of AIDE is about $20 canadian.
For this tutorial, we are going to learn how to code a java page, the mainactivity.java; so we can add a simple text message using the Toast Method to our View.
We are going to create a new app for this tutorial, and name is - AndroididToast
You can also create; RUN your apps using the code in these tutorials, with Android Studio. Android Studio is for desktop computers. Choose Java XML as the programming language. Android Studio is free to install and use; and has helpful guides.
Complete Example Codes are available for each of our tutorials. With these example codes you can make a functioning android app in
either AIDE or Android Studio.
To open your
app just click on the app name(AndroididToast) on the left menu; then browse to, the androidmanifest.xml file at bottom of files, double click to open it. The file now shows in the
AIDE coding editor.
To view A FILE do either: from right menu choose FILES or GOTO, this will show the apps files along the top of editor, dropdown, and left side menu. After editing a file, SAVE it, right side menu, choose SAVE.
Just double click a file to open it in the coding editor. Once file is opened they also show as tabs at top of editor. Just click file name to open it in the code editor.
To return to prev folder, just click on ORANGE colored FOLDER at top of files hierachy left side menu; to return to AppProjects (where you can see all apps you created) just click orange folder till you see AppProject, or from dropdown menu right side, or middle editor, choose, Show - View All Projects.
Code the Strings.xml
We will add one line of text
"Use Toast Method To Display Text". We will name our string, learntoast, and type the text as shown.
Our strings.xml file also has another string, our app_name,AndroididToast, which we will leave in the strings.xml as this is the name that shows at top of view and is required.
Once the text is added to the strings.xml file, save the file.
We will make reference to our string in our TextView element as shown here.
The duration of the toast message(time it remains visible in the view) is coded with one of two attribute values; either the Long which we used, and the other value you can use is Short.
You can also have the Toast Message appear anywhere within your app's view, by addng some additional code to our
Learn about coding these and additional Reading on 'Toasts", at the Android Developer website.
View Toasts Code At Android Developer Website
You can get the code from this tutorial from our EXAMPLE CODE section on this page. You can add the code easily to your apps coded pages using copy/paste. Just delete the code that's in your main.xml, mainactivity.java, and strings.xml files and replace it with the code from this tutorial. Save each page after pasting the code.
We also included the androidmanifest.xml file, however, this page only needs to be
coded when adding certain functionalites or themes to your app. For this tutorial
we did not need to change or add code to it.
Once a file is in the editor, you can edit, save it, then RUN your APP, install,
Open your app.
Make sure you SAVED EACH PAGE, before you RUN your code. SAVE, RUN, INSTALL, OPEN, your AndroididToast App. Once it has been installed on your tablet, you can open it Simply by Clicking on the Android little green App Icon,with the wording 'AndroididToast' on your tablet. It will be with your other installed apps.
If you make further changes to this App, you need to SAVE, RUN, UPDATE, INSTALL, OPEN the app.
This free script provided by