This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onSizeChanged(int w, int h, int oldw, int oldh) { | |
super.onSizeChanged(w, h, oldw, oldh); | |
if (mRectFRound == null) { | |
return; | |
} | |
mRectFRound.set(0, 0, w, h); | |
mRectFRound.set(0, 0, w, h); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MyApplication.java | |
public class MyApplication extends Application { | |
private MyApplication sInstance; | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
init(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BetterArrayAdapter<T> extends ArrayAdapter<T> { | |
//... | |
@Override | |
public void addAll(Collection<? extends T> collection) { | |
// Firmware is at least API 11, when ArrayAdapter#addAll() was introduced. | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { |