Skip to content

Commit ae97d5e

Browse files
committed
Fix ANR
The text views which show information about the units could be clicked and crash the app.
1 parent 18297af commit ae97d5e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<TextView style="@style/AppTheme.CalculatorButton.Floating" />
2+
<TextView style="@style/AppTheme.CalculatorButton.FloatingInfo" />

app/src/main/res/values/styles.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@
8686
<item name="android:textSize">20dp</item>
8787
</style>
8888

89+
<style name="AppTheme.CalculatorButton.FloatingInfo" parent="AppTheme.CalculatorButton.Floating">
90+
<item name="android:clickable">false</item>
91+
<item name="android:longClickable">false</item>
92+
<item name="android:onClick">@null</item> <!-- It's just info, remove the ability to click on it -->
93+
</style>
8994

9095
<style name="AppTheme.CalculatorButton.Secondary" parent="AppTheme.CalculatorButton">
9196
<item name="android:minHeight">40dp</item>

0 commit comments

Comments
 (0)