- <?xml version="1.0" encoding="utf-8"?>
- <ScrollView 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:paddingBottom="@dimen/activity_vertical_margin"
- android:paddingLeft="@dimen/activity_horizontal_margin"
- android:paddingRight="@dimen/activity_horizontal_margin"
- android:paddingTop="@dimen/activity_vertical_margin"
- tools:context="pl.edu.pwr.lab1borowiak.andlab01.MainActivity">
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:descendantFocusability="beforeDescendants"
- android:focusableInTouchMode="true" >
- <TextView
- android:id="@+id/heightText"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/height"
- android:textSize="20sp"
- android:layout_margin="20dp"/>
- <EditText
- android:id="@+id/heightEdit"
- android:layout_width="100dp"
- android:layout_height="wrap_content"
- android:inputType="numberDecimal"
- android:layout_alignBottom="@+id/heightText"
- android:layout_alignRight="@+id/countButton"
- android:layout_alignEnd="@+id/countButton"
- android:hint="@string/height"/>
- <TextView
- android:id="@+id/massText"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/mass"
- android:textSize="20sp"
- android:bottom="@+id/heightText"
- android:layout_below="@+id/heightText"
- android:layout_alignLeft="@+id/heightText"
- android:layout_alignStart="@+id/heightText" />
- <EditText
- android:id="@+id/massEdit"
- android:layout_width="100dp"
- android:layout_height="wrap_content"
- android:inputType="numberDecimal"
- android:hint="@string/kg"
- android:layout_above="@+id/countButton"
- android:layout_alignLeft="@+id/heightEdit"
- android:layout_alignStart="@+id/heightEdit" />
- <Button
- android:id="@+id/countButton"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/count"
- android:textSize="20sp"
- android:layout_marginRight="50dp"
- android:layout_marginLeft="50dp"
- android:layout_marginTop="10dp"
- android:layout_marginBottom="10dp"
- android:layout_below="@+id/massText"/>
- <TextView
- android:id="@+id/bmiText"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/bmi"
- android:layout_below="@+id/countButton"
- android:layout_centerHorizontal="true"
- android:textSize="40sp"/>
- <TextView
- android:id="@+id/bmiResult"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:layout_below="@+id/bmiText"
- android:textSize="50sp"/>
- <Switch
- android:id="@+id/mySwitch"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@+id/bmiResult"
- android:layout_marginTop="20dp"
- android:text="KgM / IbIn"
- android:layout_margin="50dp"
- android:layout_alignParentRight="true"/>
- <Button
- android:id="@+id/infoButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@drawable/toolbar_get_info"
- android:layout_alignBaseline="@+id/mySwitch"
- android:layout_alignBottom="@+id/mySwitch"
- android:layout_alignLeft="@+id/countButton"
- android:layout_alignStart="@+id/countButton" />
- </RelativeLayout>
- </ScrollView>