Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fragment Home XML
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.dashboard.DashboardFragment">
<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/lato"
android:text="@string/rub_sign"
android:textColor="#5E35B1"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="@+id/rub_buy"
app:layout_constraintEnd_toStartOf="@+id/rub_sale"
app:layout_constraintStart_toEndOf="@+id/rub_buy"
app:layout_constraintTop_toTopOf="@+id/rub_buy" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/lato"
android:text="@string/euro_sign"
android:textColor="#5E35B1"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="@+id/eur_buy"
app:layout_constraintEnd_toStartOf="@+id/eur_sale"
app:layout_constraintStart_toEndOf="@+id/eur_buy"
app:layout_constraintTop_toTopOf="@+id/eur_buy" />
<TextView
android:id="@+id/rub_sale"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:layout_marginTop="2dp"
android:fontFamily="@font/lato"
android:text=""
android:textSize="24sp"
app:layout_constraintStart_toStartOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@+id/eur_sale"
tools:text="@tools:sample/cities" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/dollar_sign"
android:textColor="#5E35B1"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="@+id/usd_buy"
app:layout_constraintEnd_toStartOf="@+id/usd_sale"
app:layout_constraintStart_toEndOf="@+id/usd_buy"
app:layout_constraintTop_toTopOf="@+id/usd_buy"
app:layout_constraintVertical_bias="0.0" />
<TextView
android:id="@+id/rub_buy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginEnd="18dp"
android:fontFamily="@font/lato"
android:textSize="24sp"
app:layout_constraintEnd_toStartOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@+id/eur_buy"
tools:text="@tools:sample/cities" />
<TextView
android:id="@+id/eur_sale"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:layout_marginTop="2dp"
android:fontFamily="@font/lato"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@+id/usd_sale"
tools:text="@tools:sample/cities" />
<TextView
android:id="@+id/eur_buy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:layout_marginEnd="18dp"
android:fontFamily="@font/lato"
android:textSize="24sp"
app:layout_constraintEnd_toStartOf="@+id/guideline"
app:layout_constraintTop_toBottomOf="@+id/usd_buy"
tools:text="@tools:sample/cities" />
<TextView
android:id="@+id/usd_sale"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="18dp"
android:layout_marginTop="30dp"
android:fontFamily="@font/lato"
android:textSize="24sp"
app:layout_constraintStart_toStartOf="@+id/guideline"
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/cities" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.05109489" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.95" />
<TextView
android:id="@+id/usd_buy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginEnd="18dp"
android:fontFamily="@font/lato"
android:textSize="24sp"
app:layout_constraintEnd_toStartOf="@+id/guideline"
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/cities" />
<com.google.android.material.button.MaterialButtonToggleGroup
android:id="@+id/toggleGroup3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:orientation="horizontal"
app:checkedButton="@id/btn_sale"
app:layout_constraintEnd_toStartOf="@+id/guideline3"
app:layout_constraintStart_toStartOf="@+id/guideline2"
app:layout_constraintTop_toBottomOf="@+id/textView6"
app:selectionRequired="true"
app:singleSelection="true">
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_buy"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_buy">
</com.google.android.material.button.MaterialButton>
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_sale"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_sale"
tools:layout_editor_absoluteX="205dp"
tools:layout_editor_absoluteY="98dp">
</com.google.android.material.button.MaterialButton>
</com.google.android.material.button.MaterialButtonToggleGroup>
<com.google.android.material.button.MaterialButtonToggleGroup
android:id="@+id/toggleGroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal"
app:checkedButton="@id/btn_uah"
app:layout_constraintEnd_toStartOf="@+id/guideline3"
app:layout_constraintStart_toStartOf="@+id/guideline2"
app:layout_constraintTop_toBottomOf="@+id/toggleGroup3"
app:selectionRequired="true"
app:singleSelection="true">
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_uah"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/uah_btn">
</com.google.android.material.button.MaterialButton>
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_usd"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/usd_btn">
</com.google.android.material.button.MaterialButton>
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_eur"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/eur_btn">
</com.google.android.material.button.MaterialButton>
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_rub"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/rub_btn">
</com.google.android.material.button.MaterialButton>
</com.google.android.material.button.MaterialButtonToggleGroup>
<EditText
android:id="@+id/editText3"
android:layout_width="153dp"
android:layout_height="55dp"
android:layout_marginTop="8dp"
android:ems="10"
android:gravity="center_horizontal"
android:hint="@string/edit_text_hint"
android:imeOptions="actionDone"
android:importantForAutofill="no"
android:inputType="number|numberDecimal"
android:textAlignment="center"
android:textSize="22dp"
app:layout_constraintEnd_toStartOf="@+id/guideline"
app:layout_constraintStart_toStartOf="@+id/guideline2"
app:layout_constraintTop_toBottomOf="@+id/toggleGroup" />
<TextView
android:id="@+id/textView"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:textAlignment="center"
android:textSize="22sp"
app:layout_constraintBaseline_toBaselineOf="@+id/editText3"
app:layout_constraintEnd_toStartOf="@+id/guideline3"
app:layout_constraintStart_toStartOf="@+id/guideline" />
<com.google.android.material.button.MaterialButtonToggleGroup
android:id="@+id/toggleGroup2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal"
app:checkedButton="@id/btn_eur_sale"
app:layout_constraintEnd_toStartOf="@+id/guideline3"
app:layout_constraintStart_toStartOf="@+id/guideline2"
app:layout_constraintTop_toBottomOf="@+id/editText3"
app:selectionRequired="true"
app:singleSelection="true">
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_uah_sale"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/uah_btn"
tools:layout_editor_absoluteX="144dp"
tools:layout_editor_absoluteY="374dp">
</com.google.android.material.button.MaterialButton>
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_usd_sale"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/usd_btn">
</com.google.android.material.button.MaterialButton>
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_eur_sale"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/eur_btn"
tools:layout_editor_absoluteX="144dp"
tools:layout_editor_absoluteY="374dp">
</com.google.android.material.button.MaterialButton>
<com.google.android.material.button.MaterialButton
android:id="@+id/btn_rub_sale"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/rub_btn"
tools:layout_editor_absoluteX="230dp"
tools:layout_editor_absoluteY="374dp">
</com.google.android.material.button.MaterialButton>
</com.google.android.material.button.MaterialButtonToggleGroup>
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/text_timer" />
<TextView
android:id="@+id/text_timer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="TextView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/toggleGroup2" />
<com.yandex.mobile.ads.AdView
android:id="@+id/banner_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="136dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment