大佬教程收集整理的这篇文章主要介绍了在4.1中的弹出窗口中无法在列表视图中选择行,但在Android 5.0中工作,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
<ListView android:id="@+id/lstSites" android:layout_width="fill_parent" android:layout_height="fill_parent" android:fastScrollEnabled="true" android:layout_margin="5dp" android:descendantFocusability="blocksDescendants"></ListView> </LinearLayout>
列表项目:
<LinearLayout xmlns:android="http://scheR_292_11845@as.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:descendantFocusability="blocksDescendants" android:focusable="false" android:focusableInTouchMode="false"> <ImageView android:id="@+id/thumbImage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" android:layout_marginRight="10dp" android:focusable="false" android:focusableInTouchMode="false"/> <TextView android:id="@+id/tvSite" android:textSize="20dp" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:text="Name" android:focusable="false" android:focusableInTouchMode="false"/>
添加行点击列表:
lstSiteMenu = (ListView) popupView.findViewById(R.id.lstSites); adapter = new MenuItemsAdapter(SiteActivity.this,arrMenu); // Attach the adapter to a ListView lstSiteMenu.setAdapter(adapter); lstSiteMenu.setOnItemClickListener(new AdapterView.onItemClickListener() { @Override public void onItemClick(AdapterView<?> parent,View view,final int position,long id) { }
以上是大佬教程为你收集整理的在4.1中的弹出窗口中无法在列表视图中选择行,但在Android 5.0中工作全部内容,希望文章能够帮你解决在4.1中的弹出窗口中无法在列表视图中选择行,但在Android 5.0中工作所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。