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

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

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

ListView.setItemsCanFocus介绍

暂无

代码示例

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

final ListView list = (ListView) findViewById(R.id.list);
list.setItemsCanFocus(false);

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

ListView list = (ListView) findViewById(R.id.myList);
list.setAdapter(new DoubleClickAdapter(this));
list.setItemsCanFocus(true);

代码示例来源:origin: jjdxmashl/jjdxm_ijkplayer

/**
 * 显示分辨率列表
 */
private void showStreamSelectView() {
  this.streamSelectView.setVisibility(View.VISIBLE);
  if (!isForbidHideControlPanl) {
    ll_topbar.setVisibility(View.GONE);
    ll_bottombar.setVisibility(View.GONE);
  }
  this.streamSelectListView.setItemsCanFocus(true);
}

代码示例来源:origin: k9mail/k-9

@Override
public void onCreate(Bundle icicle) {
  super.onCreate(icicle);
  setResult(RESULT_CANCELED);
  setLayout(R.layout.account_list);
  ListView listView = getListView();
  listView.setOnItemClickListener(this);
  listView.setItemsCanFocus(false);
}

代码示例来源:origin: android-hacker/VirtualXposed

/**
   * Populates the UI ListView with the given list of items and selects an item
   * based on {@code mSelectedItemIndex} member variable.
   */
  private void populateUIAccountList(String[] listItems) {
    ListView list = (ListView) findViewById(android.R.id.list);
    list.setAdapter(new ArrayAdapter<>(this,
        android.R.layout.simple_list_item_single_choice, listItems));
    list.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
    list.setItemsCanFocus(false);
    list.setOnItemClickListener(
        new AdapterView.OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
            mSelectedItemIndex = position;
            mOkButton.setEnabled(true);
          }
        });
    if (mSelectedItemIndex != SELECTED_ITEM_NONE) {
      list.setItemChecked(mSelectedItemIndex, true);
      VLog.v(TAG, "List item " + mSelectedItemIndex + " should be selected");
    }
  }
}

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

aa = new DataItemAdapter(this, resID, dataItems);
dataListView.setAdapter(aa);
dataListView.setItemsCanFocus(true);

代码示例来源:origin: k9mail/k-9

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
  setLayout(R.layout.list_content_simple);
  getListView().setTextFilterEnabled(true);
  getListView().setItemsCanFocus(false);
  getListView().setChoiceMode(ListView.CHOICE_MODE_NONE);
  Intent intent = getIntent();
  String accountUuid = intent.getStringExtra(EXTRA_ACCOUNT);
  mAccount = Preferences.getPreferences(this).getAccount(accountUuid);
  adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1);
  setListAdapter(adapter);
  setupClickListeners();
}

代码示例来源:origin: k9mail/k-9

getListView().setItemsCanFocus(false);
getListView().setChoiceMode(ListView.CHOICE_MODE_NONE);
Intent intent = getIntent();

代码示例来源:origin: arcadefire/nice-spinner

listView.setItemsCanFocus(true);
listView.setVerticalScrollBarEnabled(false);
listView.setHorizontalScrollBarEnabled(false);

代码示例来源:origin: k9mail/k-9

ListView listView = getListView();
listView.setOnItemClickListener(this);
listView.setItemsCanFocus(false);
listView.setScrollingCacheEnabled(false);
registerForContextMenu(listView);

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

lv.setAdapter(ma);
lv.setOnItemClickListener(this); 
lv.setItemsCanFocus(false);
lv.setTextFilterEnabled(true);

代码示例来源:origin: xiaole0310/MyMusicPlayer

private void refreshListView() {
    musicPlayerService=myApplication.musicPlayerService;
    if (musicPlayerService!=null){
      musicPlayerService.pesition=-1;
    }
    songBySearch.setAdapter(myAdapter);
    songBySearch.setItemsCanFocus(false);
    listener= resetLickListener();
    songBySearch.setOnItemClickListener(listener);
//        myAdapter.notifyDataSetChanged();
  }

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

public class simple List extends ListActivity {

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  setListAdapter(new ArrayAdapter<String>(this,
      android.R.layout.simple_list_item_multiple_choice, GENRES));

  final ListView listView = getListView();

  listView.setItemsCanFocus(false);
  listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
}

private static final String[] GENRES = new String[] { "india", "england", "London", "New york", "New jercy", "LA", "Pakistan", "srilanka", "bangladesh", "chin", "Australia", "Japan" };}

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

public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setListAdapter(new ArrayAdapter<String>(this,
      android.R.layout.simple_list_item_multiple_choice, GENRES));
  final ListView listView = getListView();
  listView.setItemsCanFocus(false);
  listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
}

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

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

代码示例来源:origin: qiubiteme/android_api_demos

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setListAdapter(new ArrayAdapter<>(this,
      android.R.layout.simple_list_item_single_choice, GENRES));
  
  final ListView listView = getListView();
  listView.setItemsCanFocus(false);
  listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
}

代码示例来源:origin: li2/learning-android-open-source

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setListAdapter(new ArrayAdapter<String>(this,
      android.R.layout.simple_list_item_single_choice, GENRES));
  
  final ListView listView = getListView();
  listView.setItemsCanFocus(false);
  listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
}

代码示例来源:origin: li2/learning-android-open-source

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setListAdapter(new ArrayAdapter<String>(this,
      android.R.layout.simple_list_item_multiple_choice, GENRES));
  
  final ListView listView = getListView();
  listView.setItemsCanFocus(false);
  listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
}

代码示例来源:origin: qiubiteme/android_api_demos

@Override
public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setListAdapter(new ArrayAdapter<>(this,
      android.R.layout.simple_list_item_multiple_choice, GENRES));
  
  final ListView listView = getListView();
  listView.setItemsCanFocus(false);
  listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
}

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

@Override
public View onCreateView(final LayoutInflater inflater, final ViewGroup container,
    final Bundle savedInstanceState) {
  mDBHelper = new IRKitDBHelper(getActivity());
  mVirtualProfileAdapter = new VirtualProfileAdapter(getActivity(), createDeviceContainers());
  View rootView = inflater.inflate(R.layout.fragment_profilelist, container, false);
  mListView = (ListView) rootView.findViewById(R.id.listview_devicelist);
  mListView.setItemsCanFocus(true);
  mListView.setAdapter(mVirtualProfileAdapter);
  return rootView;
}

相关文章

ListView类方法