Posts

Formatting TextView in Android.

Image
  Thank You!!! Enjoy the Coding....👍👍

Android Mock Test

    Quiz  
  CSS Properties CSS has so many predefined properties. CSS properties can be used to apply a style on the web page. Some of them are described as follow. Text Properties: we can use these properties on text data of web page Property Description Values color Sets the color of a text RGB, hex, keyword line-height Sets the distance between lines normal,  number, length, % letter-spacing Increase or decrease the space between characters normal,  length text-align Aligns the text in an element left, right, center, justify text-decoration Adds decoration to text none, underline, overline, line-through text-indent Indents the first line of text in an element length, % text-transform Controls the letters in an element none, capitalize, uppercase, lowercase Below example will explain , How to use these properties? e.g: p { color: yellow; text-decoration:underline; text-transform-capitalize; } List Properties Property Description Values list-style Sets all the properties for a lis...
Image
To start Quiz click on   Java Quiz 1  

Custom Buttons in Android

Image
Android applications make use of so many UI components, out of those some can be customized as per our need. In this tutorial, we will learn about custom Buttons in very few steps.  Two shapes we will see in this Tutorial. 1. Rounded Corner Button 2. Circle Shape Button. First of all, we will see how to create rounded corner Button Step 1: After creating Android Project create XML file under res => drawable folder and give a name   rounded_corner_bg.xml and paste below code. <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"     android:shape="rectangle" android:padding="10dp">     <!-- you can use any color you want -->     <solid android:color="#00BCD4"/>     <corners android:radius="40dp"/> </shape> Step 2: Open activity_main.xml file and paste below code <?xml version="1.0" encoding="utf-8"?> ...

Options Menu in Android.

Image

Time Picker in Android.

Image
Welcome to AndroidEasy. Today we will see how to create TimePicker in android application in easiest way. Step 1:   Create a new project in Android Studio.( Select  File ⇒ New ⇒ Android Project  and give                       activity  name as   Time Picker . ) Step 2:   Open timePicker_activity.xml file and Paste below code into it. <? 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"     tools:context=".MainActivity">     <TimePicker      ...

Create an android app that demonstrates Activity Lifecycle and Instance State.

Image
In this tutorial we will see the working of Activity lifecycle step by step. Activity  life cycle consists of 7 methods as below. onCreate()  -   Invoked when Activity is created. onStart()  -       Invoked   when Activity is becoming visible. onResume()  - Invoked when Activity starts Interacting with user. onPause()  -    Invoked when Activity is invisible to user onStop()  -       Invoked when activity is no longer visible. onRestart() -  Invoked   after your activity is stopped, prior to start. onDestroy()  - Invoked  before Activity is killed. Let's begin coding .... 💻💻 Step 1: After creating Android project, open activity_main.xml file and paste below code as it is. activity_main.xml <?xml  version="1.0" encoding="utf-8" ?>    <android.support.constraint.ConstraintLayout  xmlns:andr...

Create android app that demonstrates working with TextView elements.

Image
In this tutorial we will see some TextView properties to create custom TextViews in android.  We are going to use three TextViews and will apply different styles to them in this project. Step 1:create new project in android studio             == >new ==>new project ==>select EmptyActivity ==>click next ==>finish Step 2: Open activity_main.xml file and paste below code. <? 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 :orientation= "vertical"    ...