diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiPersonalDialogFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiPersonalDialogFragment.java index 277a26fc8c..137ff803fa 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiPersonalDialogFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiPersonalDialogFragment.java @@ -7,6 +7,7 @@ import android.graphics.Point; import android.graphics.Typeface; import android.os.Build; import android.os.Bundle; +import android.util.TypedValue; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -219,13 +220,13 @@ public class TaxiPersonalDialogFragment extends TextView textView = (TextView) tab.getCustomView().findViewById(R.id.operation_tab_title); ImageView imageView = (ImageView) tab.getCustomView().findViewById(R.id.operation_tab_line_iv); if (isSelected){ - textView.setTextSize(AutoSizeUtils.dp2px(getContext(),46)); + textView.setTextSize(TypedValue.COMPLEX_UNIT_PX,AutoSizeUtils.dp2px(getContext(),46)); CallerLogger.INSTANCE.d(M_TAXI + TAG,"SelectTv = "+ textView.getText()); textView.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); textView.setTextColor(Color.parseColor("#FFFFFF")); imageView.setImageDrawable(getResources().getDrawable(R.drawable.taxi_driver_operation_tab_line)); }else { - textView.setTextSize(AutoSizeUtils.dp2px(getContext(),40)); + textView.setTextSize(TypedValue.COMPLEX_UNIT_PX,AutoSizeUtils.dp2px(getContext(),40)); CallerLogger.INSTANCE.d(M_TAXI + TAG,"unSelectTv = "+ textView.getText()); textView.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL)); textView.setTextColor(Color.parseColor("#A7B6F0")); diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiServerOrdersFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiServerOrdersFragment.java index 05bd955236..91007e4705 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiServerOrdersFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiServerOrdersFragment.java @@ -6,6 +6,7 @@ import android.graphics.Color; import android.graphics.Typeface; import android.os.Build; import android.os.Bundle; +import android.util.TypedValue; import android.view.View; import android.widget.TextView; @@ -27,6 +28,7 @@ import com.mogo.och.taxi.bean.OrderQueryRouteInfoRespBean; import java.util.ArrayList; import java.util.List; +import me.jessyan.autosize.AutoSize; import me.jessyan.autosize.utils.AutoSizeUtils; /** @@ -136,13 +138,13 @@ public class TaxiServerOrdersFragment extends BaseTaxiUIFragment { TextView textView = (TextView) tab.getCustomView().findViewById(R.id.tab_title); if (isSelected){ textView.setBackground(getActivity().getDrawable(R.drawable.taxi_driver_tab_item_bg)); - textView.setTextSize(AutoSizeUtils.dp2px(getContext(),40)); + textView.setTextSize(TypedValue.COMPLEX_UNIT_PX,AutoSizeUtils.dp2px(getContext(),40)); CallerLogger.INSTANCE.d(M_TAXI + TAG,"SelectTv = "+ textView.getText()); textView.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); textView.setTextColor(Color.parseColor("#FFFFFF")); }else { textView.setBackground(null); - textView.setTextSize(AutoSizeUtils.dp2px(getContext(),36)); + textView.setTextSize(TypedValue.COMPLEX_UNIT_PX,AutoSizeUtils.dp2px(getContext(),36)); CallerLogger.INSTANCE.d(M_TAXI + TAG,"unSelectTv = "+ textView.getText()); textView.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL)); textView.setTextColor(Color.parseColor("#CCD4F5"));