开发者

Creating new params in the Code is not working?

This chunk of code doesnt seem to be doing its job.

line=(ImageView)findViewById(R.id.imageView1);
RelativeLayout.LayoutParams params==(RelativeLayout.LayoutParams)line.getLayoutParams();
params.addRule(RelativeLayout.BELOW, R.id.minSpinner开发者_运维百科);
line.setLayoutParams(params);

**Note all of these have been instantiated just not doing there job when put into emulator. The line is supposed to move BELOW the Spinner. Thanks in advance


Change the == to =?

RelativeLayout.LayoutParams params==(RelativeLayout.LayoutParams)line.getLayoutParams();


Have you tried quickly implementing the layout in XML to make sure that BELOW is actually functioning as you're expecting? Relative layouts can be tricky to figure out without some trial and error.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜