本文整理匯總了Java中android.app.ExpandableListActivity類的典型用法代碼示例。如果您正苦於以下問題:Java ExpandableListActivity類的具體用法?Java ExpandableListActivity怎麽用?Java ExpandableListActivity使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ExpandableListActivity類屬於android.app包,在下文中一共展示了ExpandableListActivity類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: type
import android.app.ExpandableListActivity; //導入依賴的package包/類
public static SubjectFactory<ExpandableListActivitySubject, ExpandableListActivity> type() {
return new SubjectFactory<ExpandableListActivitySubject, ExpandableListActivity>() {
@Override
public ExpandableListActivitySubject getSubject(FailureStrategy fs, ExpandableListActivity that) {
return new ExpandableListActivitySubject(fs, that);
}
};
}
示例2: onClick
import android.app.ExpandableListActivity; //導入依賴的package包/類
@Override
public void onClick(View v) {
if (v != null) {
final int position = ((ExpandableListActivity) context)
.getExpandableListView().getPositionForView(v) - 1;
Log.d("" + position, "checkposition");
final long packedPosition = ((ExpandableListActivity) context)
.getExpandableListView().getExpandableListPosition(
position);
Log.d("" + packedPosition, "checkposition");
((ExpandableListActivity) context).getExpandableListView();
// final int packedPosition =
// ((ExpandableListActivity)context).getExpandableListView().getExpandableListPosition(position);
final int groupPosition = ExpandableListView
.getPackedPositionGroup(packedPosition);
if (groupPosition != AdapterView.INVALID_POSITION) {
mCallBack = (OnGroupClickListener) ((Activity) context);
mCallBack.OnGroupClick(groupPosition,
groupItem.get(groupPosition).getUrl().toString(),
"link");
}
}
}
示例3: onCheckedChanged
import android.app.ExpandableListActivity; //導入依賴的package包/類
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (buttonView!=null){
final int position = ((ExpandableListActivity)context).getExpandableListView().getPositionForView(buttonView);
Log.d(""+position,"checkposition");
final long packedPosition= ((ExpandableListActivity)context).getExpandableListView().getExpandableListPosition(position);
Log.d(""+packedPosition,"checkposition");
//((ExpandableListActivity)context).getExpandableListView();
// final int packedPosition = ((ExpandableListActivity)context).getExpandableListView().getExpandableListPosition(position);
final int groupPosition = ExpandableListView.getPackedPositionGroup(packedPosition);
if (groupPosition != AdapterView.INVALID_POSITION) {
getGroup(groupPosition).setStar(isChecked);
//Change the View
if (isChecked){
mCallBack=(OnGroupClickListener)((Activity)context);
mCallBack.OnGroupClick(groupPosition,groupItem.get(groupPosition).getGuid(),"star");
}else {
mCallBack=(OnGroupClickListener)((Activity)context);
mCallBack.OnGroupClick(groupPosition,groupItem.get(groupPosition).getGuid(),"unstar");
}
}
}
}
示例4: ExpandableListActivitySubject
import android.app.ExpandableListActivity; //導入依賴的package包/類
protected ExpandableListActivitySubject(FailureStrategy failureStrategy, ExpandableListActivity subject) {
super(failureStrategy, subject);
}
示例5: ExpandableListActivityAssert
import android.app.ExpandableListActivity; //導入依賴的package包/類
public ExpandableListActivityAssert(ExpandableListActivity actual) {
super(actual, ExpandableListActivityAssert.class);
}