Fix to show APN prefs correctly
Test: Settings -> Advanced -> Access Point Names Change-Id: Ia3ad443ac056a877abd6cd258c2219d8ee6ff181 Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
android:background="?android:attr/selectableItemBackground">
|
android:background="?android:attr/selectableItemBackground">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title"
|
android:id="@android:id/title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceListItem" />
|
android:textAppearance="?android:attr/textAppearanceListItem" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/summary"
|
android:id="@android:id/summary"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@android:id/title"
|
android:layout_below="@android:id/title"
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import com.android.messaging.R;
|
import com.android.messaging.R;
|
||||||
import com.android.messaging.datamodel.data.ParticipantData;
|
import com.android.messaging.datamodel.data.ParticipantData;
|
||||||
@@ -81,7 +80,7 @@ public class ApnPreference extends Preference implements
|
|||||||
} else {
|
} else {
|
||||||
rb.setVisibility(View.GONE);
|
rb.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
setApnRadioButtonContentDescription(rb);
|
rb.setContentDescription(getTitle());
|
||||||
}
|
}
|
||||||
|
|
||||||
View textLayout = view.findViewById(R.id.text_layout);
|
View textLayout = view.findViewById(R.id.text_layout);
|
||||||
@@ -92,13 +91,6 @@ public class ApnPreference extends Preference implements
|
|||||||
return view;
|
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() {
|
public boolean isChecked() {
|
||||||
return getKey().equals(mSelectedKey);
|
return getKey().equals(mSelectedKey);
|
||||||
}
|
}
|
||||||
@@ -128,7 +120,7 @@ public class ApnPreference extends Preference implements
|
|||||||
mCurrentChecked = null;
|
mCurrentChecked = null;
|
||||||
mSelectedKey = null;
|
mSelectedKey = null;
|
||||||
}
|
}
|
||||||
setApnRadioButtonContentDescription(buttonView);
|
buttonView.setContentDescription(getTitle());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick(android.view.View v) {
|
public void onClick(android.view.View v) {
|
||||||
|
|||||||
Reference in New Issue
Block a user