math.modf is used to get the integral and fractional part of a given number in corona. Return the integral and fractional parts of the given number.
Here is a simple function to change the opacity of a view in android. Opacity is called alpha in android. so setAlpha(int) will do the job. The integer value may range from 0-255.
Here is the sample code to get the number of taps on a view in Corona SDK. here button is a displayObject like an image or a UI Button and event.numTaps gives the number of Taps on that view.
This is really simple in Corona, just use textObject:setTextColor( 255,255,255 )
In the previous post I told you about corona SDK and Today I will show you how to get started with Corona SDK. 1. First Go to http://www.anscamobile.com/corona/ and download the SDK for trial. 2. If you are a MAC user then download the dmg or if you are windows user then download the exe… Read More »
Today I will talk about building games for android and iPhone. There are a lot of SDK’s available for building games over the internet and I am here to talk about the CORONA SDK. Corona SDK is a software development kit created by Walter Luh, co-founder of Ansca Mobile. It allows software programmers to build… Read More »
Here are the simple steps to sign an android apk and publish it to the android market if you have an android developer account. Follow these steps exactly 1. Right click your project in eclipse and Click Android tools – > export unsigned apk. Give it a name and save it in a directory. 2.… Read More »
In the previous post I have showed how to create gradient buttons in android using XML. This is how we do this in java code. This is another method of applying gradiant. Please leave your valuable comments.
You can create any type of views in android and you can provide any color you want as background. It can be a single color or any number of colors as you wish. Here is a simple example. First create an xml inside the res/drawable folder and name it blue_button.xml and copy this code into… Read More »
This is a simple example showing how to create a shadow for a textView in android.
In android we can simply start a browser or start the browser with a supplied search query. Remember that we start the browser using an intent and we can put extra parameters in an intent. Here in the browser intent we can supply the search query as a “SearchManager.QUERY” and giving the value.
Here is a simple method to listen to software keyboard done button in android while editing in an EditText.
This is a simple example showing how to load a webpage and show a progressBar while the page is loading in android. For that you have to set a chrome client for the webview which implements “onProgressChanged” Here is the layout file. Here is the java file