git checkout -b [name_of_your_new_branch]
- Push the branch on github :
git push origin [name_of_your_new_branch]
- When you want to commit something in your branch, be sure to be in your branch.
| enum class TickOrientation { | |
| TOP, START, END, BOTTOM | |
| } | |
| class TooltipShape( | |
| private val cornerRadiusDp: Dp, | |
| private val tickHeight: Dp, | |
| private val tickOrientation: TickOrientation | |
| ) : Shape { |
| 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( |
| /** | |
| * 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; | |
| } |
| 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 { |
git checkout -b [name_of_your_new_branch]
git push origin [name_of_your_new_branch]
(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); |