Skip to content

Instantly share code, notes, and snippets.

View paveldudka's full-sized avatar

Pasha Dudka paveldudka

  • Mountain View, CA
View GitHub Profile
public class SquareBitmapView extends View {
int backgroundColor;
public SquareBitmapView(Context context) {
this(context,null);
init(null);
}
public SquareBitmapView(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
init(attrs);
#!/bin/bash
#this is a small script which updates Android SDK from command line.
#Needs to be executed from Android SDK root
( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | tools/bin/sdkmanager \
"tools" \
"platform-tools" \
"platforms;android-25" \
"build-tools;25.0.1" \
<?xml version="1.0" encoding="utf-8"?>
<blink
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/activity_root"
android:layout_width="match_parent"
android:layout_height="match_parent"