Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
android_packages_apps_ExactCalculator
Commits
2efdf2d6
Commit
2efdf2d6
authored
Aug 31, 2021
by
Fahim
Browse files
3720-Q-Equal_button_visibility_issue
issue:
e/backlog#3720
parent
b48a3338
Changes
6
Hide whitespace changes
Inline
Side-by-side
res/drawable/eq_button_backgroud.xml
deleted
100644 → 0
View file @
b48a3338
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<shape
android:shape=
"oval"
>
<solid
android:color=
"@color/calculator_accent_color"
/>
<stroke
android:color=
"@color/calculator_accent_color"
android:width=
"5dp"
/>
<!-- Set the same value for both width and height to get a circular shape -->
<size
android:width=
"40dp"
android:height=
"40dp"
/>
</shape>
</item>
</selector>
res/drawable/pad_button_inverse_background.xml
View file @
2efdf2d6
...
...
@@ -20,7 +20,7 @@
<item
android:id=
"@android:id/mask"
>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"4dip"
/>
<solid
android:color=
"@
android:color/white
"
/>
<solid
android:color=
"@
color/color_default_view_on_accent
"
/>
</shape>
</item>
<item>
...
...
res/layout/pad_numeric.xml
View file @
2efdf2d6
...
...
@@ -101,13 +101,31 @@
app:layout_row=
"3"
app:layout_column=
"1"
/>
<com.android.calculator2.HapticButton
android:id=
"@+id/eq"
android:textColor=
"@android:color/white"
style=
"@style/PadButtonStyle.Numeric.Equals"
android:contentDescription=
"@string/desc_eq"
android:text=
"@string/eq"
<RelativeLayout
android:layout_width=
"0dp"
android:layout_height=
"0dp"
app:layout_rowWeight=
"1"
app:layout_columnWeight=
"1"
app:layout_row=
"3"
app:layout_column=
"2"
/>
style=
"@style/PadButtonStyle.Numeric.Equals"
app:layout_column=
"2"
app:layout_gravity=
"fill"
>
<ImageView
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:src=
"@drawable/circle_bg"
android:layout_centerInParent=
"true"
/>
<com.android.calculator2.HapticButton
android:id=
"@+id/eq"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_centerInParent=
"true"
android:textColor=
"@color/color_default_view_on_accent"
style=
"@style/PadButtonStyle.Numeric"
android:contentDescription=
"@string/desc_eq"
android:text=
"@string/eq"
/>
</RelativeLayout>
</androidx.gridlayout.widget.GridLayout>
res/layout/pad_operator_two_col.xml
View file @
2efdf2d6
...
...
@@ -73,13 +73,31 @@
app:layout_row=
"3"
app:layout_column=
"0"
/>
<com.android.calculator2.HapticButton
android:id=
"@+id/eq"
android:textColor=
"@android:color/white"
style=
"@style/PadButtonStyle.Operator"
android:contentDescription=
"@string/desc_eq"
android:text=
"@string/eq"
<RelativeLayout
android:layout_width=
"0dp"
android:layout_height=
"0dp"
app:layout_rowWeight=
"1"
app:layout_columnWeight=
"1"
app:layout_row=
"3"
app:layout_column=
"1"
/>
app:layout_column=
"1"
app:layout_gravity=
"fill"
>
<ImageView
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:src=
"@drawable/circle_bg"
android:layout_centerInParent=
"true"
/>
<com.android.calculator2.HapticButton
android:id=
"@+id/eq"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_centerInParent=
"true"
android:textColor=
"@color/color_default_view_on_accent"
style=
"@style/PadButtonStyle.Operator"
android:contentDescription=
"@string/desc_eq"
android:text=
"@string/eq"
/>
</RelativeLayout>
</androidx.gridlayout.widget.GridLayout>
res/values/color.xml
View file @
2efdf2d6
...
...
@@ -30,6 +30,8 @@
<!-- Color to indicate an error has occured. -->
<color
name=
"calculator_error_color"
>
@lineageos.platform:color/color_default_red1
</color>
<color
name=
"color_default_view_on_accent"
>
@lineageos.platform:color/color_default_view_on_accent
</color>
<!-- Background color of the calculator display. -->
<color
name=
"display_background_color"
>
@lineageos.platform:color/color_default_background
</color>
...
...
@@ -54,6 +56,8 @@
<!-- Text color for a button in a pad. -->
<color
name=
"pad_button_text_color"
>
@lineageos.platform:color/color_default_primary_text
</color>
<color
name=
"color_default_gray1"
>
@lineageos.platform:color/color_default_gray1
</color>
<!-- Text color for a button in the advanced pad. -->
<color
name=
"pad_button_advanced_text_color"
>
@lineageos.platform:color/color_default_primary_text
</color>
...
...
res/values/themes.xml
View file @
2efdf2d6
...
...
@@ -62,5 +62,6 @@
<style
name=
"actionOverflowButtonStyle"
>
<item
name=
"android:src"
>
@drawable/ic_more
</item>
<item
name=
"android:tint"
>
@color/calculator_accent_color
</item>
<item
name=
"android:paddingRight"
>
10dp
</item>
</style>
</resources>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment