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


Java StickyListHeadersListView.setOnItemClickListener方法代碼示例

本文整理匯總了Java中se.emilsjolander.stickylistheaders.StickyListHeadersListView.setOnItemClickListener方法的典型用法代碼示例。如果您正苦於以下問題:Java StickyListHeadersListView.setOnItemClickListener方法的具體用法?Java StickyListHeadersListView.setOnItemClickListener怎麽用?Java StickyListHeadersListView.setOnItemClickListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在se.emilsjolander.stickylistheaders.StickyListHeadersListView的用法示例。


在下文中一共展示了StickyListHeadersListView.setOnItemClickListener方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setContentView(R.layout.addresses);

    AddressCache.initialize(this);
    CollectionCache.initialize(this);
    UserAddressCache.initialize(this);

    clearCachedIfRequired();

    lv = (StickyListHeadersListView) findViewById(R.id.stickyheaderslistview);
    lv.setOnItemClickListener(new OnItemClickListener() {
        public void onItemClick(AdapterView<?> av, View view, int i, long l) {
            submitAddress(i);
        }
    });
}
 
開發者ID:wpinnoo,項目名稱:GarbageCalendar,代碼行數:20,代碼來源:AddressListActivity.java

示例3: initViews

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //導入方法依賴的package包/類
@SuppressLint("InflateParams")
private void initViews(View view) {
    mEmptyView = (EmptyLayout) view.findViewById(R.id.error_layout);
    mListView = (StickyListHeadersListView) view
            .findViewById(R.id.listview);
    mListView.setOnScrollListener(mScrollListener);
    mListView.setOnItemClickListener(this);
    View header = LayoutInflater.from(getActivity()).inflate(
            R.layout.v2_list_header_user_center, null);
    mIvAvatar = (ImageView) header.findViewById(R.id.iv_avatar);
    mTvName = (TextView) header.findViewById(R.id.tv_name);
    mTvFollowing = (TextView) header.findViewById(R.id.tv_following_count);
    mTvFollower = (TextView) header.findViewById(R.id.tv_follower_count);
    mTvLastestLoginTime = (TextView) header
            .findViewById(R.id.tv_latest_login_time);

    mBtnPrivateMsg = (TextView) header
            .findViewById(R.id.tv_private_message);
    mBtnPrivateMsg.setOnClickListener(this);
    mBtnFollowUser = (TextView) header.findViewById(R.id.tv_follow_user);
    mBtnFollowUser.setOnClickListener(this);

    mListView.addHeaderView(header);

    if (mAdapter == null) {
        mAdapter = new UserCenterAdapter(this);

        mState = STATE_REFRESH;
        mEmptyView.setErrorType(EmptyLayout.NETWORK_LOADING);
        sendGetUserInfomation();
    }
    mListView.setAdapter(mAdapter);
}
 
開發者ID:blueelwang,項目名稱:oschina-app,代碼行數:34,代碼來源:UserCenterFragment.java

示例4: initViews

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //導入方法依賴的package包/類
@SuppressLint("InflateParams")
private void initViews(View view) {
	mEmptyView = (EmptyLayout) view.findViewById(R.id.error_layout);
	mListView = (StickyListHeadersListView) view
			.findViewById(R.id.listview);
	mListView.setOnScrollListener(mScrollListener);
	mListView.setOnItemClickListener(this);
	View header = LayoutInflater.from(getActivity()).inflate(
			R.layout.v2_list_header_user_center, null);
	mIvAvatar = (ImageView) header.findViewById(R.id.iv_avatar);
	mTvName = (TextView) header.findViewById(R.id.tv_name);
	mTvFollowing = (TextView) header.findViewById(R.id.tv_following_count);
	mTvFollower = (TextView) header.findViewById(R.id.tv_follower_count);
	mTvLastestLoginTime = (TextView) header
			.findViewById(R.id.tv_latest_login_time);

	mBtnPrivateMsg = (TextView) header
			.findViewById(R.id.tv_private_message);
	mBtnPrivateMsg.setOnClickListener(this);
	mBtnFollowUser = (TextView) header.findViewById(R.id.tv_follow_user);
	mBtnFollowUser.setOnClickListener(this);

	mListView.addHeaderView(header);

	if (mAdapter == null) {
		mAdapter = new UserCenterAdapter(this);

		mState = STATE_REFRESH;
		mEmptyView.setErrorType(EmptyLayout.NETWORK_LOADING);
		sendGetUserInfomation();
	}
	mListView.setAdapter(mAdapter);
}
 
開發者ID:447491480,項目名稱:ima_intellj,代碼行數:34,代碼來源:UserCenterFragment.java

示例5: 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

示例6: 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

示例7: 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

示例8: setUpLicenseListView

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //導入方法依賴的package包/類
public void setUpLicenseListView() {
    StickyListHeadersListView list = findViewById(R.id.list_license);
    list.addHeaderView(LayoutInflater.from(getContext()).inflate(R.layout.list_header_license, null, false));
    list.setAdapter(new LicenseListAdapter(getContext()));
    list.setOnItemClickListener(this);
}
 
開發者ID:KeithYokoma,項目名稱:LGTMCamera,代碼行數:7,代碼來源:LicenseListHelper.java


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