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
| public class Car { | |
| long modelNumber; | |
| int maxSpeed; | |
| String color; | |
| String manufacturer; | |
| String style; | |
| String price; | |
| } |
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
| JSONObject toJson() { | |
| JSONObject jsonObject = new JSONObject(); | |
| try { | |
| jsonObject.put("modelNumber", modelNumber); | |
| jsonObject.put("maxSpeed", maxSpeed); | |
| jsonObject.put("color", color); | |
| jsonObject.put("manufacturer", manufacturer); | |
| jsonObject.put("style", style); | |
| jsonObject.put("price", price); | |
| } catch (JSONException e) { |
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
| public JSONObject toJson() { | |
| JSONObject jsonObject = new JSONObject(); | |
| try { | |
| jsonObject.put("modelNumber", modelNumber); | |
| jsonObject.put("maxSpeed", maxSpeed); | |
| jsonObject.put("color", color); | |
| jsonObject.put("manufacturer", manufacturer); | |
| jsonObject.put("style", style); | |
| jsonObject.put("price", price); | |
| } catch (JSONException e) { |
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
| @Target(AnnotationTarget.CLASS) | |
| annotation class EasyJSON |
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 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 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 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 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 VariableElements = typeElement.enclosedElements | |
| .filterIsInstance<VariableElement>() |
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
| final RichPath richPath = imageView.findFirstRichPath(); | |
| richPath.setStrokeColor(Color.BLACK); | |
| richPath.setStrokeWidth(1f); | |
| RichPathAnimator | |
| .animate(richPath) | |
| .pathData(elephantPathData) | |
| .fillColor(elephantFillColor) | |
| .duration(600) |
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
| 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 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
| <?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" /> |
OlderNewer