Skip to content

Instantly share code, notes, and snippets.

@romannurik
romannurik / DashboardLayout.java
Created March 23, 2011 05:06
A custom Android layout class that arranges children in a grid-like manner, optimizing for even horizontal and vertical whitespace.
/*
* ATTENTION:
*
* This layout is now maintained in the `iosched' code.google.com project:
*
* http://code.google.com/p/iosched/source/browse/android/src/com/google/android/apps/iosched/ui/widget/DashboardLayout.java
*
*/
/*
@naseer
naseer / gist:2703837
Created May 15, 2012 18:09
Media Scan
# Push media to sdcard and run mediascanner
adb shell am start -n com.android.development/.MediaScannerActivity
try {
packman.getPackageInfo("com.twitter.android", 0);
builder.setNeutralButton(R.string.follow_koush, new OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// this is the intent you actually want.
// grabbed this by hooking a debugger up to twitter and debugging into android framework source.
// this let me inspect the contents of the intent.
Intent i = new Intent();
i.setClassName("com.twitter.android", "com.twitter.android.ProfileActivity");
i.putExtra("screen_name", "koush");
@t0mm13b
t0mm13b / USSD Exploit fix!
Created September 28, 2012 19:47
Android USSD Exploit fix
diff --git a/packages/apps/Contacts/src/com/android/contacts/TwelveKeyDialer.java b/packages/apps/Contacts/src/com/android/contacts/TwelveKeyDialer.java
index 5219d99..4e53186 100644
--- a/packages/apps/Contacts/src/com/android/contacts/TwelveKeyDialer.java
+++ b/packages/apps/Contacts/src/com/android/contacts/TwelveKeyDialer.java
@@ -67,6 +67,10 @@ import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
@aprock
aprock / RoundedTransformation.java
Created August 12, 2013 18:08
Rounded Corner Image Transformation for square's Picasso
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Shader;
// enables hardware accelerated rounded corners
// original idea here : http://www.curious-creature.org/2012/12/11/android-recipe-1-image-with-rounded-corners/
@cs8425
cs8425 / README.md
Last active November 9, 2022 09:03
How to REAL install Remix OS on VirtualBox

How to REAL install Remix OS on VirtualBox

This is how to REAL install Remix OS on VirtualBox. rootfs could be writable!!!

Needs:

  • any linux liveCD iso file (Xubuntu here)
  • Remix OS iso file ("Remix_OS_for_PC_Android_M_32bit_B2016092201.iso" here)
  • VirtualBox