Tag Archives: Copy And Paste

How to use progress bar dialogs and custom Dialogs in ANDROID?

By | April 15, 2011

Hi, In most situations we have to use progress bar dialogs, Alert View Dialogs and Our own custom Dialogues in our applications. In most situations the built in dialogs may be enough but in certain other situations we have to build our own dialogs for better user experience. But still there is problem people don’t know how to… Read More »

The RatingBar in ANDROID

By | February 7, 2011

Simply copy and paste the following code to see how to use the RatingBar in ANDROID. [java] package AndroidRatingBar.pack; import android.app.Activity; import android.os.Bundle; import android.widget.RatingBar; import android.widget.Toast; public class AndroidRatingBar extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final RatingBar ratingBar_Small = (RatingBar)findViewById(R.id.ratingbar_Small); final RatingBar ratingBar_Indicator… Read More »

How will you access the clipboard in an AIR application?

By | January 15, 2011

The following is a sample code to do this. Simply copy and paste. [xml] <xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"> public function init():void{ var str : String = "Hello"; System.setClipboard(str); var versionString:String = Capabilities.version; var pattern:RegExp = /^(w*) (d*),(d*),(d*),(d*)$/; var result:Object = pattern.exec(versionString); if (result != null) { trace("input: " + result.input); trace("platform: " + result[1]); trace("majorVersion: " + result[2]); trace("minorVersion:… Read More »

How to read and write an XML file in Adobe AIR or Flex?

By | January 15, 2011

AIR treats the XML files as just as normal file and so you can proceed using the FileStream classs. Please take a look at the sample code. Just copy and paste the following code to your main.MXML file and you are done. [xml] import flash.xml.XMLDocument; private function init():void { xmlTA.text = " Sample XML "; var fileStream:FileStream =… Read More »