Facebook
From Harmless Anoa, 7 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 273
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  3.     xmlns:tools="http://schemas.android.com/tools"
  4.     android:layout_width="match_parent"
  5.     android:layout_height="match_parent"
  6.     android:paddingBottom="@dimen/activity_vertical_margin"
  7.     android:paddingLeft="@dimen/activity_horizontal_margin"
  8.     android:paddingRight="@dimen/activity_horizontal_margin"
  9.     android:paddingTop="@dimen/activity_vertical_margin"
  10.     tools:context="pl.edu.pwr.lab1borowiak.andlab01.MainActivity">
  11. <RelativeLayout
  12.     android:layout_width="match_parent"
  13.     android:layout_height="match_parent"
  14.     android:descendantFocusability="beforeDescendants"
  15.     android:focusableInTouchMode="true" >
  16.  
  17.  
  18.     <TextView
  19.         android:id="@+id/heightText"
  20.         android:layout_width="wrap_content"
  21.         android:layout_height="wrap_content"
  22.         android:text="@string/height"
  23.         android:textSize="20sp"
  24.         android:layout_margin="20dp"/>
  25.     <EditText
  26.         android:id="@+id/heightEdit"
  27.         android:layout_width="100dp"
  28.         android:layout_height="wrap_content"
  29.         android:inputType="numberDecimal"
  30.         android:layout_alignBottom="@+id/heightText"
  31.         android:layout_alignRight="@+id/countButton"
  32.         android:layout_alignEnd="@+id/countButton"
  33.         android:hint="@string/height"/>
  34.     <TextView
  35.         android:id="@+id/massText"
  36.         android:layout_width="wrap_content"
  37.         android:layout_height="wrap_content"
  38.         android:text="@string/mass"
  39.         android:textSize="20sp"
  40.         android:bottom="@+id/heightText"
  41.         android:layout_below="@+id/heightText"
  42.         android:layout_alignLeft="@+id/heightText"
  43.         android:layout_alignStart="@+id/heightText" />
  44.     <EditText
  45.         android:id="@+id/massEdit"
  46.         android:layout_width="100dp"
  47.         android:layout_height="wrap_content"
  48.         android:inputType="numberDecimal"
  49.         android:hint="@string/kg"
  50.         android:layout_above="@+id/countButton"
  51.         android:layout_alignLeft="@+id/heightEdit"
  52.         android:layout_alignStart="@+id/heightEdit" />
  53.     <Button
  54.         android:id="@+id/countButton"
  55.         android:layout_width="match_parent"
  56.         android:layout_height="wrap_content"
  57.         android:text="@string/count"
  58.         android:textSize="20sp"
  59.         android:layout_marginRight="50dp"
  60.         android:layout_marginLeft="50dp"
  61.         android:layout_marginTop="10dp"
  62.         android:layout_marginBottom="10dp"
  63.         android:layout_below="@+id/massText"/>
  64.  
  65.     <TextView
  66.         android:id="@+id/bmiText"
  67.         android:layout_width="wrap_content"
  68.         android:layout_height="wrap_content"
  69.         android:text="@string/bmi"
  70.         android:layout_below="@+id/countButton"
  71.         android:layout_centerHorizontal="true"
  72.         android:textSize="40sp"/>
  73.     <TextView
  74.         android:id="@+id/bmiResult"
  75.         android:layout_width="wrap_content"
  76.         android:layout_height="wrap_content"
  77.         android:layout_centerHorizontal="true"
  78.         android:layout_below="@+id/bmiText"
  79.         android:textSize="50sp"/>
  80.     <Switch
  81.         android:id="@+id/mySwitch"
  82.         android:layout_width="wrap_content"
  83.         android:layout_height="wrap_content"
  84.         android:layout_below="@+id/bmiResult"
  85.         android:layout_marginTop="20dp"
  86.         android:text="KgM / IbIn"
  87.         android:layout_margin="50dp"
  88.         android:layout_alignParentRight="true"/>
  89.     <Button
  90.         android:id="@+id/infoButton"
  91.         android:layout_width="wrap_content"
  92.         android:layout_height="wrap_content"
  93.  
  94.         android:background="@drawable/toolbar_get_info"
  95.         android:layout_alignBaseline="@+id/mySwitch"
  96.         android:layout_alignBottom="@+id/mySwitch"
  97.         android:layout_alignLeft="@+id/countButton"
  98.         android:layout_alignStart="@+id/countButton" />
  99.  
  100. </RelativeLayout>
  101. </ScrollView>
  102.