design part 3
This commit is contained in:
@@ -2,12 +2,15 @@ package ch.pizzalink.android.view;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import ch.pizzalink.android.R;
|
||||
import ch.pizzalink.android.activity.BaseActivity;
|
||||
|
||||
/**
|
||||
* Created by cimenmus on 26.10.2017.
|
||||
@@ -18,7 +21,9 @@ public class PizzalinkDropdownView extends LinearLayout {
|
||||
private View rootView;
|
||||
private TextView hintTextView;
|
||||
private TextView textview;
|
||||
private RelativeLayout bottomLineLayout;
|
||||
private String hint;
|
||||
private String dropdownTheme;
|
||||
|
||||
public PizzalinkDropdownView(Context context) {
|
||||
super(context);
|
||||
@@ -31,6 +36,7 @@ public class PizzalinkDropdownView extends LinearLayout {
|
||||
TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.PizzalinkDropdownView, 0, 0);
|
||||
try {
|
||||
hint = a.getString(R.styleable.PizzalinkDropdownView_dropdownHintView);
|
||||
dropdownTheme = a.getString(R.styleable.PizzalinkDropdownView_dropdownTheme);
|
||||
} finally {
|
||||
a.recycle();
|
||||
}
|
||||
@@ -42,7 +48,14 @@ public class PizzalinkDropdownView extends LinearLayout {
|
||||
rootView = (View) inflate(context, R.layout.layout_pizzalink_drowdown_view, this);
|
||||
hintTextView = (TextView) rootView.findViewById(R.id.hintTextView);
|
||||
textview = (TextView) rootView.findViewById(R.id.textview);
|
||||
bottomLineLayout = (RelativeLayout) rootView.findViewById(R.id.bottomLineLayout);
|
||||
hintTextView.setText(hint);
|
||||
if(dropdownTheme != null && dropdownTheme.equals("navy")){
|
||||
int navyColor = ContextCompat.getColor(BaseActivity.currentActivity, R.color.navigation_drawer_background);
|
||||
hintTextView.setTextColor(navyColor);
|
||||
textview.setTextColor(navyColor);
|
||||
bottomLineLayout.setBackgroundColor(navyColor);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isEmpty(){
|
||||
|
||||
Reference in New Issue
Block a user