зеркало из https://github.com/mozilla/gecko-dev.git
Bug 880118 - Dynamically pull resource IDs to avoid R.java reordering r=kats
This commit is contained in:
Родитель
6d8ac130b9
Коммит
8b7d6d5ca2
|
@ -443,18 +443,20 @@ public class LayerView extends FrameLayout {
|
|||
return mGLController;
|
||||
}
|
||||
|
||||
private Bitmap getDrawable(int resId) {
|
||||
private Bitmap getDrawable(String name) {
|
||||
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||
options.inScaled = false;
|
||||
return BitmapUtils.decodeResource(getContext(), resId, options);
|
||||
Context context = getContext();
|
||||
int resId = context.getResources().getIdentifier(name, "drawable", context.getPackageName());
|
||||
return BitmapUtils.decodeResource(context, resId, options);
|
||||
}
|
||||
|
||||
Bitmap getShadowPattern() {
|
||||
return getDrawable(R.drawable.shadow);
|
||||
return getDrawable("shadow");
|
||||
}
|
||||
|
||||
Bitmap getScrollbarImage() {
|
||||
return getDrawable(R.drawable.scrollbar);
|
||||
return getDrawable("scrollbar");
|
||||
}
|
||||
|
||||
/* When using a SurfaceView (mSurfaceView != null), resizing happens in two
|
||||
|
|
Загрузка…
Ссылка в новой задаче