imageview 的问题 整了好久没解决 sdk版本问题 看看你imageview的属性和设置图片的代码 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 谢谢sa兄,<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:orientation="vertical" > <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="#00ffffff" ----这个行加跟不加没变化 android:src="@drawable/rpt" /> <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" /></LinearLayout>public View getView(int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub int pic; View view; if(convertView==null){ LayoutInflater layoutInflater = LayoutInflater.from(m_context); view = layoutInflater.inflate(R.layout.tab_item_view, null); //view.setAlpha(0); //view.setBackgroundColor(Color.TRANSPARENT); } else view = convertView; //parent.setBackgroundColor(Color.TRANSPARENT); ImageView imageView = (ImageView)view.findViewById(R.id.imageView1); if (imageView != null) { try { pic=Integer.parseInt(m_pc.get(position)); } catch (Exception e) { pic=0; } imageView.setImageResource(m_piclist[pic%m_piclist.length]); } TextView textView = (TextView) view.findViewById(R.id.textView1); textView.setText(m_name.get(position)); textView.setTextColor(Color.BLACK); return view; } [求支招]如何构建高稳定性Android多人在线棋牌类游戏,不管是新手老手都感谢能够进来分享一下! 一个超简单的新手问题 Android点击键盘后弹出点击内容的悬浮框是怎么实现的? android数据库访问 调用系统照相机照相 android GPS函数问题 安卓关于上传文件到服务器 调用相机,能扫描识别PDF417的二维码吗? 如何用纯java代码通过GridView实现跨多行多列 关于Java线程同步问题 Android没有SD卡怎么实现自动更新? android 全屏问题
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical" > <ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#00ffffff" ----这个行加跟不加没变化
android:src="@drawable/rpt" /> <TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" /></LinearLayout>public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
int pic;
View view;
if(convertView==null){
LayoutInflater layoutInflater = LayoutInflater.from(m_context);
view = layoutInflater.inflate(R.layout.tab_item_view, null);
//view.setAlpha(0);
//view.setBackgroundColor(Color.TRANSPARENT);
} else
view = convertView;
//parent.setBackgroundColor(Color.TRANSPARENT);
ImageView imageView = (ImageView)view.findViewById(R.id.imageView1);
if (imageView != null)
{
try {
pic=Integer.parseInt(m_pc.get(position));
} catch (Exception e) {
pic=0;
}
imageView.setImageResource(m_piclist[pic%m_piclist.length]);
}
TextView textView = (TextView) view.findViewById(R.id.textView1);
textView.setText(m_name.get(position));
textView.setTextColor(Color.BLACK);
return view;
}