Wednesday, 5 September 2012
Tuesday, 4 September 2012
Kirit Bhayani: library list of git hub
Kirit Bhayani: library list of git hub
https://github.com/yanivtal
https://github.com/yanivtal
Sunday, 2 September 2012
listview how to selected
private static int mIndex = -1;
//________________in getview________________________
if(mIndex == position)
{
holder.lyt_home_main.setSelected(true);
holder.lyt_left_img_disclosure.setSelected(true);
}
else
{
holder.lyt_home_main.setSelected(false);
holder.lyt_left_img_disclosure.setSelected(false);
}
//+_______________________on click event___________________________
holder.lyt_home_main.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0)
{
CatagoryDB cat1 = (CatagoryDB) arg0.getTag();
Where=cat1.categoryID;
title = cat1.categoryName;
m1Index = -1;
mIndex = position;
int n = listcat.getChildCount();
for (int i = 0; i < n; i++)
{
View v = listcat.getChildAt(i);
LinearLayout lin = (LinearLayout)v.findViewById(R.id.lyt_home_main);
lin.setSelected(false);
}
new GetDataSubCat().execute();
arg0.setSelected(true);
home_list_right.setVisibility(View.VISIBLE);
}
});
return resultListView;
}
//________________in getview________________________
if(mIndex == position)
{
holder.lyt_home_main.setSelected(true);
holder.lyt_left_img_disclosure.setSelected(true);
}
else
{
holder.lyt_home_main.setSelected(false);
holder.lyt_left_img_disclosure.setSelected(false);
}
//+_______________________on click event___________________________
holder.lyt_home_main.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0)
{
CatagoryDB cat1 = (CatagoryDB) arg0.getTag();
Where=cat1.categoryID;
title = cat1.categoryName;
m1Index = -1;
mIndex = position;
int n = listcat.getChildCount();
for (int i = 0; i < n; i++)
{
View v = listcat.getChildAt(i);
LinearLayout lin = (LinearLayout)v.findViewById(R.id.lyt_home_main);
lin.setSelected(false);
}
new GetDataSubCat().execute();
arg0.setSelected(true);
home_list_right.setVisibility(View.VISIBLE);
}
});
return resultListView;
}
Subscribe to:
Posts (Atom)