button and edittext views
This commit is contained in:
@@ -2,6 +2,7 @@ package ch.pizzalink.android.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Color;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
import android.util.AttributeSet;
|
||||
@@ -18,11 +19,12 @@ import ch.pizzalink.android.activity.BaseActivity;
|
||||
|
||||
public class PizzalinkToolbar extends Toolbar {
|
||||
|
||||
private View rootView;;
|
||||
private View rootView;
|
||||
private TextView toolbarTitleTextView;
|
||||
private ImageView hamburgerIcon;
|
||||
private boolean showHamburgerIcon;
|
||||
private String title;
|
||||
private int toolbarBackgroundColor, titleTextColor;
|
||||
|
||||
/*
|
||||
public PizzalinkToolbar(Toolbar toolbar){
|
||||
@@ -43,6 +45,13 @@ public class PizzalinkToolbar extends Toolbar {
|
||||
try {
|
||||
showHamburgerIcon = a.getBoolean(R.styleable.PizzalinkToolbar_showHamburgerMenuIcon, false);
|
||||
title = a.getString(R.styleable.PizzalinkToolbar_title);
|
||||
/*
|
||||
toolbarBackgroundColor = a.getColor(R.styleable.PizzalinkToolbar_toolbarBackgroundColor,
|
||||
ContextCompat.getColor(BaseActivity.currentActivity, R.color.colorPrimary));
|
||||
titleTextColor = a.getColor(R.styleable.PizzalinkToolbar_toolbarTitleTextColor,
|
||||
ContextCompat.getColor(BaseActivity.currentActivity, R.color.white));
|
||||
*/
|
||||
|
||||
} finally {
|
||||
a.recycle();
|
||||
}
|
||||
@@ -54,6 +63,8 @@ public class PizzalinkToolbar extends Toolbar {
|
||||
this.setPadding(0, 0, 0, 0);
|
||||
this.setContentInsetsAbsolute(0, 0);
|
||||
toolbarTitleTextView = (TextView) rootView.findViewById(R.id.toolbarTitleTextView);
|
||||
//this.setBackgroundResource(toolbarBackgroundColor);
|
||||
//toolbarTitleTextView.setTextColor(titleTextColor);
|
||||
hamburgerIcon = (ImageView) rootView.findViewById(R.id.hamburgerIcon);
|
||||
if(showHamburgerIcon)
|
||||
hamburgerIcon.setVisibility(VISIBLE);
|
||||
|
||||
Reference in New Issue
Block a user