Android Studio design gradient stripe
Colors.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#008577</color>
<color name="colorPrimaryDark">#00574B</color>
<color name="colorAccent">#D81B60</color>
<color name="colorTransparent">#00FFFFFF</color>
<color name="colorGradientStart">#D9ff43</color>
<color name="colorGradientCenter">#f67831</color>
<color name="colorGradientend">#ff1493</color>
<color name="colorStripeStart">#1eff0e5a</color>
<color name="colorStripetend">#1effd640</color>
</resources>
Android Studio Design Animation
Style.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
Android Studio Design Animation
Stripe_gradients.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:type="linear"
android:angle="90"
android:startColor="@color/colorStripeStart"
android:centerColor="@color/colorStripetend"/>
</shape>
Android Studio Design Animation
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"
android:id="@+id/gradient_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/animationgradientlist"
tools:context=".design8part15">
</androidx.constraintlayout.widget.ConstraintLayout>
Android Studio Design Animation
Main_activity.kt
package com.designapp
import android.graphics.drawable.AnimationDrawable
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.view.animation.AnimationUtils
import kotlinx.android.synthetic.main.activity_design9part15.*
class design9part15 : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_design9part15)
window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
val animationDrawable = gradient_layout2.background as AnimationDrawable
animationDrawable.setEnterFadeDuration(10)
animationDrawable.setExitFadeDuration(5000)
animationDrawable.start()
val anim = AnimationUtils.loadAnimation(this, R.anim.stripe_anim)
layoutstripe.startAnimation(anim)
}
}
Android Studio Design Animation
0 Response to "Android Studio design gradient stripe"
Post a Comment