Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
您现在的位置: Android教程網 >> Android系統教程 >  >> Android 技術 >> Android 開發實例

Android API 中文(74)——AdapterView.AdapterContextMenuInfo 解析

編輯:Android 開發實例

類別用途

AdapterView.AdapterContextMenuInfo 是 AdapterView 的靜態類別,實作 ContextMenu.ContextMenuInfo。它用於在顯示 AdapterView 的上下文選單時,提供額外的菜單資訊。

主要欄位

  • id:用於顯示上下文選單的子視圖所對應的列 ID。
  • position:該子視圖在適配器中的位置。
  • targetView:觸發上下文選單的子視圖,也是 AdapterView 的子視圖之一。

建構方式

可透過建構子 AdapterContextMenuInfo(View targetView, int position, long id) 建立物件,通常在 onCreateContextMenu 回調中取得並使用。

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © Android教程網 All Rights Reserved