开发者

Changing the position of Image view at run time

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 a开发者_如何学运维re 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.


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);


You could call setVisiblity(View.GONE) to hide the loading animation whenever you've loaded the page


You shouldn't be using AbsoluteLayout since it's deprecated.

You can set the Text invisible as Kurru said or use an Animation to make it go out of the screen.


if you want to move imageview in absolute layout use setX() and setY() method .But this method are not supported in below 3.0 verson

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜