Advertisement
Guest User

Untitled

a guest
Jan 14th, 2015
410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. I cannot see right side vertical divider , I create linearlayout widget layout Programmatically.
  2. ![enter image description here][1]
  3. I see all these except red vertical line. here is the my code:
  4.  
  5. public class TextLinear extends LinearLayout {
  6.  
  7. mainLinearLayout= new LinearLayout(mcontext);
  8. linearSocial= new LinearLayout(mcontext);
  9. linearSocial.setOrientation(LinearLayout.HORIZONTAL);
  10.  
  11. lLayout = new LinearLayout(mcontext);
  12. tViewTitle = new TextView(mcontext);
  13. tvMessageFire = new TextView(mcontext);
  14.  
  15. viewDivider = new View(mcontext);
  16. viewDivider.setLayoutParams(new LayoutParams(5,LayoutParams.WRAP_CONTENT));
  17. viewDivider.setBackgroundColor(Color.RED);
  18.  
  19. img0=new ImageView(mcontext);
  20. img1=new ImageView(mcontext);
  21.  
  22. linearSocial.addView(img0);
  23. linearSocial.addView(img1);
  24. linearSocial.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT,Gravity.RIGHT));
  25.  
  26. lLayout.addView(tViewTitle);
  27. lLayout.addView(tvMessageFire);
  28. lLayout.addView(linearSocial,rightGravityParams);
  29.  
  30. mainLinearLayout.addView(lLayout);
  31.  
  32. this.addView(mainLinearLayout);
  33. this.addView(viewDivider);
  34. }
  35.  
  36. [1]: http://i.stack.imgur.com/t03il.png
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement