summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaesu Lee <taesu82.lee@samsung.com>2020-05-04 18:15:52 +0900
committerMichael Bestas <mkbestas@lineageos.org>2020-05-24 20:13:50 +0300
commitf730ce2f857a0fd32052183e7e01a744a2f1084f (patch)
tree5219266f9e7d2f08b84e84300514e6e9cb1611f6
parent446e3a722ba650593a81ab65d7849b5214c9db0f (diff)
downloadpackages_apps_Messaging-f730ce2f857a0fd32052183e7e01a744a2f1084f.tar.gz
packages_apps_Messaging-f730ce2f857a0fd32052183e7e01a744a2f1084f.tar.bz2
packages_apps_Messaging-f730ce2f857a0fd32052183e7e01a744a2f1084f.zip
Fix to show APN prefs correctly
Test: Settings -> Advanced -> Access Point Names Change-Id: Ia3ad443ac056a877abd6cd258c2219d8ee6ff181 Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
-rw-r--r--res/layout/apn_preference_layout.xml4
-rw-r--r--src/com/android/messaging/ui/appsettings/ApnPreference.java12
2 files changed, 4 insertions, 12 deletions
diff --git a/res/layout/apn_preference_layout.xml b/res/layout/apn_preference_layout.xml
index 8b864f6..12693d4 100644
--- a/res/layout/apn_preference_layout.xml
+++ b/res/layout/apn_preference_layout.xml
@@ -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"
diff --git a/src/com/android/messaging/ui/appsettings/ApnPreference.java b/src/com/android/messaging/ui/appsettings/ApnPreference.java
index c5cc85a..64358eb 100644
--- a/src/com/android/messaging/ui/appsettings/ApnPreference.java
+++ b/src/com/android/messaging/ui/appsettings/ApnPreference.java
@@ -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) {