Skip to main content

Posts

Custom Android SeekBar Developement

Before starting coding for Custom SeekBar,You must have good concept of following topics. 1. Layer List 2. Animation List 3. Selector   Layer List :A LayerDrawable is a drawable object that manages an array of other drawables. Each drawable in the list is drawn in the order of the list—the last drawable in the list is drawn on top. <layer-list xmlns:android= "http://schemas.android.com/apk/res/android" > <item android:id= "@android:id/background" android:drawable= "@drawable/seekbar_total" /> <item android:id= "@android:id/secondaryProgress" > <clip android:drawable= "@drawable/seekbar_buffer" /> </item> <item android:id= "@android:id/progress" > <clip android:drawable= "@drawable/seekbar_played" /> </item> </layer-list> Animation List: A AnimationDrawable is a drawable object that is used to create fram...

Android Different Layout For Portrait and Landscape Mode

A problem that we face mostly while developing Android application for Multiple screen i.e designing layout such that it suits for multiple screen.In particular situation we need to design two layout, one for portrait and another for landscape.This tutorial going to focus about this. For designing different layout for portrait and landscape  mode,you need to create folder in resource named layout-land and put layout name same as then name of layout inside layout folder.Now design layout inside layout-land for landscape mode and inside layout folder for portrait mode. Write some code in AndroidManifest.xml <activity android:configchanges="uiMode"  android:label="@string/app_name"  android:name=".SplashScreen"  android:screenorientation="sensor"> Good luck

Android Background processing with AsyncTask

I had to download data from server and bind it with the ListView .I studied about this and finally used AsyncTask for background processing.I'm going to post some code and it's description about Android background processing. AsyncTask AsyncTask is designed to perform background processing and publish result on the UI thread.It is a helper class around Thread and Handler and does not constitute a generic threading framework.AsyncTask is defined by three generic types called Params , Progress and Result .And it has four callback methods called onPreExecute() , onPostExecute() , doInBackground() and onProgressUpdate() . public Load extends AsyncTask<Params,Progress,Result> { } AsyncTask's generic types Params :-It's a parameters send to the task upon execution. Progress :-This parameter shows progress units during background processing. Result :-It return type of result of the background processing. If you don't require it...

Get device name,IMEI no,screen width,height and mobile no in Android

Hi friends,Today I'm going post about how to Get device name,IMEI no,screen width,height and mobile no.Few days ago I need to use this all in my recent project but could not seen any tutorial which explains about this all.So have look on code part it's pretty easy.Android provides us API for this all. Code: public class Utility {     int sh, sw;     Context context;     DisplayMetrics metrics;     public AdParameters(Context context) {         // TODO Auto-generated constructor stub         this.context = context;         metrics = context.getResources().getDisplayMetrics();     }     public String getDeviceName() {         return android.os.Build.MODEL;     }     public String getIMEI() {     ...

Create Database in Android using SQLite

Hi all ,Its my great pleasure to write an article about Database in Android.We consider you have some knowledge of Android application development,Java like Singleton class and Database also.So first have a look on XML part : Menu.xml <?xml version= "1.0" encoding= "utf-8" ?> <LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android"     android:layout_width= "match_parent"     android:layout_height= "match_parent"     android:orientation= "vertical" >     <LinearLayout         android:layout_width= "fill_parent"         android:layout_height= "wrap_content"         android:orientation= "horizontal"         android:weightSum= "100" >         <Button    ...