本文整理汇总了Java中android.support.v7.widget.GridLayoutManager.setAutoMeasureEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java GridLayoutManager.setAutoMeasureEnabled方法的具体用法?Java GridLayoutManager.setAutoMeasureEnabled怎么用?Java GridLayoutManager.setAutoMeasureEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v7.widget.GridLayoutManager
的用法示例。
在下文中一共展示了GridLayoutManager.setAutoMeasureEnabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}