本文整理匯總了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);
}