android.widget.GridView.setTag()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(165)

本文整理了Java中android.widget.GridView.setTag()方法的一些代码示例,展示了GridView.setTag()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GridView.setTag()方法的具体详情如下:
包路径:android.widget.GridView
类名称:GridView
方法名:setTag

GridView.setTag介绍

暂无

代码示例

代码示例来源:origin: HelloChenJinJun/TestChat

if (i == 0) {
    gridView.setAdapter(gridViewAdapter = new GridViewAdapter(this, emotionFaceList.subList(0, 21)));
    gridView.setTag(gridViewAdapter);
} else {
    gridView.setAdapter(mGridViewAdapter = new GridViewAdapter(this, emotionFaceList.subList(21, emotionFaceList.size())));
    gridView.setTag(mGridViewAdapter);

代码示例来源:origin: tdscientist/fluidCalendar

@Override
public Object instantiateItem(ViewGroup container, int position) {
  LayoutInflater inflater = LayoutInflater.from(context);
  LinearLayout layout = new LinearLayout(context);
  layout.setOrientation(LinearLayout.VERTICAL);
  layout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
  FlexibleCalendarGridAdapter adapter = dateAdapters.get(position);
  adapter.setOnDateClickListener(onDateCellItemClickListener);
  adapter.setMonthEventFetcher(monthEventFetcher);
  adapter.setCellViewDrawer(cellViewDrawer);
  GridView view = (GridView) inflater.inflate(R.layout.month_grid_layout, null);
  view.setTag(GRID_TAG_PREFIX + position);
  view.setAdapter(adapter);
  view.setVerticalSpacing(gridViewVerticalSpacing);
  view.setHorizontalSpacing(gridViewHorizontalSpacing);
  layout.addView(view);
  container.addView(layout);
  return layout;
}

代码示例来源:origin: p-v/FlexibleCalendar

@Override
public Object instantiateItem(ViewGroup container, int position) {
  LayoutInflater inflater = LayoutInflater.from(context);
  LinearLayout layout = new LinearLayout(context);
  layout.setOrientation(LinearLayout.VERTICAL);
  layout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
  FlexibleCalendarGridAdapter adapter = dateAdapters.get(position);
  adapter.setOnDateClickListener(onDateCellItemClickListener);
  adapter.setMonthEventFetcher(monthEventFetcher);
  adapter.setCellViewDrawer(cellViewDrawer);
  GridView view = (GridView) inflater.inflate(R.layout.month_grid_layout, null);
  view.setTag(GRID_TAG_PREFIX + position);
  view.setAdapter(adapter);
  view.setVerticalSpacing(gridViewVerticalSpacing);
  view.setHorizontalSpacing(gridViewHorizontalSpacing);
  layout.addView(view);
  container.addView(layout);
  return layout;
}

代码示例来源:origin: stackoverflow.com

gridView.setTag(GRIDVIEW_TAG);

相关文章

GridView类方法