Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - RelativeLayout MarginLayoutParams resize ImageView

RelativeLayout MarginLayoutParams resize ImageView

All your problems with Audio, Video and Images.

RelativeLayout MarginLayoutParams resize ImageView

Postby onurtpl » Tue Jun 28, 2011 2:43 pm

Hi All,

I have a ImageView and its src is a animation-list when I try to to set it margins programmatically it also resize the imageview very very small.

In a button click event i set the margin of the image view
Code: Select all
        ImageView hand = (ImageView)rlRoot.findViewById(R.id.ivHandAnimation);

        MarginLayoutParams marginsParams = new MarginLayoutParams(hand.getLayoutParams());
        marginsParams.setMargins(this.getLeft(), rlRoot.getMeasuredHeight() - 20, 0, 0);
        RelativeLayout.LayoutParams lp = new LayoutParams(marginsParams);
        //lp.height = rlRoot.findViewById(R.id.btnHole_14).getMeasuredHeight();
        hand.setLayoutParams(lp);

        if (hand != null) {

            hand.setVisibility(View.VISIBLE);
            AnimationDrawable frameAnimation = (AnimationDrawable)hand.getDrawable();
            frameAnimation.setCallback(hand);
            frameAnimation.setVisible(true, true);
        }


I have also tried to set lp.height but it is not working. And I also create LayoutParams with following code.

Code: Select all
RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);


Thanks a lot.
onurtpl
Freshman
Freshman
 
Posts: 2
Joined: Tue Jun 28, 2011 2:37 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 4 guests