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


Java StickyListHeadersListView.setDrawingListUnderStickyHeader方法代码示例

本文整理汇总了Java中se.emilsjolander.stickylistheaders.StickyListHeadersListView.setDrawingListUnderStickyHeader方法的典型用法代码示例。如果您正苦于以下问题:Java StickyListHeadersListView.setDrawingListUnderStickyHeader方法的具体用法?Java StickyListHeadersListView.setDrawingListUnderStickyHeader怎么用?Java StickyListHeadersListView.setDrawingListUnderStickyHeader使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在se.emilsjolander.stickylistheaders.StickyListHeadersListView的用法示例。


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

示例1: onCreateView

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.image_list_fragment, container, false);
    mStickyList = (StickyListHeadersListView) view.findViewById(R.id.image_list_view);
    mStickyList.setOnItemClickListener(this);
    mAdapter = new ImageListAdapter(this.getActivity());
    mStickyList.setAdapter(mAdapter);
    mStickyList.setDrawingListUnderStickyHeader(false);

    IntentFilter filter = new IntentFilter(EvernoteMars.END_NOTE_LOADING);
    filter.addAction(MarsImagesApp.MISSION_CHANGED);
    filter.addAction(MarsImagesApp.IMAGE_SELECTED);
    filter.addAction(MarsImagesApp.NOTES_CLEARED);
    filter.addAction(MarsImagesApp.LOCATIONS_LOADED);
    LocalBroadcastManager.getInstance(getActivity()).registerReceiver(mMessageReceiver, filter);

    return view;
}
 
开发者ID:OpsLabJPL,项目名称:MarsImagesAndroid,代码行数:19,代码来源:ImageListFragment.java

示例2: onCreate

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    setTheme(App.theme.theme);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_app_list);
    Utils.checkBackups(getApplicationContext());
    ActionBar actionBar = getActionBar();
    if (actionBar != null) {
        actionBar.setTitle(Ui.applyCustomTypeFace(getString(R.string.app_name), this));
    }

    loadingView = findViewById(R.id.loadingView);
    emptyView = findViewById(R.id.emptyView);
    listView = (StickyListHeadersListView) findViewById(R.id.listView);
    listView.setDrawingListUnderStickyHeader(false);
    listView.setOnItemClickListener(new OnItemClickListener() {
        @Override
        public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
            if (isRootAccessGiven) {
                startPreferencesActivity((AppEntry) mAdapter.getItem(arg2));
            } else {
                checkRoot();
            }
        }
    });

    if (savedInstanceState == null) {
        checkRoot();
    }

    if (savedInstanceState == null || Utils.getPreviousApps() == null) {
        startTask();
    } else {
        updateListView(Utils.getPreviousApps());
    }
}
 
开发者ID:SimonMarquis,项目名称:Android-PreferencesManager,代码行数:37,代码来源:AppListActivity.java

示例3: onCreate

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_sign_log);
	toolbar = (Toolbar) findViewById(R.id.toolbar_sign_log);
	stickyList = (StickyListHeadersListView) findViewById(R.id.list);
	toolbar.setTitle("签到记录");
	toolbar.setNavigationIcon(R.mipmap.button_back);
	toolbar.setNavigationOnClickListener(new View.OnClickListener() {
		@Override
		public void onClick(View view) {
			finish();
		}
	});
	toolbar.inflateMenu(R.menu.sign_log_toobar_menu);
	toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {
		@Override
		public boolean onMenuItemClick(MenuItem item) {
			switch (item.getItemId()){
				case R.id.action_only_signed:
					mAdapter.only_signed();
					break;
				case R.id.action_only_no_signed:
					mAdapter.only_no_signed();
					break;
				case R.id.action_all_people:
					mAdapter.all_signed();
					break;
				case R.id.action_about:

					break;
				default:
					break;

			}
			return false;
		}
	});
	stickyList.setOnItemClickListener(this);
	stickyList.setOnHeaderClickListener(this);
	stickyList.setOnStickyHeaderChangedListener(this);
	stickyList.setOnStickyHeaderOffsetChangedListener(this);
	stickyList.addHeaderView(getLayoutInflater().inflate(R.layout.list_header, null));
	stickyList.addFooterView(getLayoutInflater().inflate(R.layout.list_footer, null));
	TextView textView = new TextView(this);
	textView.setText("当前签到内容为空!");
	stickyList.setEmptyView(textView);
	stickyList.setDrawingListUnderStickyHeader(true);
	stickyList.setAreHeadersSticky(true);

	refreshLayout = (SwipeRefreshLayout) findViewById(R.id.refresh_layout);
	refreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
		@Override
		public void onRefresh() {
			new Handler().postDelayed(new Runnable() {
				@Override
				public void run() {
					refreshLayout.setRefreshing(false);
				}
			}, 1000);
		}
	});
	AlertDialog.Builder builder = new AlertDialog.Builder(this);
	builder.setCancelable(false);
	builder.setTitle("温馨提示");
	builder.setMessage("正在加载,请稍后......");
	builder.setView(new ProgressBar(this));
	dialog = builder.show();
	loadData();
}
 
开发者ID:tony-Shx,项目名称:Swface,代码行数:71,代码来源:SignLogActivity.java

示例4: onCreate

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    refreshLayout = (SwipeRefreshLayout) findViewById(R.id.refresh_layout);
    refreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
        @Override
        public void onRefresh() {
            new Handler().postDelayed(new Runnable() {
                @Override
                public void run() {
                    refreshLayout.setRefreshing(false);
                }
            }, 1000);
        }
    });

    mAdapter = new TestBaseAdapter(this);

    stickyList = (StickyListHeadersListView) findViewById(R.id.list);
    stickyList.setOnItemClickListener(this);
    stickyList.setOnHeaderClickListener(this);
    stickyList.setOnStickyHeaderChangedListener(this);
    stickyList.setOnStickyHeaderOffsetChangedListener(this);
    stickyList.addHeaderView(getLayoutInflater().inflate(R.layout.list_header, null));
    stickyList.addFooterView(getLayoutInflater().inflate(R.layout.list_footer, null));
    stickyList.setEmptyView(findViewById(R.id.empty));
    stickyList.setDrawingListUnderStickyHeader(true);
    stickyList.setAreHeadersSticky(true);
    stickyList.setAdapter(mAdapter);

    mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
    mDrawerToggle = new ActionBarDrawerToggle(
            this,                  /* host Activity */
            mDrawerLayout,         /* DrawerLayout object */
            R.drawable.ic_drawer,  /* nav drawer icon to replace 'Up' caret */
            R.string.drawer_open,  /* "open drawer" description */
            R.string.drawer_close  /* "close drawer" description */
    );

    // Set the drawer toggle as the DrawerListener
    mDrawerLayout.setDrawerListener(mDrawerToggle);

    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setHomeButtonEnabled(true);

    restoreButton = (Button) findViewById(R.id.restore_button);
    restoreButton.setOnClickListener(buttonListener);
    openExpandableListButton = (Button) findViewById(R.id.open_expandable_list_button);
    openExpandableListButton.setOnClickListener(buttonListener);
    updateButton = (Button) findViewById(R.id.update_button);
    updateButton.setOnClickListener(buttonListener);
    clearButton = (Button) findViewById(R.id.clear_button);
    clearButton.setOnClickListener(buttonListener);

    stickyCheckBox = (CheckBox) findViewById(R.id.sticky_checkBox);
    stickyCheckBox.setOnCheckedChangeListener(checkBoxListener);
    fadeCheckBox = (CheckBox) findViewById(R.id.fade_checkBox);
    fadeCheckBox.setOnCheckedChangeListener(checkBoxListener);
    drawBehindCheckBox = (CheckBox) findViewById(R.id.draw_behind_checkBox);
    drawBehindCheckBox.setOnCheckedChangeListener(checkBoxListener);
    fastScrollCheckBox = (CheckBox) findViewById(R.id.fast_scroll_checkBox);
    fastScrollCheckBox.setOnCheckedChangeListener(checkBoxListener);

    stickyList.setStickyHeaderTopOffset(-20);
}
 
开发者ID:soulrelay,项目名称:StickyListHeadersWithRefreshAndLoadMore,代码行数:68,代码来源:TestActivity.java


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