use of com.hippo.easyrecyclerview.LinearDividerItemDecoration in project EhViewer by seven332.
the class DirExplorer method init.
private void init(Context context) {
mAdapter = new DirAdapter();
setAdapter(mAdapter);
setLayoutManager(new LinearLayoutManager(context));
LinearDividerItemDecoration decoration = new LinearDividerItemDecoration(LinearDividerItemDecoration.VERTICAL, getResources().getColor(R.color.divider), LayoutUtils.dp2pix(context, 1));
decoration.setShowLastDivider(true);
addItemDecoration(decoration);
setSelector(Ripple.generateRippleDrawable(context, false));
setOnItemClickListener(this);
mCurrentFile = Environment.getExternalStorageDirectory();
if (!Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) || mCurrentFile == null) {
mCurrentFile = new File("/");
}
updateFileList();
}
Aggregations