|
<?xml version="1.0" encoding="utf-8"?> |
|
<LinearLayout 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:id="@+id/main" |
|
android:layout_width="match_parent" |
|
android:layout_height="match_parent" |
|
tools:context=".MainActivity"> |
|
|
|
<LinearLayout |
|
android:layout_width="match_parent" |
|
android:layout_height="match_parent" |
|
android:orientation="vertical"> |
|
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout |
|
android:layout_width="match_parent" |
|
android:layout_height="wrap_content"> |
|
|
|
<com.google.android.material.appbar.AppBarLayout |
|
android:layout_width="match_parent" |
|
android:layout_height="wrap_content"> |
|
|
|
<com.google.android.material.appbar.MaterialToolbar |
|
android:id="@+id/topAppBar" |
|
android:layout_width="match_parent" |
|
android:layout_height="wrap_content" |
|
app:navigationIcon="@drawable/baseline_menu_24" |
|
app:title="@string/app_name" /> |
|
|
|
</com.google.android.material.appbar.AppBarLayout> |
|
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout> |
|
|
|
<LinearLayout |
|
android:layout_width="match_parent" |
|
android:layout_height="match_parent" |
|
android:layout_margin="12dp" |
|
android:gravity="center" |
|
android:orientation="vertical"> |
|
|
|
<com.google.android.material.textview.MaterialTextView |
|
android:layout_width="wrap_content" |
|
android:layout_height="wrap_content" |
|
android:layout_marginTop="16dp" |
|
android:text="@string/calc_type_length" |
|
android:textSize="24sp" /> |
|
|
|
<com.google.android.material.textfield.TextInputLayout |
|
android:id="@+id/fromTextField" |
|
android:layout_width="match_parent" |
|
android:layout_height="wrap_content" |
|
android:layout_marginTop="16dp" |
|
android:hint="@string/input_number"> |
|
|
|
<com.google.android.material.textfield.TextInputEditText |
|
android:layout_width="match_parent" |
|
android:layout_height="wrap_content" |
|
android:inputType="numberDecimal" /> |
|
|
|
</com.google.android.material.textfield.TextInputLayout> |
|
|
|
<com.google.android.material.textfield.TextInputLayout |
|
android:id="@+id/fromUnitInput" |
|
style="@style/Widget.Material3.TextInputLayout.FilledBox.ExposedDropdownMenu" |
|
android:layout_width="match_parent" |
|
android:layout_height="wrap_content" |
|
android:layout_marginTop="16dp" |
|
android:hint="@string/fromUnitHint"> |
|
|
|
<AutoCompleteTextView |
|
android:layout_width="match_parent" |
|
android:layout_height="wrap_content" |
|
app:simpleItems="@array/units_menu_array" |
|
tools:ignore="LabelFor" /> |
|
|
|
</com.google.android.material.textfield.TextInputLayout> |
|
|
|
<com.google.android.material.textfield.TextInputLayout |
|
android:id="@+id/toUnitInput" |
|
style="@style/Widget.Material3.TextInputLayout.FilledBox.ExposedDropdownMenu" |
|
android:layout_width="match_parent" |
|
android:layout_height="wrap_content" |
|
android:layout_marginTop="16dp" |
|
android:hint="@string/toUnitHint"> |
|
|
|
<AutoCompleteTextView |
|
android:layout_width="match_parent" |
|
android:layout_height="wrap_content" |
|
app:simpleItems="@array/units_menu_array" |
|
tools:ignore="LabelFor" /> |
|
|
|
</com.google.android.material.textfield.TextInputLayout> |
|
|
|
<com.google.android.material.button.MaterialButton |
|
android:id="@+id/convertButton" |
|
android:layout_width="wrap_content" |
|
android:layout_height="wrap_content" |
|
android:layout_marginTop="16dp" |
|
android:text="@string/convert"> |
|
|
|
</com.google.android.material.button.MaterialButton> |
|
|
|
<com.google.android.material.textview.MaterialTextView |
|
android:id="@+id/outputTextView" |
|
android:layout_width="wrap_content" |
|
android:layout_height="wrap_content" |
|
android:text=""> |
|
|
|
</com.google.android.material.textview.MaterialTextView> |
|
</LinearLayout> |
|
|
|
|
|
</LinearLayout> |
|
|
|
|
|
</LinearLayout> |