How does Exception chaining in Java

Most of the applications need to implement their own set of application specific exceptions which can be thrown by the business logic of the application. As we know, we can extend the ‘Exception’ class to create our own exceptions in Java. In order to notify the end user of the actual cause of the […]

Barometer Sensor working in android

This tutorial shows Barometer Sensor works in android. You will understand how Barometer works after watching this tutorial.

Create android project by selecting file > new > new android application. Now name your app whatever you like. When done hit finish.

JAVA CODE and XML:
activity_main.xml

activity_press.xml

Add the following xml file in your menu folder which lies in […]

Android tutorial to change screen brightness

You can easily control android device display brightness via java code and this tutorial shows how to implement that feature in your app.

Create android project by selecting file > new > new android application. Now name your app whatever you like. When done hit finish.

JAVA CODE and XML:
Add the following xml and java file […]

Using Spinner widget in your android app

We have seen dropdown List in many websites. Dropdown is named Spinner in android. This tutorial will show how you can implement spinner in your app.

Create android project by selecting file > new > new android application. Now name your app whatever you like. When done hit finish.

JAVA CODE and XML:
Add the following xml […]

Length, Size and Capacity of a collection in Java

Collection framework in Java language specification provides a set of interfaces and their implementation based on the different types of object groups we can have in any application. Like, some collections can contain only a certain defined group of objects, some can have different types of objects. Some collections can allow duplicate entries\objects, some […]

Android TabLayout example source code

With TabLayout you can easily create nice interface of your application. TabLayout is very user friendly and easy to use.

Create android project by selecting file > new > new android application. Now name your app whatever you like. When done hit finish.

JAVA CODE and XML:
Add the following xml file into your project.
activity_tab_layout.xml

Add this under […]

Setting an error message in EditText in android

When a user hit submit button without entering any text in the EditText we alert user in two ways one is by using Toast message and another one using setError() method as you will see in the video.

Create android project by selecting file > new > new android application. Now name your app […]

Showing And Hiding Menu Items in android using java code

Showing menu item at right time and hiding it otherwise makes your code efficient. With this you can have two view in one place. This tutorial shows how to show and hide menu items in android application via java code.

Create android project by selecting file > new > new android application. Now name your […]

Play Audio using Soundpool in Android

With the help of SoundPool you can make our own customized music player. This class helps you to play, pause and stop music. Lets’ code for this.

Create android project by selecting file > new > new android application. Now name your app whatever you like. When done hit finish.

JAVA CODE and XML:
activity_main.xml

MainActivity.java

Running the app […]

Creating Custom View for your android apps

If you are want to develop game or customized application then you must learn how to create custom view in android application in java code. We are going to learn this today.

Create android project by selecting file > new > new android application. Now name your app whatever you like. When done hit finish.

JAVA […]

x

Enter your email address:

Delivered by FeedBurner

Java ExperienceA place for all type of Java web tutorials2014