getting childview margin from inflated view
<p>I have implemented horizontal list view by linear layout with horizontal scroll view. I have added the list item by adding view to linear layout. Now i don't know how to get the margins of child view inside linear layout when specific child view is clicked. Actually i want to replace the selected child view with text view with same margins. please help</p>

<pre><code>  vi1.setOnClickListener(new OnClickListener()
     {
        @Override
        public void onClick(View arg0)
        {
            back_image = (ImageView)activity.findViewById(R.id.tvguide_image);
            back_image.setBackgroundResource(im);

            }
    });
    layout.addView(vi1);

    return layout;
}
</code></pre>

<p>In above code, on child view selected i am changing the background of some other image view. how to get the child view position and replace it with text view</p>
