Skip to content

Instantly share code, notes, and snippets.

View vishvendra01's full-sized avatar
😃
Kaizen

Vishvendra Singh vishvendra01

😃
Kaizen
View GitHub Profile
@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
*
*/
/*
@fidanov
fidanov / Util.java
Created July 4, 2012 11:26
Android: DIP 2 PX programmatically. Works on any device with any density. Useful when settings width and height in code.
import android.content.Context;
import android.util.TypedValue;
public class Util {
public static int dp(Context context, int size) {
return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
size,
context.getResources().getDisplayMetrics());
}
}
@chrisjenx
chrisjenx / UiRunnablesFragment.java
Last active September 17, 2016 18:10
QueuedUiRunnableFragment
import android.content.Intent;
import com.actionbarsherlock.app.SherlockFragment;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
/**
* Created with Intellij with Android, BIZZBY product.
@melanke
melanke / MLRoundedImageView.java
Created October 25, 2013 17:19
Android Rounded Image
public class MLRoundedImageView extends ImageView {
public MLRoundedImageView(Context context) {
super(context);
}
public MLRoundedImageView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@hzqtc
hzqtc / main_AndroidManifest.xml
Last active December 11, 2018 04:36
Android FlowLayout demo.
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="hzqtc.flowlayout"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19"/>