Skip to content

Commit

Permalink
state hoisting pattern added
Browse files Browse the repository at this point in the history
  • Loading branch information
Gowtham committed Aug 23, 2021
1 parent db8c6fd commit 305cafb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import android.util.Log

object LogMessage {

private val logVisible = true
private const val logVisible = false

internal fun v(msg: String) {
if (logVisible) Log.v("Compose-Ratingbar :",msg)
Expand Down
5 changes: 0 additions & 5 deletions ratingbar/src/main/java/com/gowtham/ratingbar/RatingBar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,22 @@ package com.gowtham.ratingbar
import android.util.Log
import android.view.MotionEvent
import androidx.compose.foundation.layout.*
import androidx.compose.material.Surface
import androidx.compose.runtime.*
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.input.key.onKeyEvent
import androidx.compose.ui.input.pointer.pointerInteropFilter
import androidx.compose.ui.layout.onSizeChanged
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.semantics.SemanticsPropertyKey
import androidx.compose.ui.semantics.SemanticsPropertyReceiver
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.toSize
import com.gowtham.ratingbar.RatingBarUtils.stepSized
import kotlin.math.absoluteValue

sealed class StepSize {
object ONE : StepSize()
Expand Down

0 comments on commit 305cafb

Please sign in to comment.