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
@Composable | |
fun AppGreeting() { | |
Text(text = "Hello from app module!") | |
} | |
@Preview(name = "App module greeting", group = "Greetings") | |
@Composable | |
fun DefaultPreview() { | |
ShowkaseTheme { | |
AppGreeting() |
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
@ShowkaseScreenshot(rootShowkaseClass = ShowkaseRoot::class) | |
abstract class ComposeTests : ShowkaseScreenshotTest { | |
override fun onScreenshot( | |
id: String, | |
name: String, | |
group: String, | |
styleName: String?, | |
screenshotType: ShowkaseScreenshotType, | |
screenshotBitmap: Bitmap |
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
lateinit var manager: ReviewManager | |
var reviewInfo: ReviewInfo? = null | |
// Call this method asap, for example in onCreate() | |
private fun initReviews() { | |
manager = ReviewManagerFactory.create(this) | |
manager.requestReviewFlow().addOnCompleteListener { request -> | |
if (request.isSuccessful) { | |
reviewInfo = request.result | |
} else { |
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.android.tools.lint.client.api.UElementHandler | |
import com.android.tools.lint.detector.api.* | |
import org.jetbrains.uast.UElement | |
import org.jetbrains.uast.UPostfixExpression | |
class NonNullAssertionDetector : Detector(), Detector.UastScanner { | |
override fun getApplicableUastTypes(): List<Class<out UElement>>? { | |
return listOf(UPostfixExpression::class.java) | |
} |
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
/** | |
* Vrátí html kód pro přihlášení / odhlášení / informaci o zaplněnosti pro | |
* daného uživatele. Pokud není zadán, vrací prázdný řetězec. | |
* @todo v rodině instancí maximálně jedno přihlášení? | |
* @todo konstanty pro jména POST proměnných? viz prihlasovatkoZpracuj | |
*/ | |
function prihlasovatko(Uzivatel $u = null, $parametry = 0) { | |
$out = ''; | |
if($u && $u->gcPrihlasen() && $this->prihlasovatelna($parametry)) { | |
if (($stav = $this->prihlasenStav($u)) > -1) { |
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
uploadPhoto(requireNotNull(intent.getStringExtra("PHOTO_URL"), { "Activity parameter 'PHOTO_URL' is missing" })) |
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
uploadPhoto(intent.getStringExtra("PHOTO_URL")!!) |
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
fun getUserName(): String { | |
return mUserName ?: "Anonymous" | |
} |
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
fun getUserName(): String { | |
if (mUserName != null) { | |
return mUserName!! | |
} else { | |
return "Anonymous" | |
} | |
} |
NewerOlder