login and register
This commit is contained in:
@@ -21,8 +21,8 @@ public class PizzalinkToolbar extends Toolbar {
|
||||
|
||||
private View rootView;
|
||||
private TextView toolbarTitleTextView;
|
||||
private ImageView hamburgerIcon;
|
||||
private boolean showHamburgerIcon;
|
||||
private ImageView hamburgerIcon, backIcon;
|
||||
private boolean showHamburgerIcon, showBackIcon;
|
||||
private String title;
|
||||
private int toolbarBackgroundColor, titleTextColor;
|
||||
|
||||
@@ -44,6 +44,7 @@ public class PizzalinkToolbar extends Toolbar {
|
||||
TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.PizzalinkToolbar, 0, 0);
|
||||
try {
|
||||
showHamburgerIcon = a.getBoolean(R.styleable.PizzalinkToolbar_showHamburgerMenuIcon, false);
|
||||
showBackIcon = a.getBoolean(R.styleable.PizzalinkToolbar_showBackIcon, false);
|
||||
title = a.getString(R.styleable.PizzalinkToolbar_title);
|
||||
/*
|
||||
toolbarBackgroundColor = a.getColor(R.styleable.PizzalinkToolbar_toolbarBackgroundColor,
|
||||
@@ -66,8 +67,11 @@ public class PizzalinkToolbar extends Toolbar {
|
||||
//this.setBackgroundResource(toolbarBackgroundColor);
|
||||
//toolbarTitleTextView.setTextColor(titleTextColor);
|
||||
hamburgerIcon = (ImageView) rootView.findViewById(R.id.hamburgerIcon);
|
||||
backIcon = (ImageView) rootView.findViewById(R.id.backIcon);
|
||||
if(showHamburgerIcon)
|
||||
hamburgerIcon.setVisibility(VISIBLE);
|
||||
if(showBackIcon)
|
||||
backIcon.setVisibility(VISIBLE);
|
||||
if(title != null) {
|
||||
toolbarTitleTextView.setText(title);
|
||||
toolbarTitleTextView.setVisibility(VISIBLE);
|
||||
@@ -91,6 +95,10 @@ public class PizzalinkToolbar extends Toolbar {
|
||||
hamburgerIcon.setVisibility(GONE);
|
||||
}
|
||||
|
||||
public void setBackIconClickListener(OnClickListener onClickListener){
|
||||
backIcon.setOnClickListener(onClickListener);
|
||||
}
|
||||
|
||||
public ImageView getHamburgerIcon() {
|
||||
return hamburgerIcon;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user