Put xml file "api_keys.xml" in the directory "res/value/".
api_keys.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="THE_MOVIE_DB_API_TOKEN">XXXXX</string>
</resources>| import com.squareup.moshi.JsonAdapter | |
| import com.squareup.moshi.Moshi | |
| import com.squareup.moshi.Types | |
| import java.lang.reflect.Type | |
| // val adapter = moshi.listAdapter<MyModel>() | |
| // val adapter = moshi.mapAdapter<String, List<MyModel>>(valueType = listType<MyModel>()) | |
| inline fun <reified E> Moshi.listAdapter(elementType: Type = E::class.java): JsonAdapter<List<E>> { | |
| return adapter(listType<E>(elementType)) |
| import sys, os, shutil | |
| def generateClass(directory, classNumber, methodsPerClass, mainPackage): | |
| className = "Foo" + str(classNumber) | |
| filePath = os.path.join(directory, className + ".java") | |
| with open(filePath,"w+") as f: | |
| f.write("package " + mainPackage + "." + directory + ";\n") | |
| f.write("public class " + className + " {\n") | |
| for i in xrange(0, methodsPerClass): | |
| f.write("public void foo" + str(i) + "(){\n") |
| open class ScopedViewModel : ViewModel() { | |
| private val job = Job() | |
| protected val scope: CoroutineScope = job + Dispatchers.Main | |
| override fun onCleared() { | |
| super.onCleared() | |
| job.cancel() | |
| } | |
| } |
| // Output Android Assets.jsx | |
| // 2012 Todd Linkner | |
| // License: none (public domain) | |
| // v1.0 | |
| // | |
| // This scrip is for Photoshop CS6. It outputs Android XHDPI, HDPI, MDPI, | |
| // and LDPI PNG assets from HDPI source files. The resulting PNGs will be | |
| // placed in sub-folders within your target folder. | |
| /* |
| // Output Android Icons.jsx | |
| // 2012 Todd Linkner | |
| // License: none (public domain) | |
| // v1.0 - base file by Todd Linkner | |
| // v1.1 - added support for XXHDPI, XXXHDPI and added PNG to the file selector | |
| // | |
| // This script is for Photoshop CS6. It outputs Android icons of the | |
| // following sizes from a source PSD at least 512px x 512px | |
| // | |
| // store: |
| import haxe.io.Bytes; | |
| import haxe.Resource; | |
| import openfl.Assets; | |
| import openfl.display.Bitmap; | |
| import openfl.display.BitmapData; | |
| import openfl.display.Loader; | |
| import openfl.utils.ByteArray; | |
| /** |
| var nElements = 7; | |
| var myCounter = 0; | |
| var ping = 0; | |
| function setup() { | |
| createCanvas(600, 500); | |
| } | |
| function draw() { | |
| background((255*(1-(ping*=0.95))), 255,255); |
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> | |
| <!-- Title for the application. [CHAR LIMIT=12] --> | |
| <string name="app_name">Sólo Java</string> | |
| <!-- Hint text display in the empty field for the user's name [CHAR LIMIT=20] --> | |
| <string name="name">Nombre</string> | |
| <!-- Hint text display in the empty field for the user's name [CHAR LIMIT=20] --> | |
| <string name="toppings">Ingredientes</string> |