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
/* | |
* Copyright 2022 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file | |
* except in compliance with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software distributed under the | |
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
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"?> | |
<project version="4"> | |
<component name="JavaProjectCodeInsightSettings"> | |
<excluded-names> | |
<name>android.app.LauncherActivity.ListItem</name> | |
<name>android.graphics.drawable.Icon</name> | |
<name>android.graphics.fonts.FontFamily</name> | |
<name>android.inputmethodservice.Keyboard.Row</name> | |
<name>android.text.layout.Alignment</name> | |
<name>android.widget.GridLayout.Alignment</name> |
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
// Full credit for this snippet goes to Sean McQuillan - https://twitter.com/objcode | |
class Ref(var value: Int) | |
// Note the inline function below which ensures that this function is essentially | |
// copied at the call site to ensure that its logging only recompositions from the | |
// original call site. | |
@Composable | |
inline fun LogCompositions(tag: String, msg: String) { | |
if (BuildConfig.DEBUG) { |
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
context.startActivity(createShowkaseBrowserIntent(context)) |
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
@ShowkaseRoot | |
class MyRootModule: ShowkaseRootModule |
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
@ShowkaseTypography( | |
name = "Custom name for text style", | |
group = "Custom group name" | |
) | |
val h1 = TextStyle(fontWeight = FontWeight.Light, fontSize = 96.sp) |
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
@ShowkaseColor( | |
name = "Primary Color", | |
group = "Material Design" | |
) | |
val primaryColor = Color(0xFF6200EE) |
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
@Preview( | |
name = "Custom name for component", | |
group = "Custom group name" | |
) | |
@Composable | |
fun MyComponent() { … } |
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
@ShowkaseComposable( | |
name = "Custom name for component", | |
group = "Custom group name" | |
) | |
@Composable | |
fun MyComponent() { … } |
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
implementation "com.airbnb.android:showkase:1.0.0-alpha04" | |
kapt "com.airbnb.android:showkase-processor:1.0.0-alpha04" |
NewerOlder