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