当前位置: 首页>>代码示例>>Java>>正文


Java SherlockExpandableListActivity类代码示例

本文整理汇总了Java中com.actionbarsherlock.app.SherlockExpandableListActivity的典型用法代码示例。如果您正苦于以下问题:Java SherlockExpandableListActivity类的具体用法?Java SherlockExpandableListActivity怎么用?Java SherlockExpandableListActivity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SherlockExpandableListActivity类属于com.actionbarsherlock.app包,在下文中一共展示了SherlockExpandableListActivity类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getContextForInflater

import com.actionbarsherlock.app.SherlockExpandableListActivity; //导入依赖的package包/类
/**
 * @return Context which should be used for inflating the header layout
 */
public Context getContextForInflater(Activity activity) {
    if (activity instanceof SherlockActivity) {
        return ((SherlockActivity) activity).getSupportActionBar().getThemedContext();
    } else if (activity instanceof SherlockListActivity) {
        return ((SherlockListActivity) activity).getSupportActionBar().getThemedContext();
    } else if (activity instanceof SherlockFragmentActivity) {
        return ((SherlockFragmentActivity) activity).getSupportActionBar()
                .getThemedContext();
    } else if (activity instanceof SherlockExpandableListActivity) {
        return ((SherlockExpandableListActivity) activity).getSupportActionBar()
                .getThemedContext();
    } else if (activity instanceof SherlockPreferenceActivity) {
        return ((SherlockPreferenceActivity) activity).getSupportActionBar()
                .getThemedContext();
    }
    return super.getContextForInflater(activity);
}
 
开发者ID:GoogleCloudPlatform,项目名称:endpoints-codelab-android,代码行数:21,代码来源:PullToRefreshAttacher.java

示例2: getContextForInflater

import com.actionbarsherlock.app.SherlockExpandableListActivity; //导入依赖的package包/类
/**
 * @return Context which should be used for inflating the header layout
 */
public Context getContextForInflater(Activity activity) {
    ActionBar ab = null;
    if (activity instanceof SherlockActivity) {
        ab = ((SherlockActivity) activity).getSupportActionBar();
    } else if (activity instanceof SherlockListActivity) {
        ab = ((SherlockListActivity) activity).getSupportActionBar();
    } else if (activity instanceof SherlockFragmentActivity) {
        ab = ((SherlockFragmentActivity) activity).getSupportActionBar();
    } else if (activity instanceof SherlockExpandableListActivity) {
        ab = ((SherlockExpandableListActivity) activity).getSupportActionBar();
    } else if (activity instanceof SherlockPreferenceActivity) {
        ab = ((SherlockPreferenceActivity) activity).getSupportActionBar();
    }

    Context context = null;
    if (ab != null) {
        context = ab.getThemedContext();
    }
    if (context == null) {
        context = activity;
    }
    return context;
}
 
开发者ID:Mobideck,项目名称:appdeck-android,代码行数:27,代码来源:AbsPullToRefreshAttacher.java

示例3: showUpButton

import com.actionbarsherlock.app.SherlockExpandableListActivity; //导入依赖的package包/类
@Override
public void showUpButton() {

	if (getActivity() instanceof SherlockActivity) {

		((SherlockActivity) getActivity()).getSupportActionBar()
				.setDisplayHomeAsUpEnabled(true);

	} else if (getActivity() instanceof SherlockFragmentActivity) {

		((SherlockFragmentActivity) getActivity()).getSupportActionBar()
				.setDisplayHomeAsUpEnabled(true);

	} else if (getActivity() instanceof SherlockExpandableListActivity) {

		((SherlockExpandableListActivity) getActivity())
				.getSupportActionBar().setDisplayHomeAsUpEnabled(true);

	} else if (getActivity() instanceof SherlockListActivity) {

		((SherlockListActivity) getActivity()).getSupportActionBar()
				.setDisplayHomeAsUpEnabled(true);

	} else if (getActivity() instanceof SherlockPreferenceActivity) {
		((SherlockPreferenceActivity) getActivity()).getSupportActionBar()
				.setDisplayHomeAsUpEnabled(true);

	} else {
		super.showUpButton();
	}

}
 
开发者ID:SimoneLocatelli,项目名称:androidbase,代码行数:33,代码来源:SupportActivityHelper.java


注:本文中的com.actionbarsherlock.app.SherlockExpandableListActivity类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。