🤵♂️
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
| @Stable | |
| interface CircularRowState { | |
| val horizontalOffset: Float | |
| val firstVisibleItem: Int | |
| val lastVisibleItem: Int | |
| val scaleX: Float | |
| val scaleY: Float | |
| val alphaValue: Float | |
| suspend fun snapTo(value: Float) |
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
| val canvasWidth = size.width.toDp() | |
| // calculate the progress for each color | |
| val progressGreen = 40 | |
| val greenSize = (canvasWidth * progressGreen) / 100 | |
| val progressYellow = 20 | |
| val yellowSize = (canvasWidth * progressYellow) / 100 | |
| val progressRed = 15 | |
| val redSize = (canvasWidth * progressRed) / 100 | |
| val progressGray = 5 | |
| val graySize = (canvasWidth * progressGray) / 100 |
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
| LaunchedEffect(greyAnimate,yellowAnimate,redAnimate,greenAnimate,redAnimate) { | |
| launch { | |
| greenAnimate.animateTo( | |
| targetValue = 1f, | |
| animationSpec = tween(durationMillis = 3000, easing = LinearEasing)) | |
| yellowAnimate.animateTo( | |
| targetValue = 1f, | |
| animationSpec = tween(durationMillis = 3000, easing = LinearEasing)) | |
| redAnimate.animateTo( | |
| targetValue = 1f, |
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
| drawRect( | |
| color = Color(0xFFFEC93E), | |
| topLeft = Offset(greenSize.toPx(), 0f), | |
| size = Size(yellowSize.toPx(), 8.dp.toPx()) | |
| ) | |
| //draw red progress with offset = yellow progress + green progress | |
| drawRect( | |
| color = Color(0xFFED5554), | |
| topLeft = Offset(greenSize.toPx() + yellowSize.toPx(), 0f), |
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 MultiColorProgressCanvas() { | |
| Canvas( | |
| modifier = Modifier | |
| .height(16.dp) | |
| .fillMaxSize() | |
| ) { | |
| } |
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 MultiColorProgressCanvas() { | |
| Canvas( | |
| modifier = Modifier | |
| .fillMaxSize() | |
| .padding(16.dp) | |
| ) { | |
| //draw shapes here | |
| // get canvas width in dp |
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.content.Context | |
| import android.graphics.* | |
| import android.util.AttributeSet | |
| import androidx.appcompat.widget.AppCompatSeekBar | |
| import androidx.core.content.ContextCompat | |
| import com.peoplemesh.now.R | |
| class TagTickBar(context: Context, attrs: AttributeSet?, defStyleAttr:Int) :AppCompatSeekBar(context,attrs,defStyleAttr){ | |
| constructor(context: Context) : this(context,null) |
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
| { | |
| "uiKey": "p440ZPs", | |
| "text": "Test 3", | |
| "to": { | |
| "uuid": "3049" | |
| }, | |
| "macros": { | |
| "employees": {}, | |
| "demographics": {}, | |
| "attributes": { |
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
| I: --> PUT https://app-ws.mesh.ai/service/custom/auth/tasks/322676 | |
| I: Content-Type: application/json; charset=UTF-8 | |
| I: Content-Length: 28570 | |
| I: deviceType: APP | |
| I: deviceOsType: Android | |
| I: deviceOsVersion: 1 | |
| I: Cookie: authToken=uM4vK7zSqB6kZggT9dAfPw | |
| I: {"actions":null,"activityCardTask":null,"actual":10.0,"alternateText":null,"commentStatus":null,"completionTS":null,"contentState":null,"createdTS":1619123864000,"delayed":false,"description":null,"detailedStatus":"ONGOING","discussionCommentsCount":null,"dueTS":1625018658000,"from":{"active":true,"lastUserEvent":null,"metadata":{"department":"Technology","designation":"SDE","displayName":"Arun Kumar","email":"arun@thepeoplemesh.com","firstName":"Arun","gender":"MALE","lastName":"Kumar","level":null,"location":"Hyderabad","managerEmail":"saurabh@thepeoplemesh.com"},"organization":{"active":true,"aggregatedvarues":null,"applauseRefillFrequency":"MONTHLY","checkinFrequency":"WEEKLY","country":null,"created":"2020-05-29T18:11:25.000+0000","currency":"INR","defaul |
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.graphics.Canvas | |
| import android.graphics.Color | |
| import android.graphics.ColorFilter | |
| import android.graphics.Paint | |
| import android.graphics.PixelFormat | |
| import android.graphics.RectF | |
| import android.graphics.Typeface | |
| import android.graphics.drawable.ShapeDrawable | |
| import android.graphics.drawable.shapes.OvalShape | |
| import android.graphics.drawable.shapes.RectShape |