Author name: Laura Prata

Info

Android Number Series

Hi, today I want to present my new application Number Series. Number Series is a logical game with numbers, just perfect for you if you like to challenge your brain. You have to go through 10 levels with varying degree of difficulty and you have only 3 lives to complete the game. What do you […]

,
Info

My Applications

Here I will post the applications developed by us. 1. Number Series  Number Series is a logical game with numbers, just perfect for you if you like to challenge your brain. You have to go through 10 levels with varying degree of difficulty and you have only 3 lives to complete the game. What do

, ,
Solutions, Tutorials

Android AdMob Banner XML

In the preview tutorial I explained how to add AdMob to your project, but we created the AdView in Java. So in this tutorial I will show you how to set it up in XML. Actually it’s more simple this way, at least in my opinion :) 1. Create a new project (or use an

, ,
Solutions, Tutorials

How to Add AdMob to Android [Deprecated]

NOTE 1: This tutorial is now deprecated. See this one instead! NOTE 2:  This project is made in Intellij. For those who use Eclipse or other IDE the integration of AdMob library will differ. You can use AdMob lib only on at least Android v3.2 (Api Level 13), so you must compile your project on

, ,
Tutorials

Android LayoutInflater Turorial

In this tutorial I will show you how to use the LayoutInflater in Android.1. Make a new project (I called my project InflaterExample and my main Activity it’s called “MyActivity”) 2. Go to res – layout – main.xml and put an id called “main_layout_id” <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:orientation=”vertical” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:id=”@+id/main_layout_id”> </LinearLayout> 3. Go to res

,
Tutorials

Android Persist Data Using Shared Preferences

Most of the projects need to persist different data in order to use it in a way or another. So in this tutorial I will show you how to persist your data using Shared Preferences in Android. First you have to know that in Android, if you need to store data you have 4 options to achieve this:

, ,
Snippets, Tutorials

Android: Open the Calculator from Android using Intent

If you make an application and you need to open the calculator that comes with Android you can use the code bellow, but be careful because some Android phones might not have the Calculator installed or the name of the package and class might differ. 1. When you make the new project call your main

, ,
Snippets, Tutorials

Android Vibrate on Click

If you want to make the phone to vibrate when you click on a button from your application: 1. You have to declare in your AndroidManifest.xml the permission: <uses-permission android:name=”android.permission.VIBRATE”/> 2. Now go to the class you want to put the vibration and in onCreate put this code: final Vibrator vibe = (Vibrator) yourActivity.this.getSystemService(Context.VIBRATOR_SERVICE); //replace

, ,
Snippets, Tutorials

Android EditText text changes Listener

If you want “listen” to the text changes from an EditText you have to use the TextWatcher. Bellow I will show you an example of TextWatcher: //first, we create an EditText EditText answer = new EditText(this); //second, we create the TextWatcher TextWatcher textWatcher = new TextWatcher() { @Override public void beforeTextChanged(CharSequence charSequence, int i, int

, ,
Tutorials

Detect when Done key is pressed

If you want to detect when a key from soft keyboard is pressed, like Done key, you can use the following code: mEditText = (EditText)findViewById(R.id.edit); mEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { //verifies what key is pressed, in our case verifies if the DONE key is pressed if (actionId

, ,
Solutions, Tutorials

Android SQLite Ignore Case from Database

If you want to select data from Database and you want to ignore the case of letters you should use COLLATE NOCASE in your query: “SELECT * FROM  myDataBaseName WHERE some_column= some_value COLLATE NOCASE” It’s not exactly an android issue but you might need some day in your android projects, so I hope it helps

, , ,
Tutorials

Android Gallery with Dots On Scroll

In this tutorial I will show you how to create an Android Gallery and how to create dots or little circles when you scroll the images. So let’s start: 1. First you have to create a new project. 2. After the project is created go to res -> drawable and put your images in the

Solutions, Tutorials

Android How to put markers/pins on the map

We’ve already explained how to make an application with a map here. So, now we will try to put markers or pins (or however are they called) on the map, by knowing the Latitude and Longitude, in case you will ever need it and someday you will :) . So lets start: 1. After you

, ,
Tutorials

Android PreferenceActivity & SharedPreferences tutorial

I will start with an example. Let’s assume that we want the user to change the date format of your application. For this you must have a class that extends PreferenceActivity, but first you have to create an XML file like this: 1. Make a directory in res called “xml” 2. In the xml directory

, , ,
Scroll to Top