Posts

Showing posts from April, 2018

Android studio 7. Develop simple quiz app

Just follow the foolowing link for developing a quiz app https://www.youtube.com/watch?v=JA9s_Fntg_4&t=139s The codes corresponding to above video is given below. MainActivity.java ***************************************************************************************************************************************** package com.example.hp_pc.hpluniv; import android.content.DialogInterface; import android.content.Intent; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; import java.util.Random; public class MainActivity extends AppCompatActivity {     Button answer1, answer2, answer3, answer4;     TextView score, question;     private Questions mQuestions= new Questions();     private String mAnswer;     private int mScore = 0;     priv...

Android Studio 6 adding link to text

This lesson teaches about adding link to the textview.  Please follow the instructions given in the video of the following link Adding link to text view https://www.youtube.com/watch?v=aQIqQ2-lyO8

Android Studio 5 Start Another Activity

Image
Reference https://developer.android.com/training/basics/firstapp/starting-activity.html Start Another Activity This lesson teaches you to Respond to the send button Build an Intent Create the second activity Add a text view Display the message Add up navigation After completing the previous lesson , you have an app that shows an activity (a single screen) with a text field and a button. In this lesson, you’ll add some code to MainActivity that starts a new activity to display the message when the user taps Send . Note: This lesson expects that you are using Android Studio 3.0 or higher. Respond to the send button Add a method to the MainActivity class that's called by the button as follows: In the file app > java > com.example.myfirstapp > MainActivity , add the sendMessage() method stub as shown below: Kotlin Java More class MainActivity : AppCompatActivity () {     override fun onCreate ( savedInstanceState :...

Android studio 4 Building user Interface in the app

Image
Build a Simple User Interface This lesson teaches you to Open the Layout Editor Add a text box Add a button Change the UI strings Make the text box size flexible In this lesson, you'll use the Android Studio Layout Editor to create a layout that includes a text box and a button. In the next lesson, you'll make the app respond to the button tap by sending the content of the text box to another activity. Figure 1. Screenshot of the final layout The user interface for an Android app is built using a hierarchy of layouts ( ViewGroup objects) and widgets ( View objects). Layouts are invisible containers that control how its child views are positioned on the screen. Widgets are UI components such as buttons and text boxes. Figure 2. Illustration of how ViewGroup objects form branches in the layout and contain View objects Android provides an XML vocabulary for ViewGroup and View classes, so most of your UI is defined in XML files. However, inst...

Android studio 3 Running an app

Image
Run Your App This lesson teaches you to Run on a real device Run on an emulator In the previous lesson , you created an Android project that displays "Hello World!". You can now run the app on a real device or an emulator. Run on a real device Set up your device as follows: Connect your device to your development machine with a USB cable. If you're developing on Windows, you might need to install the appropriate USB driver for your device. Enable USB debugging in the Developer options as follows. First, you must enable the developer options: Open the Settings app. (Only on Android 8.0 or higher) Select System . Scroll to the bottom and select About phone . Scroll to the bottom and tap Build number 7 times. Return to the previous screen to find Developer options near the bottom. Open Developer options , and then scroll down to find and enable USB debugging . Run the app on your device as follows: In Android Studio, cli...

Android studio 2 Creation of a simple app

Image
Create an Android Project This lesson shows you how to create a new Android project with Android Studio and describes some of the files in the project. First, be sure you have installed the latest version of Android Studio. Download Android Studio here . In the Welcome to Android Studio window, click Start a new Android Studio project . Or if you have a project opened, select File > New Project . In the Create New Project window, enter the following values: Application Name : "My First App" Company Domain : "example.com" You might want to change the project location. Also, if you want to write a Kotlin app, check the Include Kotlin support checkbox. Leave the other options as they are. Click Next . In the Target Android Devices screen, keep the default values and click Next . In the Add an Activity to Mobile screen, select Empty Activity and click Next . In the Configure Activity screen, keep the...

Android studio 1 Introduction

Android studio is a software that gives Integrated Development Environment(IDE)  for Android application development.That is it integrates JAVA, XML, CSS  and other programming languages in the creation of application.It can  be downloaded  from android studio official website(probably first link when you search Android studio in Google).The similar way JAVA is also needs to be installed from it's official site. Normally first link when it is searched in google.Both are free. Android studio official website for downloading android studio: https://developer.android.com/studio/ JAVA official website for downloading JDK: https://java.com/en/download/ Various Devices/ Emulators can used by downloading Genymotion software on free version. Install and the Genymotion software and click to start your favorite devices. Then those devices will be shown while running your app as Emualators https://www.genymotion.com/