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


Java StickyListHeadersListView类代码示例

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


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

示例1: onCreate

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_demo_main);
    mList = (StickyListHeadersListView)findViewById(R.id.list);
    mList.setAreHeadersSticky(true);
    AsyncTask<Void,Void,Void> asyncTask = new AsyncTask<Void, Void, Void>() {
        @Override
        protected Void doInBackground(Void... voids) {
            fetchPhoneContacts();
            return null;
        }

        @Override
        protected void onPostExecute(Void aVoid) {
            mList.setAdapter(new DemoListAdapter(DemoMainActivity.this,mContacts));
        }
    };
    asyncTask.execute();

}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:22,代码来源:DemoMainActivity.java

示例2: onCreateView

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入依赖的package包/类
@Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
          Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_all_track_list, container, false);

vFoldingPaneLayout = (FoldingPaneLayout) view.findViewById(R.id.vFoldingPaneLayout);
vLeftMenu = (MainFoldingView) view.findViewById(R.id.vLeftMenu);
lvTracks = (StickyListHeadersListView) view.findViewById(R.id.lvTracks);
lyTooltipframe = (ToolTipRelativeLayout) view.findViewById(R.id.lyTooltipframe);
      emptyView = view.findViewById(R.id.emptyView);
   
   strM = getResources().getString(R.string.strM);
strKm = getResources().getString(R.string.strKm);
strRecording = getResources().getString(R.string.strRecording);
   // TODO Use "injected" views...
setupView();
   return view;
  }
 
开发者ID:jp1017,项目名称:TheSceneryAlong,代码行数:19,代码来源:AllTrackListFragment.java

示例3: getHeaderView

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入依赖的package包/类
@Override
public View getHeaderView(int position, View convertView, ViewGroup parent) {
    if(convertView == null){
        convertView = LayoutInflater.from(getActivity())
                .inflate(R.layout.item_selection_all_tracks, null);
    }

    //?????不加会报空指针
    convertView.setLayoutParams(new StickyListHeadersListView.LayoutParams(
            StickyListHeadersListView.LayoutParams.MATCH_PARENT,
            StickyListHeadersListView.LayoutParams.WRAP_CONTENT));

    convertView.setBackgroundColor(getResources().getColor(COLORS[position%COLORS.length]));

    String sl = TrackUtil.getListSelection(tracks.tracks.get(position));
    ((TextView)convertView).setText(sl);

    return convertView;
}
 
开发者ID:jp1017,项目名称:TheSceneryAlong,代码行数:20,代码来源:AllTrackListFragment.java

示例4: initData

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入依赖的package包/类
private void initData() {
    StickyListHeadersListView listView = (StickyListHeadersListView) findViewById(R.id.lv_datas);
    MainListDataAdapter mainListDataAdapter = new MainListDataAdapter(this);
    if (listView != null) {
        listView.setAdapter(mainListDataAdapter);
    }
    List<IMainListData> mainListDatas = MainListDataFactory.getInstance().getMainListDatas();

    Collections.sort(mainListDatas, new Comparator<IMainListData>() {
        @Override
        public int compare(IMainListData lhs, IMainListData rhs) {

            int result = lhs.getMainTitle() - rhs.getMainTitle();
            if (result == 0) {
                result = lhs.getSubTitle() - rhs.getSubTitle();
            }
            return result;
        }
    });

    mainListDataAdapter.setDataList(mainListDatas);
}
 
开发者ID:ArtTriumph,项目名称:RxJavaDemo,代码行数:23,代码来源:MainListActivity.java

示例5: initDatabaseDependentViews

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入依赖的package包/类
@Override
public void initDatabaseDependentViews() {
    Student student = UnicapApplication.getCurrentStudent();

    List<SubjectTest> subjectTests = student.getSubjectTestsOrdered();

    if (subjectTests.size() == 0) {
        setContentView(R.layout.content_empty_calendar);
        return;
    }

    StickyListHeadersListView subjectCalendarListView = (StickyListHeadersListView) getContentView().findViewById(R.id.calendar_list);

    SubjectCalendarListItemAdapter subjectCalendarListItemAdapter = new SubjectCalendarListItemAdapter(subjectTests, getActivity());

    subjectCalendarListView.setAdapter(subjectCalendarListItemAdapter);
}
 
开发者ID:gabrielduque,项目名称:unicap,代码行数:18,代码来源:CalendarFragment.java

示例6: afterViews

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入依赖的package包/类
@AfterViews
void afterViews()
{
    oneAdapter = new OneAdapter(this);
    onelist.setAdapter( oneAdapter );
    onelist.setAnimExecutor( new AnimationExecutor() );
    onelist.setOnHeaderClickListener( new StickyListHeadersListView.OnHeaderClickListener()
    {
        @Override
        public void onHeaderClick( StickyListHeadersListView l,View header,int itemPosition,long headerId,boolean currentlySticky )
        {
            if ( onelist.isHeaderCollapsed( headerId ) )
            {
                onelist.expand( headerId );
            }
            else
            {
                onelist.collapse( headerId );
            }
        }
    } );
}
 
开发者ID:amar19860330,项目名称:amar-android-demo,代码行数:23,代码来源:ExpandList3Activity.java

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

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

示例9: updateView

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入依赖的package包/类
private void updateView() {
//        sF();
        if (talk.size() == 0 || client.getTimeout() > 10000) {
            LOGD(TAG, "adapter " + adapter.getCount());
            LOGD(TAG, "talk " + talk.size());

            empty.setVisibility(TextView.VISIBLE);
            mProgressBar.setVisibility(ProgressBar.GONE);
            stickyList.setVisibility(StickyListHeadersListView.GONE);

        } else {
            empty.setVisibility(TextView.GONE);
            mProgressBar.setVisibility(ProgressBar.GONE);
            stickyList.setVisibility(StickyListHeadersListView.VISIBLE);
        }
    }
 
开发者ID:DevConMyanmar,项目名称:devcon-android-2013,代码行数:17,代码来源:ScheduleFragment.java

示例10: onStickyHeaderOffsetChanged

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入依赖的package包/类
@Override
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void onStickyHeaderOffsetChanged(StickyListHeadersListView l, View header, int offset) {
    if (fadeHeader && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        header.setAlpha(1 - (offset / (float) header.getMeasuredHeight()));
    }
}
 
开发者ID:soulrelay,项目名称:StickyListHeadersWithRefreshAndLoadMore,代码行数:8,代码来源:TestActivity.java

示例11: onStickyHeaderChanged

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入依赖的package包/类
@Override
public void onStickyHeaderChanged(StickyListHeadersListView stickyListHeadersListView, View header, int position, long headerId) {
    Log.d(LOG_TAG, String.format("onStickyHeaderChanged, position = %d, headerId = %d", position, headerId));

    if (CalendarManager.getInstance().getEvents().size() > 0) {
        CalendarEvent event = CalendarManager.getInstance().getEvents().get(position);
        if (event != null) {
            mCalendarView.scrollToDate(event);
            mCalendarPickerController.onScrollToDate(event.getInstanceDay());
        }
    }
}
 
开发者ID:jgabrielfreitas,项目名称:Agenda,代码行数:13,代码来源:AgendaCalendarView.java

示例12: IndexScroller

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入依赖的package包/类
public IndexScroller(Context context, StickyListHeadersListView lv) {
	mDensity = context.getResources().getDisplayMetrics().density;
	mScaledDensity = context.getResources().getDisplayMetrics().scaledDensity;
	mListView = lv;
	setAdapter(mListView.getAdapter());
	
	mIndexbarWidth = 20 * mDensity;
	mIndexbarMargin = 10 * mDensity;
	mPreviewPadding = 5 * mDensity;
}
 
开发者ID:tengbinlive,项目名称:info_demo,代码行数:11,代码来源:IndexScroller.java

示例13: initViews

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入依赖的package包/类
@Override
protected void initViews() {
    setContentView(R.layout.activity_register_doctor_schedule);
    initTitleAndSubTitle();
    lvSticky = (StickyListHeadersListView) this.findViewById(R.id.lv);

}
 
开发者ID:mjd507,项目名称:zsyy,代码行数:8,代码来源:RegisterDoctorScheduleActivity.java

示例14: attachToListView

import se.emilsjolander.stickylistheaders.StickyListHeadersListView; //导入依赖的package包/类
public void attachToListView(@NonNull StickyListHeadersListView listView) {
    AbsListViewScrollDetectorImpl scrollDetector = new AbsListViewScrollDetectorImpl();
    scrollDetector.setScrollDirectionListener(null);
    scrollDetector.setOnScrollListener(null);
    scrollDetector.setListView(listView.getWrappedList());
    scrollDetector.setScrollThreshold(getResources().getDimensionPixelOffset(R.dimen.fab_scroll_threshold));
    listView.setOnScrollListener(scrollDetector);
}
 
开发者ID:nikitin-da,项目名称:sticky-dictionary,代码行数:9,代码来源:CustomFloatingActionButton.java

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


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