Introduction To Swift Programming Language

Swift is a multi-paradigm, compiled programming language created by Apple for iOS and OS X development. Introduced at Apple’s 2014 Worldwide Developers Conference (WWDC), Swift is designed to work with Apple’s Cocoa and Cocoa Touch frameworks and the large body of existing Objective-C code written for Apple products. Swift is intended to be more resilient to erroneous code (“safer”) than Objective-C, and also more concise. It is built with the LLVM compiler framework included in Xcode 6, and uses the Objective-C runtime, allowing C, Objective-C, Cpp and Swift code to run within a single program.

Syntax and Code Structure

Traditional first line code :

Variables And Constants 

In swift language var is used to create variables, and let is used to create constants.

 

  A constant or variable must have the same type as the value you want to assign to it. However, you don’t always have to write the type explicitly. Providing a value when you create a constant or a variable lets the compiler infer its type. In the above example, the compiler infers that “variable” is an integer because its initial value is an integer.

If

Google Analytics v4 API Android

Implementing Google Analytics v4 API Android, Google Analytics provides powerful digital analytics for anyone with a web presence, large or small. It’s one of the most powerful digital analytics solutions available – and it’s free for anyone to use.
I will show you the step by step methods to Implementing Google Analytics v4 API Android.

Step 1 : The Application Class File, Google Analytics v4 API Android.

Create a class with name MyApplication.java (you can create a class with any name, Here I am using this). And put the below code

Continue reading

Styling Android TextView Simple Code

Styling Android TextView is simple with four attribute of TextView. And those attributes are :

  • shadowColor
  • shadowDx
  • shadowDy
  • shadowRadius

 android:shadowColor

The shadowColor will set a specified color shadow behind the text. The value for shadowColor attribute must be anyone of these forms : “#rgb“(#09f), “#argb“(#709f), “#rrggbb“(#0099ff), or “#aarrggbb“(#7F0099ff).

Continue reading

Android Activity Fullscreen Simple Code Snippet

To make an Android Activity Fullscreen, There is two ways:

  1. With java code in your Activity file.
  2. With xml code in your AndroidManifest.xml.
Android Activity Fullscreen with Java code

Android Activity Fullscreen with Xml code

Continue reading