How to create a scrollable TextView in android?
The simplest way to create a Scrolling TextView in android is to place it inside a ScrollView. Here is a sample xml file with a scrollable TextView.
The simplest way to create a Scrolling TextView in android is to place it inside a ScrollView. Here is a sample xml file with a scrollable TextView.
This is a simple example showing how to listen to checkbox in android. To check whether the checkbox is in on state or in off state just add a listener to the checkbox you want to listen. This is how we do this. ch.setOnCheckedChangeListener(new OnCheckedChangeListener() { }); This is the layout contaning a checkbox. This… Read More »
Digital Clock is a very useful widget in android to show time in your application. Here is a simple demo on using digital Clock widget. First In the layout file copy this file. This creates a digital clock widget in the UI which will automatically update the time from the device. Now in the java… Read More »
Here is a simple way to change the orientation of the activity in android Through java code we do this…. Through xml we do this Following are two other values that you can specify in the android:screenOrientation attribute: ➤➤ portrait — Portrait mode ➤➤ sensor — Based on the accelerometer Please leave your valuable comments.
Hello all… In today’s tutorial I will show you how to add different layouts one over another in android through java code. For this we use the function addContentView() which is a variation on setContentView(View, android.view.ViewGroup.LayoutParams) to add an additional content view to the screen. Here I will create an xml with a textView and… Read More »
Hello all… Today I will show you how to use preferences in android? First we will create preferences using Create a folder named “xml” inside the “res” folder and inside that create an xml named “preferences.xml”. Now create a java file named “PreferenceDemo.java” in your src folder and copy this code into it. Now in… Read More »
We can create any type of alert in android. Today I will show a simple example showing how to create a custom alert in android. i.e you can provide any layout to your alert dialog. Now we will start. First create an xml for your alert dialog. Here I am creating an xml that contains… Read More »
This is a simple example showing how to use android built in drawables. Here I am showing only the xml file. Please leave your valuable comments on this post.
This code snippet helps you to open browser in android cocos2D application Call this function anywhere inside your cocos2D project to open the browser with the corresponding URL.
We can create a dialog with custom alert dialog with our xml in android. But for making simple alerts we can make custom alerts through code itself. Here is a simple function for this. Here I am having a Listview and an edittext with two buttons in the alertBox. Please leave your valuable comments on… Read More »
Hello all.. Today I will talk about how to theme your activities the way you want. Besides that android provides many built in themes that you can use instead of all writing it yourselves. One of those kind is making the activity appear like a dialog box. Here is how you do it. After creating… Read More »
Hello all… Recent studies has shown that apps that run on Apple’s iOS crashes more than Google’s Android apps. This is something that people who are involved in computer repair training should be aware of. According to the studies iOS apps crashes more than 3 times as compared to Android apps. These are some of… Read More »
In today’s tutorial I will show how to apply custom theme for your activity in android. Android has several built in themes for applying to your activity but you can also provide your own custom themes for your activity. Now we will start creating an activity with a custom theme applied. Create a fresh project… Read More »
Test
A new feature is coming to your android and blackberry phones which allows you to track your phone if it is lost. please check this link for more information on this.
Hello android lovers, In today’s tutorial I will show you how to 1. Create a text file and save a textfile in your SDCARD in your preferred path. 2. Read the contents from the same file and show it in a TextView. For writing a file we use the FileWriter class and for reading the… Read More »
Hello all… You may already know how to uninstall an android apk through interface in android emulator or device. But there is another way to remove the apk. It is through command line. here is how you do it. First navigate to android tools directory from your command line. Here I have installed android in… Read More »
Hello all.. The latest development in android is that google has removed the menu button from android, instead they provide something called the actionbar like in the Honeycomb devices. Google introduced the ActionBar class as the standard solution to make actions from the user options immediately visible and quick to invoke The ActionBar looks like… Read More »
Hello everyone, Today I will show you a simple trick of scaling the android device through command line. Ofcourse this can be done using the interface, but the otherway is using the command line. Through interface is like this . Through command line Change the scale value and see how your emulator changes. please leave… Read More »
Downloading an image in corona is really easy. Check out the example. Check the console to see where the downloaded file is saved. Download the complete source code from here.
To create gradient text in corona, you have to download ‘Corona daily build 612’ which has functions like setFillColor() etc. You create a new gradient object by calling graphics.newGradient(). You can pass (and reuse) the object in calls to text:setTextColor() and rect:setFillColor(). Here is an example.
Here is a way to get the number of children in a displayGroup in corona. Each children ca be accessed via the child index.