android.widget.ListView.setClickable()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(167)

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

ListView.setClickable介绍

暂无

代码示例

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

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);
ListView people = (ListView)findViewById(R.id.peopleList);
if(PeepList.size() != 0)
  UpdateList();
people.setClickable(true);
people.setOnItemClickListener(new OnItemClickListener() {
  @Override
  public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
    if(pos == 0){

    }
    if(pos == 1){
      PeepList.remove(position);
    }
  }
});
}

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

ListView list = (ListView)findViewById(R.id.custom_list);
list.setClickable(true);
list.setOnItemClickListener(this);
list.setAdapter(new CustomListAdapter(getApplicationContext(), listItems));

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

ListView listView = (ListView) findViewById(R.id.yourListViewId);
listView.setItemsCanFocus(true);
listView.setClickable(false);

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

sceltadieta = (ListView) findViewById(R.id.scelta_dieta);
sceltadieta.setAdapter(sca);
sceltadieta.setClickable(true);
sceltadieta.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  @SuppressWarnings("deprecation")

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

listView.setClickable(true);

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

lv.setClickable(true);
lv.setEnabled(true);
lv.setChoiceMode(ListView.CHOICE_MODE_SINGLE);

代码示例来源:origin: lessthanoptimal/BoofAndroidDemo

textMessage = findViewById(R.id.text_message);
listView.setClickable(true);
listView.setOnItemClickListener((adapterView, view, position, l) -> {
  QrCode qr = qrcodes.get(position);

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
             final Bundle savedInstanceState) {
  setHasOptionsMenu(true);
  View root = inflater.inflate(R.layout.fragment_service_list_viewer, container, false);
  mListAdapter = new ServiceListAdapter(getActivity(), getProvider(), false);
  ListView listView = (ListView) root.findViewById(R.id.activity_fabo_service_list_view);
  listView.setAdapter(mListAdapter);
  listView.setItemsCanFocus(true);
  listView.setClickable(true);
  listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
    @Override
    public void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) {
      Object service = mListAdapter.getItem(position);
      if (service instanceof VirtualService) {
        openVirtualServiceActivity((VirtualService) service);
      }
    }
  });
  Button newServiceButton = (Button) root.findViewById(R.id.activity_fabo_service_add_btn);
  newServiceButton.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(final View v) {
      openVirtualServiceActivity(null);
    }
  });
  return root;
}

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

mListView.setAdapter(mListAdapter);
mListView.setItemsCanFocus(true);
mListView.setClickable(true);
mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  @Override

代码示例来源:origin: DeviceConnect/DeviceConnect-Android

listView.setAdapter(mListAdapter);
listView.setItemsCanFocus(true);
listView.setClickable(true);
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  @Override

代码示例来源:origin: apps4av/avare

mNearest.setClickable(true);
mNearest.setDividerHeight(10);
mNearest.setOnItemClickListener(new OnItemClickListener() {

代码示例来源:origin: sphinx02/AppStarter

mListView.setFocusable(false);
mListView.setFocusableInTouchMode(false);
mListView.setClickable(false);

代码示例来源:origin: PhilippC/keepass2android

R.layout.kp2a_textview,
    itemNames));
listview.setClickable(true);
listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  @Override

代码示例来源:origin: apps4av/avare

mAirportView.setClickable(false);
mAirportView.setDividerHeight(10);
TypeValueAdapter tvAdapter = new TypeValueAdapter(AirportActivity.this, views, values, categories, mPref.isNightMode());

相关文章

ListView类方法