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
RichPathView colorPickerRichPathView = findViewById(R.id.color_picker); | |
final RichPath bluePath = colorPickerRichPathView.findRichPathByName("bluePath"); | |
final RichPath redPath = colorPickerRichPathView.findRichPathByName("redPath"); | |
final RichPath greenPath = colorPickerRichPathView.findRichPathByName("greenPath"); | |
final RichPath purplePath = colorPickerRichPathView.findRichPathByName("purplePath"); | |
colorPickerRichPathView.setOnPathClickListener(new RichPath.OnPathClickListener() { | |
@Override | |
public void onClick(RichPath richPath) { | |
// reset all strokes |
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
<com.richpath.RichPathView | |
android:id="@+id/color_picker" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
app:vector="@drawable/color_picker" /> |
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
RichPathView colorPickerRichPathView = findViewById(R.id.color_picker); | |
final RichPath bluePath = colorPickerRichPathView.findRichPathByName("bluePath"); | |
final RichPath redPath = colorPickerRichPathView.findRichPathByName("redPath"); | |
final RichPath greenPath = colorPickerRichPathView.findRichPathByName("greenPath"); | |
final RichPath purplePath = colorPickerRichPathView.findRichPathByName("purplePath"); | |
colorPickerRichPathView.setOnPathClickListener(new RichPath.OnPathClickListener() { | |
@Override | |
public void onClick(RichPath richPath) { | |
bluePath.setStrokeAlpha(0f); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<vector xmlns:android="http://schemas.android.com/apk/res/android" | |
android:width="218dp" | |
android:height="64dp" | |
android:viewportHeight="40" | |
android:viewportWidth="136"> | |
<path | |
android:fillColor="#FFFFFF" | |
android:pathData="M136,38c0,1.1-0.9,2-2,2H2c-1.1,0-2-0.9-2-2V2c0-1.1,0.9-2,2-2h132c1.1,0,2,0.9,2,2V38z" /> |
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
final KyrieDrawable kyrieDrawable = | |
KyrieDrawable.builder() | |
.viewport(409, 280) | |
.child( | |
PathNode.builder() | |
.strokeColor(Color.BLACK) | |
.strokeWidth(1f) | |
.fillColor( | |
Animation.ofArgb(hippoFillColor, elephantFillColor).duration(300), | |
Animation.ofArgb(buffaloFillColor).startDelay(600).duration(300), |
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
final RichPath richPath = imageView.findFirstRichPath(); | |
richPath.setStrokeColor(Color.BLACK); | |
richPath.setStrokeWidth(1f); | |
RichPathAnimator | |
.animate(richPath) | |
.pathData(elephantPathData) | |
.fillColor(elephantFillColor) | |
.duration(600) |
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
val VariableElements = typeElement.enclosedElements | |
.filterIsInstance<VariableElement>() |
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
import com.tarek30.annotation.EasyJSON; | |
import org.json.JSONObject; | |
@EasyJSON | |
public class Car { | |
long modelNumber; | |
int maxSpeed; | |
String color; | |
String manufacturer; | |
String style; |
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
import com.google.auto.service.AutoService | |
import com.tarek30.annotation.EasyJSON | |
import javax.annotation.processing.AbstractProcessor | |
import javax.annotation.processing.ProcessingEnvironment | |
import javax.annotation.processing.Processor | |
import javax.annotation.processing.RoundEnvironment | |
import javax.lang.model.SourceVersion | |
import javax.lang.model.element.TypeElement | |
@AutoService(Processor::class) |
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
@Target(AnnotationTarget.CLASS) | |
annotation class EasyJSON |