Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eece865a authored by Mohit Mali's avatar Mohit Mali Committed by Romain Hunault
Browse files

Polish fix dialer q

parent e0bd3cd0
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ final class BottomNavItem extends LinearLayout {

  private ImageView image;
  private TextView text;
  private View indicator;
  private TextView notificationBadge;

  public BottomNavItem(Context context, @Nullable AttributeSet attrs) {
@@ -48,7 +49,12 @@ final class BottomNavItem extends LinearLayout {
    super.onFinishInflate();
    image = findViewById(R.id.bottom_nav_item_image);
    text = findViewById(R.id.bottom_nav_item_text);
    indicator = findViewById(R.id.indicator);

    notificationBadge = findViewById(R.id.notification_badge);
    int colorId = ThemeComponent.get(getContext()).theme().getColorPrimary();
    image.setImageTintList(ColorStateList.valueOf(colorId));
    text.setTextColor(colorId);
  }

  @Override
@@ -56,10 +62,10 @@ final class BottomNavItem extends LinearLayout {
    super.setSelected(selected);
    int colorId =
        selected
            ? ThemeComponent.get(getContext()).theme().getColorPrimary()
            : ThemeComponent.get(getContext()).theme().getTextColorSecondary();
    image.setImageTintList(ColorStateList.valueOf(colorId));
    text.setTextColor(colorId);
            ? getContext().getResources().getColor(R.color.dialer_theme_color)
            : getContext().getResources().getColor(R.color.foreground_color);
//    indicator.setBackgroundTintList(ColorStateList.valueOf(colorId));
    indicator.setBackgroundColor(colorId);
  }

  void setup(@StringRes int stringRes, @DrawableRes int drawableRes) {
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
  <solid android:color="?android:attr/colorPrimary"/>
  <solid android:color="@color/badge_bg"/>
  <corners android:radius="20dp"/>
  <stroke android:color="?android:attr/colorBackgroundFloating" android:width="2dp"/>
</shape>
 No newline at end of file
+43 −39
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2018 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,15 +13,20 @@
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<com.android.dialer.main.impl.bottomnav.BottomNavItem
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
<com.android.dialer.main.impl.bottomnav.BottomNavItem xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="?android:attr/selectableItemBackgroundBorderless"
    android:gravity="center"
    android:minWidth="80dp"
    android:minHeight="56dp"
    android:gravity="center"
    android:background="?android:attr/selectableItemBackgroundBorderless">
    android:orientation="vertical">

    <View
        android:id="@+id/indicator"
        android:layout_width="match_parent"
        android:background="@color/foreground_color"
        android:layout_height="2dp" />

    <FrameLayout
        android:layout_width="wrap_content"
@@ -40,25 +44,25 @@
            android:layout_height="wrap_content"
            android:layout_gravity="top|end"
            android:layout_marginTop="2dp"
            android:background="@drawable/notification_badge"
            android:fontFamily="sans-serif-medium"
            android:gravity="center"
            android:minWidth="20dp"
            android:minHeight="20dp"
            android:paddingStart="6dp"
            android:paddingEnd="6dp"
            android:paddingBottom="1dp"
        android:minHeight="20dp"
        android:minWidth="20dp"
        android:gravity="center"
        android:textSize="12sp"
            android:textColor="?android:attr/textColorPrimaryInverse"
        android:background="@drawable/notification_badge"
        android:fontFamily="sans-serif-medium"
            android:textSize="12sp"
            android:visibility="invisible" />
    </FrameLayout>

    <TextView
        android:id="@+id/bottom_nav_item_text"
        style="@style/Dialer.TextAppearance.Secondary"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:gravity="center_horizontal"
      android:textSize="12sp"
      style="@style/Dialer.TextAppearance.Secondary"/>
        android:textSize="12sp" />
</com.android.dialer.main.impl.bottomnav.BottomNavItem>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:layout_gravity="end|bottom"
        android:layout_gravity="center|bottom"
        android:src="@lineageos.platform:drawable/ic_keypad"
        android:contentDescription="@string/dialpad_button_content_description"
        app:backgroundTint="?android:attr/colorAccent"
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@

  <color name="dialer_secondary_color">@lineageos.platform:color/color_default_blue1</color>
  <color name="dialer_background_color">#FAFAFA</color>
  <color name="badge_bg">#20CE70</color>

  <color name="foreground_color">@lineageos.platform:color/color_default_foreground</color>
  <color name="dialer_primary_text">@lineageos.platform:color/color_default_primary_text</color>
Loading