Posts

Showing posts with the label Android

What Is An Intent In Android | Explicit And Implicit Intent

Image
In this post I will explain you what is an intent and the importance of it but before I start explaining you what is an intent. Let me first explain you the concept of an activity. Now many of you may know what does an activity but for understanding intent. It is important to understand the activity first. Suppose you create a simple hello world application which consists of a single page and if you show this application to a non programmer then for him this is an application which consists of a single page but as Android developers instead of calling this a page we call this an activity. So according to me this is an Android app which consists of a single activity made up of two main files main a trigger on Java and activity main dot XML so if you have an application which consists of three pages then in technical terms your application consists of three activities. If you have three activities inside your application then you need some component to communicate between these activ

Android Circle Background

Image
Android Circle Background Giving Circle Background to TextView and making TextView text center. First create activity and add a TextView in it as shown below. < TextView android :layout_width ="180dp" android :layout_height ="180dp" android :gravity ="center" android :background ="@drawable/circle" android :textColor ="#ffffff" android :text ="www.thenewtutorial.com" /> android:background In property we will give name of our drawable resource file that we will create inside  drawable  resource directory. android:text This is the text that will be shown in TextView. android:gravity This will make  TextView text center. Now create drawable resource file named  circle . Make sure that this file is inside drawable resource directory. < selector xmlns: android ="http://schemas.android.com/apk/res/android" > < item > < shape androi