Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Ye Lin Aung yelinaung

🏠
Working from home
View GitHub Profile
View FloatLabelEditText
package com.homeaway.floatlabel.library;
import android.content.Context;
import android.content.res.TypedArray;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
@cheeaun
cheeaun / rdrc2014.md
Last active Aug 29, 2015
RedDotRubyConf 2014 links & resources
View rdrc2014.md
@tyvsmith
tyvsmith / App.java
Last active Aug 29, 2015
Android ListAdapter using custom ViewGroup over ViewHolder pattern
View App.java
package com.example.app;
public class App {
public String id;
public String name;
public String icon_url;
@Override
public String toString() {
return name;
View read.go
package main
import (
"net/http"
"encoding/json"
"io/ioutil"
"log"
"fmt"
)
@rallat
rallat / build.gradle
Last active Nov 16, 2015
release signed apk using gradle
View build.gradle
android {
signingConfigs {
release {
storeFile file("/path/to/keystore")
storePassword "storepassword"
keyAlias "alias"
keyPassword "keypassword"
}
}
buildTypes {
View MyFragment.java
public class MyFragment {
boolean loaded;
private void maybeLoad() {
if (!loaded && getUserVisibleHint()) {
loaded = true;
loadMyData();
}
}
@Override
@JakeWharton
JakeWharton / README.md
Last active May 10, 2018
A workaround for Android "L" Okio packaging problem. Place all of the following in a `libs/` folder.
View README.md
View RxImageView.java
public class RxImageView extends ImageView {
// region Member Variables
private PublishSubject<Boolean> publishSubject = PublishSubject.create();
// endregion
// region Constructors
public RxImageView(Context context) {
super(context);
}
@JakeWharton
JakeWharton / BindingAdapter.java
Last active Nov 29, 2018
An adapter base class that uses a new/bind pattern for its views.
View BindingAdapter.java
// Apache 2.0 licensed.
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
/** An implementation of {@link BaseAdapter} which uses the new/bind pattern for its views. */
public abstract class BindableAdapter<T> extends BaseAdapter {
@gabrielemariotti
gabrielemariotti / Toolbar.java
Created Aug 4, 2014
Android-L: A little example of the new Toolbar view.
View Toolbar.java
Toolbar toolbar = (Toolbar)findViewById(R.id.toolbar);
//Title and subtitle
toolbar.setTitle("MY toolbar");
toolbar.setSubtitle("Subtitle");
//Menu
toolbar.inflateMenu(R.menu.toolbar_menu);
toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {