Skip to content

Instantly share code, notes, and snippets.

tank777

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: [android.app.ActivityManager$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
tank777 / ffmpeg-watermark.md
Created Jun 11, 2018 — forked from bennylope/ffmpeg-watermark.md
FFmpeg add a watermark to video
View ffmpeg-watermark.md

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.

View FetchContacts.java
private class FetchContacts extends AsyncTask<Void, Void, ArrayList<Contact>> {
private final String DISPLAY_NAME = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB ?
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);
@SuppressLint("InlinedApi")
View addWaterMark.java
private Bitmap addWaterMark(Bitmap src, Bitmap waterMark) {
if (src == null || waterMark == null) {
return null;
}
try {
int w = src.getWidth();
int h = src.getHeight();
@tank777
tank777 / README.md
Created Sep 11, 2017 — forked from gabrielemariotti/README.md
A SectionedGridRecyclerViewAdapter: use this class to realize a simple sectioned grid `RecyclerView.Adapter`.
View README.md

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

Screen

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
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'},
View 1Description.md

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)
View VerticalTransformer.java
public class VerticalTransformer implements ViewPager.PageTransformer {
private float yPosition;
@Override
public void transformPage(View view, float position) {
view.setTranslationX(view.getWidth() * -position);
yPosition = position * view.getHeight();
view.setTranslationY(yPosition);
}
}
View ripple_effect.xml
<!-- ripple effect API 21 -->
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/colorRipple"> <!-- ripple color -->
<!-- for Button -->
<item>
<shape android:shape="rectangle">
View CreatePDF.java
package com.qoppa.qpdf.samples;
import com.bta.android.pdfProcess.PDFCanvas;
import com.bta.android.pdfProcess.PDFDocument;
import com.bta.android.pdfProcess.PDFFontStandard;
import com.bta.android.pdfProcess.PDFFontStandard.PDFFontFamily;
import com.bta.android.pdfProcess.PDFPa
import com.bta.android.pdfProcess.PDFPaint;
import com.bta.android.pdfViewer.fonts.StandardFontTF;
You can’t perform that action at this time.