當前位置: 首頁>>代碼示例>>Java>>正文


Java ExpandableListActivity類代碼示例

本文整理匯總了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);
    }
  };
}
 
開發者ID:pkware,項目名稱:truth-android,代碼行數:9,代碼來源:ExpandableListActivitySubject.java

示例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");

		}
	}
}
 
開發者ID:redapple1900,項目名稱:ClinicalTrialTracker,代碼行數:28,代碼來源:ArticleExpandableListAdapter.java

示例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");	
              }        	 
          } 
          
 	 }
     
  }
 
開發者ID:redapple1900,項目名稱:ClinicalTrialTracker,代碼行數:28,代碼來源:ArticleExpandableListAdapter.java

示例4: ExpandableListActivitySubject

import android.app.ExpandableListActivity; //導入依賴的package包/類
protected ExpandableListActivitySubject(FailureStrategy failureStrategy, ExpandableListActivity subject) {
  super(failureStrategy, subject);
}
 
開發者ID:pkware,項目名稱:truth-android,代碼行數:4,代碼來源:ExpandableListActivitySubject.java

示例5: ExpandableListActivityAssert

import android.app.ExpandableListActivity; //導入依賴的package包/類
public ExpandableListActivityAssert(ExpandableListActivity actual) {
  super(actual, ExpandableListActivityAssert.class);
}
 
開發者ID:square,項目名稱:assertj-android,代碼行數:4,代碼來源:ExpandableListActivityAssert.java


注:本文中的android.app.ExpandableListActivity類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。