Posts

Showing posts from September, 2020

Android Toast Application, Toast text on button click.

Image
Android Toast Application, Toast text on button click. In this Application We will Create an application that designs a layout with a text box and button named  submit. When the submit button is clicked than the text in the text box should be displayed in the toast. First of All we need to design activity layout file " activity_main.xml " file. <? 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 :gravity ="center" tools :context =".MainActivity" > < EditText android :layout_width ="mat...

Create My Info Android application.

Image
That will display your name, qualification, contact num, email id and address. All details must have different color. (using 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 :gravity ="center" android :background ="#89898A" tools :context =".MainActivity" > < TextView android :id ="@+id/name" android :layout_width ="match_parent" android :layout_height ="wrap_content" android :layout_margin ="20dp" android :text ="Name: PK EasyLife" an...

Android Hello World Application

Image
"Hello World" application. That will display "Hello World" in the middle of the screen in the red color with white background. Now Here We will create a android application that will display "Hello world" in the middle of the screen. Create a Hello Application with empty activity. and Write below mentioned code in your " activity_main.xml" file. <? 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 :gravity ="center" android :background ="#ffffff" tools :context =".MainActivity" > < TextView android :layout_wi...