Skip to content

Instantly share code, notes, and snippets.

View smartherd's full-sized avatar

Sriyank Siddhartha smartherd

View GitHub Profile
@smartherd
smartherd / MainActivity.kt
Last active October 12, 2020 15:39
KeyFrame Animation
package com.sriyank.keyframeanimation
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.transition.ChangeBounds
import android.transition.TransitionManager
import android.view.animation.AnticipateOvershootInterpolator
import androidx.constraintlayout.widget.ConstraintSet
import kotlinx.android.synthetic.main.activity_main.*
@smartherd
smartherd / MainActivity.kt
Last active October 14, 2020 11:47
Transition Animation
package com.sriyank.transitionanimations
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.transition.Scene
import android.transition.Transition
import android.view.View
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {
@smartherd
smartherd / MainActivity.kt
Last active October 17, 2020 07:49
Frame Animation GISTs
package com.sriyank.frameanimation
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
@smartherd
smartherd / activity_main.xml
Last active June 14, 2022 14:52
AnimatedVectorDrawable
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/avdImage"
android:layout_width="120dp"
android:layout_height="120dp"
@smartherd
smartherd / activity_temp.xml
Last active October 27, 2020 12:12
9-patch Drawable
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
@smartherd
smartherd / Country.kt
Last active March 2, 2024 23:11
Spinner GISTs
package com.sriyank.spinner
data class Country(val image: Int, val name: String)
object Countries {
private val images = intArrayOf(
R.drawable.all_countries,
R.drawable.india,
R.drawable.united_states,
@smartherd
smartherd / activity_main.xml
Last active January 2, 2024 16:10
CircularImageView
<?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"
android:layout_width="match_parent"
android:layout_height="match_parent">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/celebrityImage"
android:layout_width="250dp"
@smartherd
smartherd / action_hero.jpeg
Last active July 1, 2024 21:18
ShapeableImageView
action_hero.jpeg
@smartherd
smartherd / MainActivity.kt
Created November 8, 2020 13:31
Spannable String
package com.sriyank.spannablestring
import android.graphics.Color
import android.graphics.Typeface
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.text.Spannable
import android.text.SpannableString
import android.text.SpannableStringBuilder
import android.text.TextPaint
@smartherd
smartherd / MainActivity.kt
Created November 27, 2020 08:03
Material Toggle Button (Material Design Component: MDC)
package com.sriyank.mdccomponents
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.widget.Toast
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {