本文整理汇总了Java中me.yokeyword.indexablerv.IndexableLayout类的典型用法代码示例。如果您正苦于以下问题:Java IndexableLayout类的具体用法?Java IndexableLayout怎么用?Java IndexableLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IndexableLayout类属于me.yokeyword.indexablerv包,在下文中一共展示了IndexableLayout类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initView
import me.yokeyword.indexablerv.IndexableLayout; //导入依赖的package包/类
private void initView() {
mDatas = FileUtil.getLocalIndexMusics(FindIndexMusicAty.this.getContentResolver());
titleBackIBtn = (ImageButton) findViewById(R.id.title_music_left_imv);
mProgressBar = (ProgressBar) findViewById(R.id.find_index_music_pbar);
mCurrMusicAlbumImv = (ImageView) findViewById(R.id.find_music_album_imv);
mCurrMusicTitleTv = (MarqueeTextView) findViewById(R.id.item_music_title_tv);
mCurrMusicTitleTv.setEllipsize(TextUtils.TruncateAt.MARQUEE);
mCurrMusicTitleTv.setSingleLine(true);
mCurrMusicArtistTv = (TextView) findViewById(R.id.item_music_artist_tv);
mCurrMusicPlayOrPauseIBtn = (ImageButton) findViewById(R.id.find_music_play_ibtn);
mCurrMusicDetailIBtn = (ImageButton) findViewById(R.id.find_music_detail_ibtn);
mCurrMusicNextIBtn = (ImageButton) findViewById(R.id.find_music_next_ibtn);
// mSeekBar = (SeekBar) findViewById(R.id.find_music_seekbar);
// mSeekBar.setProgress(mMediaPlayer.getCurrentPosition());
// mSeekBar.setMax(mMediaPlayer.getDuration());
mIndexableLayout = (IndexableLayout) findViewById(R.id.find_music_indexableLayout);
mProgressBar.setVisibility(View.VISIBLE);
mFindIndexMusicAdapter = new FindIndexMusicAdapter(this);
mIndexableLayout.setAdapter(mFindIndexMusicAdapter);
mFindIndexMusicAdapter.setDatas(mDatas, new IndexableAdapter.IndexCallback<MusicEntity>() {
@Override
public void onFinished(List<MusicEntity> datas) {
mProgressBar.setVisibility(View.GONE);
}
});
// mIndexableLayout.setOverlayStyle_MaterialDesign(R.color.colorAccent);
// 快速排序。 排序规则设置为:只按首字母 (默认全拼音排序) 效率很高,是默认的10倍左右。 按需开启~
mIndexableLayout.setFastCompare(true);
initFirstRunEvent();
}
示例2: onCreate
import me.yokeyword.indexablerv.IndexableLayout; //导入依赖的package包/类
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pick_city);
// getSupportActionBar().setTitle("选择城市");
getCity();
mSearchFragment = (SearchFragment) getSupportFragmentManager().findFragmentById(R.id.search_fragment);
indexableLayout = (IndexableLayout) findViewById(R.id.indexableLayout);
mSearchView = (SearchView) findViewById(R.id.searchview);
mProgressBar = (FrameLayout) findViewById(R.id.progress);
}