(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// only works if app has a launcher activity | |
Intent launchIntent = getPackageManager().getLaunchIntentForPackage("com.example.yourapp"); | |
startActivity(launchIntent); | |
// works if we know the name of the main activity, even if not a launcher | |
Intent intent = new Intent(Intent.ACTION_MAIN); | |
intent.setClassName("com.example.yourapp", "com.example.yourapp.MainActivity"); | |
startActivity(intent); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
git checkout -b [name_of_your_new_branch]
git push origin [name_of_your_new_branch]
val textPaint = Paint().asFrameworkPaint().apply { | |
isAntiAlias = true | |
textSize = 24.sp.toPx() | |
color = android.graphics.Color.BLUE | |
typeface = Typeface.create(Typeface.MONOSPACE, Typeface.BOLD) | |
} | |
Canvas( | |
modifier = modifier.fillMaxSize(), | |
onDraw = { | |
drawIntoCanvas { |
/** | |
* Set this on a textview and then you can potentially open links locally if applicable | |
*/ | |
public class DefaultLinkMovementMethod extends LinkMovementMethod { | |
private OnLinkClickedListener mOnLinkClickedListener; | |
public DefaultLinkMovementMethod(OnLinkClickedListener onLinkClickedListener) { | |
mOnLinkClickedListener = onLinkClickedListener; | |
} |
private const val SCROLL_DX = 24f | |
private const val REQUIRED_CARD_COUNT = 8 | |
private class AutoScrollItem<T>( | |
val id: String = UUID.randomUUID().toString(), | |
val data: T | |
) | |
@Composable | |
fun <T : Any> AutoScrollingLazyRow( |
enum class TickOrientation { | |
TOP, START, END, BOTTOM | |
} | |
class TooltipShape( | |
private val cornerRadiusDp: Dp, | |
private val tickHeight: Dp, | |
private val tickOrientation: TickOrientation | |
) : Shape { |