本文整理汇总了Java中android.support.v7.widget.GridLayoutManager.setSmoothScrollbarEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java GridLayoutManager.setSmoothScrollbarEnabled方法的具体用法?Java GridLayoutManager.setSmoothScrollbarEnabled怎么用?Java GridLayoutManager.setSmoothScrollbarEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v7.widget.GridLayoutManager
的用法示例。
在下文中一共展示了GridLayoutManager.setSmoothScrollbarEnabled方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onViewCreated
import android.support.v7.widget.GridLayoutManager; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mEmptyTxt = (TextView) view.findViewById(R.id.empty_txt);
mRecycleView = (RecyclerView) view.findViewById(R.id.media_recycleview);
mLoadingView = (ProgressBar) view.findViewById(R.id.loading);
GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), GRID_COUNT);
gridLayoutManager.setSmoothScrollbarEnabled(true);
mRecycleView.setLayoutManager(gridLayoutManager);
mRecycleView.addItemDecoration(new SpacesItemDecoration(getResources().getDimensionPixelOffset(R.dimen.boxing_media_margin), GRID_COUNT));
mRecycleView.setAdapter(mMediaAdapter);
mRecycleView.addOnScrollListener(new ScrollListener());
mMediaAdapter.setOnMediaClickListener(new OnMediaClickListener());
mMediaAdapter.setOnCameraClickListener(new OnCameraClickListener());
view.findViewById(R.id.finish_txt).setOnClickListener(this);
}
示例2: initRecycleView
import android.support.v7.widget.GridLayoutManager; //导入方法依赖的package包/类
private void initRecycleView() {
GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), GRID_COUNT);
gridLayoutManager.setSmoothScrollbarEnabled(true);
mRecycleView.setLayoutManager(gridLayoutManager);
mRecycleView.addItemDecoration(new SpacesItemDecoration(getResources().getDimensionPixelOffset(R.dimen.boxing_media_margin), GRID_COUNT));
mMediaAdapter.setOnCameraClickListener(new OnCameraClickListener());
mMediaAdapter.setOnCheckedListener(new OnMediaCheckedListener());
mMediaAdapter.setOnMediaClickListener(new OnMediaClickListener());
mRecycleView.setAdapter(mMediaAdapter);
mRecycleView.addOnScrollListener(new ScrollListener());
}
示例3: initRecyclerView
import android.support.v7.widget.GridLayoutManager; //导入方法依赖的package包/类
private void initRecyclerView() {
GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), GRID_COUNT);
gridLayoutManager.setSmoothScrollbarEnabled(true);
photoRecyclerView.setLayoutManager(gridLayoutManager);
photoRecyclerView.addItemDecoration(new SpacesItemDecoration(getResources().getDimensionPixelOffset(com.bilibili.boxing_impl.R.dimen.media_margin), GRID_COUNT));
mediaAdapter.setOnMediaClickListener(new OnMediaClickListener());
photoRecyclerView.setAdapter(mediaAdapter);
}
示例4: initView
import android.support.v7.widget.GridLayoutManager; //导入方法依赖的package包/类
private void initView() {
tvItemPurpose.setText(appAutoDeploy.getPurpose());
tvItemNumber.setText(appAutoDeploy.getChangeNo());
tvItemPeople.setText(appAutoDeploy.getProposer());
tvItemStartTime.setText(
FormatUtlis.getStringFormatTime(appAutoDeploy.getStartTime(), "MM/dd HH:mm"));
tvItemEndTime.setText(
FormatUtlis.getStringFormatTime(appAutoDeploy.getEndTime(), "MM/dd HH:mm"));
tvItemName.setText(appAutoDeploy.getBusinessName());
List<BAutoDeployInfo> displayInfo = appAutoDeploy.getDisplayInfo();
for (int i = 0; i < displayInfo.size(); i++) {
ip += displayInfo.get(i).getIp();
if (i == displayInfo.size() - 1) {
} else {
ip += displayInfo.get(i).getIp() + ";";
}
name += displayInfo.get(i).getScriptName();
if (i == displayInfo.size() - 1) {
} else {
name += displayInfo.get(i).getScriptName() + ";";
}
}
tvItemIp.setText(ip);
ReleaseAppItem2RecyclerViewAdapter releaseAppItemRecyclerViewAdapter =
new ReleaseAppItem2RecyclerViewAdapter(getActivity(), displayInfo);
GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 2);
gridLayoutManager.setSmoothScrollbarEnabled(true);
gridLayoutManager.setAutoMeasureEnabled(true);
rvApp.setLayoutManager(gridLayoutManager);
rvApp.setHasFixedSize(true);
rvApp.setNestedScrollingEnabled(false);
rvApp.setAdapter(releaseAppItemRecyclerViewAdapter);
rvApp.setFocusable(false);
refreshLayout.setEnableLoadmore(false);
refreshLayout.setEnableRefresh(false);
//List<String> stringList = new ArrayList<>();
//for (int i = 0; i < 15; i++) {
// stringList.add("测试数据" + i);
//}
detaillog = appAutoDeploy.getDetaillog();
releaseStatusRecyclerViewAdapter =
new ReleaseStatusRecyclerViewAdapter(getActivity(), detaillog);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
linearLayoutManager.setSmoothScrollbarEnabled(true);
linearLayoutManager.setAutoMeasureEnabled(true);
recyclerView.setBackgroundColor(getResources().getColor(R.color.black));
recyclerView.setLayoutManager(linearLayoutManager);
recyclerView.setHasFixedSize(true);
recyclerView.setNestedScrollingEnabled(false);
recyclerView.setAdapter(releaseStatusRecyclerViewAdapter);
recyclerView.setFocusable(false);
}