Skip to main content

Posts

Showing posts from May, 2012

Multi-Page template in JQuery Mobile

 In my previous post I had talked about single page template in jQuery mobile. This is my another simple example for creating multiple page template using JQuery mobile. JQuery Mobile Multi Page Template Header This is page1 Move To Second Page Footer Header This is page2 Move To First Page Footer  Here the init() method is my onload function, In this function I have registered the on click event for two buttons. The button "moveToPage2" present in page1 is redirect you to second page and the button "moveToPage1" button present in second page is redirect you to first page.

Android - The radio group creation and event handler mechanism

 This is very simple example for creating check box in android application. Here I have created the new android project and I have modified the main.xml file with following code.  Here I have created the one radio grop and I have added some games names as option. Now I am going to display the selected game with using TextView. For getting this effect I have modified the main activity java file with following code. import android.app.Activity; import android.os.Bundle; import android.widget.RadioGroup; import android.widget.RadioGroup.OnCheckedChangeListener; import android.widget.TextView; public class RadioBoxActivity extends Activity implements OnCheckedChangeListener{ /** Called when the activity is first created. */ RadioGroup radioGroup; TextView textView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.

Android - The check box creation and event handler mechanism

 This is simple example for creating check box in android application. I have created the new android project and I have modified the main.xml file present in the layout folder with following code.  Here I have just drag and drooped the check box control and I have changed the text value as "The Checkbox is unchecked". Now I am going to add the on change listener for this check box. I have changed the main java file and this is my code. import android.app.Activity; import android.os.Bundle; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; public class BasicInputsActivity extends Activity implements OnCheckedChangeListener{ /** Called when the activity is first created. */ CheckBox checkBox1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); checkBox1 = (Chec

Single page template in JQuery mobile

 The following code is simple example for creating mobile pages using JQuery mobile. For developing JQuery mobile pages you needs to include the jquerymobile.css, jquerymobile.js and jquery.js files. You can able to download these file from jquery site. This is my single page template. <! DOCTYPE html> < html > < head >        < meta charset = "ISO-8859-1" >        < meta name = "viewport" content = "width=device-width, initial-scale=1" >        < title > JQuery Mobile Single Page Template </ title >        < script type = "text/javascript" src = "js/jquery.js" ></ script >        < script type = "text/javascript" src = "js/jquery.mobile-1.1.0.min.js" ></ script >        < link rel = "stylesheet" type = "text/css"  href = "css/themes/default/jquery.mobile-1.1.0.css" /> </ head