Bug 1224214 - Remove "Set current tab" checkbox from homepage setting. r=margaret

This commit is contained in:
Michael Comella 2015-11-23 15:12:20 -08:00
parent 482e217b59
commit 4b600494d4
2 changed files with 0 additions and 43 deletions

View File

@ -24,7 +24,6 @@ import android.widget.EditText;
public class SetHomepagePreference extends DialogPreference {
SharedPreferences prefs;
EditText homepageTextEdit;
CheckBox useCurrentTabCheck;
public SetHomepagePreference(final Context context, final AttributeSet attrs) {
super(context, attrs);
@ -61,27 +60,6 @@ public class SetHomepagePreference extends DialogPreference {
if (!AboutPages.HOME.equals(url)) {
homepageTextEdit.setText(url);
}
useCurrentTabCheck = (CheckBox) view.findViewById(R.id.use_current_checkbox);
view.findViewById(R.id.use_current_title).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(final View v) {
useCurrentTabCheck.toggle();
}
});
useCurrentTabCheck.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(final CompoundButton buttonView, final boolean isChecked) {
homepageTextEdit.setEnabled(!isChecked);
if (isChecked) {
homepageTextEdit.setText(Tabs.getInstance().getSelectedTab().getURL());
} else {
homepageTextEdit.selectAll();
}
}
});
}
@Override

View File

@ -3,7 +3,6 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="20dp"
@ -17,24 +16,4 @@
android:inputType="textUri"
android:layout_marginTop="8dp" />
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical">
<CheckBox android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:id="@+id/use_current_checkbox" />
<TextView android:id="@+id/use_current_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/home_homepage_use_current_tab"
tools:text="Use current tab" />
</LinearLayout>
</LinearLayout>