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
<?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=".MainActivity" | |
android:background="@color/colorBg"> | |
<View |
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
<?xml version="1.0" encoding="utf-8"?> | |
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item android:state_selected="true" android:drawable="@drawable/selector_tab_second"/> | |
<item android:state_selected="false" android:drawable="@drawable/unselector_tab"/> | |
</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
<?xml version="1.0" encoding="utf-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
android:shape="rectangle"> | |
<!-- radius should be half of the desired TabLayout height --> | |
<corners | |
android:radius="15dp"/> | |
<!-- color of the selected tab --> | |
<solid |
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
<?xml version="1.0" encoding="utf-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
android:shape="rectangle"> | |
<!-- radius should be half of the desired TabLayout height --> | |
<corners | |
android:radius="15dp"/> | |
<!-- color of the selected tab --> | |
<solid |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="colorBg">#202125</color> | |
<color name="colorText">#7e8186</color> | |
<color name="colorTextSelected">#379477</color> | |
<color name="colorBgTabSelected">#043d2e</color> | |
<color name="transparent">#00000000</color> | |
</resources> |
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
val tabs = tabLayout.getChildAt(0) as ViewGroup | |
for (i in 0 until tabs.childCount - 1) { | |
val tab = tabs.getChildAt(i) | |
val layoutParams = tab.layoutParams as LinearLayout.LayoutParams | |
layoutParams.marginEnd = dpToPx(resources, 8f).toInt() | |
layoutParams.marginStart = dpToPx(resources, 8f).toInt() | |
tab.layoutParams = layoutParams | |
tabLayout.requestLayout() | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<androidx.appcompat.widget.SwitchCompat | |
android:id="@+id/toggleSwitch" | |
android:layout_width="wrap_content" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@android:color/transparent"> | |
<ImageView | |
android:id="@+id/card_man" | |
android:layout_width="121dp" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<set xmlns:android="http://schemas.android.com/apk/res/android"> | |
<objectAnimator | |
android:valueFrom="1.0" | |
android:valueTo="0.0" | |
android:propertyName="alpha" | |
android:duration="0" /> | |
<objectAnimator |
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
<?xml version="1.0" encoding="utf-8"?> | |
<set xmlns:android="http://schemas.android.com/apk/res/android"> | |
<objectAnimator | |
android:valueFrom="0" | |
android:valueTo="180" | |
android:propertyName="rotationY" | |
android:duration="1500" /> | |
<objectAnimator | |
android:valueFrom="1.0" |
OlderNewer