We provide complete mobile and web apps development solutions

Tuesday, January 22, 2013

Creating Bitmap

To Create Bitmap 
Bitmap bmp = Bitmap.createBitmap((int)
getWindowManager().getDefaultDisplay().getWidth(), (int)
getWindowManager().getDefaultDisplay().getHeight(), Bitmap.Config.ARGB_8888);


To create Bitmap from resources

Bitmap image=BitmapFactory.decodeResource(context.getResources(),R.drawable.ic_launcher); 


Bitmap Configurations:
 
ALPHA_8  : 8 bits on Alpha channel, and no other colours.
 
ARGB_4444: 4 bits per color channel includes alpha,

ARGB_8888: 8 bits per color channel includes alpha,
 
RGB_565  : 5 bits for Red,6 bits for Green,5 bits for Blue 

TabHost- Tabs Android

 TabActivity:


In android, Using tabs, we can open multiple activities within single screen.
Three ways to create Tabs.

1. extends class from TabActivity or ActivityGroup

2. extending Activity and  use LocalActivityManager

3. using fragments ( Api 11 required).

Here is the sample working code for Tabs



package com.srinivas.tabs;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.app.Activity;
import android.app.LocalActivityManager;
import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.widget.TabHost;

public class MainActivity extends Activity {
    private static TabHost tabHost;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tabs);
        tabHost = (TabHost) findViewById(R.id.tabhost);
        LocalActivityManager mLocalActivityManager = new LocalActivityManager(this, false);
        mLocalActivityManager.dispatchCreate(savedInstanceState);
        tabHost.setup(mLocalActivityManager);
        Resources res = getResources();
       
        TabHost.TabSpec spec;

        Intent songintent = new Intent().setClass(this, SongsActivity.class);

        spec = tabHost.newTabSpec("songs")
                .setIndicator("Songs", res.getDrawable(R.drawable.ic_launcher))
                .setContent(logintent);
        tabHost.addTab(spec);

        Intent videointent = new Intent().setClass(this, VideosActivity.class);
        spec = tabHost
                .newTabSpec("video")
                .setIndicator("Videos", res.getDrawable(R.drawable.ic_launcher))
                .setContent(viodeintent);
        tabHost.addTab(spec);

        Intent booksintent = new Intent().setClass(this, BooksActivity.class);
        spec = tabHost.newTabSpec("books")
                .setIndicator("Books", res.getDrawable(R.drawable.ic_launcher))
                .setContent(booksintent);
        tabHost.addTab(spec);

       tabHost.setCurrentTab(0);
}
}


tabs.xml

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:id="@+id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <RelativeLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:padding="5dp"
        />
        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="bottom"
            android:layout_alignParentBottom="true"
        />
    </RelativeLayout>
</TabHost>


if you want to place Tabs at top , remove    android:layout_alignParentBottom="true"

https://picasaweb.google.com/115546358500228747299/Jun27201203?authkey=Gv1sRgCLmos6S5s_iaTA&feat=directlink#5836330903891211490

Thursday, January 10, 2013

What is Android ?



What is android

         Android is a software stack comprising not only OS but also middleware and key applications. It is an open source operating system, means developers customize the operating system for each mobile.

      Android was released by "Android Incorporation", a small company  in 2003. In 2005, It was aquired by the Google.Google formed a group named "Open Handset Alliance" to develop open standards. In that group many companies joined like Samsung, Motorola, mobile network companies, semiconductor companies etc.



Monday, January 7, 2013

Ubuntu is going to join into Mobile os market in 2014.............



Till now android, ios os occupied the entire mobile market. Now Ubuntu (Open source) want to compitative to all other mobile os.


What is the extra features it contains?



Ubuntu for android mobile enables to Android handsets to run the Ubuntu os on it. Ubuntu is a open source software. we can install the os in any compatible devices freely. For developing applications, canonical providing free registration. Canonical is the backend company for ubuntu mobile os.


It supports most of the popular languages for developing ubuntu mobile applications. C, c+ c#,python,qml, javascript,vala by using the programming technologies , we can develop ubuntu mobile applications.

Hope we can expect the ubuntu as a future compitative mobile os among all other os.

Wednesday, December 26, 2012

Setting Up Android App Development

Using existing IDE
 

Step 1: Setting Up the JDK Download JDK from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1637583.html

 Step 2: Download Eclipse and install download from http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/junor

Step 3:Setting Up the Android SDK download latest android sdk from developers.android.com

 step4: install adt plugin, which will provide the interface between eclipse and android sdk.

 Download SDK bundle with pre configured tools required for android app development

 http://developer.android.com/sdk/index.html#download

Sunday, December 16, 2012

Shasidhar googlegroups jobs

-->

Friday, December 14, 2012

Iphone Jobs

Home Android Jobs Iphone Jobs Jobs for All Friday, December 14, 2012 Iphone Jobs BNB Gamestudio hiring iphone developers exp: 0-1 Timing : 11:00 AM - 1:00 PM and 4:00 PM to 6:00 PM Interview Rounds 1st : Written Test (Technical, logical programs) 2nd : Face to face interview (Technical) 3rd : Face to face interview (HR) -->

Online Training

Your Name :
Your Email: (required)
Your Message: (required)

Powered by Blogger.

Recent Posts

Find Us On Facebook

Popular Posts