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
| package com.example.views | |
| import android.content.Context | |
| import android.graphics.Bitmap | |
| import android.graphics.Canvas | |
| import android.graphics.Color | |
| import android.graphics.Paint | |
| import android.graphics.Path | |
| import android.graphics.RectF | |
| import android.graphics.drawable.Drawable | |
| import android.util.AttributeSet |
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
| <com.com.ZoomImageView | |
| android:id="@+id/ivMedia" | |
| android:layout_width="0dp" | |
| android:layout_height="0dp" | |
| android:visibility="gone" | |
| app:layout_constraintBottom_toTopOf="@id/clBottom" | |
| app:layout_constraintEnd_toEndOf="parent" | |
| app:layout_constraintStart_toStartOf="parent" | |
| app:layout_constraintTop_toBottomOf="@id/actionBar" /> |
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
| package com.example.views | |
| import android.content.Context | |
| import android.graphics.Color | |
| import android.graphics.PorterDuff | |
| import android.graphics.Typeface | |
| import android.util.AttributeSet | |
| import android.util.TypedValue | |
| import android.view.Gravity | |
| import android.view.View |
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.animation.ValueAnimator | |
| import android.content.Context | |
| import android.graphics.Color | |
| import android.graphics.drawable.GradientDrawable | |
| import android.util.AttributeSet | |
| import android.view.Gravity | |
| import android.view.View | |
| import android.widget.FrameLayout | |
| import android.widget.LinearLayout |
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
| class CustomView @JvmOverloads constructor( | |
| context: Context, | |
| attrs: AttributeSet? = null, | |
| defStyleAttr: Int = 0 | |
| ) : ConstraintLayout(context, attrs, defStyleAttr) { | |
| private var cornerRadiusTopLeft = 0f | |
| private var cornerRadiusTopRight = 0f | |
| private var cornerRadiusBottomLeft = 0f | |
| private var cornerRadiusBottomRight = 0f | |
| private var strokeWidth = 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
| class CustomRadioGroup @JvmOverloads constructor( | |
| context: Context, attrs: AttributeSet? = null | |
| ) : ConstraintLayout(context, attrs) { | |
| private var checkedView: CustomRadioView? = null | |
| private var listener: ((CustomRadioView) -> Unit)? = null | |
| fun setOnCheckedChangeListener(listener: (CustomRadioView) -> Unit) { | |
| this.listener = listener | |
| } |
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
| @Composable | |
| fun AnnotatedString() { | |
| Box( | |
| modifier = Modifier | |
| .fillMaxWidth() | |
| .padding(16.dp) | |
| ) { | |
| val list = rememberSaveable { | |
| listOf( |
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
| @Composable | |
| fun MusicKnobScreen() { | |
| Box(contentAlignment = Alignment.Center, | |
| modifier = Modifier.fillMaxSize().background(Color(0xFF101010))) { | |
| Row(verticalAlignment = Alignment.CenterVertically, | |
| horizontalArrangement = Arrangement.Center, | |
| modifier = Modifier | |
| .padding(horizontal = 10.dp) | |
| .border(1.dp, color = Color.Green, RoundedCornerShape(10.dp)) |