Skip to content

Instantly share code, notes, and snippets.

View mreichelt's full-sized avatar
👨‍💻
Coding is awesome 🎉

Marc Reichelt mreichelt

👨‍💻
Coding is awesome 🎉
View GitHub Profile
@tajchert
tajchert / gist:73422616624090851fa5
Last active August 16, 2019 00:01 — forked from mediavrog/gist:5625602
Due to Facebook not handling any text in share intent (ACTION_SEND), and not trying to fix it (it is a "feature"), lets remove it from share dialog - as otherwise it results in broken user experience and most likely users will blame us not the Facebook. Bug on Facebook issue tracker https://developers.facebook.com/bugs/332619626816423
// Usage:
// your share intent
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, "some text");
intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "a subject");
// invoke custom chooser that contains all apps just without Facebook
startActivity(Tools.customChooserIntentNoFb(intent, "Share using", context));
// Method:
@rock3r
rock3r / rms.xml
Created May 23, 2022 15:01
rms — live template to insert/surround with "val ... by remember { mutableStateOf(...) }"
<template name="rms" value="val $name$ by androidx.compose.runtime.remember { androidx.compose.runtime.mutableStateOf($SELECTION$$END$) }" description="Remember mutableState" toReformat="false" toShortenFQNames="true">
<variable name="name" expression="kotlinSuggestVariableName()" defaultValue="name" alwaysStopAt="true" />
<context>
<option name="KOTLIN_EXPRESSION" value="true" />
</context>
</template>