Skip to content

Instantly share code, notes, and snippets.

View doridori's full-sized avatar

Dorian Cussen doridori

View GitHub Profile
@doridori
doridori / gist:c3ec473f5e54969f46c0
Created June 13, 2014 15:42
robospice dropped result log
D/dalvikvm﹕ Late-enabling CheckJNI
E/jdwp﹕ Failed sending reply to debugger: Broken pipe
D/dalvikvm﹕ Debugger has detached; object registry had 1 entries
D//SpiceManager.java:212﹕ 16:20:13.876 main SpiceManager started.
V//SpiceManager.java:1183﹕ 16:20:13.877 SpiceManagerThread 0 Binding to service.
D//SpiceManager.java:483﹕ 16:20:13.881 main adding request to request queue
V//SpiceManager.java:1189﹕ 16:20:13.881 SpiceManagerThread 0 Binding to service succeeded.
D//SpiceManager.java:1236﹕ 16:20:13.887 SpiceManagerThread 0 Waiting for service to be bound.
D/dalvikvm﹕ GC_CONCURRENT freed 182K, 3% free 9243K/9460K, paused 2ms+2ms, total 22ms
D//SpiceService.java:127﹕ 16:20:13.924 main SpiceService instance created.
@doridori
doridori / MyWebView.java
Last active August 29, 2015 14:01
make WebViews computeHorizontalScrollRange() method public
public class MyWebView extends WebView
{
public MyWebView(Context context)
{
super(context);
}
public MyWebView(Context context, AttributeSet attrs)
{
super(context, attrs);
@doridori
doridori / ViewTreeObserver_Ex.java
Last active August 29, 2015 13:56
Grabbing content view dimensions via ViewTreeObserver - all Display methods have no guarantee if they will include system and status bars in height
//inside a fragment. If in an Activity you could use findViewById(Window.ID_ANDROID_CONTENT);
getView().getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener()
{
@Override
public void onGlobalLayout()
{
//do something like measure a view etc
View content = getWindow().findViewById(Window.ID_ANDROID_CONTENT);
Log.d("DISPLAY", content.getWidth() + " x " + content.getHeight());
@doridori
doridori / convertLocalizable.rb
Last active December 13, 2015 19:18 — forked from florianmski/convertLocalizable.rb
sub non alpha chars out - this could be done much better with regex
#!/usr/bin/ruby
# based on https://github.com/tmurakam/cashflow/blob/0a01ac9e0350dfb04979986444244f8daf4cb5a8/android/convertStrings.rb
# support comments and Converter such as "%@", "%d", "%0.1f"...
# in your directory : ./main.rb Localizable.strings
file = File.open("strings.xml", "w");
file.puts "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
file.puts "<resources>"