Skip to main content

Posts

Showing posts from 2012

Expandable Listview Android example

Create New Android Project In Main Activity : package com.multilayerexpandable; import java.util.ArrayList; import android.app.ExpandableListActivity; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.widget.ExpandableListView; import android.widget.ExpandableListView.OnChildClickListener; import android.widget.Toast; public class MainActivity extends ExpandableListActivity implements OnChildClickListener { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ExpandableListView expandbleLis = getExpandableListView(); expandbleLis.setDividerHeight(2); expandbleLis.setGroupIndicator(null); expandbleLis.setClickable(true); setGroupData(); setChildGroupData(); NewAdapter mNewAdapter = ne...

Save Bitmap and sent it with Email attachment ANDROID

It is very simple to save BITMAP into image if (BITMAP != null) { try { ByteArrayOutputStream bytes = new ByteArrayOutputStream(); BITMAP.compress(Bitmap.CompressFormat.PNG, 40, bytes); // you can create a new file name ".jpg" in // sdcard folder. String pngUri = Environment .getExternalStorageDirectory() + File.separator + _KNAME + "_" + General_Class.selectitem_ + "_" ...

Titanium Appcelerator - Android and iPhone Application Development

For Download and install Titanium SDK ClickHere . Create new project in Titanium Studio. Now open app.js from Resource/app.js and do below code. /*  * Single Window Application Template:  * A basic starting point for your application.  Mostly a blank canvas.  *   * In app.js, we generally take care of a few things:  * - Bootstrap the application with any data we need  * - Check for dependencies like device type, platform version or network connection  * - Require and open our top-level UI component  *    */ //bootstrap and check dependencies if (Ti.version < 1.8 ) { alert( 'Sorry - this application template requires Titanium Mobile SDK 1.8 or later' );   } // This is a single context application with mutliple windows in a stack /*(function() { //determine platform and form factor and render appropr...

Android show Data from Sqlite DB into Grid View

Shaadi.com Matrimonials Shaadi.com Indian Matrimonials Your Main Activity class package com . Sqlite_grid_view ; import java . util . ArrayList ; import java . util . List ; import android . app . Activity ; import android . os . Bundle ; import android . util . Log ; import android . view . View ; import android . widget . AdapterView ; import android . widget . AdapterView . OnItemClickListener ; import android . widget . ArrayAdapter ; import android . widget . GridView ; import android . widget . TextView ; import android . widget . Toast ; public class AndroidSQLiteTutorialActivity extends Activity { private GridView gridView ; public static ArrayList < String > ArrayofName = new ArrayList < String >(); /** Called when the activity is first created. */ @ Override public void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ); setContentView ( R . l...