-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sidsharma2002/development
Development
- Loading branch information
Showing
22 changed files
with
680 additions
and
33 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
jdk: | ||
- openjdk11 | ||
before_install: | ||
- ./scripts/prepareJitpackEnvironment.sh |
This file contains 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
7 changes: 7 additions & 0 deletions
7
spinwill/src/main/java/com/example/spinwill/adapter/WillPaintAdapter.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.example.spinwill.adapter | ||
|
||
import android.graphics.Paint | ||
|
||
interface WillPaintAdapter { | ||
fun setPaintProperties(paint: Paint) | ||
} |
11 changes: 11 additions & 0 deletions
11
spinwill/src/main/java/com/example/spinwill/models/WillDimenProperties.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.example.spinwill.models | ||
|
||
data class WillDimenProperties( | ||
var paddingLeft: Int = 0, | ||
var paddingRight: Int = 0, | ||
var paddingTop: Int = 0, | ||
var paddingBottom: Int = 0, | ||
var padding: Int = 0, | ||
var radius: Int = 0, | ||
var center: Int = 0 | ||
) |
8 changes: 8 additions & 0 deletions
8
spinwill/src/main/java/com/example/spinwill/models/WillGradient.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.example.spinwill.models | ||
|
||
import android.graphics.RadialGradient | ||
|
||
data class WillGradient( | ||
var darkYellow: RadialGradient? = null, | ||
var lightYellow: RadialGradient? = null | ||
) |
34 changes: 34 additions & 0 deletions
34
spinwill/src/main/java/com/example/spinwill/models/WillPaintProperties.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.example.spinwill.models | ||
|
||
import android.graphics.Paint | ||
import com.example.spinwill.adapter.WillPaintAdapter | ||
|
||
data class WillPaintProperties( | ||
val archPaint: Paint = Paint().apply { | ||
isAntiAlias = true | ||
isDither = true | ||
style = Paint.Style.FILL_AND_STROKE | ||
}, | ||
val textPaint: Paint = Paint().apply { | ||
isAntiAlias = true | ||
isDither = true | ||
letterSpacing = 0.1f | ||
}, | ||
val overlayTextPaint: Paint = Paint().apply { | ||
isAntiAlias = true | ||
isDither = true | ||
letterSpacing = 0.1f | ||
}, | ||
val separationArchPaint: Paint = Paint().apply { | ||
style = Paint.Style.STROKE | ||
isAntiAlias = true | ||
isDither = true | ||
}, | ||
val bitmapPaint: Paint = Paint(Paint.ANTI_ALIAS_FLAG or Paint.DITHER_FLAG or Paint.FILTER_BITMAP_FLAG), | ||
|
||
var archPaintAdapter: WillPaintAdapter? = null, | ||
var textPaintAdapter: WillPaintAdapter? = null, | ||
var overlayTextPaintAdapter: WillPaintAdapter? = null, | ||
var separationArchPaintAdapter: WillPaintAdapter? = null, | ||
var bitmapPaintAdapter: WillPaintAdapter? = null | ||
) |
25 changes: 25 additions & 0 deletions
25
spinwill/src/main/java/com/example/spinwill/ui/DimenAdapters/DimenAdapter1.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.example.spinwill.ui.DimenAdapters | ||
|
||
import com.example.spinwill.models.WillDimenProperties | ||
import com.example.spinwill.models.WillPaintProperties | ||
|
||
interface OffSetDimenAdapter1 { | ||
|
||
fun getVOffsetOverLayText( | ||
tempAngle: Float, | ||
sweepAngle: Float, | ||
text: String, | ||
itemsSize: Int, | ||
paintProps: WillPaintProperties, | ||
dimenProps: WillDimenProperties | ||
): Int | ||
|
||
fun getHOffsetOverlayText( | ||
tempAngle: Float, | ||
sweepAngle: Float, | ||
text: String, | ||
itemsSize: Int, | ||
paintProps: WillPaintProperties, | ||
dimenProps: WillDimenProperties | ||
): Int | ||
} |
46 changes: 46 additions & 0 deletions
46
spinwill/src/main/java/com/example/spinwill/ui/SpinWillView1.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.example.spinwill.ui | ||
|
||
import android.content.Context | ||
import android.view.LayoutInflater | ||
import android.view.View | ||
import android.widget.FrameLayout | ||
import androidx.annotation.ColorRes | ||
import androidx.annotation.IdRes | ||
import androidx.constraintlayout.widget.ConstraintLayout | ||
import com.example.spinwill.R | ||
import com.example.spinwill.ui.adapters.WillItemUiAdapter | ||
|
||
class SpinWillView1<T> constructor( | ||
context: Context | ||
) : ConstraintLayout(context) { | ||
|
||
private lateinit var willView1: WillView1<T> | ||
|
||
init { | ||
val parentView = | ||
LayoutInflater.from(context).inflate(R.layout.layout_spinwillview1, null, false) | ||
willView1 = WillView1<T>(context, null) | ||
val parentLayout: FrameLayout = parentView.findViewById(R.id.container) | ||
parentLayout.addView(willView1) | ||
addView(parentView) | ||
postInvalidate() | ||
} | ||
|
||
fun setItems(data: List<T>) { | ||
willView1.setItems(data) | ||
willView1.invalidate() | ||
} | ||
|
||
fun setItemAdapter(willItemUiAdapter: WillItemUiAdapter<T>) { | ||
willView1.setItemAdapter(willItemUiAdapter) | ||
willView1.invalidate() | ||
} | ||
|
||
fun getWillView(): WillView1<T> { | ||
return willView1 | ||
} | ||
|
||
fun setTextColor(@IdRes color: Int) { | ||
willView1.paintProps.textPaint.color = color | ||
} | ||
} |
Oops, something went wrong.