title: how set padding for my imageview?
body: <p>I created glow effect imageview application. its working fine, my problem is glow effect left,right,bottom,top was little bit hiding so i am trying to set padding but still i have same problem. how to solve this problem?</p>
  
  <p>code:</p>
  
  <pre><code>ImageView mImageBk = (ImageView)itemTemplate.findViewById(R.id.imgBk);
  RelativeLayout.LayoutParams ImgBKLayoutParams = new RelativeLayout.LayoutParams(scrWidth/8 + scrWidth/20, scrWidth/8 + scrWidth/20 );
  ImgBKLayoutParams.leftMargin =0;
  ImgBKLayoutParams.topMargin = 0;
  mImageBk.setLayoutParams(ImgBKLayoutParams);
  mImageBk.setImageResource(R.drawable.glow_effect);
  mImageBk.setPadding(10, 10, 10, 10);
  mImageBk.setVisibility(View.GONE);
  </code></pre>
  
  <p>full code :</p>
  
  <pre><code>public class tttAdapter extends BaseAdapter{
      private Context mContext;
      private int scrWidth=0;
      private int scrHeight=0;
      private int scrDpi = 0;
      private boolean setInvisible = false;
      private boolean visibleConf[];
      private boolean selected[];
      private boolean innerListView = false;
  
  
      private int[] IMAGE_IDS = {  
              R.drawable.s_record, R.drawable.s_record
      };  
      private String[] title = {
              "Tv", "My Favorites List1"
      };
  
      private String[] detail = {
              "Tv", "My Favorites List1"  
              };
  
      public favoritesAdapter(Context context) {
          mContext = context;
          visibleConf = new boolean[IMAGE_IDS.length];
          selected = new boolean[IMAGE_IDS.length];
      }
  
      public void updateImageSize(int width, int height, int dpi) {
          scrWidth= width;
          scrHeight = height;
          scrDpi = dpi;
  
      }
      public void setTextVisible(int position){
          if(IMAGE_IDS.length &lt;= position)
              return;
  
          for(int i=0; i &lt; IMAGE_IDS.length; i++) {
              visibleConf[i] = false;
          }
  
          visibleConf[position] = true;
      }
      public int getCount() {
          return IMAGE_IDS.length;
      }
  
      public Object getItem(int position) {
          return position;
      }
  
      public long getItemId(int position) {
          return position;
      }
  
      public void setTextInvisible(int position) {
          visibleConf[position] = false;
      }
  
      public void setInnerViewVisible(boolean enable) {
          innerListView = enable;
      }
  
      public void unsetSelectedItem(int position) {
          for(int i=0; i &lt; IMAGE_IDS.length; i++) {
              selected[i] = false;
          }
      }
  
      public void setSelectedItem(int position) {
          for(int i=0; i &lt; IMAGE_IDS.length; i++) {
              selected[i] = false;
          }
  
          selected[position] = true;
      }
  
      public View getView(int position, View view, ViewGroup parent) {
          LayoutInflater inflater = LayoutInflater.from(mContext);
          View itemTemplate = inflater.inflate(R.layout.list_item, null);
  
  
          ImageView mImageBk = (ImageView)itemTemplate.findViewById(R.id.imgBk);
          RelativeLayout.LayoutParams ImgBKLayoutParams = new RelativeLayout.LayoutParams(scrWidth/8 + scrWidth/20, scrWidth/8 + scrWidth/20 );
          ImgBKLayoutParams.leftMargin =0;
          ImgBKLayoutParams.topMargin = 0;
          mImageBk.setLayoutParams(ImgBKLayoutParams);
          mImageBk.setImageResource(R.drawable.glow_effect);
          mImageBk.setPadding(10, 10, 10, 10);
          mImageBk.setVisibility(View.GONE);
  
  
          ImageView mImage = (ImageView)itemTemplate.findViewById(R.id.img);
          RelativeLayout.LayoutParams ImgLayoutParams = new RelativeLayout.LayoutParams(scrWidth/8 , scrWidth/8 );
          ImgLayoutParams.leftMargin = scrWidth/38;
          ImgLayoutParams.topMargin = scrWidth/38;
  
          mImage.setLayoutParams(ImgLayoutParams);
          mImage.setImageResource(IMAGE_IDS[position]);
          mImage.bringToFront();
  
          TextView mTextTitle = (TextView)itemTemplate.findViewById(R.id.title);
          mTextTitle.setClickable(false);
          mTextTitle.setEnabled(true);
          mTextTitle.setText(title[position]);
  
          TextView mTextDetail = (TextView)itemTemplate.findViewById(R.id.detail);
          mTextDetail.setClickable(false);
          mTextDetail.setEnabled(true);
          mTextDetail.setText(detail[position]);      
  
          if(selected[position] == true) {
              ImageView mArrowImg = (ImageView)itemTemplate.findViewById(R.id.imgArrow);
              //mArrowImg.setLayoutParams(new RelativeLayout.LayoutParams(scrWidth/32, scrHeight/32));
              RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(scrWidth/32, scrHeight/32);
              layoutParams.leftMargin = scrWidth / 8;
              layoutParams.topMargin = scrWidth / 16;
              mArrowImg.setLayoutParams(layoutParams);
              mArrowImg.setImageResource(R.drawable.arrow);           
              mImage.setBackgroundResource(R.drawable.test_glowb);
              mTextTitle.setVisibility(View.GONE);
              mTextDetail.setVisibility(View.GONE);
              mImageBk.setVisibility(View.VISIBLE);
          } else {
              if(innerListView == true) {
                  mImage.setVisibility(View.GONE);
              }
          }
  
          if(visibleConf[position] == true) {
              mTextTitle.setTextSize((scrWidth*160) / (30 * scrDpi));
              mTextDetail.setTextSize((scrWidth*160) / (50 * scrDpi));                        
              mTextTitle.setTypeface(null,Typeface.BOLD);
              mTextDetail.setTypeface(null,Typeface.BOLD);
              mImageBk.setVisibility(View.VISIBLE);
  
          } else {
  
              mTextTitle.setTextSize((scrWidth*160) / (40 * scrDpi));
              mTextDetail.setTextSize((scrWidth*160) / (70 * scrDpi));
              //mTextTitle.setVisibility(View.GONE);
              //mTextDetail.setVisibility(View.GONE);         
              mImage.setAlpha(150);
          }
  
          if(innerListView == true) {
              mTextTitle.setVisibility(View.GONE);
              mTextDetail.setVisibility(View.GONE);
          }
          return itemTemplate;
      }
  }
  </code></pre>
  
  <p>xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal" &gt;
  
      &lt;RelativeLayout
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:id="@+id/thumb"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:padding="3dip"
          android:layout_alignParentLeft="true"
          android:layout_marginRight="5dip"&gt;
  
          &lt;ImageView
              android:id="@+id/img"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"/&gt;
  
           &lt;ImageView
              android:id="@+id/imgBk"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"/&gt;
  
      &lt;/RelativeLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginRight="14dip"
          android:layout_marginTop="30dp"
          android:layout_centerInParent="true"
          android:layout_toRightOf="@+id/thumb"
          android:orientation="vertical" &gt;
  
          &lt;TextView
              android:id="@+id/title"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignTop="@+id/thumb"
              android:layout_toRightOf="@+id/thumb"
              android:layout_centerVertical="true"
              android:textColor="#ffffff" /&gt;
  
          &lt;TextView
              android:id="@+id/detail"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_toRightOf="@+id/thumb"     
              android:layout_alignParentBottom="true"
              android:textColor="#ffffff" /&gt;
  
          &lt;ImageView 
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/imgArrow"
              android:layout_alignParentRight="true"
              android:layout_centerVertical="true"/&gt;  
      &lt;/LinearLayout&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>