Skip to content

Instantly share code, notes, and snippets.

@joielechong
joielechong / Gettysburg.java
Created July 20, 2020 04:24 — forked from jewelsea/Gettysburg.java
JavaFX sample to display the Gettysburg address in a titled border.
import javafx.animation.FadeTransition;
import javafx.application.Application;
import javafx.beans.value.*;
import javafx.event.*;
import javafx.geometry.*;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.scene.effect.*;
import javafx.scene.image.*;
@joielechong
joielechong / 16al_header_sm.jpg
Created July 20, 2020 04:24 — forked from thirdy/16al_header_sm.jpg
JavaFX titled border example standalone version of https://gist.github.com/jewelsea/2838292
16al_header_sm.jpg
@joielechong
joielechong / README.md
Created August 28, 2018 09:08 — forked from StefMa/README.md
SearchView suggestions over network

SearchView suggestions over network


What is it?

This is a simple how to make a network request with the SearchView implemented in a Toolbar.


Why?

The documentation for a Search Interface says that you can't make a a request over the network. You can only make a SearchView via recent searches or over a ContentProvider. I want to demonstrate how to make network request with the searchview.

@joielechong
joielechong / MethodParamNamesScaner.java
Created July 2, 2017 06:39 — forked from wendal/MethodParamNamesScaner.java
获得方法形参名称列表(Java)
package org.nutz.lang.util;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
@joielechong
joielechong / BadgeTabLayout.java
Created January 24, 2017 11:37 — forked from eneim/BadgeTabLayout.java
A custom TabLayout with badge support for Tabs
package im.ene.lab.android.widgets;
import android.content.Context;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.util.AttributeSet;
@joielechong
joielechong / hosts
Last active February 2, 2022 23:29 — forked from eyecatchup/hosts
Disable Skype ads: 1.) Add hosts to your hosts file 2.) Flush DNS resolver cache (ipconfig /flushdns)
# On Windows 7, 8, 10 Hosts file is in c:\windows\system32\drivers\etc\hosts
#
# Block Skype ads
127.0.0.1 secure-sin.adnxs.com # On skype 7.*
127.0.0.1 *.adnxs.com # On skype 7.*
127.0.0.1 logi10.xiti.com # On skype 7.*
127.0.0.1 *.everesttech.net # On skype 7.*
127.0.0.1 pixel.everesttech.net # On skype 7.*
127.0.0.1 d.adroll.com # On skype 7.*
@joielechong
joielechong / SomeFragment.java
Created August 1, 2016 02:45 — forked from joshdholtz/SomeFragment.java
Android Google Maps V2 - MapView in XML
public class SomeFragment extends Fragment {
MapView mapView;
GoogleMap map;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.some_layout, container, false);