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

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

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

GridView.setDrawSelectorOnTop介绍

暂无

代码示例

代码示例来源:origin: Flipboard/bottomsheet

tileGrid.setDrawSelectorOnTop(true);
tileGrid.setVerticalSpacing(spacing);
tileGrid.setHorizontalSpacing(spacing);

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

GridView gvCalender = (GridView)findViewById(R.id.gv_calender);
CalendarAdapter adapter = new CalendarAdapter(getActivity(), lsCalender);
 gvCalender.setDrawSelectorOnTop(false);
 gvCalender.setAdapter(adapter);

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

@Override
  public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id)
  {
    // Get packagename of the app to be started
    mMovingApp[0] = (AppInfo) parent.getAdapter().getItem(position);
    mGridView.setDrawSelectorOnTop(true);
    mGridView.invalidate();
    Toast.makeText(getActivity(), getActivity().getResources().getString(R.string.MoveAppAndClickToDrop), Toast.LENGTH_SHORT).show();
    return true;
  }
});

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

@Override
  public void onActionClicked(ActionEnum action)
  {
    Log.d("AppSettingsAction", "Clicked action: " + action.toString());
    // Close dialog and evaluate click event:
    appSettingsDialog.dismiss();
    switch (action)
    {
      case SORT:
        // Get packagename of the app to be started
        mMovingApp[0] = appInfo;
        mGridView.setDrawSelectorOnTop(true);
        mGridView.invalidate();
        Toast.makeText(getActivity(), getActivity().getResources().getString(R.string.MoveAppAndClickToDropWhenStartedByMenu), Toast.LENGTH_SHORT).show();
        break;
      case SETTINGS:
        AppStarter.startSettingsViewByPackageName(AppActivity.this.getActivity(), appInfo.packageName);
        break;
      default:
        // Do nothing by default
    }
  }
});

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

@Override
public boolean onBackPressed()
{
  boolean retVal = false;
  if(mMovingApp[0] != null)
  {
    // Stop moving without saving the order
    mMovingApp[0] = null;
    mGridView.setDrawSelectorOnTop(false);
    mGridView.invalidate();
    // Restore old order
    InstalledAppsAdapter actAdapter = (InstalledAppsAdapter)mGridView.getAdapter();
    actAdapter.loadInstalledApps();
    actAdapter.notifyDataSetChanged();
    retVal = true;
  }
  return retVal;
}

代码示例来源:origin: arnabc/simplelauncher

lv.setDrawSelectorOnTop(false);
lv.setColumnWidth(convertDpToPixels(60, getActivity()));
lv.setStretchMode(GridView.STRETCH_COLUMN_WIDTH);

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

public void onItemClick(AdapterView<?> parent, View v, int position, long id)
  {
    if (mMovingApp[0] != null)
    {
      // Stop moving
      mMovingApp[0] = null;
      mGridView.setDrawSelectorOnTop(false);
      mGridView.invalidate();
      // Save current order
      InstalledAppsAdapter actAdapter = (InstalledAppsAdapter) parent.getAdapter();
      actAdapter.storeNewPackageOrder();
    } else
    {
      // Get packagename of the app to be started
      String packageName = ((AppInfo) parent.getAdapter().getItem(position)).packageName;
      // Now start app
      AppStarter.startAppByPackageName(getActivity(), packageName, false, false, false);
    }
  }
});

代码示例来源:origin: chengzichen/KrGallery

AndroidUtilities.dp(4));
listView.setClipToPadding(false);
listView.setDrawSelectorOnTop(true);
listView.setStretchMode(GridView.STRETCH_COLUMN_WIDTH);
listView.setHorizontalScrollBarEnabled(false);

相关文章

GridView类方法