Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. private ImageView ImgHome;
  2. private ImageView ImgProfile;
  3. private Toolbar TbHeader;
  4. private LinearLayout RlProfile;
  5. private TextView tvTitle;
  6. Context context;
  7. Activity activity = null;
  8.  
  9. public ToolbarHeader(Context context, IAttributeSet attrs) : base(context, attrs)
  10. {
  11. Initialize(context);
  12. ImgHome.Click += (sender, e) =>
  13. {
  14. //apply back button here//
  15. };
  16.  
  17. }
  18.  
  19. public ToolbarHeader(Context context, IAttributeSet attrs, int defStyle) : base(context, attrs, defStyle)
  20. {
  21. Initialize(context);
  22. }
  23.  
  24. private void Initialize(Context context)
  25. {
  26. LayoutInflater inflater = (LayoutInflater)context.GetSystemService(Context.LayoutInflaterService);
  27. inflater.Inflate(Resource.Layout.Toolbar_header, this);
  28.  
  29. AssignUiElements();
  30. AssignClickHandlers();
  31. }
  32.  
  33. private void AssignUiElements()
  34. {
  35. TbHeader = (Toolbar)FindViewById(Resource.Id.edit_toolbar);
  36. ImgHome = (ImageView)FindViewById(Resource.Id.img_home);
  37. RlProfile = (LinearLayout)FindViewById(Resource.Id.layout_profile);
  38. tvTitle = (TextView)FindViewById(Resource.Id.tv_title);
  39.  
  40. }
  41.  
  42.  
  43. private void AssignClickHandlers()
  44. {
  45.  
  46. }
  47.  
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement