我在我的网站顶部使用静态条,大约20px高.当我点击一个锚点链接时(对于那些不知道的人来说,维基百科上的导航就是这样的.点击一个标题,然后浏览器就会显示它).文本的一部分消失在顶部栏后面.
有没有办法阻止这种情况发生?我不能使用iFrame.我能想到的只是让它每次都回滚一下,但还有另外一种方法吗?一些CSS设置来操纵身体或什么?
我正在开发一个在res/values映射中有自定义XML文件的项目.
它不是一个深度XML:
<resources>
<accesspoint
...
Run Code Online (Sandbox Code Playgroud)
Eclipse正在生成错误: found tag accesspoint where item is expected
现在,我用Google搜索了一下,到处都有类似的问题.但没有解决方案.当我将它们全部更改为项目并给它们一个名称和类型时,我仍然会在结束标记上出现错误,这些标记只是简单地说"Orginally defind here".
我在这里没有想法,有谁知道这意味着什么?以及我如何解决它?
我已经看到了这个问题:android如何下载1mb图像文件并设置为ImageView
它没有解决我的问题,因为它只显示了你已经拥有它后如何显示位图.
我正在尝试从URL下载图像,以便在Android设备上显示ImageView.我不知道该怎么做.
我在互联网上看了一下,这是我到目前为止的代码:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//Set local image
ImageView image = (ImageView) findViewById(R.id.test_image);
image.setImageResource(R.drawable.test2);
//Prepare to download image
URL url;
InputStream in;
//BufferedInputStream buf;
try {
url = new URL("http://i.imgur.com/CQzlM.jpg");
in = url.openStream();
out = new BufferedOutputStream(new FileOutputStream("testImage.jpg"));
int i;
while ((i = in.read()) != -1) {
out.write(i);
}
out.close();
in.close();
buf = new BufferedInputStream(in);
Bitmap bMap = BitmapFactory.decodeStream(buf);
image.setImageBitmap(bMap);
if (in != null) {
in.close();
}
if (buf != null) …Run Code Online (Sandbox Code Playgroud)