This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Migrations { | |
public static final Migration MIGRATION_1_2 = new Migration(1, 2) { | |
@Override | |
public void migrate(@NonNull SupportSQLiteDatabase database) { | |
database.execSQL("ALTER TABLE user ADD COLUMN professionOwnerId INTEGER NOT NULL DEFAULT 1"); | |
} | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
V/MotionLayout: CHECK: start is hided | |
V/MotionLayout: CHECK: end is shown | |
W/MotionLayout: CHECK: hided NO View matches id itemBackground | |
W/MotionLayout: CHECK: hided(itemBackground) no LAYOUT_HEIGHT | |
W/MotionLayout: CHECK: hided NO View matches id dragLabel | |
W/MotionLayout: CHECK: hided NO View matches id itemForeground | |
W/MotionLayout: CHECK: hided(itemForeground) no LAYOUT_HEIGHT | |
W/MotionLayout: CHECK: hided NO View matches id deleteAction | |
V/MotionLayout: CHECK: CURRENT | |
V/MotionLayout: CHECK: transition = hided -> shown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This is applied for default --> | |
<Transition | |
app:constraintSetEnd="@id/panelExpanded" | |
app:constraintSetStart="@id/panelCollapsed" | |
app:duration="500"> | |
<OnSwipe app:dragDirection="dragRight" /> | |
</Transition> | |
<!-- This must be set explicitly from code or xml --> | |
<Transition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<MotionScene> | |
<!-- You must implement all the attributes --> | |
<ConstraintSet android:id="@+id/viewsInvisible"> | |
<Constraint android:id="@+id/loading"> | |
<Layout | |
android:layout_width="64dp" | |
android:layout_height="64dp" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintStart_toStartOf="parent" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bottomSheetSwitch.setOnCheckedChangeListener { _, bottomSheetSmall -> | |
if (bottomSheetSmall) | |
motionLayout.loadLayoutDescription(R.xml.expandable_bottom_sheet_small) | |
else | |
motionLayout.loadLayoutDescription(R.xml.expandable_bottom_sheet_big) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ConstraintSet | |
android:id="@+id/end" | |
motion:deriveConstraintsFrom="@id/start"> | |
<Constraint | |
android:id="@+id/card" | |
android:layout_width="0dp" | |
android:layout_height="100dp" | |
android:layout_marginStart="0dp" | |
android:layout_marginEnd="0dp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
motionLayout.setTransitionListener(MotionProgressListener { progress: Float -> | |
lottie.progress = progress | |
arrow.isVisible = (progress <= 0.5f) | |
editText.isVisible = (progress >= 0.5f) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<com.google.android.material.card.MaterialCardView | |
android:id="@+id/toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="100dp" | |
app:cardCornerRadius="0dp" | |
app:cardElevation="10dp"> | |
<RelativeLayout | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
implementation 'com.airbnb.android:lottie:3.4.0' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
list.adapter = RvAdapter { name -> | |
editText.setText(name) | |
motionLayout.transitionToEnd() | |
} |