mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-02-14 02:20:48 +01:00
remove the RelativeLayout wrapping the calculator
This commit is contained in:
parent
dc09b69235
commit
8960387b48
@ -1,232 +1,228 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
<LinearLayout
|
||||
android:id="@+id/calculator_holder"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/dark_grey"
|
||||
android:orientation="vertical"
|
||||
tools:context="calculator.simplemobiletools.com.simple_calculator.MainActivity">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/result"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.8"
|
||||
android:gravity="center_vertical|right"
|
||||
android:lines="1"
|
||||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:text="0"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/display_text_size"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/dark_grey"
|
||||
android:orientation="vertical">
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/result"
|
||||
<Button
|
||||
android:id="@+id/btn_modulo"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.8"
|
||||
android:gravity="center_vertical|right"
|
||||
android:lines="1"
|
||||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
android:text="0"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="@dimen/display_text_size"/>
|
||||
android:layout_weight="1"
|
||||
android:text="%"/>
|
||||
|
||||
<LinearLayout
|
||||
<Button
|
||||
android:id="@+id/btn_power"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal">
|
||||
android:layout_weight="1"
|
||||
android:text="^"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_modulo"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="%"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_power"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="^"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_root"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="√"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_clear"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="C"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_reset"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="AC"
|
||||
android:visibility="gone"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<Button
|
||||
android:id="@+id/btn_root"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal">
|
||||
android:layout_weight="1"
|
||||
android:text="√"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_7"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="7"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_8"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="8"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_9"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="9"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_divide"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="÷"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<Button
|
||||
android:id="@+id/btn_clear"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal">
|
||||
android:layout_weight="1"
|
||||
android:text="C"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_4"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="4"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_5"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="5"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_6"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="6"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_multiply"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="*"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<Button
|
||||
android:id="@+id/btn_reset"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_1"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="1"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_2"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="2"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_3"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="3"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_minus"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="-"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_0"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="0"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_decimal"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="."/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_equals"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="="/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_plus"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="+"/>
|
||||
</LinearLayout>
|
||||
android:layout_weight="1"
|
||||
android:text="AC"
|
||||
android:visibility="gone"/>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_7"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="7"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_8"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="8"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_9"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="9"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_divide"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="÷"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_4"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="4"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_5"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="5"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_6"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="6"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_multiply"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="*"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_1"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="1"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_2"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="2"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_3"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="3"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_minus"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="-"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_0"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="0"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_decimal"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="."/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_equals"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="="/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_plus"
|
||||
style="@style/MyButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="+"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
Loading…
x
Reference in New Issue
Block a user