Skip to main content

Posts

Showing posts from December, 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_ + "_"