Skip to content

Instantly share code, notes, and snippets.

@chao2zhang
Created September 2, 2021 22:46
Show Gist options
  • Save chao2zhang/da2a6de03d3e1192d807556cd7abdddf to your computer and use it in GitHub Desktop.
Save chao2zhang/da2a6de03d3e1192d807556cd7abdddf to your computer and use it in GitHub Desktop.
Hot Flow activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<TextView
android:id="@+id/source_flow"
android:textSize="40sp"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/transformed_flow"
app:layout_constraintVertical_chainStyle="packed"
tools:text="15"/>
<TextView
android:id="@+id/transformed_flow"
android:textSize="40sp"
android:layout_gravity="center_horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/source_flow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@id/plus_one"
tools:text="225"/>
<Button
android:id="@+id/plus_one"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
app:layout_constraintTop_toBottomOf="@id/transformed_flow"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:text="Plus 1"/>
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment