This file contains hidden or 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
| fun showEmptyEquipmentState(show: Boolean) { | |
| TransitionManager.beginDelayedTransition(content_root) | |
| empty_equipment.isGone = !show | |
| Handler().postDelayed({ | |
| if (isAdded) { | |
| equipment_edit_highlight.isSelected = show | |
| } | |
| }, 800) | |
| } |
This file contains hidden or 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
| override fun onDataChanged() { | |
| super.onDataChanged() | |
| showEmptyEquipmentState(equipmentAdapter.itemCount <= 0) | |
| } |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <item android:state_selected="true"> | |
| <objectAnimator | |
| android:duration="200" | |
| android:propertyName="elevation" | |
| android:valueTo="6dp" | |
| android:valueType="floatType" /> | |
| </item> |
This file contains hidden or 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
| <FrameLayout | |
| android:id="@+id/header" | |
| android:layout_width="match_parent" | |
| android:layout_height="52dp" | |
| android:background="#ffffff" | |
| android:stateListAnimator="@animator/toolbar_elevation"> |
This file contains hidden or 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
| scroll_view.setOnScrollChangeListener { _, _, _, _, _ -> | |
| header.isSelected = scroll_view.canScrollVertically(-1) | |
| } |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <transition xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <item android:drawable="@color/category_subject" /> | |
| <item android:drawable="@color/category_equipment" /> | |
| </transition> |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <transition xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <!-- The drawables used here can be solid colors, gradients, shapes, images, etc. --> | |
| <item android:drawable="@color/category_subject" /> | |
| <item android:drawable="@color/category_equipment" /> | |
| </transition> |
This file contains hidden or 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
| val transition = onboarding_overlay.background as TransitionDrawable | |
| transition.reverseTransition(500) |
This file contains hidden or 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
| val transition = onboarding_overlay.background as TransitionDrawable | |
| transition.startTransition(500) | |
| supportFragmentManager.beginTransaction() | |
| .replace(R.id.onboarding_overlay, EquipmentOnboardingFragment()) | |
| .setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out) | |
| .commit() |
This file contains hidden or 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
| import android.arch.lifecycle.LiveData | |
| import com.google.firebase.firestore.FirebaseFirestore | |
| class AppConfigLiveData : LiveData<AndroidAppConfig>() { | |
| var db = FirebaseFirestore.getInstance() | |
| override fun onActive() { | |
| super.onActive() |