How to change the textColor in Corona SDK?
This is really simple in Corona, just use textObject:setTextColor( 255,255,255 )
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
In android the default transition between activities is to slide from left to right. But with custom animations we can change that. First create a folder inside the res/drawable folder called “anim”. Then create a file named “fade.xml” and copy this code into it. create another file named “hold.xml” in the same place hold.xml. activity_animation.xml… Read More »
The first part is explained in this Tutorial, that is taking the screenshot of the application (View). The second part is storing it in the SDCARD. This is possible by compressing the image bitmap to bytes and then store. Finally dont forgot to put the following permission in the manifest file.
In android with shapes we can create beautiful layouts. Lets look at an example. Create an xml named “gradient.xml” in your drawable folder and copy this code into it. Now the main layout file main.xml The main java file. Done. You can now run the application.
Here is a simple code to get the current time in android in your own format. The output will look like this.
Hello all….. In today’s tutorial I will show you how to create a custom listview in android. For that we need 3java files. One holding the ListView itself another a Model object that holds the data for the listview and the third one for the Adapter which extends the ArrayAdapter class for holding the model.… Read More »
Here is a sample code to get the version of your application in android. Try changing the version in the AndroidManifest file and check the result in the console. Note : “pack.coderzheaven” should be replaced by your application package name.
This example will test whether a service is running in android if you know it’s package name. Run this sample of code to check this.
This is a simple example showing how will you disable any input on your current application screen in android. This is done by showing a transparent overlay dialog on the screen. This is how it is done. The layout for the above java file- main.xml
Hello all.. This is a simple code snippet to enable WI-FI in android programatically in android. Note : Make sure to add the permissions in the manifest file. These are the permissions. Please leave your valuable comments on this post.
Hello everyone, this is a simple example showing how to remove a view in android that is created using your xml file. This is the xml file that contains a TextView Here is the java code for removing this view After running this program you will not see the TextView that was in your layout… Read More »
Hello all.. In today’s tutorial I will show you how to open the wifisettings in android programatically. This code comes handy when the user have not enabled the wifi and you want the user to enable it for your application to work. Here is the code for that. Here is the layout xml- main.xml
Hello everyone today i will show you how to create a splash screen in android. This is one of the simplest ways to create a splash screen however there are another ways to create the splash screen. Lets look at the code. We need two layouts one for the splash screen and another for the… Read More »
Hello everyone, Today I will give you a simple tip on how to keep your screen on While your application is running in android. In Real devices the problem is you will loose some of the values in your variable when your device goes to sleep mode. To prevent this what we can do is… Read More »
Hi, For destroying physics bodies in Corona SDK, use any of the following methods. OR Note : While Box2D objects will be safely retained until the end of the current world step, their Lua references will be deleted immediately. Therefore, be careful not to accidentally delete the same Lua object more than once. This situation… Read More »