android.widget.ImageView.setFocusableInTouchMode()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(129)

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

ImageView.setFocusableInTouchMode介绍

暂无

代码示例

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

public View getView(int position, View covertView, ViewGroup parent) {
   LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
   View rowView = inflater.inflate(R.layout.cat_select, parent, false);
   TextView textView = (TextView) rowView.findViewById(R.id.cat_name);
   Category catToDisplay = categories.get(position);
   textView.setText(catToDisplay.getName());
   if(catToDisplay.isParent()) {
     ImageView imageView = (ImageView) rowView.findViewById(R.id.cstrow_cat_expand);
     imageView.setImageResource(R.drawable.cat_expand);
     imageView.setOnClickListener(categoryExpandClickHandler);
     imageView.setOnTouchListener(categoryExpandTouchHandler);
     imageView.setFocusable(false); // to make sure the highlight on the item shows
     imageView.setFocusableInTouchMode(false); // to make sure the highlight on the item shows
     imageView.setTag(catToDisplay);
   }
   return rowView;
 }

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

fuzz_graphic.setFocusableInTouchMode(false);
return true;

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

imageView.setFocusableInTouchMode(false);
imageView.setClickable(true);
imageView.setOnClickListener(new View.OnClickListener() {

代码示例来源:origin: AlexMofer/ProjectX

mIcon.setBackgroundDrawable(null);
mIcon.setFocusable(false);
mIcon.setFocusableInTouchMode(false);
mIcon.setPadding(paddingIcon, 0, paddingIcon, 0);
mIcon.setScaleType(ImageView.ScaleType.CENTER_INSIDE);

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

imageView.setFocusableInTouchMode(false);
imageView.setClickable(true);
imageView.setOnClickListener(new View.OnClickListener() {

代码示例来源:origin: Hankkin/GradationTitleBar

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  getWindow().requestFeature(Window.FEATURE_NO_TITLE);
  StatusBarUtil.setImgTransparent(this);
  setContentView(R.layout.activity_qqspeak);
  scrollView = (GradationScrollView) findViewById(R.id.scrollview);
  listView = (ListView) findViewById(R.id.listview);
  textView = (TextView) findViewById(R.id.textview);
  ivBanner = (ImageView) findViewById(R.id.iv_banner);
  ivBanner.setFocusable(true);
  ivBanner.setFocusableInTouchMode(true);
  ivBanner.requestFocus();
  initListeners();
  initData();
}

相关文章

ImageView类方法