Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private ImageView ImgHome;
- private ImageView ImgProfile;
- private Toolbar TbHeader;
- private LinearLayout RlProfile;
- private TextView tvTitle;
- Context context;
- Activity activity = null;
- public ToolbarHeader(Context context, IAttributeSet attrs) : base(context, attrs)
- {
- Initialize(context);
- ImgHome.Click += (sender, e) =>
- {
- //apply back button here//
- };
- }
- public ToolbarHeader(Context context, IAttributeSet attrs, int defStyle) : base(context, attrs, defStyle)
- {
- Initialize(context);
- }
- private void Initialize(Context context)
- {
- LayoutInflater inflater = (LayoutInflater)context.GetSystemService(Context.LayoutInflaterService);
- inflater.Inflate(Resource.Layout.Toolbar_header, this);
- AssignUiElements();
- AssignClickHandlers();
- }
- private void AssignUiElements()
- {
- TbHeader = (Toolbar)FindViewById(Resource.Id.edit_toolbar);
- ImgHome = (ImageView)FindViewById(Resource.Id.img_home);
- RlProfile = (LinearLayout)FindViewById(Resource.Id.layout_profile);
- tvTitle = (TextView)FindViewById(Resource.Id.tv_title);
- }
- private void AssignClickHandlers()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement