當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。