|
<?xml version="1.0" encoding="utf-8"?> |
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
xmlns:app="http://schemas.android.com/apk/res-auto" |
|
xmlns:tools="http://schemas.android.com/tools" |
|
android:orientation="vertical" |
|
android:layout_width="match_parent" |
|
android:layout_height="match_parent" |
|
tools:context="com.bytepace.test.calculator.MainActivity"> |
|
|
|
<LinearLayout |
|
android:id="@+id/ll_input_data_panel" |
|
android:gravity="center" |
|
android:orientation="horizontal" |
|
android:layout_width="match_parent" |
|
android:layout_height="wrap_content"> |
|
<EditText |
|
android:inputType="number" |
|
android:id="@+id/et_input_data" |
|
android:layout_weight="0.7" |
|
android:layout_width="0dp" |
|
android:layout_height="wrap_content" /> |
|
<Button |
|
android:text="@string/calculate" |
|
android:id="@+id/btn_calculate" |
|
android:layout_width="0dp" |
|
android:layout_height="wrap_content" |
|
android:layout_weight="0.3"/> |
|
</LinearLayout> |
|
|
|
<LinearLayout |
|
android:id="@+id/ll_operations_panel" |
|
android:layout_below="@+id/ll_input_data_panel" |
|
android:layout_width="match_parent" |
|
android:layout_height="wrap_content" |
|
android:orientation="horizontal"> |
|
<Button |
|
android:text="@string/operation_add" |
|
android:id="@+id/btn_add" |
|
android:layout_weight="1" |
|
android:layout_width="0dp" |
|
android:layout_height="wrap_content" /> |
|
<Button |
|
android:text="@string/operation_subtract" |
|
android:id="@+id/btn_subtract" |
|
android:layout_weight="1" |
|
android:layout_width="0dp" |
|
android:layout_height="wrap_content" /> |
|
<Button |
|
android:text="@string/operation_divide" |
|
android:id="@+id/btn_divide" |
|
android:layout_weight="1" |
|
android:layout_width="0dp" |
|
android:layout_height="wrap_content" /> |
|
<Button |
|
android:id="@+id/btn_multiply" |
|
android:text="@string/operation_multiply" |
|
android:layout_weight="1" |
|
android:layout_width="0dp" |
|
android:layout_height="wrap_content" /> |
|
<Button |
|
android:id="@+id/btn_clean" |
|
android:text="@string/operation_ce" |
|
android:layout_weight="1" |
|
android:layout_width="0dp" |
|
android:layout_height="wrap_content" /> |
|
</LinearLayout> |
|
|
|
<TextView |
|
android:layout_below="@+id/ll_operations_panel" |
|
android:id="@+id/tv_result" |
|
android:gravity="center" |
|
android:layout_marginTop="10dp" |
|
android:layout_width="match_parent" |
|
android:layout_height="wrap_content" /> |
|
|
|
<LinearLayout |
|
android:clickable="true" |
|
android:id="@+id/ll_progress_bar_panel" |
|
android:alpha="0.3" |
|
android:background="@android:color/black" |
|
android:gravity="center" |
|
android:layout_width="match_parent" |
|
android:layout_height="match_parent"> |
|
<ProgressBar |
|
android:layout_width="50dp" |
|
android:layout_height="50dp" /> |
|
</LinearLayout> |
|
</RelativeLayout> |