From c79bf376219a5712cee4c7b47464e44ea20098ab Mon Sep 17 00:00:00 2001 From: Gilles Debunne Date: Fri, 2 Dec 2011 13:29:31 -0800 Subject: [PATCH] Typos in CheckBoxAndSettingsPreference Change-Id: Ied042582e3aa1ef8eb5f71b56e734c8889711080 --- .../CheckBoxAndSettingsPreference.java | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/com/android/settings/inputmethod/CheckBoxAndSettingsPreference.java b/src/com/android/settings/inputmethod/CheckBoxAndSettingsPreference.java index 952146d94d7..28b8616ab19 100644 --- a/src/com/android/settings/inputmethod/CheckBoxAndSettingsPreference.java +++ b/src/com/android/settings/inputmethod/CheckBoxAndSettingsPreference.java @@ -34,8 +34,7 @@ public class CheckBoxAndSettingsPreference extends CheckBoxPreference { private SettingsPreferenceFragment mFragment; private TextView mTitleText; private TextView mSummaryText; - private View mCheckBox; - private ImageView mSetingsButton; + private ImageView mSettingsButton; private Intent mSettingsIntent; public CheckBoxAndSettingsPreference(Context context, AttributeSet attrs) { @@ -47,28 +46,28 @@ public class CheckBoxAndSettingsPreference extends CheckBoxPreference { @Override protected void onBindView(View view) { super.onBindView(view); - mCheckBox = view.findViewById(R.id.inputmethod_pref); - mCheckBox.setOnClickListener( + View textLayout = view.findViewById(R.id.inputmethod_pref); + textLayout.setOnClickListener( new OnClickListener() { @Override public void onClick(View arg0) { onCheckBoxClicked(); } }); - mSetingsButton = (ImageView)view.findViewById(R.id.inputmethod_settings); + + mSettingsButton = (ImageView) view.findViewById(R.id.inputmethod_settings); mTitleText = (TextView)view.findViewById(android.R.id.title); mSummaryText = (TextView)view.findViewById(android.R.id.summary); - mSetingsButton.setOnClickListener( + mSettingsButton.setOnClickListener( new OnClickListener() { @Override - public void onClick(View arg0) { - onSettingsButtonClicked(arg0); + public void onClick(View clickedView) { + onSettingsButtonClicked(); } }); enableSettingsButton(); } - @Override public void setEnabled(boolean enabled) { super.setEnabled(enabled); @@ -88,23 +87,23 @@ public class CheckBoxAndSettingsPreference extends CheckBoxPreference { } } - protected void onSettingsButtonClicked(View arg0) { + protected void onSettingsButtonClicked() { if (mFragment != null && mSettingsIntent != null) { mFragment.startActivity(mSettingsIntent); } } private void enableSettingsButton() { - if (mSetingsButton != null) { + if (mSettingsButton != null) { if (mSettingsIntent == null) { - mSetingsButton.setVisibility(View.GONE); + mSettingsButton.setVisibility(View.GONE); } else { final boolean checked = isChecked(); - mSetingsButton.setEnabled(checked); - mSetingsButton.setClickable(checked); - mSetingsButton.setFocusable(checked); + mSettingsButton.setEnabled(checked); + mSettingsButton.setClickable(checked); + mSettingsButton.setFocusable(checked); if (!checked) { - mSetingsButton.setAlpha(DISABLED_ALPHA); + mSettingsButton.setAlpha(DISABLED_ALPHA); } } }