Introducing Views

Views are the rectangular shaped, basic building block of a layout or user interface that assures some content on the screen. Views – as the name suggests – is used to view any content on the screen. Without it, it is not possible to display anything on the screen. Thus it is the most essential element of any UI screen.

Views can me of various geometric shapes and sizes. These can be combined to form advanced views. All of these views and combinations form the layout of a screen. Here, I give an example of a view, complete with markings for easier understanding.

WhatsApp Image 2016-08-17 at 8.33.00 PM (1)

WordBin Login Page

This is a screenshot of one of our published apps, WordBin. Here I have marked the views in black. These views when grouped together, formed the Login page (layout). Any such combination forms different layouts.

Here, it is clearly visible that the bounds of the views can both me transparent (view marked “1”) due to it’s background, and can also be clearly distinguished (view marked “2”). Using the various properties of the views and using its features we can design any view as per our requirement.

Talking from a more programmatic point of view, View is an Android Base class from which all other types of views inherit.

Most Commonly Used Android Views:

  • TextView
  • EditText
  • Button
  • ImageView
  • ImageButton
  • CheckBox
  • RadioButton
  • RadioGroup
  • ListView
  • Spinner
  • AutoCompleteTextView

Since in Java, the norm is to follow Camel Case, the above classes follow such specifications. The above are just a few library classes of the vast Android library. Developers can define custom views and layouts as well on XML files. These custom views must be bound by some Android rules, but mostly they are flexible.

XML (Extensible Markup Language) files store the design of each user interface and  Java is required to implement it’s interactivity with other Java files. Android Studio is the most commonly used IDE to design the entire application.

The intention of this post was to give a basic idea of the View element of Android. Professional developers don’t memorize everything. Looking up information and implementing them properly is a key part of the job. But to implement properly, one should have their concepts clear. There are online sources which I found very useful while developing applications and which I used to refer to for implementing codes. But most of these concepts were not clearly stated in those sources. I learnt these over time after developing many applications. Hope this helps you.

Subscribe and keep checking for more posts soon.

Thank You.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s