Fix to show APN prefs correctly am: 14853cb490
Change-Id: Ife9a0aa4272d91766b146d241fec43184e59862f
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:id="@android:id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="true"
|
||||
@@ -46,7 +46,7 @@
|
||||
android:textAppearance="?android:attr/textAppearanceListItem" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/summary"
|
||||
android:id="@android:id/summary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@android:id/title"
|
||||
|
||||
@@ -26,7 +26,6 @@ import android.view.ViewGroup;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.android.messaging.R;
|
||||
import com.android.messaging.datamodel.data.ParticipantData;
|
||||
@@ -81,7 +80,7 @@ public class ApnPreference extends Preference implements
|
||||
} else {
|
||||
rb.setVisibility(View.GONE);
|
||||
}
|
||||
setApnRadioButtonContentDescription(rb);
|
||||
rb.setContentDescription(getTitle());
|
||||
}
|
||||
|
||||
View textLayout = view.findViewById(R.id.text_layout);
|
||||
@@ -92,13 +91,6 @@ public class ApnPreference extends Preference implements
|
||||
return view;
|
||||
}
|
||||
|
||||
public void setApnRadioButtonContentDescription(final CompoundButton buttonView) {
|
||||
final View widget = (View) buttonView.getParent();
|
||||
final TextView tv = (TextView) widget.findViewById(R.id.title);
|
||||
final String apnTitle = tv.getText().toString();
|
||||
buttonView.setContentDescription(apnTitle);
|
||||
}
|
||||
|
||||
public boolean isChecked() {
|
||||
return getKey().equals(mSelectedKey);
|
||||
}
|
||||
@@ -128,7 +120,7 @@ public class ApnPreference extends Preference implements
|
||||
mCurrentChecked = null;
|
||||
mSelectedKey = null;
|
||||
}
|
||||
setApnRadioButtonContentDescription(buttonView);
|
||||
buttonView.setContentDescription(getTitle());
|
||||
}
|
||||
|
||||
public void onClick(android.view.View v) {
|
||||
|
||||
Reference in New Issue
Block a user