Wednesday, 15 October 2014

Android programming tutorials.

Labels.


Labels are the simplest widgets in android programming. They are used adjacent to other widgets such as fields.

Dealing with labels in Xml.
This is achieved by adding a TextView element to the layout with an android.text property to set the value of the label itself.

TextView Properties of relevance to labels.

  • android:typeface: Sets the typeface to use for the label (e.gmonospace)
  • android:textStyle: Indicates that the typeface should be made bold(bold), italic (italic), or bold and italic (bold_italic)
  • android:textSize: Specifies the size of the font, in one of several measures: sp(scaled pixels), dip(density-independent pixels), px(raw pixels), in(inches), mm(millimeters). The recommend approach is to use sp, and this is appended to the size, such as 12sp.
  • android:textColor: Sets the color of the label’s text, in RGB hex format (e.g., #FF0000for red

Basic Xml code to demostrate a label.

<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="http://mwangisimon.blogspot.com"
/>



Tuesday, 23 September 2014

HOW TO CAPTURE SCREENSHOTS IN WINDOWS 8.0 AND 8.1

This is my first post on this blog.Kindly bear with me incase there shall be any broken parts in my post.However,am going to show you an amazingly easy way to capture screenshots in windows operating system without having to download any applications.

Lets start.
The task is easy.The only two items required to do it are:
  1. English literacy.
  2. Brain.
We are going to make use to two features:
  1. The PrtSc button.
  2. The Paint application
  • The first thing we shall open whatever app or site we want to take screenshot.Done?
 
  • Then press the PrtSc button on your keyboard.
  • Open the "Paint" apllication.
  • Paste (Ctrl+v).
You are done.

Facebook Simon Mwangi