Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="24dp"
android:paddingRight="16dp">
<View
android:background="@android:color/holo_red_dark"
android:id="@+id/my_site_list_row_empty_icon"
#!/bin/sh
# Example inputs:
# dashicon_admin_site 
# dashicon_admin_users 
# dashicon_lock 
# dashicon_edit 
# dashicon_email 
if [ x$2 == x ]; then

The following guide can be applied on Mac OS X and Linux.

Prerequisites: git and java installed.

  1. Download [Android Studio beta]. It includes: Android Studio (IDE based on Intellij IDEA), the Android SDK, Android tools and an Android emulator. Unzip this archive in a place you like, we're going to refer to the Android Studio directory later by AS_DIR. Note you don't have to use the Android Studio IDE. You can use your favorite editor and the command line build tool (gradle).

     $ export AS_DIR="/home/user/work/Android Studio"
    
  2. Install the Android SDK version 20

@maxme
maxme / codeStyleSettings.xml
Created April 10, 2014 09:39
codeStyleSettings.xml for IDEA IntelliJ - WPAndroid
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<option name="LAYOUT_STATIC_IMPORTS_SEPARATELY" value="false" />
<option name="INSERT_INNER_CLASS_IMPORTS" value="true" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
#!/bin/sh
CURDATE=$(date -Iseconds | sed s/:/-/g)
adb shell screencap -p /sdcard/screencap-$CURDATE.png
adb pull /sdcard/screencap-$CURDATE.png 2> /dev/null > /dev/null
adb shell rm /sdcard/screencap-$CURDATE.png
echo screencap-$CURDATE.png
#!/bin/sh
# Example inputs:
# dashicon_admin_site 
# dashicon_admin_users 
# dashicon_lock 
# dashicon_edit 
# dashicon_email 
if [ x$2 == x ]; then
#!/bin/sh
CURDATE=$(date -Iseconds)
adb shell screencap -p /sdcard/screencap-$CURDATE.png
adb pull /sdcard/screencap-$CURDATE.png
adb shell rm /sdcard/screencap-$CURDATE.png
task androidJar(type:Exec) {
commandLine = ['jar', 'cf', 'build/EmailChecker.jar', '-C', 'build/classes/release', '.', 'libs/native-libs-0.1.jar']
}
@maxme
maxme / ndk-build.gradle
Created November 12, 2013 17:21
A gradle build file for Android NDK - uses a trick to put *so files in a jar and add that jar as a project dependency
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
}
apply plugin: 'android'
function reduce_tqr_time_font_size() {
var a = document.querySelectorAll("tr span");
var i = 0;
for (i = 0; i < a.length; i++) {
a[i].setAttribute("style", "font-size: 0.7em");
}
}