Last active
November 12, 2018 00:05
-
-
Save bdumeljic/1253c8082cfd41c2d5d1783e692bc3aa to your computer and use it in GitHub Desktop.
[Banner] #android #material #design
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
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:state_selected="true"> | |
<objectAnimator android:propertyName="elevation" | |
android:valueTo="@dimen/standard_elevation" | |
android:valueType="floatType" | |
android:duration="100"/> | |
</item> | |
<item> | |
<objectAnimator android:propertyName="elevation" | |
android:valueTo="@dimen/no_elevation" | |
android:valueType="floatType" | |
android:duration="100"/> | |
</item> | |
</selector> |
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
<LinearLayout | |
android:id="@+id/banner" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:visibility="visible" | |
android:orientation="vertical"> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginBottom="@dimen/standard_spacing" | |
android:layout_marginTop="@dimen/standard_spacing_big" | |
android:layout_marginLeft="@dimen/standard_spacing_big" | |
android:layout_marginRight="@dimen/standard_spacing_big" | |
android:text="@string/msg_banner_msg" /> | |
<Button | |
android:id="@+id/gallery_banner_btn_verify_account" | |
style="@style/Widget.AppCompat.Button.Borderless.Colored" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="end|bottom" | |
android:text="@string/msg_banner_btn" /> | |
<View | |
android:id="@+id/divider" | |
android:layout_width="match_parent" | |
android:layout_height="1dp" | |
android:background="?android:attr/listDivider" /> | |
</LinearLayout> |
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
appBar.setStateListAnimator(AnimatorInflater.loadStateListAnimator(getContext(), R.animator.appbar_elevation)); | |
----- | |
TransitionSet transitionSet = new TransitionSet(); | |
transitionSet.addTransition(new Slide(Gravity.TOP)); | |
TransitionManager.beginDelayedTransition(container, transitionSet); | |
appBar.setSelected(true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment