本文整理了Java中android.widget.GridView.getSelectedItemPosition()
方法的一些代码示例,展示了GridView.getSelectedItemPosition()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GridView.getSelectedItemPosition()
方法的具体详情如下:
包路径:android.widget.GridView
类名称:GridView
方法名:getSelectedItemPosition
暂无
代码示例来源:origin: arnabc/simplelauncher
/**
* Get the position of the currently selected grid item.
*/
public int getSelectedItemPosition() {
ensureGrid();
return mGrid.getSelectedItemPosition();
}
代码示例来源:origin: sphinx02/AppStarter
final AppInfo appInfo = (AppInfo) ((InstalledAppsAdapter) mGridView.getAdapter()).getItem(mGridView.getSelectedItemPosition());
final AppSettingsOverlayDialog appSettingsDialog = newInstance(appInfo);
代码示例来源:origin: MoMoWait/LeanbackLauncher
}else if(keyCode == KeyEvent.KEYCODE_DPAD_UP){
int numCols = mAllAppGridView.getNumColumns();
int selectedPosition = mAllAppGridView.getSelectedItemPosition();
if(selectedPosition / numCols == 0)
return true;
}else if(keyCode == KeyEvent.KEYCODE_DPAD_RIGHT){
int selectedPosition = mAllAppGridView.getSelectedItemPosition();
if(selectedPosition == mAllAppGridView.getAdapter().getCount() - 1)
return true;
内容来源于网络,如有侵权,请联系作者删除!