| | |
| | | |
| | | import android.content.Context; |
| | | import android.content.res.ColorStateList; |
| | | import android.graphics.Typeface; |
| | | import android.graphics.drawable.ColorDrawable; |
| | | import android.graphics.drawable.Drawable; |
| | | import android.util.TypedValue; |
| | |
| | | * @desc TitleBar统一样式 |
| | | */ |
| | | public class MyTitleBarStyle extends CommonBarStyle { |
| | | |
| | | @Override |
| | | public TextView createLeftView(Context context) { |
| | | return super.createLeftView(context); |
| | | public Typeface getTitleTypeface(Context context, int style) { |
| | | return Typeface.createFromAsset(context.getAssets(), "roboto_regular.ttf"); |
| | | } |
| | | |
| | | @Override |
| | | public Typeface getLeftTitleTypeface(Context context, int style) { |
| | | return Typeface.createFromAsset(context.getAssets(), "roboto_regular.ttf"); |
| | | } |
| | | |
| | | @Override |
| | | public Typeface getRightTitleTypeface(Context context, int style) { |
| | | return Typeface.createFromAsset(context.getAssets(), "roboto_regular.ttf"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 16, context.getResources().getDisplayMetrics()); |
| | | } |
| | | |
| | | |
| | | |
| | | } |