Skip to main content

Posts

Draw PolyLines in Google Map

Change the Marker icon in Google Map

Previous : Add Marker To Google Map   Next : Draw Polylines in Google map

Add Marker to Google Map

Previous : Display Google Map         Next : Change the marker Icon

place Google map in user defined fragment

Previous : Display Google Map     Next : Add Marker To Google Map

Display Google Map using API V2 in android

Displaying Google Map in android using the API version 1 is deprecated now. Google introduce a lot of changes in displaying Google Map using API version 2. In this post i demonstrate how to display the Google Map using API Version 2. Ads By Google Step 1: Install the Google Play Service SDK  For displaying Map using API V2, you need the Google Play Services. So first step is to open your Android SDK manager and install the Google Play Services. Step 2: Add the Google Play Service as a library project into your android work-space.  After the successful installation of Google Play Service SDK, you can find out the Google play service library project on the following location in your android SDK folder.                                             sdk-->Extras-->Google Import the Google Play Services as a library project into the work-s...

android fragment example

In this post i am going to present a simple example about fragments in android. In this example there are  two fragments presents, and add them into the main activity using two separate relative layouts. There are two buttons on the main activity, first button is for open the first fragment and by clicking the second button user can open the second fragment. Ads By Google MainActivity.java 1: public class MainActivity extends Activity { 2: Button B1,B2; 3: @Override 4: protected void onCreate(Bundle savedInstanceState) { 5: super.onCreate(savedInstanceState); 6: setContentView(R.layout.activity_main); 7: B1 = (Button)findViewById(R.id.b1); 8: B2 = (Button)findViewById(R.id.b2); 9: B1.setOnClickListener(new OnClickListener() { 10: @Override 11: public void onClick(View arg0) { 12: FragmentManager FM = getFragmentManager(); 13: ...

working with Fragments in android

Fragments are one of the most useful user interface components in android. Making of a very complex user interface made easy by using the fragments. We can easily categorize an android activity into separate modules using the fragment feature of android. Ads by Google   Why we use the fragment ? We know that there are a lot of android devices with different screen resolutions are available on the market. So the making of an android app for a particular device or resolution is not practical. Fragments help us to solve this problem. We can categorize the UI of an activity using fragments. If the app open in a high resolution device then the detailed representation of the activity shown and if it is a standard definition device then the system shows only one or more fragment view of that activity. You can implement the Fragments in two ways 1. Insert the Fragment directly in to the XML file of an activity. 2. Insert the Fragment programatically to an activity....