Pages

Friday, April 4, 2014

Download Air Control 3 22 apk Android

Have you ever tried to use Air Control on your android device? This app is indeed great android application that you need to have it. It brings a lot of features which will make you really love it. The newest version is Air Control 3.22. Air Control 3.22 might be downloaded from Android Market. So, if you need to download it into your android device, just open your Play Store application and search Air Control. Below this is detail of the application.


Air Control 3.22


Features of Air Control 3.22


Air Control 3.22 brings many features which will make you really love it. Heres summary of the application based on official page from Google Play


You are the air traffic controller helping the planes safely to ground.

In this simple yet surprisingly addictive drawing game you take on the role of Air Traffic Controller. It is your job to direct airplanes to runways while avoiding collisions.

FEATURES

★ 4 different maps
★ Special aircraft like super sonic jet and zeppelin
★ Classic game mode as well as the unique puzzle game mode
★ Online highscores
★ Beautiful curves
★ Countless hours of addictive gameplay
★ #1 Android air traffic controller game

THE PRESS SAYS

"...one of the most adrenaline charged games available for the android platform." -Android Geek Tips

"Are you looking for the next addicting Android game? Well, luckily, you’ve found it with Air Control! Your speed, agility, and foresight will be tested in this game of near-misses and crazy landings." -Best Android Apps Review

"...exciting, addicting gameplay that you will be sure to love. You need to download this game!" -Best Android Apps Review


Air Control Air Control


The newest version, Air Control 3.22 also brings many changes and improvements, here are:


  1. Reduced how often ranks are refreshed.

Download Air Control 3.22 apk Android


And finally, we advise you to set up this application to your android device. Follow this link to download Air Control 3.22 immediately into your android device.

Read More..

The 3n 1 problem in Python

Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs. More infos HERE.


And heres the algorithm in Python:
------------------------------------------------------


#ciclu
def ciclu(nr):
contor=0;
while nr!=1:
if nr%2==1:
nr=3*nr+1
else:
nr=nr/2
contor=contor+1
contor=contor+1
return contor
#parcurgere
def parcurgere(i,j):
n=0
maxim=ciclu(i)
for k in range (i+1,j):
n=ciclu(k)
if maxim<=n:
maxim=n
print(i,j,maxim)
#main
sw=1
while sw==1:
i=int(input())
j=int(input())
parcurgere(i,j)
print("Continue? 1=Yes 0=No")
sw=int(input())


------------------------------------------------------
Read More..

Thursday, April 3, 2014

Creating a custom title bar In Android

This is a sample application which shows how to create a custom Title Bar in android. Last topic published on this forum is Create a Toggle Button.
Underlying Algorithm:
Basic description of algorithm in step by step form:
1.) Create a Project CustomTitleBar.
2.) Define a custom layout mytitle.xml in res/layout :
<?xml version="1.0" encoding="utf-8"?>
<TextView
 xmlns:android="http://schemas.android.com/apk/res/android"
 android:id="@+id/myTitle"

 android:text="custom title bar"
 android:layout_width="fill_parent"
 android:layout_height="fill_parent"
 android:textColor="@color/titletextcolor"
 android:gravity ="center"/>
3.) Define colors.xml in res/values :
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="customTheme" parent="android:Theme">
    <item name="android:windowTitleBackgroundStyle">@style/WindowTitleBackground</item>
    </style>
</resources>
4.) Define themes.xml in res/values:
<?xml version="1.0" encoding="utf-8"?>
<resources>
   <style name="WindowTitleBackground">  
        <item name="android:background">@color/titlebackgroundcolor</item>    
    </style>
</resources>
5.) Define styles.xml in res/values:
<?xml version="1.0" encoding="utf-8"?>
<resources> 
    <color name="titlebackgroundcolor">#3232CD</color>
    <color name="titletextcolor">#FFFF00</color>
</resource>
6.) Put the following code in AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.app.CustomTitleBar"
     android:versionCode="1"
     android:versionName="1.0">
    <uses-sdk android:minSdkVersion="7" />
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".CustomTitleBar"android:theme="@style/customTheme"
                 android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>
7.) Run the application.
Steps to Create:
1.) Open Eclipse. Use the New Project Wizard and select Android Project Give the respective project name i.e. CustomTitleBar. Enter following information:
Project name: CustomTitleBar
Build Target: Android 2.1
Application name: CustomTitleBar
Package name: com.app.CustomTitleBar
Create Activity: CustomTitleBar
On Clicking Finish CustomTitleBar code structure is generated with the necessary Android Packages being imported along with CustomTitleBar.java. CustomTitleBar class will look like following:
package com.app.CustomTitleBar;
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
public class CustomTitleBar extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
            requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
            setContentView(R.layout.main);
            getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle);
    }
}
Output –The final output:
Read More..

Share Your Data Android Programming

This example shows how you can share your text and data with your friends.
Algorithm:
1.) Create a new project by File-> New -> Android Project name it ShareYourData.
2.) Write following into activity_main.xml:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#C0C0C0"
    android:orientation="vertical" >
    <Button
        android:id="@+id/button2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Share Data"
        android:onClick="shareData"
        />
</LinearLayout>
3.) Write following into res/values/styles.xml:
1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="myText">
        <item name="android:textColor">#000000</item>
        <item name="android:textSize">22sp</item>
        <item name="android:padding">3dip</item>
    </style>
</resources>
4.) Run for output.
Steps:
1.) Create a project named ShareYourData and set the information as stated in the image.
Build Target: Android 4.0
Application Name: ShareYourData
Package Name: com. example. ShareYourData
Activity Name: MainActivity
Min SDK Version: 11
2.) Open MainActivity.java file and write following code there:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package com.example.shareyourdata;
 
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
 
public class MainActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        }
    public void shareData(View view) {
        Intent intent = new Intent(Intent.ACTION_SEND);
        intent.setType("text/plain");
        intent.putExtra(Intent.EXTRA_TEXT, "This is my shared text");
        startActivity(Intent.createChooser(intent, "Share this text via"));
    }
}
3.) Compile and build the project.
Output
Read More..