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