mMaxTextSize = getTextSize(); mAvailableSpaceRect = new RectF(); mTextCachedSizes = new SparseIntArray(); if (mMaxLines == 0) {
mMaxTextSize = getTextSize(); mAvailableSpaceRect = new RectF(); mTextCachedSizes = new SparseIntArray(); if (mMaxLines == 0) {
SparseIntArray spa = new SparseIntArray(); public int getColor(int position) { if(spa.get(position) == 0) {
int newPosition; LayoutInflater inflater; SparseIntArray positionMap = new SparseIntArray();
private void shaveOffCorners(final ViewGroup view) { view.post(new Runnable() { @Override public void run() { // make all child views invisible before scraping the drawing cache SparseIntArray viewStates = new SparseIntArray(); for(int index = 0; index < view.getChildCount(); ++index) { View child = view.getChildAt(index); viewStates.put(index, child.getVisibility()); child.setVisibility(View.INVISIBLE); } view.buildDrawingCache(); // this is the exact bitmap that is currently rendered to screen. hence, we wanted to // hide all the children so that they don't permanently become part of the background final Bitmap rounded = view.getDrawingCache(); // restore actual visibility states after getting the drawing cache for(int index = 0; index < view.getChildCount(); ++index) { View child = view.getChildAt(index); child.setVisibility(viewStates.get(index)); } view.setBackgroundDrawable(new BitmapDrawable( getResources(), MyImageUtil.createRoundedCornerBitmap( view.getContext(), rounded, getResources().getDimensionPixelSize(R.dimen.radius_corner_default), false, true, true, false))); } }); }
private static final SparseIntArray tagMatcher2 = new SparseIntArray(); private static void put(String key, int value) { tagMatcher2.put(key.hashCode(), value); } private static int get(String key) { return tagMatcher2.get(key.hashCode()); } static { put("tag1", 1); put("tag2", 2); put("tag23", 23); } private void parse2 (String node) { switch (get(node)) { case 1: // etc break; case 0: // no match break; } }
private static SparseIntArray ORIENTATIONS = new SparseIntArray(); static{ ORIENTATIONS.append(Surface.ROTATION_0, 0); ORIENTATIONS.append(Surface.ROTATION_90, 90); ORIENTATIONS.append(Surface.ROTATION_180, 180); ORIENTATIONS.append(Surface.ROTATION_270, 270); } private int sensorToDeviceRotation(CameraCharacteristics cameraCharacteristics, int deviceOrientation){ int sensorOrientation = cameraCharacteristics.get(CameraCharacteristics.SENSOR_ORIENTATION); deviceOrientation = ORIENTATIONS.get(deviceOrientation); return (sensorOrientation + deviceOrientation + 360) % 360; }
SparseIntArray counts = new SparseIntArray(); for(int i = 0; i < centers.rows(); i++) counts.put(i, 0);
mTextCachedSizes = new SparseIntArray(); if (mMaxLines == 0) {
sections = new SparseIntArray(); int m=0; int t = 'A'; cursorPositions = new SparseIntArray(); for (int i=0; i<cursor.getCount() + sections.size(); i++){ if (sections.get(i, -1) != -1){
mMaxTextSize = getTextSize(); mAvailableSpaceRect = new RectF(); mTextCachedSizes = new SparseIntArray(); if (mMaxLines == 0) {
mMaxTextSize = getTextSize(); mAvailableSpaceRect = new RectF(); mTextCachedSizes = new SparseIntArray(); if (mMaxLines == 0) {
mapOfFilledTextViews = new SparseIntArray(4); mapOfButtons = new SparseIntArray(10); mapOfButtons.put(R.id.button_0, 0); mapOfButtons.put(R.id.button_1, 1);