Saturday, September 8, 2012

To Display Indian Currency by Coding In Android


Public Class RupeesFont Extends Activity
{
    @override
    publicvoid onCreate(Bundle icicle)
    {
       super.onCreate(icicle);
       setContentView(R.layout.main);
         TextView tv=(TextView)findViewById(R.id.custom);
         Typeface face=Typeface.createFromAsset(getAssets(),"fonts/Rupee.ttf");
         tv.setText("`");
         tv.setTypeface(face);
    }

}

Rupees font ttf file

Friday, September 7, 2012

Dispaly Image from Database




query_compnay_id="Select * From "+mStaticValues.company_master;
mCursor_company_detail=mDatabaseConnectionAPI.ExecuteQueryGetCursor((query_compnay_id));
mCursor_company_detail.moveToFirst();

byte[] by =mCursor_company_detail.getBlob(mCursor_company_detail.getColumnIndex(mStaticValues.image_data));
mBitmap=BitmapFactory.decodeByteArray(by, 0, by.length, null);
img_logo.setImageBitmap(mBitmap);