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
294a4967
Commit
294a4967
authored
Dec 18, 2020
by
narinder Rana
Committed by
Amit Kumar
Dec 18, 2020
Browse files
Update UI using /e/ UI SDK
parent
dc8e1e60
Changes
11
Hide whitespace changes
Inline
Side-by-side
res/drawable/circle_bg.xml
0 → 100644
View file @
294a4967
<?xml version="1.0" encoding="utf-8"?>
<shape
android:shape=
"oval"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@color/color_default_blue1"
/>
<size
android:width=
"8dp"
android:height=
"8dp"
/>
</shape>
res/drawable/eq_button_backgroud.xml
0 → 100644
View file @
294a4967
<?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/color_default_blue1"
/>
<stroke
android:color=
"@color/color_default_blue1"
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/ic_del.xml
View file @
294a4967
...
...
@@ -19,7 +19,9 @@
android:height=
"24dp"
android:width=
"24dp"
android:viewportHeight=
"24"
android:viewportWidth=
"24"
>
android:viewportWidth=
"24"
android:tint=
"@color/color_default_blue1"
>
<path
android:fillColor=
"@color/pad_button_text_color"
android:pathData=
"M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41
...
...
res/layout/activity_calculator_land.xml
View file @
294a4967
...
...
@@ -25,6 +25,11 @@
layout=
"@layout/display"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<View
android:background=
"@color/color_default_blue1"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
/>
<LinearLayout
android:layout_width=
"match_parent"
...
...
res/layout/activity_calculator_port.xml
View file @
294a4967
...
...
@@ -22,6 +22,10 @@
android:orientation=
"vertical"
>
<include
layout=
"@layout/display"
/>
<View
android:background=
"@color/color_default_blue1"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
/>
<com.android.calculator2.CalculatorPadViewPager
android:id=
"@+id/pad_pager"
...
...
res/layout/pad_numeric.xml
View file @
294a4967
...
...
@@ -101,12 +101,39 @@
app:layout_row=
"3"
app:layout_column=
"1"
/>
<Button
android:id=
"@+id/eq"
style=
"@style/PadButtonStyle.Numeric.Equals"
android:contentDescription=
"@string/desc_eq"
android:text=
"@string/eq"
<!-- <Button-->
<!-- android:layout_width="30dp"-->
<!-- android:layout_height="30dp"-->
<!-- android:textColor="@color/color_default_foreground"-->
<!-- android:background="@drawable/circle_bg"-->
<!-- android:id="@+id/eq"-->
<!-- style="@style/PadButtonStyle.Numeric.Equals"-->
<!-- android:contentDescription="@string/desc_eq"-->
<!-- android:text="@string/eq"-->
<!-- app:layout_row="3"-->
<!-- app:layout_column="2" />-->
<RelativeLayout
android:layout_width=
"0dp"
android:layout_height=
"0dip"
app:layout_column=
"2"
app:layout_columnWeight=
"1"
app:layout_gravity=
"fill"
app:layout_row=
"3"
app:layout_column=
"2"
/>
app:layout_rowWeight=
"1"
android:onClick=
"onButtonClick"
>
<Button
android:id=
"@+id/eq"
style=
"@style/PadButtonStyle.Numeric.Equals"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:layout_centerInParent=
"true"
android:background=
"@drawable/circle_bg"
android:contentDescription=
"@string/desc_eq"
android:text=
"@string/eq"
android:textColor=
"@color/color_default_foreground"
/>
</RelativeLayout>
</androidx.gridlayout.widget.GridLayout>
res/layout/pad_operator_two_col.xml
View file @
294a4967
...
...
@@ -73,12 +73,40 @@
app:layout_row=
"3"
app:layout_column=
"0"
/>
<Button
android:id=
"@+id/eq"
style=
"@style/PadButtonStyle.Operator"
android:contentDescription=
"@string/desc_eq"
android:text=
"@string/eq"
<!-- <Button-->
<!-- android:layout_width="30dp"-->
<!-- android:layout_height="30dp"-->
<!-- android:textColor="@color/color_default_foreground"-->
<!-- android:background="@drawable/circle_bg"-->
<!-- android:id="@+id/eq"-->
<!-- style="@style/PadButtonStyle.Operator"-->
<!-- android:contentDescription="@string/desc_eq"-->
<!-- android:text="@string/eq"-->
<!-- app:layout_row="3"-->
<!-- app:layout_column="1" />-->
<RelativeLayout
android:layout_width=
"0dp"
android:layout_height=
"0dip"
app:layout_rowWeight=
"1"
app:layout_columnWeight=
"1"
app:layout_row=
"3"
app:layout_column=
"1"
/>
app:layout_column=
"1"
android:onClick=
"onButtonClick"
app:layout_gravity=
"fill"
>
<Button
android:textColor=
"@color/color_default_foreground"
android:id=
"@+id/eq"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:background=
"@drawable/circle_bg"
android:contentDescription=
"@string/desc_eq"
android:text=
"@string/eq"
android:layout_centerInParent=
"true"
style=
"@style/PadButtonStyle.Operator"
/>
</RelativeLayout>
</androidx.gridlayout.widget.GridLayout>
res/values-w230dp-h475dp-port/styles.xml
View file @
294a4967
...
...
@@ -65,8 +65,8 @@
<style
name=
"PadLayoutStyle.Operator"
>
<item
name=
"android:layout_width"
>
0dip
</item>
<item
name=
"android:layout_weight"
>
3
</item>
<item
name=
"android:paddingTop"
>
8
dip
</item>
<item
name=
"android:paddingBottom"
>
2
4
dip
</item>
<item
name=
"android:paddingTop"
>
12
dip
</item>
<item
name=
"android:paddingBottom"
>
2
0
dip
</item>
<item
name=
"android:paddingStart"
>
4dip
</item>
<item
name=
"android:paddingEnd"
>
28dip
</item>
</style>
...
...
res/values-w375dp-h500dp-port/styles.xml
View file @
294a4967
...
...
@@ -65,8 +65,8 @@
<style
name=
"PadLayoutStyle.Operator"
>
<item
name=
"android:layout_width"
>
0dip
</item>
<item
name=
"android:layout_weight"
>
3
</item>
<item
name=
"android:paddingTop"
>
8
dip
</item>
<item
name=
"android:paddingBottom"
>
2
4
dip
</item>
<item
name=
"android:paddingTop"
>
12
dip
</item>
<item
name=
"android:paddingBottom"
>
2
0
dip
</item>
<item
name=
"android:paddingStart"
>
4dip
</item>
<item
name=
"android:paddingEnd"
>
28dip
</item>
</style>
...
...
res/values-w520dp-h768dp-land/styles.xml
View file @
294a4967
...
...
@@ -66,8 +66,8 @@
<style
name=
"PadLayoutStyle.Operator"
>
<item
name=
"android:layout_width"
>
0dip
</item>
<item
name=
"android:layout_weight"
>
3
</item>
<item
name=
"android:paddingTop"
>
8
dip
</item>
<item
name=
"android:paddingBottom"
>
2
4
dip
</item>
<item
name=
"android:paddingTop"
>
12
dip
</item>
<item
name=
"android:paddingBottom"
>
2
0
dip
</item>
<item
name=
"android:paddingStart"
>
12dip
</item>
<item
name=
"android:paddingEnd"
>
12dip
</item>
</style>
...
...
res/values/color.xml
View file @
294a4967
...
...
@@ -48,13 +48,15 @@
<color
name=
"pad_operator_background_color"
>
@color/calculator_statusbar_color
</color>
<!-- Background color for the advanced pad. -->
<color
name=
"pad_advanced_background_color"
>
@lineageos.platform:color/color_default_gray2
</color>
<color
name=
"pad_advanced_background_color"
>
#ececec
</color>
<!-- Text color for a button in a pad. -->
<color
name=
"pad_button_text_color"
>
#333
</color>
<!-- Text color for a button in the advanced pad. -->
<color
name=
"pad_button_advanced_text_color"
>
@lineageos.platform:color/color_default_foreground
</color>
<color
name=
"pad_button_advanced_text_color"
>
@lineageos.platform:color/color_default_primary_text
</color>
<color
name=
"color_default_blue1"
>
@lineageos.platform:color/color_default_blue1
</color>
<!-- Ripple color when a button is pressed in a pad. -->
<color
name=
"pad_button_ripple_color"
>
#33000000
</color>
...
...
@@ -65,4 +67,6 @@
<!-- Background color for empty history view. -->
<color
name=
"empty_history_color"
>
@color/calculator_primary_color
</color>
<color
name=
"color_default_foreground"
>
@lineageos.platform:color/color_default_foreground
</color>
</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