• How to create a widget in android?

    Hello everyone… Today I will show you how to create a simple widget in android? First create a new project and name it “Widget1” and name the activity “WidgetDemo1“. Actually we dont need the activity class here. You can delete […]

  • How to create Gradiant Buttons in android?

    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 […]

  • How to use shapes in android? A simple example.

    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. […]

  • Customizing your button or TextView or another view in ANDROID.

    Beautifying our applications is one of the main features of your application’s success. In ANDROID there are many possible ways to do this. For eg. We need to have different colors for our buttons, However we can give backgrounds for […]

  • Applying a shape to xml in android

    By adding a custom shape we can make the layout more attractive. For this we have to create a xml file and specify this in the main layout xml file First make a xml inside the drawable folder. Then in […]

  • How to shoot a bullet in the direction of touch in Box2D iphone?

    write the below code in “ccTouchesBegan” function and you are done. Here the ballBody represents the bullet body. You can increase the power variable to increase bullet speed.

  • How to rotate a body manually in Box2D?

    The below code helps you to rotate a body in Box2D manually. Here the body is named “rotating_body” which is going to rotate and a sprite named “rot_sprite” is it’s userData, please give your own image for it. Make sure […]


Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.