Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block tank777

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Error Log
2019-04-09 16:52:27.704 16021-16021/com.mylol.spotafriend I/DecorView: It non-support bigbang
2019-04-09 16:52:27.708 16021-16021/com.mylol.spotafriend I/PhoneWindow: isNeedChangeNaviBarColor taskInfo: [$RunningTaskInfo@93e59cb] size: 1
2019-04-09 16:52:27.708 16021-16021/com.mylol.spotafriend I/PhoneWindow: isAPPNeedChange pkgName: com.mylol.spotafriend needKeep: false
2019-04-09 16:52:27.708 16021-16021/com.mylol.spotafriend I/PhoneWindow: isNeedChangeNaviBarColor false
2019-04-09 16:52:27.708 16021-16021/com.mylol.spotafriend I/PhoneWindow: generateLayout mNavigationBarColor: ff000000
2019-04-09 16:52:27.708 16021-16021/com.mylol.spotafriend I/PhoneWindow: generateLayout isLightNavi false, Visibility: 0
2019-04-09 16:52:27.839 16021-16021/com.mylol.spotafriend I/AdinCube: AdinCube.Interstitial.init()
2019-04-09 16:52:27.889 16021-16021/com.mylol.spotafriend I/lol.spotafrien: Rejecting re-init on previously-failed class java.lang.Class<com.adincube.sdk.mediation.mediabrix.b>: java
tank777 /
Created Jun 11, 2018 — forked from bennylope/
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.

private class FetchContacts extends AsyncTask<Void, Void, ArrayList<Contact>> {
ContactsContract.Contacts.DISPLAY_NAME_PRIMARY : ContactsContract.Contacts.DISPLAY_NAME;
private final String FILTER = DISPLAY_NAME + " NOT LIKE '%@%'";
private final String ORDER = String.format("%1$s COLLATE NOCASE", DISPLAY_NAME);
private Bitmap addWaterMark(Bitmap src, Bitmap waterMark) {
if (src == null || waterMark == null) {
return null;
try {
int w = src.getWidth();
int h = src.getHeight();
tank777 /
Created Sep 11, 2017 — forked from gabrielemariotti/
A SectionedGridRecyclerViewAdapter: use this class to realize a simple sectioned grid `RecyclerView.Adapter`.

You can use this class to realize a simple sectioned grid RecyclerView.Adapter without changing your code.


The RecyclerView has to use a GridLayoutManager.

This is a porting of the class SimpleSectionedListAdapter provided by Google

If you are looking for a sectioned list RecyclerView.Adapter you can take a look here

tank777 / countries.json
Created Aug 4, 2017 — forked from keeguon/countries.json
A list of countries in JSON
View countries.json
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},

Make your multiple type view adapter with annotations!

Gist for Making a Multiple View Types Adapter With Annotations

Pretty easy to use.

  1. Create your delegate adapters, implementing DelegateAdapter, and with the annotation DelegateAdapterType. e.g:
@DelegateAdapterType(itemType = 0)
public class VerticalTransformer implements ViewPager.PageTransformer {
private float yPosition;
public void transformPage(View view, float position) {
view.setTranslationX(view.getWidth() * -position);
yPosition = position * view.getHeight();
View ripple_effect.xml
<!-- ripple effect API 21 -->
<?xml version="1.0" encoding="utf-8"?>
android:color="@color/colorRipple"> <!-- ripple color -->
<!-- for Button -->
<shape android:shape="rectangle">
package com.qoppa.qpdf.samples;
You can’t perform that action at this time.