Skip to content

Instantly share code, notes, and snippets.

View Vitnere's full-sized avatar

Vitnere Vitnere

View GitHub Profile
@Vitnere
Vitnere / Android_notTranslate
Created November 9, 2016 13:31
Mark message parts that should not be translated
<string name="countdown">
<xliff:g id="time" example="5 days>%1$s</xliff:g>until holiday
</string>
@Vitnere
Vitnere / Android_Toast.txt
Last active November 9, 2016 12:08
Toast
Context context = getApplicationContext();
CharSequence text = "Minimum is 1 coffee!";
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText(context, text, duration);
toast.show();
@Vitnere
Vitnere / Android_Share.txt
Last active November 9, 2016 12:07
Share
/*tested on google inbox, gmail, viber,
samsung stack sms app, google keep,
facebook litle, hangouts, google translate*/
Intent intent2 = new Intent();
intent2.setAction(Intent.ACTION_SEND);
intent2.setType("text/plain");
intent2.putExtra(Intent.EXTRA_SUBJECT, "Coffee order");
intent2.putExtra(Intent.EXTRA_TEXT, priceMessage);