I have a List View which have different items in it. Now what i want is to center the position of only the first item of the List view pro grammatically. Is it possible? Right now i am just disabling the clck on the first item. Following is the code for it.
mainListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView parent, final View view,
int position, long id) {
if (id==0)
{
mainListView.setClickable(false);
}
else
{
AlertDialog.Builder abc = new AlertDialog.Builder(context);
abc.setMessage("Are you sure to delete number?");
abc.setCancelable(true);
Now i want the first item of the listview i.e. id=0 to be shown in center but the rest of items in normal position. Please explain what to do