当前位置: 首页>>代码示例>>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;未经允许,请勿转载。