public ReservationAdapter(Context context, Cursor cursor) { Log.d("smali", "Lcom/samsung/sec/mtv/ui/channelguide/MtvUiFragReservationList$ReservationAdapter;-><init>(Lcom/samsung/sec/mtv/ui/channelguide/MtvUiFragReservationList;Landroid/content/Context;Landroid/database/Cursor;)V"); this$0 = MtvUiFragReservationList.this; super(context, cursor); int ai[] = new int[2]; ai[0] = 2; ai[1] = 2; mIcon = (Drawable[][])Array.newInstance(android/graphics/drawable/Drawable, ai); mInflater = (LayoutInflater)context.getSystemService("layout_inflater"); mIcon[1][0] = context.getResources().getDrawable(0x7f0200c0); mIcon[0][0] = context.getResources().getDrawable(0x7f0200bd); mIcon[1][1] = context.getResources().getDrawable(0x7f0200c1); mIcon[0][1] = context.getResources().getDrawable(0x7f0200be); }
private void init() { deleteAllOn = context.getResources().getDrawable(R.drawable.delete); deleteAllDown = context.getResources().getDrawable(R.drawable.delete_gray); addTextChangedListener( new TextWatcher() { // 监听用户输入 @Override public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) {} @Override public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) { setDraw(); } @Override public void afterTextChanged(Editable s) {} }); }
private void init() { imgInable = mContext.getResources().getDrawable(R.drawable.delete_gray); imgAble = mContext.getResources().getDrawable(R.drawable.delete); addTextChangedListener( new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count) {} @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) {} @Override public void afterTextChanged(Editable s) { setDrawable(); } }); setDrawable(); }
/** * Stores a bitmap for use by a game tile in a level. * * @param int resourceId - The bitmap resource ID. * @return Bitmap - The Bitmap instance for the given resource ID. */ private Bitmap setAndGetGameTileBitmap(int resourceId) { if (!mGameTileBitmaps.containsKey(resourceId)) { BitmapFactory.Options opts = new BitmapFactory.Options(); opts.inJustDecodeBounds = true; Bitmap bitmap = BitmapFactory.decodeResource(mGameContext.getResources(), resourceId); if (bitmap != null) { mGameTileBitmaps.put(resourceId, bitmap); } } return mGameTileBitmaps.get(resourceId); }
/** Load the images into memory. */ public static void LoadImages(Context context) { if (images != null) { return; } images = new Bitmap[13]; Resources res = context.getResources(); images[2] = BitmapFactory.decodeResource(res, R.drawable.two); images[3] = BitmapFactory.decodeResource(res, R.drawable.three); images[4] = BitmapFactory.decodeResource(res, R.drawable.four); images[6] = BitmapFactory.decodeResource(res, R.drawable.six); images[8] = BitmapFactory.decodeResource(res, R.drawable.eight); images[9] = BitmapFactory.decodeResource(res, R.drawable.nine); images[12] = BitmapFactory.decodeResource(res, R.drawable.twelve); }
public GameThread(SurfaceHolder surfaceHolder, Context context, Handler handler) { mGameSurfaceHolder = surfaceHolder; mGameContext = context; Resources res = context.getResources(); mBackgroundImage = BitmapFactory.decodeResource(res, R.drawable.canvas_bg_01); Display display = mGameActivity.getWindowManager().getDefaultDisplay(); mScreenXMax = display.getWidth(); mScreenYMax = display.getHeight(); mScreenXCenter = (mScreenXMax / 2); mScreenYCenter = (mScreenYMax / 2); setGameStartState(); }
public IconHolder(Context context, boolean useThumbs, boolean grid) { super(); this.mContext = context; this.mUseThumbs = useThumbs; this.mRequests = new HashMap<ImageView, String>(); this.mIcons = new HashMap<String, Bitmap>(); this.mAppIcons = new LinkedHashMap<String, Bitmap>(MAX_CACHE, .75F, true) { private static final long serialVersionUID = 1L; @Override protected boolean removeEldestEntry(Entry<String, Bitmap> eldest) { return size() > MAX_CACHE; } }; this.mAlbums = new HashMap<String, Long>(); this.grid = grid; Resources res = mContext.getResources(); int dp = 50; if (grid) { dp = 150; } px = (int) (dp * (res.getDisplayMetrics().densityDpi / 160)); }
public MyView(Context context) { super(context); mBack = BitmapFactory.decodeResource(context.getResources(), R.drawable.family); mHandler.sendEmptyMessageDelayed(0, DELAY); }
public AcctInfoAdapter(Context mContext, ServiceAcctInfo[] accts) { context = mContext; acctList = accts; msgsetNames = context.getResources().getStringArray(R.array.acct_types); }
public static String getFormattedMessage(int msgId, Object... args) { String message = context.getResources().getString(msgId); return String.format(message, args); }
public static String getMessage(int msgId) { return context.getResources().getString(msgId); }