更改图像视图在运行时的位置 [英] Changing the position of Image view at run time

查看:84
本文介绍了更改图像视图在运行时的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要提出申请,其中装载的文本是存在的,在他们面前的一些点图像。我想这图片不断,直到后台工作完成后,我也可以在运行时改变它是绝对布局的图像视图的位置一定时间后显示。请分享精确的运行code,我需要它。

I want to make an application in which a Loading text is there and some dot images in front of them. I want that images are shown after some time period continuously until background work is completed or can i change the position of an image view at run time which is in absolute layout. Please share exact running code, I need it.

推荐答案

如果要移动的ImageView,那么你必须采取相对布局,你需要增加leftPadding水平移动ImageView的。

if you want to move imageview then you have to take relative layout and you need to increase leftPadding to move imageview horizontally.

ImageView leaf = (ImageView)findViewById(R.id.imageView1);

par = (LayoutParams)leaf.getLayoutParams();
par.leftMargin += 30;

leaf.setLayoutParams(par);

这篇关于更改图像视图在运行时的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆