看看你imageview的属性和设置图片的代码
解决方案 »
- 各位大侠 ,微信中的“听首老歌”的页面怎样实现的???
- 谁能来看一下这代码为什么按左右键时会间隔响应?
- 如何根据Android源代码编译出可以在模拟器上运行的img
- 如何获取控件的宽度
- 请教下,GeoDiary2 那种浮动于activity上的ui怎么实现的
- eclipse有没有工具分析继承关系?
- 怎么对android里的应用进行隐藏,短信回密,文件夹加密,等相关管理权限。
- 请教AndroidManifest.xml中的Service的name和Action的name可以不一样?
- android开发中客户端数据上传到服务器上
- 小白求助,安卓软件编写
- 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;
}