ImageView的不显示(机器人) [英] ImageView not display (android)
本文介绍了ImageView的不显示(机器人)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的ImageView的不显示任何东西,我不知道为什么。它是使用位于每个绘制文件夹,该文件是.tiff文件。
@覆盖
公共查看onCreateView(LayoutInflater吹气,ViewGroup中父母,捆绑savedInstanceState){
视图V = inflater.inflate(R.layout.fragment_hello_moon,父母,假); ImageView的M =新ImageView的(getActivity());
m.setImageResource(R.drawable.bell_dl_256); TableLayout TL =(TableLayout)v.findViewById(R.id.l1);
TR的TableRow =新的TableRow(getActivity()); tr.addView(米);
tl.addView(TR); 返回伏;}
解决方案
看起来.TIFF是不支持的媒体格式:的 http://developer.android.com/guide/appendix/media-formats.html
您很可能会需要转换那些png格式或其他核心格式之一,如果你想只是把它拖放到文件夹可绘
My ImageView is not displaying anything and I have no idea why. The file it is using is located in the each drawable folder and is a .tiff file.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState){
View v = inflater.inflate(R.layout.fragment_hello_moon, parent, false);
ImageView m = new ImageView(getActivity());
m.setImageResource(R.drawable.bell_dl_256);
TableLayout tl = (TableLayout)v.findViewById(R.id.l1);
TableRow tr = new TableRow(getActivity());
tr.addView(m);
tl.addView(tr);
return v;
}
解决方案
Looks like .tiff is not a supported media format: http://developer.android.com/guide/appendix/media-formats.html
You're probably going to need to convert those to .png or one of the other core formats if you want to just drop it into the drawables folders.
这篇关于ImageView的不显示(机器人)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文