Android application often needs settings that allow users to modify preferences in app. Android provides a powerful framework to manage user preferences. It allows us to define the way we want preferrences and it automatically generates UI for that. All we need to do is to simply use it in our app. In this example

SharedPreferences is an interface for accessing and modifying preference data returned by getSharedPreferences(String, int). For any particular set of preferences, there is a single instance of this class that all clients share. Modifications to the preferences must go through an SharedPreferences.Editor object to ensure the preference values remain in a consistent state and control when

UITableView is a subclass of UIScrollView, which allows users to scroll through the table, although UITableView allows vertical scrolling only. The cells comprising the individual items of the table are UITableView objects; UITableView uses these objects to draw the visible rows of the table. Cells have content—titles and images etc. Here we are describing how to

IOS Marquee Text

Monday, 30 September 2013 by

MarqueeLabel is a UILabel subclass adds a scrolling marquee effect when the text of the label outgrows the available width. The label scrolling direction and speed/rate can be specified as well. All standard UILabel properties (where it makes sense) are available in MarqueeLabel and it behaves just like a UILabel. Here we will show how

Mask UIImage in IOS

Monday, 30 September 2013 by

Bitmap images and image masks are like any drawing primitive in Quartz. Both images and image masks in Quartz are represented by the CGImageRef data type. As you’ll see later in this chapter, there are a variety of functions that you can use to create an image. Some of them require a data provider or

UIPanGestureRecognizer in IOS

Monday, 30 September 2013 by

UIPanGestureRecognizer is a concrete subclass of UIGestureRecognizer that looks for panning (dragging) gestures. The user must be pressing one or more fingers on a view while they pan it. Clients implementing the action method for this gesture recognizer can ask it for the current translation and velocity of the gesture. A panning gesture is continuous.

To learn drag and drop we have to know actual funda of the OnTouchListener and onTouchEvent on a view. Two types of Touch : 1.     Single Touch 2.     Multi Touch. We will discus about single touch. Receiving touch events is done in the view by implementing the overridable method onTouchEvent Whenever one or a series

Remove views from activity in Android

Friday, 27 September 2013 by

An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View). We can use addView() and removeView() to add/remove views programmically. Also we can call removeAllViews()

How to override homebutton in android?

Friday, 27 September 2013 by

There are things Android does that are completely non-transparent. One of the functions that users are not immediately aware of, is the control of default apps. When a new app is installed, it can take over functions usually reserved for an system app. With all the strange carrier/ manufacturer user interfaces coming out, many users

In this example we will show how to fetch all phone numbers including respective contact names from an Android phone. We have declared one button in activity_main.xml. Whenever user click the button it will go From MainActivity to ContactListActivity where we fetch all names and contactPhonenumbers and show these  in a Listview. The ListView is

TOP