Webspeaks

Monday, July 16, 2012

How to Switch Between Activities in Android and Using Intents

Generally the complex Android Applications involve more than one screen and frequent switching between those screens. You also need to pass the data from one screen to another. In this tutorial we will learn how to switch between multiple activities in Android and how to pass data between them using intents. First of all I will tell you about the basic functions needed to create various activities and intents. After that we will create a test project to demonstrate the feature.
First Activity
First Activity

Thursday, July 12, 2012

Twitter like Fixed Header Using LESS CSS Preprocessor

Less is the widely used CSS preprocessor that extends CSS with dynamic behavior such as variables, mixins, operations and functions. From the beginning of web designing CSS has not been given the required attention but LESS provides a totally different way to code the stylesheets.
Style like a Programmer:
Since now you have been 'writing' CSS stylesheets but with LESS you will be 'coding' the stylesheets. So if you are a programmer and hate writing the styles, LESS can be more interesting to you. In LESS you can write functions(mixins), expressions, conditions, operators, classes and much more. So now you will get all spice of programming in styling as well. Happy now:)
Twitter Like Fixed Header
Twitter Like Fixed Header

Thursday, July 5, 2012

How to Customize the Default Toast Message in Android

Android provides a very convinient way of showing messages to the user in form of Toasts. Toasts do not require any user interaction, these are just a way of informing some useful or not message to the user. Toasts disappear automatically after a short time. However if you do not like the default Toast message, Android provides you the ability to customize the Toast according to your needs. You can customize the position as well as the appearance of the Toast. However the duration of Toast can accept only two parameters: Toast.LENGTH_SHORT and Toast.LENGTH_LONG. The Toast.LENGTH_SHORT shows the Toast for 2 seconds while the Toast.LENGTH_LONG shows the Toast for 3.5 seconds. You cannot change the duration of the Toast.
Custom Toast Message in Android
Custom Toast Message in Android