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

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

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

GridView.setSelected介绍

暂无

代码示例

代码示例来源:origin: daimajia/AndroidSwipeLayout

adapter.setMode(Attributes.Mode.Multiple);
gridView.setAdapter(adapter);
gridView.setSelected(false);
gridView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
  @Override

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

public class FragmentOrder extends Fragment {

  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    //View view = inflater.inflate(R.layout.g, null);
    View view = inflater.inflate(R.layout.gridview,null);
    final GridView listView = (GridView) view.findViewById(R.id.mainGrid);
    final OrderGridViewAdapter adapter = new OrderGridViewAdapter(MainActivity.this)
    listView.setAdapter(adapter);
    //int setSelected = 0;
    listView.setSelected(true);

    listView.setOnItemClickListener(new OnItemClickListener() {
      @Override
      public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
        adapter.onItemSelect(arg0, arg1, arg2, arg3);
      }
    });
    return view;
  }
}

代码示例来源:origin: evilbinary/TvWidget

gridView.setSelected(false);
gridView.setFocusable(false);

相关文章

GridView类方法