icon.setImageDrawable(iconDrawable); title.setTextColor(current ? itemActiveColor : itemInactiveColor); view.setSoundEffectsEnabled(soundEffectsEnabled); view.setEnabled(true); } else {
view.setSoundEffectsEnabled(soundEffectsEnabled); view.setEnabled(true); } else {
v.setSoundEffectsEnabled(a.getBoolean(attr, true)); else if(attr == R.styleable.View_android_textAlignment){ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
holder.view.setBackgroundResource(outValue.resourceId); holder.onClickListener = item.getOnClickListener(); holder.view.setSoundEffectsEnabled(true); } else { TypedValue outValue = new TypedValue(); holder.view.setBackgroundResource(outValue.resourceId); holder.onClickListener = null; holder.view.setSoundEffectsEnabled(false);
@Override public void setSoundEffectsEnabled(boolean soundEffectsEnabled) { super.setSoundEffectsEnabled(soundEffectsEnabled); mSoundEffectEnable = soundEffectsEnabled; }
public static void scaleView(View view, int top, int left, int width, int height) { top = Math.round(top * scaleY); left = Math.round(left * scaleX); width = Math.round(width * scaleX); height = Math.round(height * scaleY); LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); params.height = height; params.width = width; params.topMargin = top; params.leftMargin = left; view.setLayoutParams(params); view.setSoundEffectsEnabled(false); }
public void run(RapidParserObject object, Object view, Var value) { ((View)view).setSoundEffectsEnabled(value.getBoolean()); } }
@CallSuper public void setSelectedItem(int position) { if (position >= getMenu().size() || position < 0) return; View menuItemView = getMenuItemView(position); if (menuItemView == null) return; MenuItemImpl itemData = ((MenuView.ItemView) menuItemView).getItemData(); itemData.setChecked(true); boolean previousHapticFeedbackEnabled = menuItemView.isHapticFeedbackEnabled(); menuItemView.setSoundEffectsEnabled(false); menuItemView.setHapticFeedbackEnabled(false); //avoid hearing click sounds, disable haptic and restore settings later of that view menuItemView.performClick(); menuItemView.setHapticFeedbackEnabled(previousHapticFeedbackEnabled); menuItemView.setSoundEffectsEnabled(true); mLastSelection = position; }
private void initEasterEgg() { if (Utils.getSettingBool(this, Const.RAINBOW_MODE, false)) { ImageView tumLogo = findViewById(R.id.startupTumLogo); tumLogo.setImageResource(R.drawable.tum_logo_rainbow); } tapCounter = 0; View background = findViewById(R.id.container); background.setOnClickListener(view -> { tapCounter++; if (tapCounter % 3 == 0) { tapCounter = 0; // use the other logo and invert the setting boolean rainbowEnabled = Utils.getSettingBool(this, Const.RAINBOW_MODE, false); rainbowEnabled = !rainbowEnabled; ImageView tumLogo = findViewById(R.id.startupTumLogo); if (rainbowEnabled) { tumLogo.setImageResource(R.drawable.tum_logo_rainbow); } else { tumLogo.setImageResource(R.drawable.tum_logo_blue); } Utils.setSetting(this, Const.RAINBOW_MODE, rainbowEnabled); } }); background.setSoundEffectsEnabled(false); }
holder.view.setBackgroundResource(outValue.resourceId); holder.onClickListener = item.getOnClickListener(); holder.view.setSoundEffectsEnabled(true); } else { TypedValue outValue = new TypedValue(); holder.view.setBackgroundResource(outValue.resourceId); holder.onClickListener = null; holder.view.setSoundEffectsEnabled(false);